@opentiny/vue-docs 2.1.8 → 2.1.9

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 (130) hide show
  1. package/demos/mobile/config.js +10 -1
  2. package/demos/mobile/webdoc/changelog.md +38 -0
  3. package/demos/mobile/webdoc/import.md +87 -0
  4. package/demos/mobile/webdoc/introduce.md +23 -0
  5. package/demos/mobile/webdoc/menus.js +112 -0
  6. package/demos/mobile/webdoc/mode.md +23 -0
  7. package/demos/mobile-first/app/action-sheet/webdoc/action-sheet.js +247 -22
  8. package/demos/mobile-first/app/badge/webdoc/badge.js +47 -30
  9. package/demos/mobile-first/app/button/image.vue +1 -1
  10. package/demos/mobile-first/app/button/webdoc/button.js +119 -21
  11. package/demos/mobile-first/app/calendar-bar/webdoc/calendar-bar.js +73 -19
  12. package/demos/mobile-first/app/card/check-type-checkbox.vue +1 -1
  13. package/demos/mobile-first/app/card/webdoc/card.js +217 -47
  14. package/demos/mobile-first/app/carousel/webdoc/carousel.js +68 -41
  15. package/demos/mobile-first/app/cell/webdoc/cell.js +53 -15
  16. package/demos/mobile-first/app/collapse/webdoc/collapse.js +49 -26
  17. package/demos/mobile-first/app/column-list-item/webdoc/column-list-item.js +221 -28
  18. package/demos/mobile-first/app/drawer/webdoc/drawer.js +31 -23
  19. package/demos/mobile-first/app/dropdown/webdoc/dropdown.js +136 -49
  20. package/demos/mobile-first/app/filter/webdoc/filter.js +156 -29
  21. package/demos/mobile-first/app/filter-bar/webdoc/filter-bar.js +69 -8
  22. package/demos/mobile-first/app/form/webdoc/form.js +59 -48
  23. package/demos/mobile-first/app/grid/webdoc/grid.js +7 -7
  24. package/demos/mobile-first/app/popover/webdoc/popover.js +50 -44
  25. package/demos/mobile-first/app/search/webdoc/search.js +63 -25
  26. package/demos/mobile-first/app/standard-list-item/webdoc/standard-list-item.js +172 -16
  27. package/demos/mobile-first/app/steps/webdoc/steps.js +121 -29
  28. package/demos/mobile-first/app/tabbar/webdoc/tabbar.js +56 -41
  29. package/demos/mobile-first/app/tabs/webdoc/tabs.js +63 -52
  30. package/demos/mobile-first/app/tag/webdoc/tag.js +71 -24
  31. package/demos/mobile-first/app/tag-group/webdoc/tag-group.js +63 -14
  32. package/demos/mobile-first/app/time-line/webdoc/time-line.js +59 -22
  33. package/demos/pc/app/alert/{base-composition-api.vue → basic-usage-composition-api.vue} +2 -2
  34. package/demos/pc/app/alert/{base.vue → basic-usage.vue} +2 -2
  35. package/demos/pc/app/alert/custom-close-composition-api.vue +6 -6
  36. package/demos/pc/app/alert/custom-close.vue +4 -3
  37. package/demos/pc/app/alert/icon-composition-api.vue +2 -2
  38. package/demos/pc/app/alert/icon.vue +3 -3
  39. package/demos/pc/app/alert/size.vue +15 -0
  40. package/demos/pc/app/alert/title-composition-api.vue +8 -0
  41. package/demos/pc/app/alert/title.vue +8 -0
  42. package/demos/pc/app/alert/webdoc/alert.js +79 -53
  43. package/demos/pc/app/form/webdoc/form.js +27 -27
  44. package/demos/pc/app/input/clearable.spec.ts +4 -4
  45. package/demos/pc/app/input/counter.spec.ts +3 -2
  46. package/demos/pc/app/input/method-addMemory.spec.ts +1 -1
  47. package/demos/pc/app/input/resize-composition-api.vue +1 -1
  48. package/demos/pc/app/input/resize.vue +1 -1
  49. package/demos/pc/app/input/rows-composition-api.vue +2 -1
  50. package/demos/pc/app/input/rows.vue +2 -1
  51. package/demos/pc/app/input/size.spec.ts +6 -6
  52. package/demos/pc/app/input/validate-event.spec.ts +1 -1
  53. package/demos/pc/app/ip-address/webdoc/ip-address.js +6 -6
  54. package/demos/pc/app/popconfirm/{popper-class-composition-api.vue → custom-class-composition-api.vue} +5 -1
  55. package/demos/pc/app/popconfirm/{popper-class.spec.ts → custom-class.spec.ts} +1 -1
  56. package/demos/pc/app/popconfirm/{popper-class.vue → custom-class.vue} +5 -1
  57. package/demos/pc/app/popconfirm/type-composition-api.vue +15 -1
  58. package/demos/pc/app/popconfirm/type.vue +16 -1
  59. package/demos/pc/app/popconfirm/webdoc/popconfirm.js +99 -61
  60. package/demos/pc/app/popconfirm/width-composition-api.vue +1 -1
  61. package/demos/pc/app/popconfirm/width.spec.ts +1 -1
  62. package/demos/pc/app/popconfirm/width.vue +1 -1
  63. package/demos/pc/app/tabs/tabs-separator-composition-api.vue +60 -0
  64. package/demos/pc/app/tabs/tabs-separator.spec.ts +12 -0
  65. package/demos/pc/app/tabs/tabs-separator.vue +70 -0
  66. package/demos/pc/app/tabs/webdoc/tabs.js +19 -0
  67. package/demos/pc/app/tooltip/basic-usage-composition-api.vue +16 -28
  68. package/demos/pc/app/tooltip/basic-usage.vue +18 -29
  69. package/demos/pc/app/tooltip/content-composition-api.vue +51 -0
  70. package/demos/pc/app/tooltip/content.vue +57 -0
  71. package/demos/pc/app/tooltip/control-composition-api.vue +84 -0
  72. package/demos/pc/app/tooltip/control.vue +93 -0
  73. package/demos/pc/app/tooltip/custom-popper.vue +81 -0
  74. package/demos/pc/app/tooltip/{open-delay-composition-api.vue → delay-composition-api.vue} +3 -0
  75. package/demos/pc/app/tooltip/{open-delay.vue → delay.vue} +4 -1
  76. package/demos/pc/app/tooltip/offset-composition-api.vue +16 -0
  77. package/demos/pc/app/tooltip/offset.vue +25 -0
  78. package/demos/pc/app/tooltip/popper-options-composition-api.vue +7 -5
  79. package/demos/pc/app/tooltip/popper-options.vue +7 -5
  80. package/demos/pc/app/tooltip/{tooltip-theme-composition-api.vue → theme-composition-api.vue} +14 -9
  81. package/demos/pc/app/tooltip/{tooltip-theme.vue → theme.vue} +16 -10
  82. package/demos/pc/app/tooltip/{custom-transition-composition-api.vue → transition-composition-api.vue} +3 -5
  83. package/demos/pc/app/tooltip/{custom-transition.vue → transition.vue} +3 -8
  84. package/demos/pc/app/tooltip/webdoc/tooltip.cn.md +1 -1
  85. package/demos/pc/app/tooltip/webdoc/tooltip.en.md +1 -1
  86. package/demos/pc/app/tooltip/webdoc/tooltip.js +227 -185
  87. package/demos/pc/app/watermark/basic-usage-composition-api.vue +26 -0
  88. package/demos/pc/app/watermark/basic-usage.vue +34 -0
  89. package/demos/pc/app/watermark/image-composition-api.vue +28 -0
  90. package/demos/pc/app/watermark/image.vue +36 -0
  91. package/demos/pc/app/watermark/webdoc/watermark.cn.md +6 -0
  92. package/demos/pc/app/watermark/webdoc/watermark.en.md +11 -0
  93. package/demos/pc/app/watermark/webdoc/watermark.js +134 -0
  94. package/demos/pc/menus.js +2 -1
  95. package/env/.env.mobilealpha +1 -1
  96. package/package.json +11 -11
  97. package/demos/pc/app/tooltip/dynamic-disable-composition-api.vue +0 -14
  98. package/demos/pc/app/tooltip/dynamic-disable.spec.js +0 -23
  99. package/demos/pc/app/tooltip/dynamic-disable.vue +0 -22
  100. package/demos/pc/app/tooltip/enterable-composition-api.vue +0 -12
  101. package/demos/pc/app/tooltip/enterable.spec.js +0 -16
  102. package/demos/pc/app/tooltip/enterable.vue +0 -20
  103. package/demos/pc/app/tooltip/manual-control-tip-composition-api.vue +0 -19
  104. package/demos/pc/app/tooltip/manual-control-tip.vue +0 -28
  105. package/demos/pc/app/tooltip/popper-class-composition-api.vue +0 -18
  106. package/demos/pc/app/tooltip/popper-class.spec.js +0 -13
  107. package/demos/pc/app/tooltip/popper-class.vue +0 -26
  108. package/demos/pc/app/tooltip/tabindex-composition-api.vue +0 -9
  109. package/demos/pc/app/tooltip/tabindex.spec.js +0 -9
  110. package/demos/pc/app/tooltip/tabindex.vue +0 -15
  111. package/demos/pc/app/tooltip/tooltip-content-composition-api.vue +0 -39
  112. package/demos/pc/app/tooltip/tooltip-content.vue +0 -47
  113. package/demos/pc/app/tooltip/tooltip-offset-composition-api.vue +0 -9
  114. package/demos/pc/app/tooltip/tooltip-offset.vue +0 -18
  115. package/demos/pc/app/tooltip/tooltip-render-content-composition-api.vue +0 -20
  116. package/demos/pc/app/tooltip/tooltip-render-content.spec.js +0 -12
  117. package/demos/pc/app/tooltip/tooltip-render-content.vue +0 -27
  118. package/demos/pc/app/tooltip/visible-arrow.vue +0 -20
  119. package/demos/pc/app/tooltip/visible-show-composition-api.vue +0 -38
  120. package/demos/pc/app/tooltip/visible-show.spec.js +0 -30
  121. package/demos/pc/app/tooltip/visible-show.vue +0 -47
  122. /package/demos/pc/app/alert/{base.spec.ts → basic-usage.spec.ts} +0 -0
  123. /package/demos/pc/app/tooltip/{tooltip-content.spec.js → content.spec.js} +0 -0
  124. /package/demos/pc/app/tooltip/{manual-control-tip.spec.js → control.spec.js} +0 -0
  125. /package/demos/pc/app/tooltip/{visible-arrow-composition-api.vue → custom-popper-composition-api.vue} +0 -0
  126. /package/demos/pc/app/tooltip/{visible-arrow.spec.js → custom-popper.spec.js} +0 -0
  127. /package/demos/pc/app/tooltip/{open-delay.spec.js → delay.spec.js} +0 -0
  128. /package/demos/pc/app/tooltip/{tooltip-offset.spec.js → offset.spec.js} +0 -0
  129. /package/demos/pc/app/tooltip/{tooltip-theme.spec.js → theme.spec.js} +0 -0
  130. /package/demos/pc/app/tooltip/{custom-transition.spec.js → transition.spec.js} +0 -0
@@ -1,4 +1,13 @@
1
+ const map = {
2
+ tinyMode: 'tiny_mode'
3
+ }
4
+
1
5
  export default {
2
6
  isMobile: true,
3
- initApp: (app) => {}
7
+ VITE_CONTEXT: '',
8
+ base: '',
9
+ prodBase: '',
10
+ initApp: (app) => {
11
+ app.config.globalProperties[map.tinyMode] = { value: 'mobile' }
12
+ }
4
13
  }
@@ -0,0 +1,38 @@
1
+ # 更新日志
2
+
3
+
4
+ ## v2.6.0/v3.6.0
5
+
6
+ `2023/03/30`
7
+
8
+ ### 📢 破坏性变更
9
+
10
+ - 无
11
+
12
+ ### ✨ 新特性
13
+
14
+ - 【TimeLine 组件】增加内容插槽功能
15
+ - 【TimeLine 组件】增加内容折叠功能
16
+ - 【Exception 组件】增加自定义图片功能
17
+ - 【PullRefresh 组件】增加上拉刷新功能
18
+ - 【Tabs 组件】增加可展开的功能
19
+ - 【Form 组件】增加label支撑文字超长自动换行功能
20
+ - 【UserHead 组件】新增移动端UserHead组件
21
+ - 【Popover 组件】新增移动端Popover组件
22
+ - 【Table 组件】新增移动端Table组件
23
+ - 【IndexBar 组件】新增移动端IndexBar组件
24
+ - 【Multi-select 组件】新增移动端Multi-select组件
25
+
26
+
27
+ ### 🐞 缺陷修复
28
+
29
+ - 无
30
+
31
+ ### 🚀 优化
32
+
33
+ - 【Button 组件】优化 Button 组件的移动端样式
34
+ - 【Search 组件】优化 Search 组件的移动端样式
35
+ - 【Action-sheet 组件】优化 Action-sheet 组件的滚动方式
36
+ - 【Input 组件】优化type为select时,可下拉选择
37
+
38
+ ---
@@ -0,0 +1,87 @@
1
+ <!--anchor:on-->
2
+
3
+ ## 引入组件
4
+
5
+ `TinyVue` 支持多组件引入、单组件引入以及完整引入三种方式。
6
+
7
+ ### 多组件引入(推荐)
8
+
9
+ 多组件引用即从依赖包 `@opentiny/vue` 中引用多个组件,参考示例如下(以 `Button` 和 `Alert` 组件为例):
10
+
11
+ ```vue
12
+ <template>
13
+ <div>
14
+ <tiny-button>TinyVue</tiny-button>
15
+ <tiny-alert description="TinyVue"></tiny-alert>
16
+ </div>
17
+ </template>
18
+
19
+ <script>
20
+ import { Button, Alert } from '@opentiny/vue';
21
+
22
+ export default {
23
+ components: {
24
+ TinyButton: Button,
25
+ TinyAlert: Alert,
26
+ },
27
+ };
28
+ </script>
29
+ ```
30
+
31
+ ### 单组件引入
32
+
33
+ `TinyVue` 每个组件都可以独立安装、独立使用,即只安装单个组件的依赖并单独引用该组件。
34
+
35
+ 以 `Button` 和 `Alert` 组件为例,执行以下命令安装:
36
+
37
+ ```bash
38
+ yarn add @opentiny/vue-button @opentiny/vue-alert
39
+ # 或者
40
+ npm install @opentiny/vue-button @opentiny/vue-alert
41
+ ```
42
+
43
+ 在页面中的使用 `Button` 和 `Alert` 组件的示例如下:
44
+
45
+ ```vue
46
+ <template>
47
+ <div>
48
+ <tiny-button>TinyVue</tiny-button>
49
+ <tiny-alert description="TinyVue"></tiny-alert>
50
+ </div>
51
+ </template>
52
+
53
+ <script>
54
+ import Button from '@opentiny/vue-button';
55
+ import Alert from '@opentiny/vue-alert';
56
+
57
+ export default {
58
+ components: {
59
+ TinyButton: Button,
60
+ TinyAlert: Alert,
61
+ },
62
+ };
63
+ </script>
64
+ ```
65
+
66
+ ### 完整引入(不推荐)
67
+
68
+ 完整引入组件后,就不需每个页面都 import 组件和局部注册,只需在 `main.js` 中全局注册,但因此会失去 `tree-shaking` 的能力,打包后会有冗余代码。
69
+
70
+ `Vue 3.0` 版本完整引入的示例如下:
71
+
72
+ ```js
73
+ import { createApp } from 'vue';
74
+ import TinyVue from '@opentiny/vue';
75
+
76
+ const app = createApp(App);
77
+ app.use(TinyVue);
78
+ ```
79
+
80
+ `Vue 2.0` 版本完整引入的示例如下:
81
+
82
+ ```js
83
+ import Vue from 'vue';
84
+ import TinyVue from '@opentiny/vue';
85
+
86
+ Vue.use(TinyVue);
87
+ ```
@@ -0,0 +1,23 @@
1
+ ## 环境准备
2
+
3
+ TinyVue 是一个基于 `Vue` 的 UI 组件库,可以同时支持 `Vue 2.0` 和 `Vue 3.0`。
4
+
5
+ 浏览器兼容性 `TinyVue` 支持主流浏览器的最新版本:Chrome、Edge、Firefox、Opera、Safari 不支持 IE 浏览器
6
+
7
+ ### 安装 Node.js
8
+
9
+ 推荐安装 `v16.13.0` 及以上版本,如果本地已经安装了 `Node.js`,可以通过以下命令检查版本是否正确:
10
+
11
+ ```bash
12
+ node -v
13
+ ```
14
+
15
+ ### 安装 Yarn
16
+
17
+ 管理 `npm` 包的工具主要有两种,一种是安装 `Node.js` 时自带的 `npm` ,另一种是速度更快的 `yarn`,通过以下命令安装:
18
+
19
+ ```bash
20
+ npm install -g yarn
21
+ ```
22
+
23
+ 包管理器的选择 `yarn` 和 `npm` 建议只选择使用一种包管理器,以免在安装过程中出现无法升级依赖包等问题。
@@ -0,0 +1,112 @@
1
+ export const standaloneMenus = [
2
+ {
3
+ label: '组件总览',
4
+ key: 'overview'
5
+ }
6
+ ]
7
+
8
+ export const docMenus = [
9
+ {
10
+ label: '使用指南',
11
+ labelEn: 'Guide',
12
+ key: 'doc_use',
13
+ children: [
14
+ {
15
+ title: '更新日志',
16
+ titleEn: 'Change Log',
17
+ key: 'changelog'
18
+ },
19
+ {
20
+ title: '组件介绍',
21
+ titleEn: 'Introduce',
22
+ key: 'introduce'
23
+ },
24
+ {
25
+ title: '引入组件',
26
+ titleEn: 'Import Component',
27
+ key: 'import'
28
+ },
29
+ {
30
+ title: '切换模式',
31
+ titleEn: 'Switch Mode',
32
+ key: 'mode'
33
+ }
34
+ ]
35
+ }
36
+ ]
37
+
38
+ export const cmpMenus = [
39
+ {
40
+ label: '导航组件',
41
+ labelEn: 'Navigation',
42
+ key: 'cmp_navigation',
43
+ children: [
44
+ { name: 'Navbar', nameCn: '导航栏', key: 'navbar' },
45
+ { name: 'Tabbar', nameCn: '标签栏', key: 'tabbar' },
46
+ { name: 'Tabs', nameCn: '选项卡', key: 'tabs' },
47
+ { name: 'TimeLine ', nameCn: '时间轴', key: 'timeline' },
48
+ { name: 'IndexBar ', nameCn: '索引条', key: 'index-bar' }
49
+ ]
50
+ },
51
+ {
52
+ label: '容器组件',
53
+ labelEn: 'Container',
54
+ key: 'cmp_container',
55
+ children: [{ name: 'Dialog', nameCn: '对话框', key: 'dialogbox' }]
56
+ },
57
+ {
58
+ label: '数据组件',
59
+ labelEn: 'Data',
60
+ key: 'cmp_data',
61
+ children: [{ name: 'Progress', nameCn: '进度条', key: 'progress' }]
62
+ },
63
+ {
64
+ label: '表单组件',
65
+ labelEn: 'Form',
66
+ key: 'cmp_form',
67
+ children: [
68
+ { name: 'Table', nameCn: '表格', key: 'table' },
69
+ { name: 'Button', nameCn: '按钮', key: 'button' },
70
+ { name: 'Form', nameCn: '表单', key: 'form' },
71
+ { name: 'Checkbox', nameCn: '复选框', key: 'checkbox' },
72
+ { name: 'Slider', nameCn: '滑块', key: 'slider' },
73
+ { name: 'CheckboxGroup', nameCn: '复选框组', key: 'checkboxgroup' },
74
+ { name: 'DropdownMenu ', nameCn: '筛选排序', key: 'dropdownmenu' },
75
+ { name: 'ImageViewer', nameCn: '图片预览', key: 'imageviewer' },
76
+ { name: 'Input', nameCn: '输入框', key: 'input' },
77
+ { name: 'List', nameCn: '列表', key: 'list' },
78
+ { name: 'Radio', nameCn: '单选', key: 'radio' },
79
+ { name: 'Search', nameCn: '搜索框', key: 'search' },
80
+ { name: 'Switch', nameCn: '开关', key: 'switch' },
81
+ { name: 'Numeric', nameCn: '计数器 ', key: 'numeric' },
82
+ { name: 'FileUpload', nameCn: '文件上传', key: 'file-upload' },
83
+ { name: 'MultiSelect', nameCn: '下拉选择器', key: 'multi-select' }
84
+ ]
85
+ },
86
+ {
87
+ label: '提示组件',
88
+ labelEn: 'Tooltip',
89
+ key: 'cmp_tooltip',
90
+ children: [
91
+ { name: 'PullRefresh', nameCn: '下拉刷新', key: 'pull-refresh' },
92
+ { name: 'Alert', nameCn: '提示', key: 'alert' },
93
+ { name: 'Badge', nameCn: '徽章', key: 'badge' },
94
+ { name: 'Loading', nameCn: '加载', key: 'loading' },
95
+ { name: 'Modal', nameCn: '模态框', key: 'modal' },
96
+ { name: 'Popover', nameCn: '气泡', key: 'popover' }
97
+ ]
98
+ },
99
+ {
100
+ label: '其它组件',
101
+ labelEn: 'Others',
102
+ key: 'cmp_others',
103
+ children: [
104
+ { name: 'Exception', nameCn: '缺省页', key: 'exception' },
105
+ { name: 'Avatar', nameCn: '头像', key: 'avatar' },
106
+ { name: 'Icon', nameCn: '图标', key: 'icon' },
107
+ { name: 'ActionSheet', nameCn: '上滑列表组件', key: 'actionsheet' },
108
+ { name: 'MiniPicker', nameCn: 'mini选择器', key: 'minipicker' },
109
+ { name: 'UserHead', nameCn: '用户头像', key: 'user-head' }
110
+ ]
111
+ }
112
+ ]
@@ -0,0 +1,23 @@
1
+ ## 切换为 mobile 模式
2
+
3
+ Tiny Vue 移动组件既存在和 PC 组件同名的组件,也存在不同名的组件。针对于同名组件,组件在渲染时默认加载的是 PC 组件,所以在使用移动组件之前,需要先切换为 mobile 模式,切换方式有如下两种:
4
+
5
+ ### 单组件切换
6
+
7
+ 可在组件标签上配置 `tiny_mode` 为 `mobile` 将该组件切换为 mobile 模式,渲染时就会按照移动组件模板渲染,如下所示:
8
+
9
+ ```html
10
+ <tiny-alert tiny_mode="mobile" description="type 为默认值 info"></tiny-alert>
11
+ ```
12
+
13
+ ### 全局切换
14
+
15
+ 如果按照单组件切换的方式,则每用到一个同名组件时都需要切换,比较麻烦,实际上还可以通过在 Vue 的原型上全局设置 `tiny_mode` 来实现。在 `src/main.js` 文件中 `boot` 之前增加如下代码:
16
+
17
+ ```bash
18
+ ## Vue 2.0
19
+ Vue.prototype.tiny_mode = { value: 'mobile' }
20
+
21
+ ## Vue 3.0
22
+ app.config.globalProperties.tiny_mode = { value: 'mobile' }
23
+ ```
@@ -6,11 +6,11 @@ export default {
6
6
  demoId: 'basic-usage',
7
7
  name: {
8
8
  'zh-CN': '基本用法',
9
- 'en-US': 'events'
9
+ 'en-US': 'Basic Usage'
10
10
  },
11
11
  desc: {
12
- 'zh-CN': '<p><p>',
13
- 'en-US': '<p>bbutton click</p>'
12
+ 'zh-CN': '<p></p>',
13
+ 'en-US': '<p></p>'
14
14
  },
15
15
  codeFiles: ['basic-usage.vue']
16
16
  },
@@ -18,11 +18,11 @@ export default {
18
18
  demoId: 'action',
19
19
  name: {
20
20
  'zh-CN': '操作列表模式',
21
- 'en-US': 'events'
21
+ 'en-US': 'Operation list mode'
22
22
  },
23
23
  desc: {
24
- 'zh-CN': '<p>设置 `type` 为 `action` 启用操作列表模式,设置 `title` 显示提示语。<p>',
25
- 'en-US': '<p>bbutton click</p>'
24
+ 'zh-CN': '<p>设置 `type` 为 `action` 启用操作列表模式,设置 `title` 显示提示语。</p>',
25
+ 'en-US': '<p>Set `type` to `action` to enable the operation list mode and set `title` to display prompts.</p>'
26
26
  },
27
27
  codeFiles: ['action.vue']
28
28
  },
@@ -30,12 +30,13 @@ export default {
30
30
  demoId: 'show',
31
31
  name: {
32
32
  'zh-CN': '显示隐藏',
33
- 'en-US': 'events'
33
+ 'en-US': 'Show Hide'
34
34
  },
35
35
  desc: {
36
36
  'zh-CN':
37
- '<p>- show-header: 显示头部,默认值为 true;- show-search: 显示头部搜索功能,默认值为 true;- show-footer: 显示底部,默认值为 false;<p>',
38
- 'en-US': '<p>bbutton click</p>'
37
+ '<p>show-header: 显示头部,默认值为 true;- show-search: 显示头部搜索功能,默认值为 true;- show-footer: 显示底部,默认值为 false;</p>',
38
+ 'en-US':
39
+ '<p>show-header: displays the header. The default value is true. - show-search: displays the header search function. The default value is true. - show-footer: displays the bottom. The default value is false</p>'
39
40
  },
40
41
  codeFiles: ['show.vue']
41
42
  },
@@ -43,11 +44,11 @@ export default {
43
44
  demoId: 'mask',
44
45
  name: {
45
46
  'zh-CN': '遮罩层1',
46
- 'en-US': 'events'
47
+ 'en-US': 'Mask layer one'
47
48
  },
48
49
  desc: {
49
- 'zh-CN': '<p>添加 `mask` 属性可以关闭遮罩层,默认值为 `true` 。<p>',
50
- 'en-US': '<p>bbutton click</p>'
50
+ 'zh-CN': '<p>添加 `mask` 属性可以关闭遮罩层,默认值为 `true` 。</p>',
51
+ 'en-US': '<p>bAdd the `mask` attribute to turn off the mask layer. The default value is `true`.</p>'
51
52
  },
52
53
  codeFiles: ['mask.vue']
53
54
  },
@@ -55,12 +56,13 @@ export default {
55
56
  demoId: 'mask-event',
56
57
  name: {
57
58
  'zh-CN': '遮罩层2',
58
- 'en-US': 'events'
59
+ 'en-US': 'Mask layer two'
59
60
  },
60
61
  desc: {
61
62
  'zh-CN':
62
- '<p>默认弹窗打开后,可以单击遮罩层关闭弹窗,设置 `mask-closable` 为 `false` 后将禁用该功能,默认值为 `true` 。 <p>',
63
- 'en-US': '<p>bbutton click</p>'
63
+ '<p>默认弹窗打开后,可以单击遮罩层关闭弹窗,设置 `mask-closable` 为 `false` 后将禁用该功能,默认值为 `true`。</p>',
64
+ 'en-US':
65
+ '<p>After the default pop-up window is opened, you can click the mask layer to close the pop-up window. If `mask-closable` is set to `false`, this function is disabled. The default value is `true`</p>'
64
66
  },
65
67
  codeFiles: ['mask-event.vue']
66
68
  },
@@ -68,12 +70,13 @@ export default {
68
70
  demoId: 'slot',
69
71
  name: {
70
72
  'zh-CN': '插槽',
71
- 'en-US': 'events'
73
+ 'en-US': 'slot'
72
74
  },
73
75
  desc: {
74
76
  'zh-CN':
75
- '<p>- header: 头部插槽,默认显示头部,设置 show-header="true" 时有效;- header-left: 头部左侧插槽,默认显示搜索功能;- header-right: 头部右侧插槽,默认显示关闭功能;- footer: 头部插槽,默认隐藏底部,设置 show-footer="true" 时有效;<p>',
76
- 'en-US': '<p>bbutton click</p>'
77
+ '<p>- header: 头部插槽,默认显示头部,设置 show-header="true" 时有效;- header-left: 头部左侧插槽,默认显示搜索功能;- header-right: 头部右侧插槽,默认显示关闭功能;- footer: 头部插槽,默认隐藏底部,设置 show-footer="true" 时有效;</p>',
78
+ 'en-US':
79
+ '<p> header: header slot. The header is displayed by default. This parameter is valid only when show-header is set to true. - header-left: slot on the left of the header. The search function is displayed by default. - header-right: slot on the right side of the head. The function is disabled by default. - footer: head slot. The bottom is hidden by default. This parameter is valid only when show-footer is set to true.</p>'
77
80
  },
78
81
  codeFiles: ['slot.vue']
79
82
  },
@@ -81,14 +84,236 @@ export default {
81
84
  demoId: 'ellipsis',
82
85
  name: {
83
86
  'zh-CN': '超出省略',
84
- 'en-US': 'events'
87
+ 'en-US': 'ellipsis'
85
88
  },
86
89
  desc: {
87
- 'zh-CN': '<p>添加属性 `ellipsis` 选项内容会超出隐藏。<p>',
88
- 'en-US': '<p>bbutton click</p>'
90
+ 'zh-CN': '<p>添加属性 `ellipsis` 选项内容会超出隐藏。</p>',
91
+ 'en-US': '<p>Added attribute `ellipsis` content meeting super surviving.</p>'
89
92
  },
90
93
  codeFiles: ['ellipsis.vue']
91
94
  }
92
95
  ],
93
- apis: []
96
+ apis: [
97
+ {
98
+ 'name': 'ActionSheet',
99
+ 'type': 'component',
100
+ 'props': [
101
+ {
102
+ 'name': 'custom-class',
103
+ 'type': 'String',
104
+ 'defaultValue': '',
105
+ 'desc': {
106
+ 'zh-CN': '自定义 class 样式',
107
+ 'en-US': 'Customize the class style.'
108
+ }
109
+ },
110
+ {
111
+ 'name': 'flex',
112
+ 'type': 'Boolean',
113
+ 'defaultValue': 'true',
114
+ 'desc': {
115
+ 'zh-CN': '设置弹性布局,默认为 true',
116
+ 'en-US': 'Sets the elastic layout. The default value is true.'
117
+ }
118
+ },
119
+ {
120
+ 'name': 'mask',
121
+ 'type': 'Boolean',
122
+ 'defaultValue': 'true',
123
+ 'desc': {
124
+ 'zh-CN': '是否显示遮罩层,默认值为 true',
125
+ 'en-US': 'Indicates whether to display the mask layer. The default value is true.'
126
+ },
127
+ 'demoId': 'mask'
128
+ },
129
+ {
130
+ 'name': 'mask-closable',
131
+ 'type': 'Boolean',
132
+ 'defaultValue': 'true',
133
+ 'desc': {
134
+ 'zh-CN': '单击遮罩层是否关闭弹窗,默认值为 true',
135
+ 'en-US':
136
+ 'Indicates whether to close the pop-up window when you click the mask layer. The default value is true.'
137
+ },
138
+ 'demoId': 'mask-event'
139
+ },
140
+ {
141
+ 'name': 'menus',
142
+ 'type': 'Array',
143
+ 'defaultValue': '[]',
144
+ 'desc': {
145
+ 'zh-CN': '操作列表,设置 type 为 action 启用操作列表模式时有效。',
146
+ 'en-US': 'Operation list. This parameter is valid only when type is set to action.'
147
+ },
148
+ 'demoId': 'action'
149
+ },
150
+ {
151
+ 'name': 'show-footer',
152
+ 'type': 'Boolean',
153
+ 'defaultValue': 'false',
154
+ 'desc': {
155
+ 'zh-CN': '是否显示底部,默认值为 false',
156
+ 'en-US': 'Indicates whether to display the bottom. The default value is false.'
157
+ },
158
+ 'demoId': 'show'
159
+ },
160
+ {
161
+ 'name': 'show-header',
162
+ 'type': 'Boolean',
163
+ 'defaultValue': 'true',
164
+ 'desc': {
165
+ 'zh-CN': '是否显示头部,默认值为 true',
166
+ 'en-US': 'Indicates whether to display the header. The default value is true.'
167
+ },
168
+ 'demoId': 'show'
169
+ },
170
+ {
171
+ 'name': 'title',
172
+ 'type': 'String',
173
+ 'defaultValue': '',
174
+ 'desc': {
175
+ 'zh-CN': '面板标题',
176
+ 'en-US': 'Panel Title'
177
+ },
178
+ 'demoId': 'actoin'
179
+ },
180
+ {
181
+ 'name': 'type',
182
+ 'type': 'Array[string]',
183
+ 'defaultValue': '',
184
+ 'desc': {
185
+ 'zh-CN': '设置 type 为 action 启用操作列表模式',
186
+ 'en-US': 'Set type to action to enable the operation list mode.'
187
+ },
188
+ 'demoId': 'action'
189
+ },
190
+ {
191
+ 'name': 'v-model',
192
+ 'type': 'Number | String | Array',
193
+ 'defaultValue': '',
194
+ 'desc': {
195
+ 'zh-CN': '双向数据绑定',
196
+ 'en-US': 'bidirectional data binding'
197
+ }
198
+ },
199
+ {
200
+ 'name': 'visible',
201
+ 'type': 'Boolean',
202
+ 'defaultValue': '',
203
+ 'desc': {
204
+ 'zh-CN': '是否弹出面板',
205
+ 'en-US': 'Indicates whether to display the panel.'
206
+ }
207
+ }
208
+ ],
209
+ 'methods': [
210
+ {
211
+ 'name': 'actionSelectOption',
212
+ 'type': '',
213
+ 'defaultValue': '',
214
+ 'desc': {
215
+ 'zh-CN': '选择列表项,设置 type 为 action 启用操作列表模式时有效',
216
+ 'en-US':
217
+ 'Select a list item and set type to action. This parameter is valid only when the operation list mode is enabled.'
218
+ }
219
+ },
220
+ {
221
+ 'name': 'close',
222
+ 'type': '',
223
+ 'defaultValue': '',
224
+ 'desc': {
225
+ 'zh-CN': '关闭面板',
226
+ 'en-US': 'Close the panel.'
227
+ },
228
+ 'demoId': 'action'
229
+ }
230
+ ],
231
+ 'events': [
232
+ {
233
+ 'name': 'click',
234
+ 'type': 'Function()',
235
+ 'defaultValue': '',
236
+ 'desc': {
237
+ 'zh-CN': '点击列表选项时触发,设置 type 为 action 启用操作列表模式时有效。',
238
+ 'en-US':
239
+ 'This event is triggered when a list option is clicked. This event is valid only when type is set to action and the operation list mode is enabled.'
240
+ },
241
+ 'demoId': 'action'
242
+ },
243
+ {
244
+ 'name': 'close',
245
+ 'type': 'Function()',
246
+ 'defaultValue': '',
247
+ 'desc': {
248
+ 'zh-CN': '关闭面板时触发的事件。',
249
+ 'en-US': 'Event triggered when a panel is closed.'
250
+ },
251
+ 'demoId': 'action'
252
+ },
253
+ {
254
+ 'name': 'confirm',
255
+ 'type': 'Function()',
256
+ 'defaultValue': '',
257
+ 'desc': {
258
+ 'zh-CN': '点击底部按钮时触发,设置 show-footer 为 true 时有效。',
259
+ 'en-US':
260
+ 'This event is triggered when the bottom button is clicked. It is valid only when show-footer is set to true.'
261
+ }
262
+ },
263
+ {
264
+ 'name': 'update:visible',
265
+ 'type': 'Function()',
266
+ 'defaultValue': '',
267
+ 'desc': {
268
+ 'zh-CN': '面板显示或隐藏时触发',
269
+ 'en-US': 'riggered when the panel is displayed or hidden'
270
+ },
271
+ 'demoId': 'slot'
272
+ }
273
+ ],
274
+ 'slots': [
275
+ {
276
+ 'name': 'default',
277
+ 'type': '',
278
+ 'defaultValue': '',
279
+ 'desc': {
280
+ 'zh-CN': '组件默认插槽,设置 type 为 action 启用操作列表模式会提供参数 data 列表项和 index 列表索引。',
281
+ 'en-US':
282
+ 'Component default slot. Set type to action to enable the operation list mode. The parameter data list item and index list index are provided.'
283
+ },
284
+ 'demoId': 'slot'
285
+ },
286
+ {
287
+ 'name': 'footer',
288
+ 'type': '',
289
+ 'defaultValue': '',
290
+ 'desc': {
291
+ 'zh-CN': '底部插槽,设置 show-footer 为 true 时有效',
292
+ 'en-US': 'Bottom slot. This parameter is valid only when show-footer is set to true.'
293
+ },
294
+ 'demoId': 'slot'
295
+ },
296
+ {
297
+ 'name': 'header-left',
298
+ 'type': '',
299
+ 'defaultValue': '',
300
+ 'desc': {
301
+ 'zh-CN': '头部左侧插槽,设置 show-header 为 true 时有效',
302
+ 'en-US': 'Slot on the left of the header. This parameter is valid only when show-header is set to true.'
303
+ },
304
+ 'demoId': 'slot'
305
+ },
306
+ {
307
+ 'name': 'header-right ',
308
+ 'type': '',
309
+ 'defaultValue': '',
310
+ 'desc': {
311
+ 'zh-CN': '头部右侧插槽,设置 show-header 为 true 时有效',
312
+ 'en-US': 'Slot on the right of the header. This parameter is valid only when show-header is set to true.'
313
+ },
314
+ 'demoId': 'slot'
315
+ }
316
+ ]
317
+ }
318
+ ]
94
319
  }