From a2c9a7c93d819134a5b8ce97fc7ca94503c01faf Mon Sep 17 00:00:00 2001 From: jaceechan Date: Thu, 27 Feb 2020 23:03:09 +0800 Subject: [PATCH] Update component-base-parser.js try add more support to mp-weixin component options setting, such as styleIsolation --- .../mp-weixin/runtime/wrapper/component-base-parser.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/platforms/mp-weixin/runtime/wrapper/component-base-parser.js b/src/platforms/mp-weixin/runtime/wrapper/component-base-parser.js index e560022d..6e0668d7 100644 --- a/src/platforms/mp-weixin/runtime/wrapper/component-base-parser.js +++ b/src/platforms/mp-weixin/runtime/wrapper/component-base-parser.js @@ -23,10 +23,11 @@ export default function parseBaseComponent (vueComponentOptions, { const options = { multipleSlots: true, - addGlobalClass: true + addGlobalClass: true, + ...vueOptions.options } - if (__PLATFORM__ === 'mp-weixin' || __PLATFORM__ === 'mp-qq') { + if (__PLATFORM__ === 'mp-weixin' || __PLATFORM__ === 'mp-qq') { // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项 if (vueOptions['mp-weixin'] && vueOptions['mp-weixin']['options']) { Object.assign(options, vueOptions['mp-weixin']['options']) @@ -109,4 +110,4 @@ export default function parseBaseComponent (vueComponentOptions, { return componentOptions } return [componentOptions, VueComponent] -} +} -- GitLab