提交 a25f90ad 编写于 作者: fxy060608's avatar fxy060608

fix(mp): v-model support dynamic add reactive properties

上级 1fd9e9d2
......@@ -4087,10 +4087,10 @@ function updateChildComponent (
// keep a copy of raw propsData
vm.$options.propsData = propsData;
}
// fixed by xxxxxx update properties(mp runtime)
vm._$updateProperties && vm._$updateProperties(vm);
// update listeners
listeners = listeners || emptyObject;
var oldListeners = vm.$options._parentListeners;
......@@ -4621,7 +4621,7 @@ function initProps (vm, propsOptions) {
}
//fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
if(
key === 'value' &&
key === 'value' &&
Array.isArray(vm.$options.behaviors) &&
vm.$options.behaviors.indexOf('uni://form-field') !== -1
){
......@@ -4633,7 +4633,7 @@ function initProps (vm, propsOptions) {
var $parent = vm.$parent;
while($parent){
if($parent.__next_tick_pending){
return
return
}
$parent = $parent.$parent;
}
......@@ -4965,10 +4965,10 @@ function initMixin (Vue) {
initEvents(vm);
initRender(vm);
callHook(vm, 'beforeCreate');
!vm._$fallback && initInjections(vm); // resolve injections before data/props
!vm._$fallback && initInjections(vm); // resolve injections before data/props
initState(vm);
!vm._$fallback && initProvide(vm); // resolve provide after data/props
!vm._$fallback && callHook(vm, 'created');
!vm._$fallback && callHook(vm, 'created');
/* istanbul ignore if */
if (process.env.NODE_ENV !== 'production' && config.performance && mark) {
......@@ -5694,7 +5694,7 @@ function mountComponent$1(
}
}
}
!vm._$fallback && callHook(vm, 'beforeMount');
var updateComponent = function () {
......@@ -5893,14 +5893,16 @@ function internalMixin(Vue) {
if (!target) {
target = this;
}
target[key] = value;
// 解决动态属性添加
Vue.set(target, key, value)
};
Vue.prototype.__set_sync = function(target, key, value) {
if (!target) {
target = this;
}
target[key] = value;
// 解决动态属性添加
Vue.set(target, key, value)
};
Vue.prototype.__get_orig = function(item) {
......@@ -6033,7 +6035,7 @@ Vue.prototype.__patch__ = patch;
// public mount method
Vue.prototype.$mount = function(
el ,
hydrating
hydrating
) {
return mountComponent$1(this, el, hydrating)
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册