温华
温华
找到一部分原因是因为import ActionSheet, { ActionSheetTheme } from 'tdesign-miniprogram/action-sheet/index';这个的引入未找到导致的
是因为我在tabBar中使用的原因吗,因为我看在 ```javascript handleAction() { let that =this ActionSheet.show({ theme: ActionSheetTheme.Grid, selector: "#t-action-sheet", context: that, items: [ { label: "我要出售", icon: "money" }, { label: "定金找车", icon: "cart" }, ], });...
我认为这确实是一个兼容性问题,我在按照官方文档的代码进行书写的情况下依然会出现这样的问题,但是我在pages目录下进行使用并没有此问题的发生。但是只要在tabBar中进行引入` import ActionSheet, { ActionSheetTheme } from 'tdesign-miniprogram/action-sheet/index';`便会报错 ```javascript { "dependencies": { "tdesign-miniprogram": "^1.2.4" } } // 以上是我的版本号 ```
D:\WeChatProject\Shop\custom-tab-bar 代码: ```javascript {{item.label}} import ActionSheet, { ActionSheetTheme } from 'tdesign-miniprogram/action-sheet/index'; handleAction() { ActionSheet.show({ theme: ActionSheetTheme.List, selector: '#t-action-sheet', context: this, items: [ { label: '选项一', }, { label: '选项二', },...