Skip to content

Commit 06c1a44

Browse files
authored
feat(uni): export global types (#4301)
* feat(uni): export global types * chore: add 4290 pr log * docs: update doc
1 parent fb9bcce commit 06c1a44

File tree

5 files changed

+31
-2
lines changed

5 files changed

+31
-2
lines changed

packages/tdesign-uniapp-chat/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
"vue"
1414
],
1515
"typings": "./dist/types/index.d.ts",
16+
"types": "./dist/types/index.d.ts",
1617
"exports": {
1718
"./*": "./dist/*",
19+
"./global": "./global.d.ts",
1820
"./attachments/attachments.vue": {
1921
"types": "./dist/types/attachments.d.ts",
2022
"import": "./dist/attachments/attachments.vue",

packages/tdesign-uniapp-chat/site/docs/getting-started.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,16 @@ import TChatList from '@tdesign/uniapp-chat/chat-list/chat-list.vue';
7171

7272
安装注册 TDesign 之后,在开发项目时,可以配合插件在VSCode等主流编辑器中达到提示组件名及API的效果。
7373

74-
推荐安装 `Volar`,并在项目的 `tsconfig.json``includes` 属性中增加 `node_modules/@tdesign/uniapp-chat/global.d.ts`,即可实现该效果。
74+
推荐安装 [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (之前是 Volar),并在项目的 `tsconfig.json``compilerOptions.types` 属性中增加 `@tdesign/uniapp-chat/global`,即可实现提示效果。
75+
76+
```json
77+
{
78+
"compilerOptions": {
79+
"types": [
80+
"@tdesign/uniapp-chat/global",
81+
]
82+
}
83+
}
7584

7685
## 平台兼容性
7786

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
pr_number: 4290
3+
contributor: liweijie0812
4+
---
5+
6+
- feat(Theme): 修复 index.css 尺寸值错误的问题 @liweijie0812 ([#4290](https://github.com/Tencent/tdesign-miniprogram/pull/4290))

packages/tdesign-uniapp/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@
3232
"registry": "https://registry.npmjs.org/"
3333
},
3434
"typings": "./dist/types/index.d.ts",
35+
"types": "./dist/types/index.d.ts",
3536
"exports": {
3637
"./*": "./dist/*",
38+
"./global": "./global.d.ts",
3739
"./action-sheet/action-sheet.vue": {
3840
"types": "./dist/types/action-sheet.d.ts",
3941
"import": "./dist/action-sheet/action-sheet.vue",

packages/tdesign-uniapp/site/docs/getting-started.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,17 @@ export default defineConfig({
126126

127127
安装注册 TDesign 之后,在开发项目时,可以配合插件在VSCode等主流编辑器中达到提示组件名及API的效果。
128128

129-
推荐安装 `Volar`,并在项目的 `tsconfig.json``includes` 属性中增加 `node_modules/@tdesign/uniapp/global.d.ts`,即可实现该效果。
129+
推荐安装 [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (之前是 Volar),并在项目的 `tsconfig.json``compilerOptions.types` 属性中增加 `@tdesign/uniapp/global`,即可实现提示效果。
130+
131+
```json
132+
{
133+
"compilerOptions": {
134+
"types": [
135+
"@tdesign/uniapp/global",
136+
]
137+
}
138+
}
139+
```
130140

131141
## 平台兼容性
132142

0 commit comments

Comments
 (0)