@opentiny/vue-docs 3.16.0 → 3.16.2
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.
- package/demos/apis/action-menu.js +5 -5
- package/demos/pc/app/action-menu/basic-usage-composition-api.vue +2 -1
- package/demos/pc/app/action-menu/basic-usage.vue +2 -1
- package/demos/pc/app/action-menu/webdoc/action-menu.cn.md +2 -2
- package/demos/pc/app/autocomplete/webdoc/autocomplete.cn.md +2 -2
- package/demos/pc/app/autocomplete/webdoc/autocomplete.en.md +2 -2
- package/demos/pc/app/checkbox/webdoc/checkbox.cn.md +2 -2
- package/demos/pc/app/checkbox/webdoc/checkbox.en.md +2 -2
- package/demos/pc/app/color-picker/webdoc/color-picker.cn.md +3 -3
- package/demos/pc/app/color-select-panel/webdoc/color-select-panel.cn.md +3 -3
- package/demos/pc/app/config-provider/webdoc/config-provider.cn.md +2 -2
- package/demos/pc/app/config-provider/webdoc/config-provider.en.md +2 -2
- package/demos/pc/app/container/webdoc/container.cn.md +2 -2
- package/demos/pc/app/container/webdoc/container.en.md +2 -2
- package/demos/pc/app/divider/webdoc/divider.cn.md +3 -3
- package/demos/pc/app/drop-times/webdoc/drop-times.cn.md +2 -2
- package/demos/pc/app/floatbar/webdoc/floatbar.cn.md +2 -2
- package/demos/pc/app/floatbar/webdoc/floatbar.en.md +2 -2
- package/demos/pc/app/flowchart/webdoc/flowchart.cn.md +2 -2
- package/demos/pc/app/flowchart/webdoc/flowchart.en.md +2 -2
- package/demos/pc/app/fullscreen/webdoc/fullscreen.cn.md +3 -3
- package/demos/pc/app/image/webdoc/image.cn.md +2 -2
- package/demos/pc/app/image/webdoc/image.en.md +2 -2
- package/demos/pc/app/infinite-scroll/webdoc/infinite-scroll.cn.md +2 -2
- package/demos/pc/app/layout/webdoc/layout.cn.md +2 -2
- package/demos/pc/app/link/webdoc/link.cn.md +2 -2
- package/demos/pc/app/link/webdoc/link.en.md +2 -2
- package/demos/pc/app/numeric/webdoc/numeric.cn.md +3 -3
- package/demos/pc/app/numeric/webdoc/numeric.en.md +3 -3
- package/demos/pc/app/pager/webdoc/pager.cn.md +1 -1
- package/demos/pc/app/pager/webdoc/pager.en.md +3 -3
- package/demos/pc/app/pop-upload/webdoc/pop-upload.cn.md +2 -2
- package/demos/pc/app/popconfirm/webdoc/popconfirm.cn.md +2 -2
- package/demos/pc/app/popover/webdoc/popover.cn.md +2 -2
- package/demos/pc/app/rich-text-editor/webdoc/rich-text-editor.cn.md +2 -2
- package/demos/pc/app/statistic/webdoc/statistic.cn.md +2 -2
- package/demos/pc/app/time-line/webdoc/time-line.cn.md +2 -2
- package/demos/pc/app/time-select/webdoc/time-select.cn.md +3 -3
- package/demos/pc/menus.js +90 -97
- package/demos/pc/webdoc/import-components.md +44 -4
- package/package.json +8 -8
- package/playground/App.vue +21 -13
- package/playground.html +2 -2
|
@@ -165,11 +165,11 @@ export default {
|
|
|
165
165
|
type: 'interface',
|
|
166
166
|
code: `
|
|
167
167
|
interface IItemData {
|
|
168
|
-
label
|
|
169
|
-
disabled
|
|
170
|
-
divided
|
|
171
|
-
children
|
|
172
|
-
icon
|
|
168
|
+
label?: string // 菜单项文本
|
|
169
|
+
disabled?: boolean // 是否禁用
|
|
170
|
+
divided?: boolean // 是否显示分割线
|
|
171
|
+
children?: IItemData[] // 菜单项子集
|
|
172
|
+
icon?: Component // 菜单项图标
|
|
173
173
|
}
|
|
174
174
|
`
|
|
175
175
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Numeric
|
|
2
|
+
title: Numeric
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
# Numeric
|
|
5
|
+
# Numeric
|
|
6
6
|
|
|
7
|
-
<div>The Numeric
|
|
7
|
+
<div>The Numeric can be used to enter numbers. The value range and step size can be customized. The mouse and keyboard can be added or deleted.</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: Pagination
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# Pagination
|
|
6
6
|
|
|
7
|
-
<div>When there is a large amount of data, data is split by page. This function is usually used in Grid
|
|
7
|
+
<div>When there is a large amount of data, data is split by page. This function is usually used in Grid components.</div>
|
package/demos/pc/menus.js
CHANGED
|
@@ -75,80 +75,64 @@ export const docMenus = [
|
|
|
75
75
|
|
|
76
76
|
export const cmpMenus = [
|
|
77
77
|
{
|
|
78
|
-
'label': '
|
|
79
|
-
'labelEn': '
|
|
78
|
+
'label': '基础',
|
|
79
|
+
'labelEn': 'Basic',
|
|
80
80
|
'key': 'cmp_frame_style',
|
|
81
81
|
'children': [
|
|
82
|
+
{ 'nameCn': '按钮', 'name': 'Button', 'key': 'button' },
|
|
83
|
+
{ 'nameCn': '按钮组', 'name': 'ButtonGroup', 'key': 'button-group' },
|
|
82
84
|
{ 'nameCn': '色彩', 'name': 'Color', 'key': 'color' },
|
|
83
|
-
{ 'nameCn': '
|
|
85
|
+
{ 'nameCn': '容器布局', 'name': 'Container', 'key': 'container' },
|
|
84
86
|
{ 'nameCn': '字体', 'name': 'Font', 'key': 'font' },
|
|
85
87
|
{ 'nameCn': '图标', 'name': 'Icon', 'key': 'icon' },
|
|
86
|
-
{ 'nameCn': '
|
|
88
|
+
{ 'nameCn': '栅格布局', 'name': 'Layout', 'key': 'layout' },
|
|
89
|
+
{ 'nameCn': '链接', 'name': 'Link', 'key': 'link' },
|
|
90
|
+
{ 'nameCn': '分割线', 'name': 'Divider', 'key': 'divider' }
|
|
87
91
|
]
|
|
88
92
|
},
|
|
89
93
|
{
|
|
90
|
-
'label': '
|
|
91
|
-
'labelEn': 'Navigation
|
|
94
|
+
'label': '导航',
|
|
95
|
+
'labelEn': 'Navigation',
|
|
92
96
|
'key': 'cmp_navigation_components',
|
|
93
97
|
'children': [
|
|
98
|
+
{ 'nameCn': '动作菜单', 'name': 'ActionMenu', 'key': 'action-menu' },
|
|
94
99
|
{ 'nameCn': '锚点', 'name': 'Anchor', 'key': 'anchor' },
|
|
95
|
-
{ 'nameCn': '引导', 'name': 'Guide', 'key': 'guide' },
|
|
96
100
|
{ 'nameCn': '面包屑', 'name': 'Breadcrumb', 'key': 'breadcrumb' },
|
|
101
|
+
{ 'nameCn': '下拉菜单', 'name': 'Dropdown', 'key': 'dropdown' },
|
|
97
102
|
{ 'nameCn': '瀑布菜单', 'name': 'FallMenu', 'key': 'fall-menu' },
|
|
98
|
-
{ 'nameCn': '浮动块', 'name': 'Floatbar', 'key': 'floatbar' },
|
|
99
|
-
{ 'nameCn': '收缩菜单', 'name': 'ToggleMenu', 'key': 'toggle-menu' },
|
|
100
103
|
{ 'nameCn': '收藏夹菜单', 'name': 'LinkMenu', 'key': 'link-menu' },
|
|
101
|
-
{ 'nameCn': '里程碑', 'name': 'Milestone', 'key': 'milestone' },
|
|
102
104
|
{ 'nameCn': '导航菜单', 'name': 'NavMenu', 'key': 'nav-menu' },
|
|
105
|
+
{ 'nameCn': '分页', 'name': 'Pager', 'key': 'pager' },
|
|
103
106
|
{ 'nameCn': '步骤条', 'name': 'Steps', 'key': 'steps' },
|
|
104
107
|
{ 'nameCn': '页签', 'name': 'Tabs', 'key': 'tabs' },
|
|
105
|
-
{ 'nameCn': '
|
|
106
|
-
{ 'nameCn': '树型菜单', 'name': 'TreeMenu', 'key': 'tree-menu' }
|
|
107
|
-
{ 'nameCn': '流程图', 'name': 'Wizard', 'key': 'wizard' },
|
|
108
|
-
{ 'nameCn': '下拉菜单', 'name': 'Dropdown', 'key': 'dropdown' },
|
|
109
|
-
{ 'nameCn': '菜单按钮', 'name': 'ActionMenu', 'key': 'action-menu' },
|
|
110
|
-
{ 'nameCn': '流程图', 'name': 'Flowchart', 'key': 'flowchart' }
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
'label': '容器组件',
|
|
115
|
-
'labelEn': 'Container Components',
|
|
116
|
-
'key': 'cmp_container_components',
|
|
117
|
-
'children': [
|
|
118
|
-
{ 'nameCn': '走马灯', 'name': 'Carousel', 'key': 'carousel' },
|
|
119
|
-
{ 'nameCn': '折叠面板', 'name': 'Collapse', 'key': 'collapse' },
|
|
120
|
-
{ 'nameCn': '对话框', 'name': 'DialogBox', 'key': 'dialog-box' },
|
|
121
|
-
{ 'nameCn': '弹窗选择 ', 'name': 'DialogSelect ', 'key': 'dialog-select' },
|
|
122
|
-
{ 'nameCn': '抽屉', 'name': 'Drawer', 'key': 'drawer' },
|
|
123
|
-
{ 'nameCn': '过滤器面板', 'name': 'FilterPanel', 'key': 'filter-panel' },
|
|
124
|
-
{ 'nameCn': '面板分割', 'name': 'Split', 'key': 'split' },
|
|
125
|
-
{ 'nameCn': '卡片', 'name': 'Card', 'key': 'card', 'mark': { 'text': 'New' } }
|
|
108
|
+
{ 'nameCn': '收缩菜单', 'name': 'ToggleMenu', 'key': 'toggle-menu' },
|
|
109
|
+
{ 'nameCn': '树型菜单', 'name': 'TreeMenu', 'key': 'tree-menu' }
|
|
126
110
|
]
|
|
127
111
|
},
|
|
128
112
|
{
|
|
129
|
-
'label': '
|
|
130
|
-
'labelEn': 'Form
|
|
113
|
+
'label': '表单',
|
|
114
|
+
'labelEn': 'Form',
|
|
131
115
|
'key': 'cmp_form_components',
|
|
132
116
|
'children': [
|
|
133
|
-
{ 'nameCn': '自动完成', 'name': '
|
|
134
|
-
{ 'nameCn': '按钮', 'name': 'Button', 'key': 'button' },
|
|
135
|
-
{ 'nameCn': '按钮组', 'name': 'ButtonGroup', 'key': 'button-group' },
|
|
117
|
+
{ 'nameCn': '自动完成', 'name': 'AutoComplete', 'key': 'autocomplete' },
|
|
136
118
|
{ 'nameCn': '级联选择器', 'name': 'Cascader', 'key': 'cascader' },
|
|
137
119
|
{ 'nameCn': '级联面板', 'name': 'CascaderPanel', 'key': 'cascader-panel' },
|
|
138
|
-
{ 'nameCn': '
|
|
120
|
+
{ 'nameCn': '多选框', 'name': 'Checkbox', 'key': 'checkbox' },
|
|
121
|
+
{ 'nameCn': '颜色选择器', 'name': 'ColorPicker', 'key': 'color-picker' },
|
|
122
|
+
{ 'nameCn': '颜色选择面板', 'name': 'ColorSelectPanel', 'key': 'color-select-panel' },
|
|
139
123
|
{ 'nameCn': '日期选择器', 'name': 'DatePicker', 'key': 'date-picker' },
|
|
140
124
|
{ 'nameCn': '下拉时间', 'name': 'DropTimes', 'key': 'drop-times' },
|
|
141
125
|
{ 'nameCn': '文件上传', 'name': 'FileUpload', 'key': 'file-upload' },
|
|
142
126
|
{ 'nameCn': '表单', 'name': 'Form', 'key': 'form' },
|
|
143
127
|
{ 'nameCn': '输入框', 'name': 'Input', 'key': 'input' },
|
|
144
128
|
{ 'nameCn': ' IP地址输入框', 'name': 'IpAddress', 'key': 'ip-address' },
|
|
145
|
-
{ 'nameCn': '
|
|
146
|
-
{ 'nameCn': '计数器', 'name': 'Numeric', 'key': 'numeric' },
|
|
129
|
+
{ 'nameCn': '数字输入框', 'name': 'Numeric', 'key': 'numeric' },
|
|
147
130
|
{ 'nameCn': '弹出编辑', 'name': 'PopEditor', 'key': 'popeditor' },
|
|
148
|
-
{ 'nameCn': '
|
|
131
|
+
{ 'nameCn': '弹出上传', 'name': 'PopUpload', 'key': 'pop-upload' },
|
|
149
132
|
{ 'nameCn': '单选框', 'name': 'Radio', 'key': 'radio' },
|
|
133
|
+
{ 'nameCn': '评分', 'name': 'Rate', 'key': 'rate' },
|
|
150
134
|
{
|
|
151
|
-
'nameCn': '
|
|
135
|
+
'nameCn': '富文本编辑器',
|
|
152
136
|
'name': 'RichTextEditor',
|
|
153
137
|
'key': 'rich-text-editor',
|
|
154
138
|
'mark': {
|
|
@@ -162,13 +146,12 @@ export const cmpMenus = [
|
|
|
162
146
|
{ 'nameCn': '开关', 'name': 'Switch', 'key': 'switch' },
|
|
163
147
|
{ 'nameCn': '时间选择器', 'name': 'TimePicker', 'key': 'time-picker' },
|
|
164
148
|
{ 'nameCn': '时间选择', 'name': 'TimeSelect', 'key': 'time-select' },
|
|
165
|
-
{ 'nameCn': '
|
|
166
|
-
{ 'nameCn': '颜色选择面板', 'name': 'ColorSelectPanel', 'key': 'color-select-panel' }
|
|
149
|
+
{ 'nameCn': '穿梭框', 'name': 'Transfer', 'key': 'transfer' }
|
|
167
150
|
]
|
|
168
151
|
},
|
|
169
152
|
{
|
|
170
|
-
'label': '
|
|
171
|
-
'labelEn': 'Table
|
|
153
|
+
'label': '表格',
|
|
154
|
+
'labelEn': 'Table',
|
|
172
155
|
'key': 'cmp_table_components',
|
|
173
156
|
'children': [
|
|
174
157
|
{ 'nameCn': '基本用法', 'name': '', 'key': 'grid' },
|
|
@@ -211,8 +194,58 @@ export const cmpMenus = [
|
|
|
211
194
|
]
|
|
212
195
|
},
|
|
213
196
|
{
|
|
214
|
-
'label': '
|
|
215
|
-
'labelEn': '
|
|
197
|
+
'label': '数据展示',
|
|
198
|
+
'labelEn': 'Data Display',
|
|
199
|
+
'key': 'cmp_data_components',
|
|
200
|
+
'children': [
|
|
201
|
+
{ 'nameCn': '标记', 'name': 'Badge', 'key': 'badge' },
|
|
202
|
+
{ 'nameCn': '日历', 'name': 'Calendar', 'key': 'calendar' },
|
|
203
|
+
{ 'nameCn': '日历视图', 'name': 'CalendarView', 'key': 'calendar-view' },
|
|
204
|
+
{ 'nameCn': '卡片', 'name': 'Card', 'key': 'card', 'mark': { 'text': 'New' } },
|
|
205
|
+
{ 'nameCn': '走马灯', 'name': 'Carousel', 'key': 'carousel' },
|
|
206
|
+
{ 'nameCn': '折叠面板', 'name': 'Collapse', 'key': 'collapse' },
|
|
207
|
+
{ 'nameCn': '流程图', 'name': 'FlowChart', 'key': 'flowchart' },
|
|
208
|
+
{ 'nameCn': '引导', 'name': 'Guide', 'key': 'guide' },
|
|
209
|
+
{ 'nameCn': '图片', 'name': 'Image', 'key': 'image' },
|
|
210
|
+
{ 'nameCn': '无限滚动', 'name': 'InfiniteScroll', 'key': 'infinite-scroll' },
|
|
211
|
+
{ 'nameCn': '里程碑', 'name': 'Milestone', 'key': 'milestone' },
|
|
212
|
+
{
|
|
213
|
+
'nameCn': '思维导图',
|
|
214
|
+
'name': 'MindMap',
|
|
215
|
+
'key': 'mind-map',
|
|
216
|
+
'mark': { 'text': 'New' }
|
|
217
|
+
},
|
|
218
|
+
{ 'nameCn': '二维码', 'name': 'QrCode', 'key': 'qr-code' },
|
|
219
|
+
{ 'nameCn': '统计数值', 'name': 'Statistic', 'key': 'statistic' },
|
|
220
|
+
{ 'nameCn': '标签', 'name': 'Tag', 'key': 'tag' },
|
|
221
|
+
{ 'nameCn': '标签组', 'name': 'TagGroup', 'key': 'tag-group' },
|
|
222
|
+
{ 'nameCn': '时间线', 'name': 'Timeline', 'key': 'time-line' },
|
|
223
|
+
{ 'nameCn': '树形控件', 'name': 'Tree', 'key': 'tree' },
|
|
224
|
+
{ 'nameCn': '用户头像', 'name': 'UserHead', 'key': 'user-head' },
|
|
225
|
+
{ 'nameCn': '流程图', 'name': 'Wizard', 'key': 'wizard' }
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
'label': '反馈',
|
|
230
|
+
'labelEn': 'Feedback',
|
|
231
|
+
'key': 'cmp_tips_components',
|
|
232
|
+
'children': [
|
|
233
|
+
{ 'nameCn': '警告', 'name': 'Alert', 'key': 'alert' },
|
|
234
|
+
{ 'nameCn': '对话框', 'name': 'DialogBox', 'key': 'dialog-box' },
|
|
235
|
+
{ 'nameCn': '抽屉', 'name': 'Drawer', 'key': 'drawer' },
|
|
236
|
+
{ 'nameCn': '加载', 'name': 'Loading', 'key': 'loading' },
|
|
237
|
+
{ 'nameCn': '模态框', 'name': 'Modal', 'key': 'modal' },
|
|
238
|
+
{ 'nameCn': '通知', 'name': 'Notify', 'key': 'notify' },
|
|
239
|
+
{ 'nameCn': '气泡确认框', 'name': 'PopConfirm', 'key': 'popconfirm' },
|
|
240
|
+
{ 'nameCn': '进度条', 'name': 'Progress', 'key': 'progress' },
|
|
241
|
+
{ 'nameCn': '气泡卡片', 'name': 'Popover', 'key': 'popover' },
|
|
242
|
+
{ 'nameCn': '骨架屏', 'name': 'Skeleton', 'key': 'skeleton', 'mark': { 'text': 'New' } },
|
|
243
|
+
{ 'nameCn': '文字提示', 'name': 'Tooltip', 'key': 'tooltip' }
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
'label': '图表',
|
|
248
|
+
'labelEn': 'Chart',
|
|
216
249
|
'key': 'cmp_chart_components',
|
|
217
250
|
'children': [
|
|
218
251
|
{ 'nameCn': '基本用法', 'name': 'Basic Usage', 'key': 'chart' },
|
|
@@ -245,62 +278,22 @@ export const cmpMenus = [
|
|
|
245
278
|
]
|
|
246
279
|
},
|
|
247
280
|
{
|
|
248
|
-
'label': '
|
|
249
|
-
'labelEn': '
|
|
250
|
-
'key': 'cmp_data_components',
|
|
251
|
-
'children': [
|
|
252
|
-
{ 'nameCn': '分页', 'name': 'Pager', 'key': 'pager' },
|
|
253
|
-
{ 'nameCn': '进度条', 'name': 'Progress', 'key': 'progress' },
|
|
254
|
-
{ 'nameCn': '树形控件', 'name': 'Tree', 'key': 'tree' },
|
|
255
|
-
{ 'nameCn': '穿梭框', 'name': 'Transfer', 'key': 'transfer' },
|
|
256
|
-
{ 'nameCn': '无限滚动', 'name': 'InfiniteScroll', 'key': 'infinite-scroll' },
|
|
257
|
-
{ 'nameCn': '骨架屏', 'name': 'Skeleton', 'key': 'skeleton', 'mark': { 'text': 'New' } },
|
|
258
|
-
{ 'nameCn': '统计', 'name': 'Statistic', 'key': 'statistic' }
|
|
259
|
-
]
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
'label': '提示组件',
|
|
263
|
-
'labelEn': 'Tips Components',
|
|
264
|
-
'key': 'cmp_tips_components',
|
|
265
|
-
'children': [
|
|
266
|
-
{ 'nameCn': '警告', 'name': 'Alert', 'key': 'alert' },
|
|
267
|
-
{ 'nameCn': '标记', 'name': 'Badge', 'key': 'badge' },
|
|
268
|
-
{ 'nameCn': '加载', 'name': 'Loading', 'key': 'loading' },
|
|
269
|
-
{ 'nameCn': '文字提示', 'name': 'Tooltip', 'key': 'tooltip' },
|
|
270
|
-
{ 'nameCn': '弹出框', 'name': 'Popover', 'key': 'popover' },
|
|
271
|
-
{ 'nameCn': '气泡确认框组件', 'name': 'Popconfirm', 'key': 'popconfirm' },
|
|
272
|
-
{ 'nameCn': '模态框', 'name': 'Modal', 'key': 'modal' },
|
|
273
|
-
{ 'nameCn': '通知', 'name': 'Notify', 'key': 'notify' }
|
|
274
|
-
]
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
'label': '其他组件',
|
|
278
|
-
'labelEn': 'Other Components',
|
|
281
|
+
'label': '其他',
|
|
282
|
+
'labelEn': 'Other',
|
|
279
283
|
'key': 'cmp_other_components',
|
|
280
284
|
'children': [
|
|
281
285
|
{ 'nameCn': '公告牌', 'name': 'BulletinBoard', 'key': 'bulletin-board' },
|
|
282
|
-
{ 'nameCn': '
|
|
283
|
-
{ 'nameCn': '日历视图', 'name': 'CalendarView', 'key': 'calendar-view' },
|
|
286
|
+
{ 'nameCn': '全局配置', 'name': 'ConfigProvider', 'key': 'config-provider' },
|
|
284
287
|
{ 'nameCn': '图片裁剪', 'name': 'Crop', 'key': 'crop' },
|
|
285
|
-
{ 'nameCn': '
|
|
286
|
-
{ 'nameCn': '
|
|
288
|
+
{ 'nameCn': '弹窗选择 ', 'name': 'DialogSelect ', 'key': 'dialog-select' },
|
|
289
|
+
{ 'nameCn': '过滤器面板', 'name': 'FilterPanel', 'key': 'filter-panel' },
|
|
290
|
+
{ 'nameCn': '浮动块', 'name': 'FloatBar', 'key': 'floatbar' },
|
|
291
|
+
{ 'nameCn': '全屏', 'name': 'Fullscreen', 'key': 'fullscreen' },
|
|
287
292
|
{ 'nameCn': '文字滚动', 'name': 'ScrollText', 'key': 'scroll-text' },
|
|
288
|
-
{ 'nameCn': '
|
|
289
|
-
{ 'nameCn': '标签组', 'name': 'TagGroup', 'key': 'tag-group' },
|
|
293
|
+
{ 'nameCn': '面板分割', 'name': 'Split', 'key': 'split' },
|
|
290
294
|
{ 'nameCn': '输入框', 'name': 'TextPopup', 'key': 'text-popup' },
|
|
291
295
|
{ 'nameCn': '联系人', 'name': 'UserContact', 'key': 'user-contact' },
|
|
292
|
-
{ 'nameCn': '
|
|
293
|
-
{ 'nameCn': '全屏显示', 'name': 'Fullscreen', 'key': 'fullscreen' },
|
|
294
|
-
{ 'nameCn': '全局设置', 'name': 'ConfigProvider', 'key': 'config-provider' },
|
|
295
|
-
{ 'nameCn': '分割线', 'name': 'Divider', 'key': 'divider' },
|
|
296
|
-
{ 'nameCn': '二维码', 'name': 'QrCode', 'key': 'qr-code' },
|
|
297
|
-
{ 'nameCn': '水印', 'name': 'Watermark', 'key': 'watermark' },
|
|
298
|
-
{
|
|
299
|
-
'nameCn': '脑图',
|
|
300
|
-
'name': 'MindMap',
|
|
301
|
-
'key': 'mind-map',
|
|
302
|
-
'mark': { 'text': 'New' }
|
|
303
|
-
}
|
|
296
|
+
{ 'nameCn': '水印', 'name': 'Watermark', 'key': 'watermark' }
|
|
304
297
|
]
|
|
305
298
|
}
|
|
306
299
|
]
|
|
@@ -322,7 +315,7 @@ if (envTarget === 'inner' || showBusiness) {
|
|
|
322
315
|
{ 'nameCn': '部门', 'name': 'Dept', 'key': 'dept' },
|
|
323
316
|
{ 'nameCn': '下拉角色', 'name': 'DropRoles', 'key': 'drop-roles' },
|
|
324
317
|
{ 'nameCn': '消息弹框', 'name': 'Espace', 'key': 'espace' },
|
|
325
|
-
{ 'nameCn': '权签人', 'name': '
|
|
318
|
+
{ 'nameCn': '权签人', 'name': 'HrApprover', 'key': 'hrapprover' },
|
|
326
319
|
{ 'nameCn': '语言选择', 'name': 'Locales', 'key': 'locales' },
|
|
327
320
|
{ 'nameCn': '登录用户', 'name': 'LogonUser', 'key': 'logon-user' },
|
|
328
321
|
{ 'nameCn': '注销', 'name': 'Logout', 'key': 'logout' },
|
|
@@ -22,7 +22,7 @@ Vite
|
|
|
22
22
|
import autoImportPlugin from '@opentiny/unplugin-tiny-vue'
|
|
23
23
|
|
|
24
24
|
export default {
|
|
25
|
-
plugins: [autoImportPlugin()]
|
|
25
|
+
plugins: [autoImportPlugin('vite')]
|
|
26
26
|
}
|
|
27
27
|
```
|
|
28
28
|
|
|
@@ -33,13 +33,53 @@ Webpack
|
|
|
33
33
|
|
|
34
34
|
const autoImportPlugin = require('@opentiny/unplugin-tiny-vue')
|
|
35
35
|
|
|
36
|
-
module.exports = {
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
module.exports = defineConfig({
|
|
37
|
+
configureWebpack: {
|
|
38
|
+
plugins: [autoImportPlugin('webpack')]
|
|
39
|
+
}
|
|
40
|
+
})
|
|
39
41
|
```
|
|
40
42
|
|
|
41
43
|
这样你就能直接在项目中使用 TinyVue 的组件,这些组件都是自动按需导入的,无需手动导入,且不用担心项目体积变得太大。
|
|
42
44
|
|
|
45
|
+
你也可以只使用 TinyVueResolver,这样就可以和其他组件库一起使用。
|
|
46
|
+
|
|
47
|
+
Vite
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
// vite.config.ts
|
|
51
|
+
|
|
52
|
+
import Components from 'unplugin-vue-components/vite'
|
|
53
|
+
import autoImportPlugin from '@opentiny/unplugin-tiny-vue'
|
|
54
|
+
|
|
55
|
+
export default {
|
|
56
|
+
plugins: [
|
|
57
|
+
Components({
|
|
58
|
+
resolvers: [TinyVueResolver]
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Webpack
|
|
65
|
+
|
|
66
|
+
```js
|
|
67
|
+
// webpack.config.js
|
|
68
|
+
|
|
69
|
+
const Components = require('unplugin-vue-components/webpack').default
|
|
70
|
+
const TinyVueResolver = require('@opentiny/unplugin-tiny-vue').TinyVueResolver
|
|
71
|
+
|
|
72
|
+
module.exports = defineConfig({
|
|
73
|
+
configureWebpack: {
|
|
74
|
+
plugins: [
|
|
75
|
+
Components({
|
|
76
|
+
resolvers: [TinyVueResolver]
|
|
77
|
+
})
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
```
|
|
82
|
+
|
|
43
83
|
想了解更多自动按需导入的信息,请参考:[unplugin-vue-components](https://github.com/antfu/unplugin-vue-components) 和 [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import)。
|
|
44
84
|
|
|
45
85
|
### 多组件引入
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-docs",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@unocss/reset": "0.38.2",
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
"vue-router": "4.1.5",
|
|
16
16
|
"marked": "^4.3.0",
|
|
17
17
|
"sortablejs": "1.15.0",
|
|
18
|
-
"@opentiny/vue-repl": "^1.1.
|
|
18
|
+
"@opentiny/vue-repl": "^1.1.2",
|
|
19
|
+
"@opentiny/vue": "~3.16.0",
|
|
19
20
|
"@opentiny/vue-common": "~3.16.0",
|
|
21
|
+
"@opentiny/vue-design-smb": "~3.16.0",
|
|
22
|
+
"@opentiny/vue-design-aurora": "~3.16.0",
|
|
23
|
+
"@opentiny/vue-theme": "~3.16.2",
|
|
20
24
|
"@opentiny/vue-icon-saas": "~3.16.0",
|
|
21
25
|
"@opentiny/vue-icon": "~3.16.0",
|
|
22
|
-
"@opentiny/vue": "~3.16.0",
|
|
23
|
-
"@opentiny/vue-design-smb": "~3.16.0",
|
|
24
26
|
"@opentiny/vue-design-saas": "~3.16.0",
|
|
25
|
-
"@opentiny/vue-theme": "~3.16.1",
|
|
26
|
-
"@opentiny/vue-design-aurora": "~3.16.0",
|
|
27
27
|
"@opentiny/vue-theme-mobile": "~3.16.0",
|
|
28
|
-
"@opentiny/vue-
|
|
29
|
-
"@opentiny/vue-
|
|
28
|
+
"@opentiny/vue-theme-saas": "~3.16.0",
|
|
29
|
+
"@opentiny/vue-vite-import": "~1.1.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/markdown-it": "^12.2.3",
|
package/playground/App.vue
CHANGED
|
@@ -17,7 +17,7 @@ import logoUrl from './assets/opentiny-logo.svg?url'
|
|
|
17
17
|
import GitHub from './icons/Github.vue'
|
|
18
18
|
import Share from './icons/Share.vue'
|
|
19
19
|
|
|
20
|
-
const VERSION = 'tiny-vue-version-3.
|
|
20
|
+
const VERSION = 'tiny-vue-version-3.16'
|
|
21
21
|
const LAYOUT = 'playground-layout'
|
|
22
22
|
const LAYOUT_REVERSE = 'playground-layout-reverse'
|
|
23
23
|
|
|
@@ -28,27 +28,35 @@ const isMobileFirst = tinyMode === 'mobile-first'
|
|
|
28
28
|
const isSaas = tinyTheme === 'saas'
|
|
29
29
|
const isPreview = searchObj.get('openMode') === 'preview' // 是否多端弹窗预览
|
|
30
30
|
|
|
31
|
-
const versions = ['3.14', '3.13', '3.12', '3.11', '3.10', '3.9', '3.8']
|
|
31
|
+
const versions = ['3.16', '3.15', '3.14', '3.13', '3.12', '3.11', '3.10', '3.9', '3.8']
|
|
32
32
|
const latestVersion = isPreview ? versions[0] : localStorage.getItem(VERSION) || versions[0]
|
|
33
33
|
const cdnHost = localStorage.getItem('setting-cdn')
|
|
34
|
+
|
|
35
|
+
const versionDelimiter = cdnHost.includes('npmmirror') ? '/' : '@'
|
|
36
|
+
const fileDelimiter = cdnHost.includes('npmmirror') ? 'files/' : ''
|
|
37
|
+
|
|
34
38
|
const getRuntime = (version) => {
|
|
35
39
|
const useVersion = import.meta.env.VITE_PLAYGROUND_VERIOSN || version
|
|
36
|
-
return `${cdnHost}/@opentiny/vue
|
|
40
|
+
return `${cdnHost}/@opentiny/vue${versionDelimiter}${useVersion}/${fileDelimiter}runtime/`
|
|
37
41
|
}
|
|
38
42
|
|
|
39
43
|
const createImportMap = (version) => {
|
|
40
44
|
const imports = {
|
|
45
|
+
'vue': `${cdnHost}/vue${versionDelimiter}3.4.27/${fileDelimiter}dist/vue.runtime.esm-browser.js`,
|
|
46
|
+
'@vue/compiler-sfc': `${cdnHost}/@vue/compiler-sfc${versionDelimiter}3.4.27/${fileDelimiter}dist/compiler-sfc.esm-browser.js`,
|
|
41
47
|
'@opentiny/vue': `${getRuntime(version)}tiny-vue.mjs`,
|
|
42
48
|
'@opentiny/vue-icon': `${getRuntime(version)}tiny-vue-icon.mjs`,
|
|
43
49
|
'@opentiny/vue-locale': `${getRuntime(version)}tiny-vue-locale.mjs`,
|
|
44
50
|
'@opentiny/vue-common': `${getRuntime(version)}tiny-vue-common.mjs`,
|
|
45
|
-
'@opentiny/vue-theme/': `${cdnHost}/@opentiny/vue-theme
|
|
46
|
-
'@opentiny/vue-theme-mobile/': `${cdnHost}/@opentiny/vue-theme-mobile
|
|
47
|
-
'@opentiny/vue-renderless/': `${cdnHost}/@opentiny/vue-renderless
|
|
48
|
-
'sortablejs': `${cdnHost}/sortablejs
|
|
51
|
+
'@opentiny/vue-theme/': `${cdnHost}/@opentiny/vue-theme${versionDelimiter}${version}/${fileDelimiter}`,
|
|
52
|
+
'@opentiny/vue-theme-mobile/': `${cdnHost}/@opentiny/vue-theme-mobile${versionDelimiter}${version}/${fileDelimiter}`,
|
|
53
|
+
'@opentiny/vue-renderless/': `${cdnHost}/@opentiny/vue-renderless${versionDelimiter}${version}/${fileDelimiter}`,
|
|
54
|
+
'sortablejs': `${cdnHost}/sortablejs${versionDelimiter}1.15.0/${fileDelimiter}modular/sortable.esm.js`
|
|
49
55
|
}
|
|
50
56
|
if (['aurora', 'smb', 'saas'].includes(tinyTheme)) {
|
|
51
|
-
imports[
|
|
57
|
+
imports[
|
|
58
|
+
`@opentiny/vue-design-${tinyTheme}`
|
|
59
|
+
] = `${cdnHost}/@opentiny/vue-design-${tinyTheme}${versionDelimiter}${version}/${fileDelimiter}index.js`
|
|
52
60
|
}
|
|
53
61
|
if (isSaas) {
|
|
54
62
|
imports['@opentiny/vue-icon'] = `${getRuntime(version)}tiny-vue-icon-saas.mjs`
|
|
@@ -67,10 +75,10 @@ const getTinyTheme = (version) => {
|
|
|
67
75
|
theme = 'default'
|
|
68
76
|
}
|
|
69
77
|
const tinyThemeMap = {
|
|
70
|
-
default: `${cdnHost}/@opentiny/vue-theme
|
|
71
|
-
smb: `${cdnHost}/@opentiny/vue-theme
|
|
72
|
-
aurora: `${cdnHost}/@opentiny/vue-theme
|
|
73
|
-
saas: `${cdnHost}/@opentiny/vue-theme-saas
|
|
78
|
+
default: `${cdnHost}/@opentiny/vue-theme${versionDelimiter}${version}/${fileDelimiter}index.css`,
|
|
79
|
+
smb: `${cdnHost}/@opentiny/vue-theme${versionDelimiter}${version}/${fileDelimiter}index.css`,
|
|
80
|
+
aurora: `${cdnHost}/@opentiny/vue-theme${versionDelimiter}${version}/${fileDelimiter}index.css`,
|
|
81
|
+
saas: `${cdnHost}/@opentiny/vue-theme-saas${versionDelimiter}${version}/${fileDelimiter}index.css`
|
|
74
82
|
}
|
|
75
83
|
return tinyThemeMap[theme]
|
|
76
84
|
}
|
|
@@ -163,7 +171,7 @@ function insertStyleDom(version) {
|
|
|
163
171
|
|
|
164
172
|
// 增加mobile支持,增加mobile的样式表
|
|
165
173
|
const mobileLink = link.cloneNode(true)
|
|
166
|
-
mobileLink.href = `${cdnHost}/@opentiny/vue-theme-mobile
|
|
174
|
+
mobileLink.href = `${cdnHost}/@opentiny/vue-theme-mobile${versionDelimiter}${version}/${fileDelimiter}index.css`
|
|
167
175
|
iframeWin.document.head.append(mobileLink)
|
|
168
176
|
})
|
|
169
177
|
})
|
package/playground.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Vite + Vue</title>
|
|
8
8
|
<script>
|
|
9
|
-
const cdnHost = 'https://
|
|
9
|
+
const cdnHost = 'https://registry.npmmirror.com'
|
|
10
10
|
window.localStorage.setItem('setting-cdn', cdnHost)
|
|
11
11
|
</script>
|
|
12
12
|
</head>
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
<div id="app"></div>
|
|
15
15
|
<script type="module" src="/playground/main.js"></script>
|
|
16
16
|
</body>
|
|
17
|
-
</html>
|
|
17
|
+
</html>
|