@tdesign/uniapp 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +43 -34
  3. package/dist/action-sheet/README.md +8 -3
  4. package/dist/avatar/README.md +3 -1
  5. package/dist/back-top/README.md +3 -1
  6. package/dist/badge/README.md +3 -1
  7. package/dist/button/README.md +3 -1
  8. package/dist/calendar/README.md +3 -1
  9. package/dist/cascader/README.md +3 -1
  10. package/dist/cell/README.md +3 -1
  11. package/dist/checkbox/README.md +3 -1
  12. package/dist/col/README.md +3 -1
  13. package/dist/collapse/README.md +3 -1
  14. package/dist/color-picker/README.md +3 -1
  15. package/dist/common/common.ts +121 -5
  16. package/dist/common/src/index.js +0 -1
  17. package/dist/common/validator.ts +496 -0
  18. package/dist/config-provider/README.md +3 -1
  19. package/dist/count-down/README.md +3 -1
  20. package/dist/date-time-picker/README.md +3 -1
  21. package/dist/dialog/README.md +3 -1
  22. package/dist/divider/README.md +3 -1
  23. package/dist/drawer/README.md +3 -1
  24. package/dist/dropdown-menu/README.md +2 -2
  25. package/dist/empty/README.md +3 -1
  26. package/dist/fab/README.md +3 -1
  27. package/dist/footer/README.md +3 -1
  28. package/dist/form/README.en-US.md +2 -2
  29. package/dist/form/README.md +5 -3
  30. package/dist/form/form.vue +1 -1
  31. package/dist/form/type.ts +3 -3
  32. package/dist/form-item/form-item.css +4 -0
  33. package/dist/form-item/form-item.vue +2 -3
  34. package/dist/form-item/type.ts +2 -2
  35. package/dist/grid/README.md +3 -1
  36. package/dist/guide/README.md +3 -1
  37. package/dist/icon/README.md +10 -7
  38. package/dist/icon/icon.css +1633 -1624
  39. package/dist/image/README.md +3 -1
  40. package/dist/image-viewer/README.md +3 -1
  41. package/dist/index.js +13 -0
  42. package/dist/indexes/README.md +3 -1
  43. package/dist/input/README.md +3 -1
  44. package/dist/input/input.vue +1 -27
  45. package/dist/link/README.md +3 -1
  46. package/dist/loading/README.md +3 -1
  47. package/dist/message/README.md +8 -3
  48. package/dist/mixins/page-scroll.d.ts +19 -0
  49. package/dist/mixins/skyline.js +1 -1
  50. package/dist/navbar/README.md +3 -1
  51. package/dist/notice-bar/README.md +3 -1
  52. package/dist/overlay/README.md +3 -1
  53. package/dist/picker/README.md +3 -1
  54. package/dist/popover/README.md +3 -1
  55. package/dist/popup/README.md +3 -1
  56. package/dist/progress/README.md +2 -2
  57. package/dist/pull-down-refresh/README.md +3 -1
  58. package/dist/qrcode/README.md +3 -1
  59. package/dist/radio/README.md +3 -1
  60. package/dist/rate/README.md +3 -1
  61. package/dist/rate/rate.css +1 -0
  62. package/dist/result/README.md +3 -1
  63. package/dist/script/postinstall.js +49 -24
  64. package/dist/search/README.md +3 -1
  65. package/dist/side-bar/README.md +3 -1
  66. package/dist/skeleton/README.md +3 -1
  67. package/dist/slider/README.md +3 -1
  68. package/dist/stepper/README.md +3 -1
  69. package/dist/steps/README.md +3 -1
  70. package/dist/sticky/README.md +3 -1
  71. package/dist/swipe-cell/README.md +3 -1
  72. package/dist/swiper/README.md +3 -1
  73. package/dist/switch/README.md +3 -1
  74. package/dist/tab-bar/README.md +3 -1
  75. package/dist/tabs/README.md +3 -1
  76. package/dist/tag/README.md +3 -1
  77. package/dist/textarea/README.md +3 -1
  78. package/dist/textarea/textarea.vue +1 -25
  79. package/dist/theme.css +467 -0
  80. package/dist/theme.css.d.ts +2 -0
  81. package/dist/theme.less +1 -0
  82. package/dist/theme.less.d.ts +2 -0
  83. package/dist/toast/README.md +3 -1
  84. package/dist/transition/README.md +4 -6
  85. package/dist/tree-select/README.md +3 -1
  86. package/dist/types/index.d.ts +15 -0
  87. package/dist/upload/README.md +3 -1
  88. package/dist/watermark/README.md +3 -1
  89. package/package.json +37 -3
  90. package/dist/common/src/superComponent.js +0 -5
  91. package/dist/common/validator.js +0 -210
@@ -9,7 +9,9 @@ isComponent: true
9
9
 
10
10
  ## 引入
11
11
 
12
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
12
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-image />`。详细配置请参考 [快速开始](../getting-started)。
13
+
14
+ 如需手动引入:
13
15
 
14
16
  ```js
15
17
  import TImage from '@tdesign/uniapp/image/image.vue';
@@ -9,7 +9,9 @@ isComponent: true
9
9
 
10
10
  ## 引入
11
11
 
12
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
12
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-image-viewer />`。详细配置请参考 [快速开始](../getting-started)。
13
+
14
+ 如需手动引入:
13
15
 
14
16
  ```js
15
17
  import TImageViewer from '@tdesign/uniapp/image-viewer/image-viewer.vue';
package/dist/index.js CHANGED
@@ -1,3 +1,16 @@
1
1
  // This file is intentionally empty.
2
2
  // It serves as the runtime entry point for module resolvers.
3
3
  // All meaningful exports from this package are type-only.
4
+
5
+ // mixins
6
+ export { handlePageScroll } from './mixins/page-scroll';
7
+
8
+ // 函数式调用
9
+ export { default as DialogPlugin } from './dialog/index';
10
+ export { default as Dialog } from './dialog/index';
11
+ export { default as MessagePlugin } from './message/index';
12
+ export { default as Message } from './message/index';
13
+ export { default as Toast, showToast, hideToast } from './toast/index';
14
+ export { default as ToastPlugin } from './toast/index';
15
+ export { default as ActionSheetPlugin, ActionSheetTheme } from './action-sheet/index';
16
+ export { default as ActionSheet } from './action-sheet/index';
@@ -7,7 +7,9 @@ isComponent: true
7
7
 
8
8
  ## 引入
9
9
 
10
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
10
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-indexes />`。详细配置请参考 [快速开始](../getting-started)。
11
+
12
+ 如需手动引入:
11
13
 
12
14
  ```js
13
15
  import TIndexes from '@tdesign/uniapp/indexes/indexes.vue';
@@ -9,7 +9,9 @@ isComponent: true
9
9
 
10
10
  ## 引入
11
11
 
12
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
12
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-input />`。详细配置请参考 [快速开始](../getting-started)。
13
+
14
+ 如需手动引入:
13
15
 
14
16
  ```js
15
17
  import TInput from '@tdesign/uniapp/input/input.vue';
@@ -151,7 +151,7 @@ import { getCharacterLength, calcIcon, coalesce, nextTick } from '../common/util
151
151
  import { isDef } from '../common/validator';
152
152
  import { getInputClass } from './computed.js';
153
153
  import tools from '../common/utils.wxs';
154
- import { RELATION_MAP } from '../common/relation/parent-map.js';
154
+ import { RELATION_MAP } from '../common/relation/parent-map';
155
155
 
156
156
 
157
157
  const name = `${prefix}-input`;
@@ -205,9 +205,6 @@ export default {
205
205
  tools,
206
206
 
207
207
  dataValue: coalesce(this.value, this.defaultValue),
208
-
209
- // rawValue: '',
210
- // innerMaxLen: -1,
211
208
  };
212
209
  },
213
210
  watch: {
@@ -282,30 +279,7 @@ export default {
282
279
  this.dataValue = value;
283
280
  this.count = isDef(value) ? String(value).length : 0;
284
281
  }
285
-
286
- // this.updateInnerMaxLen();
287
282
  },
288
- // updateInnerMaxLen() {
289
- // this.innerMaxLen = this.getInnerMaxLen();
290
- // },
291
- // getInnerMaxLen() {
292
- // const {
293
- // allowInputOverMax,
294
- // maxcharacter,
295
- // maxlength,
296
- // dataValue,
297
- // rawValue,
298
- // count,
299
- // } = this;
300
- // return getInnerMaxLen({
301
- // allowInputOverMax,
302
- // maxcharacter,
303
- // maxlength,
304
- // dataValue,
305
- // rawValue,
306
- // count,
307
- // });
308
- // },
309
283
 
310
284
  updateClearIconVisible(value = false) {
311
285
  const { clearTrigger, disabled, readonly } = this;
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-link />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TLink from '@tdesign/uniapp/link/link.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-loading />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
 
14
16
  ```js
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-message />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TMessage from '@tdesign/uniapp/message/message.vue';
@@ -16,10 +18,13 @@ import TMessage from '@tdesign/uniapp/message/message.vue';
16
18
 
17
19
  ### 引入 API
18
20
 
19
- 若以 API 形式调用 Message,则需在页面 `page.js` 中引入组件 API:
21
+ 若以 API 形式调用 Message,则需在页面中引入组件 API:
20
22
 
21
23
  ```js
22
- import Message from '@tdesign/uniapp/message/index';
24
+ // MessagePlugin 和 Message 均可使用
25
+ import { MessagePlugin } from '@tdesign/uniapp';
26
+ // 或
27
+ // import { Message } from '@tdesign/uniapp';
23
28
  ```
24
29
 
25
30
  ### 组件类型
@@ -0,0 +1,19 @@
1
+ interface Bus {
2
+ on(evtName: string, listener: (...args: any[]) => void): void;
3
+ once(evtName: string, listener: (...args: any[]) => void): void;
4
+ emit(evtName: string, ...args: any[]): void;
5
+ off(evtName: string, listener?: (...args: any[]) => void): void;
6
+ }
7
+
8
+ export declare const bus: Bus;
9
+ export declare const PAGE_SCROLL_EVENT_NAME: string;
10
+
11
+ declare function pageScrollMixin(
12
+ funcName?: string,
13
+ useBus?: boolean,
14
+ ): Record<string, any>;
15
+
16
+ export default pageScrollMixin;
17
+
18
+ export declare function getScroller(el: Element, root?: Window): Element | Window;
19
+ export declare function handlePageScroll(e: any): Bus;
@@ -1,4 +1,4 @@
1
- import { getCurrentPage } from '../common/utils.js';
1
+ import { getCurrentPage } from '../common/utils';
2
2
 
3
3
  export default {
4
4
  data() {
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-navbar />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TNavbar from '@tdesign/uniapp/navbar/navbar.vue';
@@ -9,7 +9,9 @@ isComponent: true
9
9
 
10
10
  ## 引入
11
11
 
12
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
12
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-notice-bar />`。详细配置请参考 [快速开始](../getting-started)。
13
+
14
+ 如需手动引入:
13
15
 
14
16
  ```js
15
17
  import TNoticeBar from '@tdesign/uniapp/notice-bar/notice-bar.vue';
@@ -9,7 +9,9 @@ isComponent: true
9
9
 
10
10
  ## 引入
11
11
 
12
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
12
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-overlay />`。详细配置请参考 [快速开始](../getting-started)。
13
+
14
+ 如需手动引入:
13
15
 
14
16
  ```js
15
17
  import TOverlay from '@tdesign/uniapp/overlay/overlay.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-picker />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TPicker from '@tdesign/uniapp/picker/picker.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-popover />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TPopover from '@tdesign/uniapp/popover/popover.vue';
@@ -9,7 +9,9 @@ isComponent: true
9
9
 
10
10
  ## 引入
11
11
 
12
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
12
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-popup />`。详细配置请参考 [快速开始](../getting-started)。
13
+
14
+ 如需手动引入:
13
15
 
14
16
  ```js
15
17
  import TPopup from '@tdesign/uniapp/popup/popup.vue';
@@ -9,9 +9,9 @@ isComponent: true
9
9
 
10
10
  ## 引入
11
11
 
12
- ### 引入组件
12
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-progress />`。详细配置请参考 [快速开始](../getting-started)。
13
13
 
14
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
14
+ 如需手动引入:
15
15
 
16
16
  ```js
17
17
  import TProgress from '@tdesign/uniapp/progress/progress.vue';
@@ -9,7 +9,9 @@ isComponent: true
9
9
 
10
10
  ## 引入
11
11
 
12
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
12
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-pull-down-refresh />`。详细配置请参考 [快速开始](../getting-started)。
13
+
14
+ 如需手动引入:
13
15
 
14
16
  ```js
15
17
  import TPullDownRefresh from '@tdesign/uniapp/pull-down-refresh/pull-down-refresh.vue';
@@ -7,7 +7,9 @@ isComponent: true
7
7
 
8
8
  ## 引入
9
9
 
10
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
10
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-qrcode />`。详细配置请参考 [快速开始](../getting-started)。
11
+
12
+ 如需手动引入:
11
13
 
12
14
  ```js
13
15
  import TQRCode from '@tdesign/uniapp/qrcode/qrcode.vue';
@@ -9,7 +9,9 @@ isComponent: true
9
9
 
10
10
  ## 引入
11
11
 
12
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
12
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-radio />`。详细配置请参考 [快速开始](../getting-started)。
13
+
14
+ 如需手动引入:
13
15
 
14
16
  ```js
15
17
  import TRadio from '@tdesign/uniapp/radio/radio.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-rate />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TRate from '@tdesign/uniapp/rate/rate.vue';
@@ -60,6 +60,7 @@
60
60
  box-shadow: var(--td-shadow-1, 0 1px 10px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.12));
61
61
  background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
62
62
  transform: translateX(-50%);
63
+ z-index: 2;
63
64
  }
64
65
  .t-rate__tips--bottom {
65
66
  top: calc(100% + 16rpx);
@@ -9,7 +9,9 @@ isComponent: true
9
9
 
10
10
  ## 引入
11
11
 
12
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
12
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-result />`。详细配置请参考 [快速开始](../getting-started)。
13
+
14
+ 如需手动引入:
13
15
 
14
16
  ```js
15
17
  import TResult from '@tdesign/uniapp/result/result.vue';
@@ -2,43 +2,68 @@ const fs = require('fs');
2
2
  const path = require('path');
3
3
 
4
4
 
5
- function switchVersion(version) {
6
- const pkg = require('../package.json');
7
- if (version != 2) {
8
- return;
5
+ function printVue2PostCSSWarning() {
6
+ console.warn('\n');
7
+ console.warn('⚠️ [TDesign UniApp] 检测到当前使用 Vue2 环境');
8
+ console.warn(' Vue2 项目需要在 postcss.config.js 中进行适配,否则样式可能无法正常工作。');
9
+ console.warn('');
10
+ console.warn(' 📖 适配指南: https://juejin.cn/post/7602901195154030644');
11
+ console.warn(' 📦 Vue2 CLI 参考项目: https://github.com/TDesignOteam/tdesign-uniapp-starter-vue2-cli');
12
+ console.warn('\n');
13
+ }
14
+
15
+
16
+ /**
17
+ * 多重检测 Vue 版本,提升准确性
18
+ * 优先级:环境变量 > require('vue') > 用户项目 package.json
19
+ */
20
+ function detectVueVersion() {
21
+ // 1. 环境变量优先
22
+ if (process.env.npm_config_vueVersion) {
23
+ return process.env.npm_config_vueVersion;
9
24
  }
10
25
 
11
- delete pkg.exports;
26
+ // 2. 尝试直接 require vue
27
+ try {
28
+ const Vue = require('vue');
29
+ if (Vue && Vue.version) return Vue.version;
30
+ } catch (e) {}
12
31
 
13
- const pkgStr = JSON.stringify(pkg, null, 2);
32
+ // 3. 读用户项目的 package.json 中的 vue 版本声明
33
+ try {
34
+ const userPkgPath = path.resolve(process.cwd(), 'package.json');
35
+ const userPkg = JSON.parse(fs.readFileSync(userPkgPath, 'utf-8'));
36
+ const vueDep = (userPkg.dependencies && userPkg.dependencies.vue)
37
+ || (userPkg.devDependencies && userPkg.devDependencies.vue);
38
+ if (vueDep) return vueDep;
39
+ } catch (e) {}
14
40
 
15
- fs.writeFileSync(path.resolve(__dirname, '../package.json'), pkgStr, 'utf-8');
41
+ return null;
16
42
  }
17
43
 
18
-
19
- function loadModule(name) {
20
- try {
21
- return require(name);
22
- } catch (e) {
23
- return undefined;
24
- }
44
+ function isVue2(version) {
45
+ if (!version || typeof version !== 'string') return false;
46
+ // 匹配 "2.x"、"^2.x"、"~2.x"、">=2.x" 等
47
+ return /(?:^|[~^>=\s])2\./.test(version);
25
48
  }
26
49
 
27
- const Vue = loadModule('vue');
50
+ function isVue3(version) {
51
+ if (!version || typeof version !== 'string') return false;
52
+ return /(?:^|[~^>=\s])3\./.test(version);
53
+ }
28
54
 
29
55
  function main() {
30
- const version = process.env.npm_config_vueVersion || (Vue ? Vue.version : '2.7.');
31
- if (!Vue || typeof version !== 'string') {
32
- console.warn('Vue is not found. Please run "npm install vue" to install.');
56
+ const version = detectVueVersion();
57
+
58
+ if (!version) {
59
+ console.warn('[TDesign UniApp] Vue is not found. Please run "npm install vue" to install.');
33
60
  return;
34
61
  }
35
62
 
36
- if (version.startsWith('2.')) {
37
- switchVersion(2);
38
- } else if (version.startsWith('3.')) {
39
- switchVersion(3);
40
- } else {
41
- console.warn(`Vue version v${version} is not supported.`);
63
+ if (isVue2(version)) {
64
+ printVue2PostCSSWarning();
65
+ } else if (!isVue3(version)) {
66
+ console.warn(`[TDesign UniApp] Vue version ${version} is not supported.`);
42
67
  }
43
68
  }
44
69
 
@@ -9,7 +9,9 @@ isComponent: true
9
9
 
10
10
  ## 引入
11
11
 
12
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
12
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-search />`。详细配置请参考 [快速开始](../getting-started)。
13
+
14
+ 如需手动引入:
13
15
 
14
16
  ```js
15
17
  import TSearch from '@tdesign/uniapp/search/search.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-side-bar />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TSideBar from '@tdesign/uniapp/side-bar/side-bar.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-skeleton />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TSkeleton from '@tdesign/uniapp/skeleton/skeleton.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-slider />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TSlider from '@tdesign/uniapp/slider/slider.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-stepper />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TStepper from '@tdesign/uniapp/stepper/stepper.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-steps />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TSteps from '@tdesign/uniapp/steps/steps.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-sticky />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TSticky from '@tdesign/uniapp/sticky/sticky.vue';
@@ -9,7 +9,9 @@ isComponent: true
9
9
 
10
10
  ## 引入
11
11
 
12
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
12
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-swipe-cell />`。详细配置请参考 [快速开始](../getting-started)。
13
+
14
+ 如需手动引入:
13
15
 
14
16
  ```js
15
17
  import TSwipeCell from '@tdesign/uniapp/swipe-cell/swipe-cell.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-swiper />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TSwiper from '@tdesign/uniapp/swiper/swiper.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-switch />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TSwitch from '@tdesign/uniapp/switch/switch.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-tab-bar />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TTabBar from '@tdesign/uniapp/tab-bar/tab-bar.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-tabs />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TTabs from '@tdesign/uniapp/tabs/tabs.vue';
@@ -8,7 +8,9 @@ isComponent: true
8
8
 
9
9
  ## 引入
10
10
 
11
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
11
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-tag />`。详细配置请参考 [快速开始](../getting-started)。
12
+
13
+ 如需手动引入:
12
14
 
13
15
  ```js
14
16
  import TTag from '@tdesign/uniapp/tag/tag.vue';
@@ -9,7 +9,9 @@ isComponent: true
9
9
 
10
10
  ## 引入
11
11
 
12
- 可在 `main.ts` 或在需要使用的页面或组件中引入。
12
+ 推荐使用 easycom 模式引入组件,配置后无需手动 import 即可直接在模板中使用 `<t-textarea />`。详细配置请参考 [快速开始](../getting-started)。
13
+
14
+ 如需手动引入:
13
15
 
14
16
 
15
17
  ```js