From e684c2b3a002fb5254725307c81e2942bb1d80ac Mon Sep 17 00:00:00 2001 From: GU Yiling Date: Sat, 1 Feb 2020 18:31:46 +0800 Subject: [PATCH 1/5] feat: add attribute coercion behavior change rfc --- active-rfcs/0000-attribute-coercion-behavior | 146 +++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 active-rfcs/0000-attribute-coercion-behavior diff --git a/active-rfcs/0000-attribute-coercion-behavior b/active-rfcs/0000-attribute-coercion-behavior new file mode 100644 index 00000000..20814c24 --- /dev/null +++ b/active-rfcs/0000-attribute-coercion-behavior @@ -0,0 +1,146 @@ +- Start Date: 2020-01-30 +- Target Major Version: 3.x +- Reference Issues: [#8731](https://github.com/vuejs/vue/issues/8731) [#8735](https://github.com/vuejs/vue/pull/8735) [#9397](https://github.com/vuejs/vue/issues/9397) [#11053](https://github.com/vuejs/vue/issues/11053) +- Implementation PR: + +# Summary + +- Drop the internal concept of enumerated attributes and treat those attributes the same as normal non-boolean attributes. +- No longer removes attribute if value is boolean `false`. Instead, it's set as `attr="false"` instead. To remove the attribute, use `null` or `undefined`. + +# Motivation + +In 2.x, we have the following strategies for coercing `v-bind` values: + +- For some attribute/element pairs, Vue is always using the corresponding IDL attribute (property): [like `value` of ``, `