From 5f4233799f4a9ee727452bf563a426586700e07e Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 14 Jan 2019 11:42:18 -0500 Subject: [PATCH 1/8] rfc: draft for new scoped slots syntax --- active-rfcs/0000-new-scoped-slots-syntax.md | 262 ++++++++++++++++++++ 1 file changed, 262 insertions(+) create mode 100644 active-rfcs/0000-new-scoped-slots-syntax.md diff --git a/active-rfcs/0000-new-scoped-slots-syntax.md b/active-rfcs/0000-new-scoped-slots-syntax.md new file mode 100644 index 00000000..86bf8670 --- /dev/null +++ b/active-rfcs/0000-new-scoped-slots-syntax.md @@ -0,0 +1,262 @@ +- Start Date: 2019-01-14 +- Target Major Version: 2.x & 3.x +- Reference Issues: https://github.com/vuejs/vue/issues/7740, https://github.com/vuejs/vue/issues/9180, https://github.com/vuejs/vue/issues/9306 +- Implementation PR: (leave this empty) + +# Summary + +Introducing a new syntax for scoped slots usage: + +- `slot-props` replaces `slot-scope` with slightly different semanticsp; +- Shorthand for `slot-props` that can potentially unify the usage of both scoped and normal slots. + +# Basic example + +Using `slot-props` to declare the props passed to the default slot of ``: + +``` vue + + {{ msg }} + +``` + +Same example, with shorthand (shorthand symbol is tentative): + +``` + + {{ msg }} + +``` + +# Motivation + +When we first introduced scoped slots, it was verbose because it required always using `