mand-mobile icon indicating copy to clipboard operation
mand-mobile copied to clipboard

[bug-report] 项目启用自定义主题后,在使用了带有popup相关的组件会报错

Open emorywang opened this issue 2 years ago • 3 comments

Mand Mobile Version

2.6.0

Vue Version

2.6.12

Model / OS & Browser Info

Chrome

Node Version, Package Management Tool

node 16.17.0/npm 8.15.0

Recurring Steps

项目启用了自定义主题(customize theme),在页面中使用picker、popup、Selector等组件时,进入该页面时控制台会报错,同时这些组件的title、确认按钮、取消按钮都不可见/不可用。

Expectant Behaviors

这些组件可以表现异常

Actual Behaviors

这些组件的title、确认按钮、取消按钮都不可见/不可用。


通过报错信息经过排查,这些组件因为都有import node_modules/mand-mobile/components/popup-title-bar/title-bar.vue文件,其中的第六行...{large: !!describe, 'large-radius': largeRadius}报错,删掉...可不报错,但不知道是否有其他未知异常

emorywang avatar Sep 26 '22 01:09 emorywang

报错信息如下请参考:

[Vue warn]: Error in render: "TypeError: Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method."
found in
---> <MdPopupTitleBar> at node_modules/mand-mobile/components/popup-title-bar/index.vue
       <MdPopup> at node_modules/mand-mobile/components/popup/index.vue
         <MdPicker> at node_modules/mand-mobile/components/picker/index.vue
           <MdDatePicker> at node_modules/mand-mobile/components/date-picker/index.vue
             <Open> at src/view/perio/Open.vue
               <App> at src/App.vue
                 <Root>

emorywang avatar Sep 26 '22 01:09 emorywang

同问

jzh12345 avatar Nov 23 '22 09:11 jzh12345

+1 但是我这边试是vue2.6.14以上才会出现这个问题

verynong avatar Feb 27 '23 08:02 verynong