Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bootstrap-vue/bootstrap-vue
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dev
Choose a base ref
...
head repository: JavascriptMick/bootstrap-vue
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dev
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 15, 2023

  1. Copy the full SHA
    4137b3b View commit details
Showing with 26 additions and 6 deletions.
  1. +26 −6 src/vue.js
32 changes: 26 additions & 6 deletions src/vue.js
Original file line number Diff line number Diff line change
@@ -33,18 +33,38 @@ if (isVue3) {
const originalVModelDynamicCreated = Vue.vModelDynamic.created
const originalVModelDynamicBeforeUpdate = Vue.vModelDynamic.beforeUpdate

// See https://github.com/vuejs/vue-next/pull/4121 for details
// See https://github.com/vuejs/vue-next/pull/4121 and https://github.com/vuejs/core/pull/8681 for details
Vue.vModelDynamic.created = function(el, binding, vnode) {
originalVModelDynamicCreated.call(this, el, binding, vnode)
if (!el._assign) {
el._assign = () => {}
const assignSymbol = Object.getOwnPropertySymbols(el).find(s => s.description === '_assign')
if (assignSymbol && !el[assignSymbol]) {
el[assignSymbol] = () => {}
}
originalVModelDynamicCreated.call(this, el, binding, vnode)
}
Vue.vModelDynamic.beforeUpdate = function(el, binding, vnode) {
const assignSymbol = Object.getOwnPropertySymbols(el).find(s => s.description === '_assign')
if (assignSymbol && !el[assignSymbol]) {
el[assignSymbol] = () => {}
}
originalVModelDynamicBeforeUpdate.call(this, el, binding, vnode)
if (!el._assign) {
el._assign = () => {}
}

const originalVModelCheckBoxCreated = Vue.vModelCheckbox.created
const originalVModelCheckBoxBeforeUpdate = Vue.vModelCheckbox.beforeUpdate

Vue.vModelCheckbox.created = function(el, binding, vnode) {
const assignSymbol = Object.getOwnPropertySymbols(el).find(s => s.description === '_assign')
if (assignSymbol && !el[assignSymbol]) {
el[assignSymbol] = () => {}
}
originalVModelCheckBoxCreated.call(this, el, binding, vnode)
}
Vue.vModelCheckbox.beforeUpdate = function(el, binding, vnode) {
const assignSymbol = Object.getOwnPropertySymbols(el).find(s => s.description === '_assign')
if (assignSymbol && !el[assignSymbol]) {
el[assignSymbol] = () => {}
}
originalVModelCheckBoxBeforeUpdate.call(this, el, binding, vnode)
}
extend = function patchedBootstrapVueExtend(definition) {
if (typeof definition === 'object' && definition.render && !definition.__alreadyPatched) {