提交 03de6b76 编写于 作者: D Danny

mp-weixin: Fix Component don't inherit props from Vue.extend(). Support externalClasses option.

Fix inheritance issue by using Vue.options instead of Vue.extendOptions.
Add externalClasses to wechat MP component options.
上级 999bf211
...@@ -20,6 +20,7 @@ export default function parseBaseComponent (vueComponentOptions, { ...@@ -20,6 +20,7 @@ export default function parseBaseComponent (vueComponentOptions, {
initRelation initRelation
} = {}) { } = {}) {
let [VueComponent, vueOptions] = initVueComponent(Vue, vueComponentOptions) let [VueComponent, vueOptions] = initVueComponent(Vue, vueComponentOptions)
vueOptions = VueComponent.options || vueOptions
const options = { const options = {
multipleSlots: true, multipleSlots: true,
...@@ -96,6 +97,10 @@ export default function parseBaseComponent (vueComponentOptions, { ...@@ -96,6 +97,10 @@ export default function parseBaseComponent (vueComponentOptions, {
__e: handleEvent __e: handleEvent
} }
} }
// externalClasses
if (vueOptions.externalClasses) {
componentOptions.externalClasses = vueOptions.externalClasses
}
if (Array.isArray(vueOptions.wxsCallMethods)) { if (Array.isArray(vueOptions.wxsCallMethods)) {
vueOptions.wxsCallMethods.forEach(callMethod => { vueOptions.wxsCallMethods.forEach(callMethod => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册