Skip to content

Commit 83fa0b0

Browse files
docs: ✏️ 文档中增加解释导入方式的faq
1 parent e173543 commit 83fa0b0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/guide/common-problems.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,21 @@ uni-app 3.99.2023122704 将支付宝小程序的`styleIsolation`默认值设置
179179
}
180180
```
181181

182+
## 为什么组件库文档中都是从`@/uni_modules/wot-design-uni`导入方法和工具类?
183+
当前组件库本身的开发方式是将组件库代码放到`@/uni_modules/wot-design-uni`这个目录的,所以文档中都是从`@/uni_modules/wot-design-uni`导入方法和工具类,使用`npm`方式安装组件库的时候可以这样调整:
184+
```ts
185+
// useToast、useNotify等同理
186+
import { useMessage } from '@/uni_modules/wot-design-uni'
187+
188+
```
189+
替换为
190+
191+
```ts
192+
import { useMessage } from 'wot-design-uni'
193+
194+
```
195+
196+
182197
## 如何快速解决你的问题?
183198

184199
[提问的智慧](https://lug.ustc.edu.cn/wiki/doc/smart-questions/),可以帮助你快速提出正确的问题,获得更快的解答。

0 commit comments

Comments
 (0)