提交 8a2a140e 编写于 作者: Q qiang

fix(vue): $getComponentDescriptor support web component

上级 d9c4ee48
......@@ -6778,11 +6778,13 @@ function updateWxsProps(oldVnode, vnode) {
}
vnode.$wxsWatches[prop] = oldWxsWatches[prop] || vnode.context.$watch(watchProp, function(newVal, oldVal) {
// vue component / web component
var component = vnode.elm.__vue__ || vnode.elm;
wxsProps[prop](
newVal,
oldVal,
context.$getComponentDescriptor(context, true),
vnode.elm.__vue__.$getComponentDescriptor(vnode.elm.__vue__, false)
component.$getComponentDescriptor && component.$getComponentDescriptor(component, false)
);
}, {
immediate: true, // 当 prop 的值被设置 WXS 函数就会触发,而不只是值发生改变,所以在页面初始化的时候会调用一次 WxsPropObserver 的函数
......
......@@ -6808,11 +6808,13 @@ function updateWxsProps(oldVnode, vnode) {
}
vnode.$wxsWatches[prop] = oldWxsWatches[prop] || vnode.context.$watch(watchProp, function(newVal, oldVal) {
// vue component / web component
const component = vnode.elm.__vue__ || vnode.elm;
wxsProps[prop](
newVal,
oldVal,
context.$getComponentDescriptor(context, true),
vnode.elm.__vue__.$getComponentDescriptor(vnode.elm.__vue__, false)
component.$getComponentDescriptor && component.$getComponentDescriptor(component, false)
);
}, {
immediate: true, // 当 prop 的值被设置 WXS 函数就会触发,而不只是值发生改变,所以在页面初始化的时候会调用一次 WxsPropObserver 的函数
......
......@@ -6800,11 +6800,13 @@ function updateWxsProps(oldVnode, vnode) {
}
vnode.$wxsWatches[prop] = oldWxsWatches[prop] || vnode.context.$watch(watchProp, function(newVal, oldVal) {
// vue component / web component
var component = vnode.elm.__vue__ || vnode.elm;
wxsProps[prop](
newVal,
oldVal,
context.$getComponentDescriptor(context, true),
vnode.elm.__vue__.$getComponentDescriptor(vnode.elm.__vue__, false)
component.$getComponentDescriptor && component.$getComponentDescriptor(component, false)
);
}, {
immediate: true, // 当 prop 的值被设置 WXS 函数就会触发,而不只是值发生改变,所以在页面初始化的时候会调用一次 WxsPropObserver 的函数
......
......@@ -6782,11 +6782,13 @@
}
vnode.$wxsWatches[prop] = oldWxsWatches[prop] || vnode.context.$watch(watchProp, function(newVal, oldVal) {
// vue component / web component
var component = vnode.elm.__vue__ || vnode.elm;
wxsProps[prop](
newVal,
oldVal,
context.$getComponentDescriptor(context, true),
vnode.elm.__vue__.$getComponentDescriptor(vnode.elm.__vue__, false)
component.$getComponentDescriptor && component.$getComponentDescriptor(component, false)
);
}, {
immediate: true, // 当 prop 的值被设置 WXS 函数就会触发,而不只是值发生改变,所以在页面初始化的时候会调用一次 WxsPropObserver 的函数
......
......@@ -6767,11 +6767,13 @@ function updateWxsProps(oldVnode, vnode) {
}
vnode.$wxsWatches[prop] = oldWxsWatches[prop] || vnode.context.$watch(watchProp, function(newVal, oldVal) {
// vue component / web component
var component = vnode.elm.__vue__ || vnode.elm;
wxsProps[prop](
newVal,
oldVal,
context.$getComponentDescriptor(context, true),
vnode.elm.__vue__.$getComponentDescriptor(vnode.elm.__vue__, false)
component.$getComponentDescriptor && component.$getComponentDescriptor(component, false)
);
}, {
immediate: true, // 当 prop 的值被设置 WXS 函数就会触发,而不只是值发生改变,所以在页面初始化的时候会调用一次 WxsPropObserver 的函数
......
......@@ -6789,11 +6789,13 @@ function updateWxsProps(oldVnode, vnode) {
}
vnode.$wxsWatches[prop] = oldWxsWatches[prop] || vnode.context.$watch(watchProp, function(newVal, oldVal) {
// vue component / web component
var component = vnode.elm.__vue__ || vnode.elm;
wxsProps[prop](
newVal,
oldVal,
context.$getComponentDescriptor(context, true),
vnode.elm.__vue__.$getComponentDescriptor(vnode.elm.__vue__, false)
component.$getComponentDescriptor && component.$getComponentDescriptor(component, false)
);
}, {
immediate: true, // 当 prop 的值被设置 WXS 函数就会触发,而不只是值发生改变,所以在页面初始化的时候会调用一次 WxsPropObserver 的函数
......
......@@ -6771,11 +6771,13 @@
}
vnode.$wxsWatches[prop] = oldWxsWatches[prop] || vnode.context.$watch(watchProp, function(newVal, oldVal) {
// vue component / web component
var component = vnode.elm.__vue__ || vnode.elm;
wxsProps[prop](
newVal,
oldVal,
context.$getComponentDescriptor(context, true),
vnode.elm.__vue__.$getComponentDescriptor(vnode.elm.__vue__, false)
component.$getComponentDescriptor && component.$getComponentDescriptor(component, false)
);
}, {
immediate: true, // 当 prop 的值被设置 WXS 函数就会触发,而不只是值发生改变,所以在页面初始化的时候会调用一次 WxsPropObserver 的函数
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册