-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(runtime-dom): "el._assign is not a function" in compat mode #4121
Conversation
Hmm, the logic is guarded to be only applied to component vnodes: https://github.com/vuejs/vue-next/blob/4f17be7b1ce4872ded085a36b95c1897d8c1f299/packages/runtime-core/src/compat/componentVModel.ts#L18 I'd love to see a reproduction to make sure we find the right fix. |
@yyx990803 thanks for your response! In order to reproduce it you can clone https://github.com/jaulz/vue-repro and run it via |
@jaulz Your reproduction is way too large, can you boil it down to only Vue and no external libs so we can take a look? (https://new-issue.vuejs.org/?repo=vuejs/vue-next#why-repro) |
While working on migration of bootstrap-vue to @vue/compat I believe I was able to extract minimal possible example: import Vue from "@vue/compat";
const App = {
compatConfig: {
MODE: 3,
COMPONENT_V_MODEL: true,
RENDER_FUNCTION: true
},
render(h) {
return h("input", {
on: {
input() {
console.log("invoked");
}
},
// This comment was in original code (bootstrap-vue):
// Directive needed to get `event.target.composing` set (if needed)
directives: [{ name: "model", value: "foo" }]
});
}
};
Vue.createApp(App).mount("#app"); According to v2 docs - usage of |
❌ Deploy Preview for vuejs-coverage failed.
|
❌ Deploy Preview for vue-next-template-explorer failed.
|
❌ Deploy Preview for vue-sfc-playground failed.
|
In compat mode
el._assign is not a function
is thrown when you bind a model to a radio button becauseonUpdate:modelValue
does not exist in the props. As far as I could see in compat mode it's calledonModelCompat:input
instead:https://github.com/vuejs/vue-next/blob/4f17be7b1ce4872ded085a36b95c1897d8c1f299/packages/runtime-core/src/compat/componentVModel.ts#L38-L40
I created a reproducible repository here:
https://github.com/jaulz/vue-repro