@opentiny/vue-docs 3.24.6 → 3.26.0
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/.stylelintrc.js +2 -2
- package/demos/apis/button.js +15 -0
- package/demos/apis/calendar-view.js +3 -2
- package/demos/apis/chart-demo.js +1 -1
- package/demos/apis/chart-docs.js +1 -1
- package/demos/apis/chart-events.js +1 -1
- package/demos/apis/chart-question.js +1 -1
- package/demos/apis/chart.js +1 -1
- package/demos/apis/form.js +3 -0
- package/demos/apis/grid.js +76 -16
- package/demos/apis/modal.js +1 -1
- package/demos/apis/numeric.js +3 -3
- package/demos/apis/search.js +28 -0
- package/demos/apis/slider-button.js +22 -0
- package/demos/apis/split.js +11 -0
- package/demos/apis/steps.js +3 -3
- package/demos/apis/tabs.js +12 -0
- package/demos/apis/time-line.js +20 -0
- package/demos/mobile-first/app/button/type.vue +1 -1
- package/demos/mobile-first/app/button/webdoc/button.js +2 -2
- package/demos/mobile-first/app/slider-button/basic-usage.vue +5 -5
- package/demos/mobile-first/app/slider-button/webdoc/slider-button.js +1 -1
- package/demos/mobile-first/app/steps/advanced-steps.vue +8 -1
- package/demos/mobile-first/menus.js +16 -9
- package/demos/pc/app/action-menu/basic-usage-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/basic-usage.vue +1 -1
- package/demos/pc/app/action-menu/card-mode-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/card-mode.vue +1 -1
- package/demos/pc/app/action-menu/disabled-composition-api.vue +2 -2
- package/demos/pc/app/action-menu/disabled.vue +2 -2
- package/demos/pc/app/action-menu/events-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/events.vue +1 -1
- package/demos/pc/app/action-menu/icon-composition-api.vue +2 -2
- package/demos/pc/app/action-menu/icon.vue +2 -2
- package/demos/pc/app/action-menu/max-show-num-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/max-show-num.vue +1 -1
- package/demos/pc/app/action-menu/more-text-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/more-text.vue +1 -1
- package/demos/pc/app/action-menu/popper-class-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/popper-class.vue +1 -1
- package/demos/pc/app/action-menu/slot-item-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/slot-item.vue +1 -1
- package/demos/pc/app/action-menu/spacing-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/spacing.vue +1 -1
- package/demos/pc/app/action-menu/text-field-composition-api.vue +1 -1
- package/demos/pc/app/action-menu/text-field.spec.ts +1 -1
- package/demos/pc/app/action-menu/text-field.vue +1 -1
- package/demos/pc/app/amount/custom-service.spec.js +4 -4
- package/demos/pc/app/base-select/slot-reference.spec.ts +1 -1
- package/demos/pc/app/button/icon-composition-api.vue +3 -1
- package/demos/pc/app/button/icon.vue +3 -1
- package/demos/pc/app/button/webdoc/button.js +3 -2
- package/demos/pc/app/calendar-view/calendar-mode-composition-api.vue +7 -1
- package/demos/pc/app/calendar-view/calendar-mode.spec.ts +3 -0
- package/demos/pc/app/calendar-view/calendar-mode.vue +7 -1
- package/demos/pc/app/carousel/webdoc/carousel.js +0 -18
- package/demos/pc/app/color-picker/alpha-composition-api.vue +1 -1
- package/demos/pc/app/color-picker/alpha.spec.ts +2 -2
- package/demos/pc/app/color-picker/alpha.vue +1 -1
- package/demos/pc/app/color-picker/base.spec.ts +2 -2
- package/demos/pc/app/color-picker/default-visible.spec.ts +1 -1
- package/demos/pc/app/color-picker/event-composition-api.vue +2 -2
- package/demos/pc/app/color-picker/event.spec.ts +4 -4
- package/demos/pc/app/color-picker/event.vue +1 -1
- package/demos/pc/app/color-picker/format.spec.ts +6 -6
- package/demos/pc/app/color-picker/history.spec.ts +1 -7
- package/demos/pc/app/color-picker/predefine.spec.ts +3 -10
- package/demos/pc/app/color-picker/size.spec.ts +4 -4
- package/demos/pc/app/color-select-panel/format.spec.ts +2 -8
- package/demos/pc/app/color-select-panel/history.spec.ts +0 -2
- package/demos/pc/app/color-select-panel/predefine.spec.ts +0 -3
- package/demos/pc/app/container/basic-usage-composition-api.vue +10 -10
- package/demos/pc/app/container/basic-usage.vue +10 -10
- package/demos/pc/app/container/custom-with-height-composition-api.vue +8 -8
- package/demos/pc/app/container/custom-with-height.vue +10 -10
- package/demos/pc/app/date-panel/custom-week.spec.ts +2 -2
- package/demos/pc/app/dialog-select/nest-grid-single.spec.ts +40 -0
- package/demos/pc/app/dialog-select/nest-tree-multi.spec.ts +53 -0
- package/demos/pc/app/dialog-select/nest-tree-single.spec.ts +25 -0
- package/demos/pc/app/dialog-select/set-selection.spec.ts +20 -0
- package/demos/pc/app/file-upload/before-upload-limit-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/before-upload-limit.spec.ts +1 -1
- package/demos/pc/app/file-upload/before-upload-limit.vue +1 -1
- package/demos/pc/app/file-upload/custom-trigger-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/custom-trigger.spec.ts +1 -1
- package/demos/pc/app/file-upload/custom-trigger.vue +1 -1
- package/demos/pc/app/file-upload/custom-upload-tip-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/custom-upload-tip.vue +1 -1
- package/demos/pc/app/file-upload/form-validation-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/form-validation.vue +1 -1
- package/demos/pc/app/file-upload/image-size-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/image-size.spec.ts +1 -1
- package/demos/pc/app/file-upload/image-size.vue +1 -1
- package/demos/pc/app/file-upload/multiple-file-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/multiple-file.spec.ts +1 -1
- package/demos/pc/app/file-upload/multiple-file.vue +1 -1
- package/demos/pc/app/file-upload/prevent-delete-file-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/prevent-delete-file.vue +1 -1
- package/demos/pc/app/file-upload/upload-request-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/upload-request.spec.ts +2 -2
- package/demos/pc/app/file-upload/upload-request.vue +1 -1
- package/demos/pc/app/grid/base/basic-usage-composition-api.vue +1 -17
- package/demos/pc/app/grid/custom/column-fixed.spec.js +2 -1
- package/demos/pc/app/grid/custom/page-size.spec.js +1 -1
- package/demos/pc/app/grid/data-source/auto-load.spec.js +0 -1
- package/demos/pc/app/grid/data-source/request-service.spec.js +1 -1
- package/demos/pc/app/grid/data-source/static-data.spec.js +1 -1
- package/demos/pc/app/grid/dynamically-columns/dynamically-columns.spec.js +2 -1
- package/demos/pc/app/grid/edit/scrollbar-not-blur-composition-api.vue +119 -0
- package/demos/pc/app/grid/edit/scrollbar-not-blur.spec.ts +28 -0
- package/demos/pc/app/grid/edit/scrollbar-not-blur.vue +129 -0
- package/demos/pc/app/grid/editor/custom-edit.spec.js +7 -2
- package/demos/pc/app/grid/empty/empty-data-iscenter.spec.js +1 -1
- package/demos/pc/app/grid/event/toolbar-button-click-event.spec.js +1 -1
- package/demos/pc/app/grid/expand/expand-trigger-slot-composition-api.vue +85 -0
- package/demos/pc/app/grid/expand/expand-trigger-slot.spec.ts +11 -0
- package/demos/pc/app/grid/expand/expand-trigger-slot.vue +95 -0
- package/demos/pc/app/grid/expand/set-row-expansion.spec.js +4 -0
- package/demos/pc/app/grid/filter/custom-filter.spec.js +3 -3
- package/demos/pc/app/grid/filter/default-filter-composition-api.vue +6 -0
- package/demos/pc/app/grid/filter/default-filter.vue +6 -0
- package/demos/pc/app/grid/filter/default-relation.spec.js +1 -1
- package/demos/pc/app/grid/filter/server-filter.spec.js +1 -1
- package/demos/pc/app/grid/filter/simple-filter.spec.ts +5 -4
- package/demos/pc/app/grid/fixed/right-fixed-composition-api.vue +4 -4
- package/demos/pc/app/grid/fixed/right-fixed.vue +4 -4
- package/demos/pc/app/grid/footer/footer-summation-empty.spec.js +0 -1
- package/demos/pc/app/grid/large-data/full-data-loading.spec.js +10 -3
- package/demos/pc/app/grid/large-data/virtual-rolling.spec.js +9 -2
- package/demos/pc/app/grid/mouse-keyboard/keyboard-navigation.spec.js +4 -1
- package/demos/pc/app/grid/renderer/inner-renderer-date-composition-api.vue +4 -3
- package/demos/pc/app/grid/renderer/inner-renderer-date.spec.js +2 -2
- package/demos/pc/app/grid/renderer/inner-renderer-date.vue +3 -3
- package/demos/pc/app/grid/renderer/inner-renderer.spec.js +4 -0
- package/demos/pc/app/grid/size/max-min-grid-height.spec.js +2 -2
- package/demos/pc/app/grid/slot/slot-conf-composition-api.vue +141 -0
- package/demos/pc/app/grid/slot/slot-conf.spec.js +12 -0
- package/demos/pc/app/grid/slot/slot-conf.vue +151 -0
- package/demos/pc/app/grid/sort/combinations-sort.spec.js +2 -2
- package/demos/pc/app/grid/webdoc/grid-edit.js +12 -0
- package/demos/pc/app/grid/webdoc/grid-empty.js +1 -1
- package/demos/pc/app/grid/webdoc/grid-expand.js +11 -0
- package/demos/pc/app/grid/webdoc/grid-slot.js +9 -0
- package/demos/pc/app/icon/iconGroups.js +8 -2
- package/demos/pc/app/input/basic-usage.spec.ts +1 -1
- package/demos/pc/app/loading/background.spec.ts +3 -1
- package/demos/pc/app/loading/custom-class.spec.ts +4 -2
- package/demos/pc/app/loading/fullscreen.spec.ts +6 -4
- package/demos/pc/app/loading/loading-tip-text.spec.ts +3 -1
- package/demos/pc/app/loading/size.spec.ts +5 -3
- package/demos/pc/app/locales/custom-service-composition-api.vue +3 -3
- package/demos/pc/app/locales/custom-service.spec.ts +1 -1
- package/demos/pc/app/locales/custom-service.vue +3 -3
- package/demos/pc/app/modal/basic-usage.spec.ts +2 -1
- package/demos/pc/app/modal/message-close.spec.ts +2 -2
- package/demos/pc/app/modal/message-id.spec.ts +2 -2
- package/demos/pc/app/modal/modal-fn-slots.spec.ts +5 -7
- package/demos/pc/app/modal/modal-header.spec.ts +2 -1
- package/demos/pc/app/numeric/input-event-composition-api.vue +26 -0
- package/demos/pc/app/numeric/input-event.spec.ts +15 -0
- package/demos/pc/app/numeric/input-event.vue +34 -0
- package/demos/pc/app/numeric/webdoc/numeric.js +12 -0
- package/demos/pc/app/pager/align-composition-api.vue +10 -13
- package/demos/pc/app/pager/align.spec.ts +8 -3
- package/demos/pc/app/pager/align.vue +11 -5
- package/demos/pc/app/pager/page-size-composition-api.vue +2 -2
- package/demos/pc/app/pager/page-size.spec.ts +1 -1
- package/demos/pc/app/pager/page-size.vue +2 -2
- package/demos/pc/app/pager/pager-in-grid-composition-api.vue +0 -1
- package/demos/pc/app/pager/pager-in-grid.vue +0 -1
- package/demos/pc/app/pager/popper-append-to-body-composition-api.vue +1 -7
- package/demos/pc/app/pager/popper-append-to-body.vue +1 -7
- package/demos/pc/app/pager/popper-class-composition-api.vue +1 -7
- package/demos/pc/app/pager/popper-class.vue +1 -7
- package/demos/pc/app/popeditor/conditions.spec.ts +1 -1
- package/demos/pc/app/popeditor/suggest.spec.ts +1 -1
- package/demos/pc/app/qr-code/icon-composition-api.vue +17 -3
- package/demos/pc/app/qr-code/icon.spec.ts +19 -0
- package/demos/pc/app/qr-code/icon.vue +25 -4
- package/demos/pc/app/qr-code/style-composition-api.vue +2 -9
- package/demos/pc/app/qr-code/style.spec.ts +18 -1
- package/demos/pc/app/qr-code/style.vue +11 -8
- package/demos/pc/app/query-builder/webdoc/query-builder.js +5 -3
- package/demos/pc/app/search/events.spec.ts +1 -1
- package/demos/pc/app/search/events.vue +9 -0
- package/demos/pc/app/search/slot-prefix-suffix.spec.ts +1 -1
- package/demos/pc/app/search/webdoc/search.js +12 -4
- package/demos/pc/app/select/nest-grid-remote.spec.ts +3 -3
- package/demos/pc/app/select/nest-grid.spec.ts +1 -1
- package/demos/pc/app/select/nest-radio-grid-much-data.spec.ts +5 -7
- package/demos/pc/app/tabs/basic-usage.spec.ts +2 -2
- package/demos/pc/app/tabs/header-only.vue +56 -0
- package/demos/pc/app/tabs/size.spec.ts +2 -2
- package/demos/pc/app/tabs/webdoc/tabs.js +12 -0
- package/demos/pc/app/time-line/slot-default-composition-api.vue +81 -0
- package/demos/pc/app/time-line/slot-default.spec.ts +13 -0
- package/demos/pc/app/time-line/slot-default.vue +95 -0
- package/demos/pc/app/time-line/webdoc/time-line.js +12 -0
- package/demos/pc/menus.js +20 -10
- package/demos/pc/webdoc/changelog-en.md +224 -197
- package/demos/pc/webdoc/changelog.md +167 -387
- package/demos/pc/webdoc/faq.md +14 -0
- package/demos/saas/menus.js +2 -14
- package/env/.env +3 -0
- package/package.json +25 -24
- package/playground/App.vue +2 -2
- package/postcss.config.cjs +1 -0
- package/src/App.vue +26 -59
- package/src/components/anchor.vue +5 -1
- package/src/components/demo.vue +18 -7
- package/src/components/design-token.vue +90 -0
- package/src/components/float-settings.vue +4 -23
- package/src/components/mcp-docs.vue +4 -26
- package/src/components/version-tip.vue +1 -1
- package/src/composable/useTinyRemoter.ts +176 -0
- package/src/composable/utils.ts +2 -166
- package/src/const.ts +6 -1
- package/src/i18n/en.json +2 -0
- package/src/i18n/es.json +47 -0
- package/src/i18n/index.js +24 -5
- package/src/i18n/pt.json +47 -0
- package/src/i18n/zh.json +2 -0
- package/src/main.js +17 -13
- package/src/{menus.jsx → menus.js} +0 -1
- package/src/router.js +3 -18
- package/src/tools/appData.js +6 -16
- package/src/tools/storage.js +5 -3
- package/src/tools/useApiMode.js +11 -3
- package/src/tools/useBulletin.jsx +9 -8
- package/src/tools/useStyleSettings.js +8 -0
- package/src/tools/useTemplateMode.js +5 -1
- package/src/tools/utils.js +32 -1
- package/src/views/components-doc/cmp-config.js +13 -1
- package/src/views/components-doc/common.vue +42 -15
- package/src/views/layout/layout.vue +5 -8
- package/src/views/overview.vue +1 -1
- package/tsconfig.node.json +2 -4
- package/src/components/MessageCard.vue +0 -117
- package/src/components/tiny-robot-chat.vue +0 -128
- package/src/composable/DifyModelProvider.ts +0 -65
- package/src/composable/useTinyRobot.ts +0 -167
- package/src/tools/useAllTaskFinish.ts +0 -0
- package/src/views/comprehensive/Demo.vue +0 -212
- package/src/views/comprehensive/index.vue +0 -380
- package/src/views/comprehensive/products.json +0 -98
- package/src/views/comprehensive/types/index.ts +0 -37
- package/src/views/remoter/index.vue +0 -63
- package/src/views/remoter/sound.vue +0 -349
- /package/demos/pc/app/grid/expand/{expand-config.spec.js → expand-config.spec.ts} +0 -0
package/demos/pc/webdoc/faq.md
CHANGED
|
@@ -110,3 +110,17 @@ const options = {
|
|
|
110
110
|
|
|
111
111
|
xss.setXssOption(options)
|
|
112
112
|
```
|
|
113
|
+
|
|
114
|
+
## 6、多组件库混用场景中的命名冲突问题
|
|
115
|
+
|
|
116
|
+
**问题描述:** 在同时使用多个组件库(如 TinyVue 和 ElementUI)时,由于各组件库都会在 Vue 实例上挂载全局方法(如 `$modal`、`$message` 等),容易造成命名冲突。
|
|
117
|
+
|
|
118
|
+
**解决方案:** TinyVue 提供了自定义前缀的配置方式,可以通过设置 `$TinyModalApiPrefix` 来修改默认的方法名前缀,避免冲突。
|
|
119
|
+
|
|
120
|
+
```js
|
|
121
|
+
// vue3下解决方案
|
|
122
|
+
app.config.globalProperties.$TinyModalApiPrefix = 'tiny_'
|
|
123
|
+
|
|
124
|
+
// vue2下解决方案
|
|
125
|
+
Vue.prototype.$TinyModalApiPrefix = 'tiny_'
|
|
126
|
+
```
|
package/demos/saas/menus.js
CHANGED
|
@@ -6,24 +6,12 @@ const noSaasComponents = [
|
|
|
6
6
|
'ActionMenu',
|
|
7
7
|
'ColorPicker',
|
|
8
8
|
'ColorSelectPanel',
|
|
9
|
-
'ConfigProvider',
|
|
10
9
|
'DatePickerMobileFirst',
|
|
11
|
-
'Divider',
|
|
12
|
-
'IndexBar',
|
|
13
|
-
'IndexBarAnchor',
|
|
14
|
-
'Label',
|
|
15
|
-
'Mask',
|
|
16
10
|
'MindMap',
|
|
17
|
-
'MultiSelect',
|
|
18
|
-
'MultiSelectItem',
|
|
19
11
|
'QrCode',
|
|
20
12
|
'RichTextEditor',
|
|
21
13
|
'TimelineItem',
|
|
22
|
-
'Toast',
|
|
23
|
-
'TopBox',
|
|
24
14
|
'Watermark',
|
|
25
|
-
'Wheel',
|
|
26
|
-
'Skeleton',
|
|
27
15
|
'Statistic'
|
|
28
16
|
]
|
|
29
17
|
|
|
@@ -44,8 +32,8 @@ const cmpMenus = pcCmpMenus.map((pcMenusitem) => {
|
|
|
44
32
|
pcMenusitem.children = pcMenusitem.children.filter((item) => !noSaasComponents.includes(item.name))
|
|
45
33
|
|
|
46
34
|
// 插入 queryBuild 的菜单。 pc 文档下线该组件,仅在saas文档展示
|
|
47
|
-
if (pcMenusitem.label === '
|
|
48
|
-
pcMenusitem.children.push({ 'nameCn': '查询生成器', 'name': 'QueryBuilder ', 'key': 'query-builder' })
|
|
35
|
+
if (pcMenusitem.label === '表单') {
|
|
36
|
+
pcMenusitem.children.push({ 'nameCn': '查询生成器', 'name': 'QueryBuilder ', 'key': 'query-builder', mode: ['pc'] })
|
|
49
37
|
}
|
|
50
38
|
return pcMenusitem
|
|
51
39
|
})
|
package/env/.env
CHANGED
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-docs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.26.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@docsearch/css": "^3.8.0",
|
|
8
8
|
"@docsearch/js": "^3.8.0",
|
|
9
9
|
"@docsearch/react": "npm:@docsearch/css",
|
|
10
|
-
"@opentiny/next-
|
|
11
|
-
"@opentiny/tiny-robot": "0.
|
|
12
|
-
"@opentiny/tiny-robot-kit": "0.
|
|
13
|
-
"@opentiny/tiny-robot-svgs": "0.
|
|
14
|
-
"@opentiny/tiny-vue-mcp": "^0.0.
|
|
10
|
+
"@opentiny/next-sdk": "^0.1.1",
|
|
11
|
+
"@opentiny/tiny-robot": "0.3.0-alpha.3",
|
|
12
|
+
"@opentiny/tiny-robot-kit": "0.3.0-alpha.3",
|
|
13
|
+
"@opentiny/tiny-robot-svgs": "0.3.0-alpha.3",
|
|
14
|
+
"@opentiny/tiny-vue-mcp": "^0.0.3",
|
|
15
15
|
"@opentiny/vue-repl": "^1.1.2",
|
|
16
16
|
"@opentiny/vue-vite-import": "~1.2.0",
|
|
17
17
|
"@unocss/reset": "0.38.2",
|
|
@@ -29,24 +29,25 @@
|
|
|
29
29
|
"vue": "^3.4.31",
|
|
30
30
|
"vue-i18n": "~9.14.3",
|
|
31
31
|
"vue-router": "4.1.5",
|
|
32
|
-
"
|
|
33
|
-
"@opentiny/
|
|
34
|
-
"@opentiny/vue
|
|
35
|
-
"@opentiny/vue": "~3.
|
|
36
|
-
"@opentiny/vue-design-
|
|
37
|
-
"@opentiny/vue-design-
|
|
38
|
-
"@opentiny/vue-
|
|
39
|
-
"@opentiny/vue-
|
|
40
|
-
"@opentiny/vue-
|
|
41
|
-
"@opentiny/vue-
|
|
42
|
-
"@opentiny/vue-
|
|
43
|
-
"@opentiny/vue-icon-multicolor": "~3.
|
|
44
|
-
"@opentiny/vue-
|
|
45
|
-
"@opentiny/vue-
|
|
46
|
-
"@opentiny/vue-
|
|
47
|
-
"@opentiny/vue-
|
|
48
|
-
"@opentiny/vue-
|
|
49
|
-
"@opentiny/vue-theme
|
|
32
|
+
"zod": "^3.24.4",
|
|
33
|
+
"@opentiny/utils": "~3.26.0",
|
|
34
|
+
"@opentiny/vue": "~3.26.0",
|
|
35
|
+
"@opentiny/vue-common": "~3.26.0",
|
|
36
|
+
"@opentiny/vue-design-aurora": "~3.26.0",
|
|
37
|
+
"@opentiny/vue-design-saas": "~3.26.0",
|
|
38
|
+
"@opentiny/vue-design-smb": "~3.26.0",
|
|
39
|
+
"@opentiny/vue-directive": "~3.26.0",
|
|
40
|
+
"@opentiny/vue-flowchart": "~3.26.0",
|
|
41
|
+
"@opentiny/vue-hooks": "~3.26.0",
|
|
42
|
+
"@opentiny/vue-huicharts": "~3.26.0",
|
|
43
|
+
"@opentiny/vue-icon-multicolor": "~3.26.0",
|
|
44
|
+
"@opentiny/vue-icon": "~3.26.0",
|
|
45
|
+
"@opentiny/vue-icon-saas": "~3.26.0",
|
|
46
|
+
"@opentiny/vue-locale": "~3.26.0",
|
|
47
|
+
"@opentiny/vue-modal": "~3.26.0",
|
|
48
|
+
"@opentiny/vue-renderless": "~3.26.0",
|
|
49
|
+
"@opentiny/vue-theme": "~3.26.0",
|
|
50
|
+
"@opentiny/vue-theme-saas": "~3.26.1"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"@playwright/test": "~1.49.0",
|
package/playground/App.vue
CHANGED
|
@@ -11,7 +11,7 @@ import logoUrl from './assets/opentiny-logo.svg?url'
|
|
|
11
11
|
import GitHub from './icons/Github.vue'
|
|
12
12
|
import Share from './icons/Share.vue'
|
|
13
13
|
|
|
14
|
-
const VERSION = 'tiny-vue-version-3.
|
|
14
|
+
const VERSION = 'tiny-vue-version-3.26'
|
|
15
15
|
const NOTIFY_KEY = 'tiny-vue-playground-notify'
|
|
16
16
|
const LAYOUT = 'playground-layout'
|
|
17
17
|
const LAYOUT_REVERSE = 'playground-layout-reverse'
|
|
@@ -23,7 +23,7 @@ const isMobileFirst = tinyMode === 'mobile-first'
|
|
|
23
23
|
const isSaas = tinyTheme === 'saas'
|
|
24
24
|
const isPreview = searchObj.get('openMode') === 'preview' // 是否多端弹窗预览
|
|
25
25
|
|
|
26
|
-
const versions = ['3.
|
|
26
|
+
const versions = ['3.26', '3.25', '3.24']
|
|
27
27
|
const getVersion = () => {
|
|
28
28
|
if (isPreview) {
|
|
29
29
|
return versions[0]
|
package/postcss.config.cjs
CHANGED
package/src/App.vue
CHANGED
|
@@ -10,70 +10,37 @@
|
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
|
-
<script>
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import { onMounted, provide, ref } from 'vue'
|
|
15
|
+
import { TinyConfigProvider, TinyModal } from '@opentiny/vue'
|
|
16
16
|
import { iconClose } from '@opentiny/vue-icon'
|
|
17
|
-
import { appData } from './tools'
|
|
18
|
-
import useTheme from './tools/useTheme'
|
|
19
|
-
import { useNextClient } from '@opentiny/next-vue'
|
|
20
|
-
import { globalConversation, $session } from './composable/utils'
|
|
21
|
-
|
|
22
|
-
export default defineComponent({
|
|
23
|
-
name: 'AppVue',
|
|
24
|
-
props: [],
|
|
25
|
-
components: {
|
|
26
|
-
TinyConfigProvider: ConfigProvider,
|
|
27
|
-
TinyModal: Modal,
|
|
28
|
-
TinyIconClose: iconClose()
|
|
29
|
-
},
|
|
30
|
-
setup() {
|
|
31
|
-
const previewUrl = ref(import.meta.env.VITE_PLAYGROUND_URL)
|
|
32
|
-
const modalSHow = ref(false)
|
|
33
17
|
|
|
34
|
-
|
|
35
|
-
clientInfo: { name: 'tiny-vue-website', version: '1.0.0' },
|
|
36
|
-
proxyOptions: { url: 'https://agent.icjs.ink/sse', token: '', sessionId: $session.sessionId }
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
watch(
|
|
40
|
-
() => sessionId.value,
|
|
41
|
-
(newVal) => {
|
|
42
|
-
if (newVal) {
|
|
43
|
-
$session.sessionId = newVal
|
|
44
|
-
globalConversation.sessionId = newVal
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
)
|
|
18
|
+
import useTheme from './tools/useTheme'
|
|
48
19
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
allowDarkTheme: true,
|
|
53
|
-
searchConfig: {
|
|
54
|
-
show: true
|
|
55
|
-
},
|
|
56
|
-
menuCollapse: {
|
|
57
|
-
useCollapse: true, // 启用1024以下隐藏菜单
|
|
58
|
-
menuId: '#layoutSider'
|
|
59
|
-
}
|
|
60
|
-
})
|
|
61
|
-
common.renderHeader()
|
|
62
|
-
})
|
|
63
|
-
const { designConfig, currentThemeKey } = useTheme()
|
|
20
|
+
const modalSHow = ref(false)
|
|
21
|
+
const previewUrl = ref(import.meta.env.VITE_PLAYGROUND_URL)
|
|
22
|
+
const tinyIconClose = iconClose()
|
|
64
23
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
24
|
+
onMounted(() => {
|
|
25
|
+
// 加载header
|
|
26
|
+
const common = new window.TDCommon(['#header'], {
|
|
27
|
+
allowDarkTheme: true,
|
|
28
|
+
searchConfig: {
|
|
29
|
+
show: true
|
|
30
|
+
},
|
|
31
|
+
menuCollapse: {
|
|
32
|
+
useCollapse: true, // 启用1024以下隐藏菜单
|
|
33
|
+
menuId: '#layoutSider'
|
|
75
34
|
}
|
|
76
|
-
}
|
|
35
|
+
})
|
|
36
|
+
common.renderHeader()
|
|
37
|
+
})
|
|
38
|
+
const { designConfig, currentThemeKey } = useTheme()
|
|
39
|
+
|
|
40
|
+
// 多端的预览图
|
|
41
|
+
provide('showPreview', (url) => {
|
|
42
|
+
previewUrl.value = url
|
|
43
|
+
modalSHow.value = true
|
|
77
44
|
})
|
|
78
45
|
</script>
|
|
79
46
|
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
<div v-if="links.length" class="cmp-page-anchor catalog">
|
|
3
3
|
<tiny-anchor
|
|
4
4
|
id="anchor"
|
|
5
|
+
:tiny_mode="theme === 'saas' ? 'pc' : 'mobile-first'"
|
|
5
6
|
:offset-top="56"
|
|
6
7
|
:links="links"
|
|
7
8
|
:is-affix="props.anchorAffix"
|
|
8
|
-
type="dot"
|
|
9
|
+
:type="theme === 'saas' ? 'line' : 'dot'"
|
|
9
10
|
container-id="#doc-layout-scroller"
|
|
10
11
|
@link-click="handleAnchorClick"
|
|
11
12
|
>
|
|
@@ -21,6 +22,8 @@ const props = defineProps({ anchorAffix: {}, currentJson: {}, activeTab: {}, lan
|
|
|
21
22
|
|
|
22
23
|
const emit = defineEmits(['link-click'])
|
|
23
24
|
|
|
25
|
+
const theme = import.meta.env.VITE_TINY_THEME
|
|
26
|
+
|
|
24
27
|
// 实例锚点
|
|
25
28
|
const demoAnchorLinks = computed(() => {
|
|
26
29
|
const links =
|
|
@@ -71,6 +74,7 @@ const handleAnchorClick = (...args) => {
|
|
|
71
74
|
:deep(.tiny-anchor__affix) {
|
|
72
75
|
top: unset !important;
|
|
73
76
|
overflow-y: auto;
|
|
77
|
+
overflow-x: hidden;
|
|
74
78
|
max-height: calc(100vh - 300px);
|
|
75
79
|
}
|
|
76
80
|
|
package/src/components/demo.vue
CHANGED
|
@@ -38,10 +38,7 @@
|
|
|
38
38
|
</div>
|
|
39
39
|
<component :is="getDescMd(demo)" class="demo-desc" />
|
|
40
40
|
|
|
41
|
-
<div v-if="
|
|
42
|
-
<tiny-button @click="openPlayground(demo, false)">多端预览</tiny-button>
|
|
43
|
-
</div>
|
|
44
|
-
<div v-else-if="demoConfig.isMobile" class="pc-demo-container">
|
|
41
|
+
<div v-if="demoConfig.isMobile" class="pc-demo-container">
|
|
45
42
|
<div class="mobile-view-btn">
|
|
46
43
|
<tiny-button @click="openIframe(demo)">{{ i18nByKey('yan-shi') }}</tiny-button>
|
|
47
44
|
</div>
|
|
@@ -70,7 +67,19 @@
|
|
|
70
67
|
</template>
|
|
71
68
|
|
|
72
69
|
<script setup lang="ts">
|
|
73
|
-
import {
|
|
70
|
+
import {
|
|
71
|
+
ref,
|
|
72
|
+
reactive,
|
|
73
|
+
computed,
|
|
74
|
+
shallowRef,
|
|
75
|
+
onMounted,
|
|
76
|
+
onBeforeUnmount,
|
|
77
|
+
watch,
|
|
78
|
+
nextTick,
|
|
79
|
+
inject,
|
|
80
|
+
h,
|
|
81
|
+
provide
|
|
82
|
+
} from 'vue'
|
|
74
83
|
import { i18nByKey, getWord } from '@/i18n'
|
|
75
84
|
import { $split, fetchDemosFile } from '@/tools'
|
|
76
85
|
import { Tabs as TinyTabs, TabItem as TinyTabItem, Button as TinyButton } from '@opentiny/vue'
|
|
@@ -123,7 +132,7 @@ const showPreview = inject('showPreview')
|
|
|
123
132
|
const state = reactive({
|
|
124
133
|
tabValue: 'tab0',
|
|
125
134
|
cmpId: router.currentRoute.value.params.cmpId,
|
|
126
|
-
langKey: getWord('zh-CN', 'en-US'),
|
|
135
|
+
langKey: getWord('zh-CN', 'en-US', 'es-LA', 'pt-BR'),
|
|
127
136
|
copyTip: i18nByKey('copyCode'),
|
|
128
137
|
copyIcon: 'i-ti-copy'
|
|
129
138
|
})
|
|
@@ -257,6 +266,8 @@ const openIframe = (demo) => {
|
|
|
257
266
|
emit('get-iframe-demo', demo)
|
|
258
267
|
}
|
|
259
268
|
|
|
269
|
+
provide('TinyMode', templateModeState.mode)
|
|
270
|
+
|
|
260
271
|
onMounted(() => {
|
|
261
272
|
if (demoContainer.value) {
|
|
262
273
|
props.observer?.observe?.(demoContainer.value)
|
|
@@ -293,7 +304,7 @@ onBeforeUnmount(() => {
|
|
|
293
304
|
padding: 4px 8px;
|
|
294
305
|
margin: 0 4px;
|
|
295
306
|
font-size: 0.85em;
|
|
296
|
-
background-color: var(--tv-color-bg-header);
|
|
307
|
+
background-color: var(--tv-color-bg-header, #f5f7fa);
|
|
297
308
|
border-radius: 3px;
|
|
298
309
|
}
|
|
299
310
|
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="tiny-token-list">
|
|
3
|
+
<div class="tiny-token-title">
|
|
4
|
+
<h2>{{ capName }} 主题变量</h2>
|
|
5
|
+
<tiny-popover width="800" trigger="hover">
|
|
6
|
+
<div>
|
|
7
|
+
<div class="tiny-token-demo">
|
|
8
|
+
<async-highlight :code="content"></async-highlight>
|
|
9
|
+
</div>
|
|
10
|
+
<tiny-link
|
|
11
|
+
:icon="TinyIconViewFlowchart"
|
|
12
|
+
:underline="false"
|
|
13
|
+
href="https://opentiny.design/opentiny-design/guide/theme"
|
|
14
|
+
target="_blank"
|
|
15
|
+
>如何定制?</tiny-link
|
|
16
|
+
>
|
|
17
|
+
</div>
|
|
18
|
+
<template #reference>
|
|
19
|
+
<div class="tiny-design">
|
|
20
|
+
<tiny-button type="text" :icon="TinyIconHelpCircle" text="如何定制"> </tiny-button>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
</tiny-popover>
|
|
24
|
+
</div>
|
|
25
|
+
<tiny-grid :data="tokenList" row-id="name">
|
|
26
|
+
<tiny-grid-column field="token" title="Token名称"> </tiny-grid-column>
|
|
27
|
+
<tiny-grid-column field="desc" title="描述"> </tiny-grid-column>
|
|
28
|
+
<tiny-grid-column field="tokenValue" title="默认值"> </tiny-grid-column>
|
|
29
|
+
</tiny-grid>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script setup>
|
|
34
|
+
import { TinyGrid, TinyGridColumn, TinyPopover, TinyButton, TinyLink } from '@opentiny/vue'
|
|
35
|
+
import { camelize, capitalize } from '@vue/shared'
|
|
36
|
+
import { computed, ref } from 'vue'
|
|
37
|
+
import { iconHelpCircle, iconViewFlowchart } from '@opentiny/vue-icon'
|
|
38
|
+
import AsyncHighlight from './async-highlight.vue'
|
|
39
|
+
|
|
40
|
+
const props = defineProps({
|
|
41
|
+
name: String,
|
|
42
|
+
tokenList: Array
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
const TinyIconHelpCircle = iconHelpCircle()
|
|
46
|
+
const TinyIconViewFlowchart = iconViewFlowchart()
|
|
47
|
+
const capName = computed(() => capitalize(camelize(props.name)))
|
|
48
|
+
const theme = '`'
|
|
49
|
+
const content = ref(
|
|
50
|
+
`
|
|
51
|
+
<tiny-config-provider :theme="{css:${theme}.tiny-button{--tv-Button-bg-color-primary: red;}${theme}}">
|
|
52
|
+
<tiny-button type="primary">主题色按钮</tiny-button>
|
|
53
|
+
</tiny-config-provider>
|
|
54
|
+
`
|
|
55
|
+
)
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<style scoped lang="less">
|
|
59
|
+
.tiny-token-list {
|
|
60
|
+
padding-bottom: 150px;
|
|
61
|
+
}
|
|
62
|
+
.tiny-token-title {
|
|
63
|
+
font-size: 16px;
|
|
64
|
+
font-weight: bold;
|
|
65
|
+
margin-top: 26px;
|
|
66
|
+
margin-bottom: 26px;
|
|
67
|
+
}
|
|
68
|
+
h2 {
|
|
69
|
+
display: inline-block;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.tiny-design {
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
font-weight: normal;
|
|
75
|
+
display: inline-block;
|
|
76
|
+
margin-left: 8px;
|
|
77
|
+
line-height: 22px;
|
|
78
|
+
span {
|
|
79
|
+
color: #808808;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
.tiny-content-text {
|
|
83
|
+
width: 270px;
|
|
84
|
+
border: 1px solid #191919;
|
|
85
|
+
}
|
|
86
|
+
.tiny-token-demo {
|
|
87
|
+
border: 1px solid #efeff4;
|
|
88
|
+
margin-bottom: 12px;
|
|
89
|
+
}
|
|
90
|
+
</style>
|
|
@@ -43,9 +43,8 @@
|
|
|
43
43
|
<tiny-popover
|
|
44
44
|
width="180"
|
|
45
45
|
placement="left-end"
|
|
46
|
-
trigger="
|
|
46
|
+
trigger="click"
|
|
47
47
|
:visible-arrow="false"
|
|
48
|
-
v-model="demoStyleVisible"
|
|
49
48
|
popper-class="opt-menu style-settings-menu theme-settings-popover"
|
|
50
49
|
>
|
|
51
50
|
<div v-for="(item, index) in styleSettings" :key="index" class="style-settings-item">
|
|
@@ -60,18 +59,7 @@
|
|
|
60
59
|
</div>
|
|
61
60
|
<template #reference>
|
|
62
61
|
<div>
|
|
63
|
-
<div
|
|
64
|
-
v-if="appData.hasFloatRobot"
|
|
65
|
-
class="settings-btn style-settings-btn"
|
|
66
|
-
@click="appData.showTinyRobot = true"
|
|
67
|
-
>
|
|
68
|
-
<IconAi class="settings-icon style-settings-icon"></IconAi>
|
|
69
|
-
</div>
|
|
70
|
-
<div
|
|
71
|
-
class="settings-btn style-settings-btn"
|
|
72
|
-
@click="demoStyleVisible = !demoStyleVisible"
|
|
73
|
-
@blur="demoStyleVisible = false"
|
|
74
|
-
>
|
|
62
|
+
<div class="settings-btn style-settings-btn">
|
|
75
63
|
<style-settings-icon class="settings-icon style-settings-icon"></style-settings-icon>
|
|
76
64
|
</div>
|
|
77
65
|
</div>
|
|
@@ -104,7 +92,6 @@ import useTheme from '@/tools/useTheme'
|
|
|
104
92
|
import { appData } from '@/tools/appData.js'
|
|
105
93
|
import { router } from '@/router'
|
|
106
94
|
import useStyleSettings from '@/tools/useStyleSettings'
|
|
107
|
-
import { IconAi } from '@opentiny/tiny-robot-svgs'
|
|
108
95
|
|
|
109
96
|
// import ThemeSettingsIcon from '@/assets/images/theme-settings.svg'
|
|
110
97
|
import StyleSettingsIcon from '@/assets/images/style-settings.svg'
|
|
@@ -117,7 +104,6 @@ export default defineComponent({
|
|
|
117
104
|
TinyRadioGroup: RadioGroup,
|
|
118
105
|
IconUpWard: iconUpWard(),
|
|
119
106
|
TinyPopover: Popover,
|
|
120
|
-
IconAi,
|
|
121
107
|
// ThemeSettingsIcon,
|
|
122
108
|
StyleSettingsIcon
|
|
123
109
|
},
|
|
@@ -130,7 +116,6 @@ export default defineComponent({
|
|
|
130
116
|
const floatSettings = ref(null)
|
|
131
117
|
|
|
132
118
|
const state = reactive({
|
|
133
|
-
demoStyleVisible: false,
|
|
134
119
|
themeData: [],
|
|
135
120
|
styleSettings: getStyleSettings(i18nByKey),
|
|
136
121
|
settingsStyle: {
|
|
@@ -269,10 +254,6 @@ export default defineComponent({
|
|
|
269
254
|
</script>
|
|
270
255
|
|
|
271
256
|
<style lang="less">
|
|
272
|
-
.docs-on-robot-show .float-settings {
|
|
273
|
-
right: 680px;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
257
|
.float-settings {
|
|
277
258
|
position: fixed;
|
|
278
259
|
right: 200px;
|
|
@@ -378,10 +359,10 @@ html.dark .settings-btn {
|
|
|
378
359
|
}
|
|
379
360
|
.tiny-popover.tiny-popper.theme-settings-popover {
|
|
380
361
|
border-radius: 12px;
|
|
381
|
-
background-color: var(--tv-color-bg);
|
|
362
|
+
background-color: var(--tv-color-bg, #fff);
|
|
382
363
|
}
|
|
383
364
|
html.dark .tiny-popover.tiny-popper.theme-settings-popover {
|
|
384
|
-
background-color: var(--tv-color-bg-dark);
|
|
365
|
+
background-color: var(--tv-color-bg-dark, #191919);
|
|
385
366
|
}
|
|
386
367
|
|
|
387
368
|
.theme-settings-menu {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="mcp-list">
|
|
3
3
|
<div class="mcp-title">
|
|
4
|
-
<h2>{{
|
|
4
|
+
<h2>{{ name }} 组件的 MCP 工具</h2>
|
|
5
5
|
</div>
|
|
6
|
-
<tiny-grid :data="
|
|
6
|
+
<tiny-grid :data="data" row-id="name">
|
|
7
7
|
<tiny-grid-column field="name" title="名称" width="180"> </tiny-grid-column>
|
|
8
8
|
<tiny-grid-column field="param" title="参数类型" width="150"> </tiny-grid-column>
|
|
9
9
|
<tiny-grid-column field="desc" title="工具描述"> </tiny-grid-column>
|
|
@@ -12,34 +12,12 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script setup>
|
|
15
|
-
import { getTinyVueMcpConfig } from '@opentiny/tiny-vue-mcp'
|
|
16
15
|
import { TinyGrid, TinyGridColumn } from '@opentiny/vue'
|
|
17
|
-
import { camelize, capitalize } from '@vue/shared'
|
|
18
|
-
import { onMounted, computed } from 'vue'
|
|
19
16
|
|
|
20
17
|
const props = defineProps({
|
|
21
|
-
name: String
|
|
18
|
+
name: String,
|
|
19
|
+
data: Array
|
|
22
20
|
})
|
|
23
|
-
|
|
24
|
-
const mcpTools = getTinyVueMcpConfig({ t: null })
|
|
25
|
-
const capName = computed(() => capitalize(camelize(props.name)))
|
|
26
|
-
|
|
27
|
-
const mcpInfo = computed(() => {
|
|
28
|
-
const schema = mcpTools.components[capName.value]?.paramsSchema
|
|
29
|
-
if (schema) {
|
|
30
|
-
return Object.keys(schema).map((name) => {
|
|
31
|
-
const item = schema[name]
|
|
32
|
-
return {
|
|
33
|
-
name,
|
|
34
|
-
param: item._def?.innerType?._def?.typeName || '',
|
|
35
|
-
desc: item._def?.description || ''
|
|
36
|
-
}
|
|
37
|
-
})
|
|
38
|
-
}
|
|
39
|
-
return null
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
onMounted(() => {})
|
|
43
21
|
</script>
|
|
44
22
|
|
|
45
23
|
<style scoped lang="less">
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script lang="ts">
|
|
25
|
-
import type
|
|
25
|
+
import { type PropType } from '@opentiny/vue-common'
|
|
26
26
|
import { defineComponent, computed } from 'vue'
|
|
27
27
|
import { Tag as TinyTag, Alert as TinyAlert, Tooltip as TinyTooltip } from '@opentiny/vue'
|
|
28
28
|
import { getWord } from '@/tools'
|