@opentiny/vue-docs 3.28.1 → 3.30.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/demos/apis/action-menu.js +22 -0
- package/demos/apis/alert.js +19 -22
- package/demos/apis/button-group.js +15 -0
- package/demos/apis/calendar-view.js +5 -5
- package/demos/apis/cascader-view.js +5 -5
- package/demos/apis/dialog-box.js +39 -38
- package/demos/apis/drawer.js +31 -0
- package/demos/apis/dropdown.js +39 -1
- package/demos/apis/filter-panel.js +21 -1
- package/demos/apis/fluent-editor.js +30 -0
- package/demos/apis/form.js +11 -0
- package/demos/apis/fullscreen.js +10 -11
- package/demos/apis/grid.js +131 -16
- package/demos/apis/guide.js +14 -0
- package/demos/apis/link.js +11 -0
- package/demos/apis/message.js +48 -22
- package/demos/apis/modal.js +34 -31
- package/demos/apis/notify.js +13 -13
- package/demos/apis/rate.js +15 -0
- package/demos/apis/search-box.js +343 -0
- package/demos/apis/select.js +14 -2
- package/demos/apis/tag-input.js +182 -0
- package/demos/apis/tree.js +23 -23
- package/demos/mobile-first/app/button-group/display-mode.vue +31 -0
- package/demos/mobile-first/app/button-group/webdoc/button-group.js +13 -0
- package/demos/mobile-first/app/calendar-view/webdoc/calendar-view.js +5 -4
- package/demos/mobile-first/app/modal/webdoc/modal.js +2 -1
- package/demos/pc/app/alert/center.spec.ts +8 -0
- package/demos/pc/app/alert/custom-close.spec.ts +39 -9
- package/demos/pc/app/alert/icon.spec.ts +18 -7
- package/demos/pc/app/alert/show-icon.spec.ts +1 -1
- package/demos/pc/app/anchor/webdoc/anchor.js +1 -0
- package/demos/pc/app/base-select/copy-multi.spec.ts +1 -1
- package/demos/pc/app/button-group/display-mode-composition-api.vue +23 -0
- package/demos/pc/app/button-group/display-mode.spec.ts +0 -0
- package/demos/pc/app/button-group/display-mode.vue +31 -0
- package/demos/pc/app/button-group/sup-composition-api.vue +1 -0
- package/demos/pc/app/button-group/sup.vue +1 -0
- package/demos/pc/app/button-group/webdoc/button-group.js +14 -0
- package/demos/pc/app/calendar-view/calendar-event.spec.ts +1 -1
- package/demos/pc/app/calendar-view/custom-day-bg-color.vue +10 -0
- package/demos/pc/app/calendar-view/webdoc/calendar-view.js +4 -4
- package/demos/pc/app/cascader/filter-mode-composition-api.vue +2 -3
- package/demos/pc/app/checkbox/checked-composition-api.vue +3 -3
- package/demos/pc/app/checkbox/checked.vue +3 -3
- package/demos/pc/app/date-picker/align.spec.ts +10 -13
- package/demos/pc/app/date-picker/clear.spec.ts +3 -3
- package/demos/pc/app/date-picker/default-value.spec.ts +4 -4
- package/demos/pc/app/date-picker/events.spec.ts +2 -2
- package/demos/pc/app/date-picker/format.spec.ts +3 -3
- package/demos/pc/app/date-picker/now.spec.ts +4 -4
- package/demos/pc/app/date-picker/shortcuts.spec.ts +1 -1
- package/demos/pc/app/date-picker/slot.spec.ts +5 -5
- package/demos/pc/app/dialog-box/basic-usage.spec.ts +5 -5
- package/demos/pc/app/dialog-box/form-in-dialog.spec.ts +1 -2
- package/demos/pc/app/drawer/basic-usage.spec.ts +4 -3
- package/demos/pc/app/drawer/close-on-press-escape.spec.ts +4 -2
- package/demos/pc/app/drawer/placement.spec.ts +4 -4
- package/demos/pc/app/drawer/show-header.spec.ts +3 -2
- package/demos/pc/app/drawer/webdoc/drawer.js +3 -2
- package/demos/pc/app/dropdown/show-icon-composition-api.vue +1 -1
- package/demos/pc/app/dropdown/show-icon.vue +1 -1
- package/demos/pc/app/dropdown/tip-composition-api.vue +5 -2
- package/demos/pc/app/dropdown/tip.vue +5 -2
- package/demos/pc/app/dropdown/webdoc/dropdown.js +2 -2
- package/demos/pc/app/filter-panel/size-composition-api.vue +58 -0
- package/demos/pc/app/filter-panel/size.spec.ts +23 -0
- package/demos/pc/app/filter-panel/size.vue +68 -0
- package/demos/pc/app/filter-panel/webdoc/filter-panel.js +13 -0
- package/demos/pc/app/flowchart/basic-usage-composition-api.vue +10 -260
- package/demos/pc/app/flowchart/basic-usage.spec.ts +2 -1
- package/demos/pc/app/flowchart/basic-usage.vue +4 -249
- package/demos/pc/app/flowchart/slots-composition-api.vue +182 -0
- package/demos/pc/app/flowchart/slots.spec.ts +24 -0
- package/demos/pc/app/flowchart/slots.vue +193 -0
- package/demos/pc/app/flowchart/webdoc/flowchart.js +14 -2
- package/demos/pc/app/form/basic-usage.spec.ts +6 -4
- package/demos/pc/app/form/custom-validation-string-length-composition-api.vue +38 -0
- package/demos/pc/app/form/custom-validation-string-length.spec.ts +18 -0
- package/demos/pc/app/form/custom-validation-string-length.vue +28 -13
- package/demos/pc/app/form/group-form-composition-api.vue +2 -2
- package/demos/pc/app/form/group-form.vue +2 -2
- package/demos/pc/app/grid/filter/advanced-filter-composition-api.vue +1 -1
- package/demos/pc/app/grid/filter/advanced-filter.spec.js +1 -0
- package/demos/pc/app/grid/filter/advanced-filter.vue +1 -1
- package/demos/pc/app/grid/filter/custom-filter-composition-api.vue +46 -23
- package/demos/pc/app/grid/filter/custom-filter.spec.js +1 -1
- package/demos/pc/app/grid/filter/custom-filter.vue +47 -24
- package/demos/pc/app/grid/filter/default-filter-composition-api.vue +5 -1
- package/demos/pc/app/grid/filter/default-filter.spec.ts +1 -0
- package/demos/pc/app/grid/filter/default-filter.vue +4 -1
- package/demos/pc/app/grid/filter/filter-label-value-composition-api.vue +71 -0
- package/demos/pc/app/grid/filter/filter-label-value.spec.ts +27 -0
- package/demos/pc/app/grid/filter/filter-label-value.vue +78 -0
- package/demos/pc/app/grid/filter/input-filter-custom-component-composition-api.vue +116 -0
- package/demos/pc/app/grid/filter/input-filter-custom-component.spec.ts +20 -0
- package/demos/pc/app/grid/filter/input-filter-custom-component.vue +126 -0
- package/demos/pc/app/grid/filter/layout-order-filter-composition-api.vue +114 -0
- package/demos/pc/app/grid/filter/layout-order-filter.spec.ts +31 -0
- package/demos/pc/app/grid/filter/layout-order-filter.vue +123 -0
- package/demos/pc/app/grid/toolbar/custom-toolbar.spec.js +1 -1
- package/demos/pc/app/grid/webdoc/grid-filter.js +89 -40
- package/demos/pc/app/guide/show-close-composition-api.vue +77 -0
- package/demos/pc/app/guide/show-close.spec.ts +37 -0
- package/demos/pc/app/guide/show-close.vue +84 -0
- package/demos/pc/app/guide/webdoc/guide.js +12 -0
- package/demos/pc/app/icon/advance-icons.js +108 -2
- package/demos/pc/app/icon/advance-usage-composition-api.vue +26 -1
- package/demos/pc/app/icon/advance-usage.vue +27 -1
- package/demos/pc/app/icon/webdoc/icon.js +5 -3
- package/demos/pc/app/input/resize.spec.ts +2 -2
- package/demos/pc/app/link/custom-icon-composition-api.vue +1 -1
- package/demos/pc/app/link/custom-icon.vue +1 -1
- package/demos/pc/app/link/target-composition-api.vue +24 -0
- package/demos/pc/app/link/target.spec.ts +41 -0
- package/demos/pc/app/link/target.vue +30 -0
- package/demos/pc/app/link/webdoc/link.js +14 -0
- package/demos/pc/app/message/basic-usage-composition-api.vue +48 -0
- package/demos/pc/app/message/basic-usage.spec.ts +27 -0
- package/demos/pc/app/message/basic-usage.vue +50 -0
- package/demos/pc/app/message/message-close-composition-api.vue +25 -0
- package/demos/pc/app/message/message-close.spec.ts +9 -0
- package/demos/pc/app/message/message-close.vue +32 -0
- package/demos/pc/app/message/message-duration-composition-api.vue +25 -0
- package/demos/pc/app/message/message-duration.spec.ts +9 -0
- package/demos/pc/app/message/message-duration.vue +32 -0
- package/demos/pc/app/message/prevent-duplicate-composition-api.vue +25 -0
- package/demos/pc/app/message/prevent-duplicate.spec.ts +9 -0
- package/demos/pc/app/message/prevent-duplicate.vue +32 -0
- package/demos/pc/app/message/webdoc/message.cn.md +7 -0
- package/demos/pc/app/message/webdoc/message.en.md +7 -0
- package/demos/pc/app/message/webdoc/message.js +56 -0
- package/demos/pc/app/modal/basic-usage.spec.ts +3 -3
- package/demos/pc/app/modal/modal-footer-composition-api.vue +3 -3
- package/demos/pc/app/modal/modal-footer.spec.ts +9 -4
- package/demos/pc/app/modal/modal-footer.vue +3 -3
- package/demos/pc/app/modal/modal-header.spec.ts +2 -2
- package/demos/pc/app/modal/modal-size.spec.ts +2 -2
- package/demos/pc/app/modal/status.spec.ts +22 -15
- package/demos/pc/app/nav-menu/overflow.spec.ts +1 -1
- package/demos/pc/app/popconfirm/custom-class.spec.ts +0 -1
- package/demos/pc/app/popconfirm/slot-message.spec.ts +10 -2
- package/demos/pc/app/popconfirm/trigger.spec.ts +16 -12
- package/demos/pc/app/popover/basic-usage.spec.js +3 -8
- package/demos/pc/app/popover/custom-popper.spec.js +2 -2
- package/demos/pc/app/popover/delay.spec.js +2 -2
- package/demos/pc/app/popover/disabled.spec.js +2 -2
- package/demos/pc/app/popover/events.spec.js +1 -1
- package/demos/pc/app/popover/ignore-boundaries.spec.js +2 -3
- package/demos/pc/app/popover/offset.spec.js +17 -31
- package/demos/pc/app/radio/dynamic-disable-composition-api.vue +3 -3
- package/demos/pc/app/radio/dynamic-disable.vue +2 -2
- package/demos/pc/app/rate/clearable-composition-api.vue +20 -0
- package/demos/pc/app/rate/clearable.spec.js +74 -0
- package/demos/pc/app/rate/clearable.vue +28 -0
- package/demos/pc/app/rate/webdoc/rate.js +12 -0
- package/demos/pc/app/search/events.spec.ts +1 -1
- package/demos/pc/app/search-box/append-to-body-composition-api.vue +300 -0
- package/demos/pc/app/search-box/append-to-body.vue +308 -0
- package/demos/pc/app/search-box/auto-match-composition-api.vue +162 -0
- package/demos/pc/app/search-box/auto-match.vue +170 -0
- package/demos/pc/app/search-box/basic-usage-composition-api.vue +269 -0
- package/demos/pc/app/search-box/basic-usage.vue +277 -0
- package/demos/pc/app/search-box/custom-panel-composition-api.vue +63 -0
- package/demos/pc/app/search-box/custom-panel.vue +72 -0
- package/demos/pc/app/search-box/default-field-composition-api.vue +163 -0
- package/demos/pc/app/search-box/default-field.vue +171 -0
- package/demos/pc/app/search-box/editable-composition-api.vue +311 -0
- package/demos/pc/app/search-box/editable.vue +320 -0
- package/demos/pc/app/search-box/empty-placeholder-composition-api.vue +162 -0
- package/demos/pc/app/search-box/empty-placeholder.vue +170 -0
- package/demos/pc/app/search-box/events-composition-api.vue +169 -0
- package/demos/pc/app/search-box/events.vue +173 -0
- package/demos/pc/app/search-box/group-key-composition-api.vue +257 -0
- package/demos/pc/app/search-box/group-key.vue +266 -0
- package/demos/pc/app/search-box/help-composition-api.vue +166 -0
- package/demos/pc/app/search-box/help.vue +175 -0
- package/demos/pc/app/search-box/id-map-key-composition-api.vue +131 -0
- package/demos/pc/app/search-box/id-map-key.vue +140 -0
- package/demos/pc/app/search-box/item-placeholder-composition-api.vue +119 -0
- package/demos/pc/app/search-box/item-placeholder.vue +127 -0
- package/demos/pc/app/search-box/max-length-composition-api.vue +29 -0
- package/demos/pc/app/search-box/max-length.vue +38 -0
- package/demos/pc/app/search-box/max-time-length-composition-api.vue +53 -0
- package/demos/pc/app/search-box/max-time-length.vue +62 -0
- package/demos/pc/app/search-box/merge-tag-composition-api.vue +59 -0
- package/demos/pc/app/search-box/merge-tag.vue +68 -0
- package/demos/pc/app/search-box/panel-max-height-composition-api.vue +162 -0
- package/demos/pc/app/search-box/panel-max-height.vue +170 -0
- package/demos/pc/app/search-box/potential-match-composition-api.vue +193 -0
- package/demos/pc/app/search-box/potential-match.vue +201 -0
- package/demos/pc/app/search-box/settings-composition-api.vue +163 -0
- package/demos/pc/app/search-box/settings.vue +171 -0
- package/demos/pc/app/search-box/size-composition-api.vue +162 -0
- package/demos/pc/app/search-box/size.vue +170 -0
- package/demos/pc/app/search-box/split-input-value-composition-api.vue +162 -0
- package/demos/pc/app/search-box/split-input-value.vue +170 -0
- package/demos/pc/app/search-box/suffix-icon-composition-api.vue +209 -0
- package/demos/pc/app/search-box/suffix-icon.vue +219 -0
- package/demos/pc/app/search-box/v-model-composition-api.vue +174 -0
- package/demos/pc/app/search-box/v-model.vue +182 -0
- package/demos/pc/app/search-box/webdoc/search-box.cn.md +7 -0
- package/demos/pc/app/search-box/webdoc/search-box.en.md +7 -0
- package/demos/pc/app/search-box/webdoc/search-box.js +257 -0
- package/demos/pc/app/select/copy-multi.spec.ts +1 -1
- package/demos/pc/app/select-wrapper/copy-multi.spec.ts +2 -1
- package/demos/pc/app/tabs/basic-usage.spec.ts +2 -2
- package/demos/pc/app/tabs/more-show-all.spec.ts +2 -1
- package/demos/pc/app/tabs/tabs-events-close-composition-api.vue +8 -2
- package/demos/pc/app/tabs/tabs-events-close.vue +8 -2
- package/demos/pc/app/tag/basic-usage.spec.ts +1 -1
- package/demos/pc/app/tag/color-border.spec.ts +2 -2
- package/demos/pc/app/tag/max-width.spec.ts +1 -1
- package/demos/pc/app/tag/size.spec.ts +3 -3
- package/demos/pc/app/tag/slot-default.spec.ts +3 -3
- package/demos/pc/app/tag-group/basic-usage.spec.js +5 -5
- package/demos/pc/app/tag-group/tag-group-effect.spec.js +10 -10
- package/demos/pc/app/tag-group/tag-group-event.spec.js +1 -1
- package/demos/pc/app/tag-input/basic-usage-composition-api.vue +29 -0
- package/demos/pc/app/tag-input/basic-usage.spec.ts +0 -0
- package/demos/pc/app/tag-input/basic-usage.vue +38 -0
- package/demos/pc/app/tag-input/clearable-tag-composition-api.vue +20 -0
- package/demos/pc/app/tag-input/clearable-tag.vue +27 -0
- package/demos/pc/app/tag-input/collapsed-tag-composition-api.vue +20 -0
- package/demos/pc/app/tag-input/collapsed-tag.vue +28 -0
- package/demos/pc/app/tag-input/disabled-readonly-composition-api.vue +20 -0
- package/demos/pc/app/tag-input/disabled-readonly.vue +29 -0
- package/demos/pc/app/tag-input/draggable-tag-composition-api.vue +12 -0
- package/demos/pc/app/tag-input/draggable-tag.spec.ts +0 -0
- package/demos/pc/app/tag-input/draggable-tag.vue +20 -0
- package/demos/pc/app/tag-input/max-composition-api.vue +20 -0
- package/demos/pc/app/tag-input/max.vue +28 -0
- package/demos/pc/app/tag-input/prefix-suffix-composition-api.vue +26 -0
- package/demos/pc/app/tag-input/prefix-suffix.vue +34 -0
- package/demos/pc/app/tag-input/separator-tag-composition-api.vue +20 -0
- package/demos/pc/app/tag-input/separator-tag.vue +28 -0
- package/demos/pc/app/tag-input/webdoc/tag-input.cn.md +7 -0
- package/demos/pc/app/tag-input/webdoc/tag-input.en.md +7 -0
- package/demos/pc/app/tag-input/webdoc/tag-input.js +107 -0
- package/demos/pc/app/time-picker/basic-usage.spec.ts +5 -4
- package/demos/pc/app/time-picker/clearable.spec.ts +5 -4
- package/demos/pc/app/time-picker/default-value.spec.ts +2 -2
- package/demos/pc/app/time-picker/disabled.spec.ts +4 -3
- package/demos/pc/app/time-picker/format.spec.ts +8 -11
- package/demos/pc/app/time-picker/is-range.spec.ts +4 -3
- package/demos/pc/app/time-picker/name.spec.ts +1 -1
- package/demos/pc/app/time-picker/placeholder.spec.ts +3 -3
- package/demos/pc/app/time-picker/popper-class.spec.ts +1 -1
- package/demos/pc/app/time-picker/size.spec.ts +2 -1
- package/demos/pc/app/time-select/basic-usage.spec.ts +1 -1
- package/demos/pc/app/time-select/clear-icon.spec.ts +1 -2
- package/demos/pc/app/time-select/focus.spec.ts +1 -1
- package/demos/pc/app/time-select/picker-options.spec.ts +2 -1
- package/demos/pc/app/time-select/range-placeholder.spec.ts +2 -2
- package/demos/pc/app/time-select/size-medium.spec.ts +3 -3
- package/demos/pc/app/tooltip/delay.spec.js +7 -9
- package/demos/pc/app/tooltip/offset.spec.js +0 -2
- package/demos/pc/app/tooltip/popper-options.spec.js +2 -1
- package/demos/pc/menus.js +6 -4
- package/demos/pc/webdoc/changelog-en.md +209 -86
- package/demos/pc/webdoc/changelog.md +176 -257
- package/demos/pc/webdoc/develop-demo-en.md +13 -13
- package/demos/pc/webdoc/import-components.md +1 -1
- package/demos/pc/webdoc/introduce.md +2 -0
- package/demos/pc/webdoc/skills-en.md +107 -0
- package/demos/pc/webdoc/skills.md +107 -0
- package/demos/pc/webdoc/theme-en.md +82 -79
- package/demos/pc/webdoc/v3.28.0-release-article.md +943 -0
- package/demos/saas/menus.js +1 -0
- package/package.json +21 -20
- package/playground/App.vue +6 -4
- package/playground/shims/vue-search-box.mjs +154 -0
- package/public/static/css/mobile-dark-theme.css +1 -0
- package/src/i18n/index.js +1 -2
- package/src/main.js +8 -5
- package/src/style.css +5 -0
- package/src/views/components-doc/common.vue +0 -25
- package/src/views/components-doc/mobile.vue +49 -2
- package/vite.config.ts +3 -2
- package/vite.extend.ts +65 -0
- package/demos/pc/app/grid/webdoc/grid-ai-agent.js +0 -23
- package/demos/pc/webdoc/mcp-en.md +0 -101
- package/demos/pc/webdoc/mcp.md +0 -101
- package/src/components/mcp-docs.vue +0 -33
- package/src/composable/useTinyRemoter.ts +0 -176
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<tiny-button plain class="show-close-btn" @click="stepStart">新手引导显示关闭按钮</tiny-button>
|
|
4
|
+
<tiny-guide :show-step="showStep" :dom-data="domData" :show-close="true"></tiny-guide>
|
|
5
|
+
|
|
6
|
+
<tiny-button plain class="hide-close-btn" style="margin-top: 20px" @click="stepStartWithoutClose"
|
|
7
|
+
>新手引导隐藏关闭按钮</tiny-button
|
|
8
|
+
>
|
|
9
|
+
<tiny-guide :show-step="showStepWithoutClose" :dom-data="domDataWithoutClose" :show-close="false"></tiny-guide>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
import { TinyGuide, TinyButton } from '@opentiny/vue'
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
components: {
|
|
18
|
+
TinyGuide,
|
|
19
|
+
TinyButton
|
|
20
|
+
},
|
|
21
|
+
data() {
|
|
22
|
+
return {
|
|
23
|
+
showStep: false,
|
|
24
|
+
showStepWithoutClose: false,
|
|
25
|
+
domData: [
|
|
26
|
+
{
|
|
27
|
+
title: '新手引导标题 1',
|
|
28
|
+
text: '这里是可以关闭的新手引导,点击右上角的关闭按钮可直接退出引导',
|
|
29
|
+
domElement: '.show-close-btn',
|
|
30
|
+
button: [
|
|
31
|
+
{
|
|
32
|
+
text: '下一步',
|
|
33
|
+
action: 'next'
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: '新手引导标题 2',
|
|
39
|
+
text: '这个引导步骤展示了关闭按钮功能',
|
|
40
|
+
domElement: '.show-close-btn',
|
|
41
|
+
button: [
|
|
42
|
+
{
|
|
43
|
+
text: '完成',
|
|
44
|
+
action: 'complete'
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
domDataWithoutClose: [
|
|
50
|
+
{
|
|
51
|
+
title: '新手引导标题 1',
|
|
52
|
+
text: '这里是不显示关闭按钮的新手引导,无法通过关闭按钮退出引导',
|
|
53
|
+
domElement: '.hide-close-btn',
|
|
54
|
+
button: [
|
|
55
|
+
{
|
|
56
|
+
text: '下一步',
|
|
57
|
+
action: 'next'
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: '新手引导标题 2',
|
|
63
|
+
text: '这个引导没有关闭按钮,只能通过底部按钮操作',
|
|
64
|
+
domElement: '.hide-close-btn',
|
|
65
|
+
button: [
|
|
66
|
+
{
|
|
67
|
+
text: '完成',
|
|
68
|
+
action: 'complete'
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
methods: {
|
|
76
|
+
stepStart() {
|
|
77
|
+
this.showStep = !this.showStep
|
|
78
|
+
},
|
|
79
|
+
stepStartWithoutClose() {
|
|
80
|
+
this.showStepWithoutClose = !this.showStepWithoutClose
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
</script>
|
|
@@ -128,6 +128,18 @@ export default {
|
|
|
128
128
|
'en-US': ''
|
|
129
129
|
},
|
|
130
130
|
codeFiles: ['callback.vue']
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
demoId: 'show-close',
|
|
134
|
+
name: {
|
|
135
|
+
'zh-CN': '关闭按钮',
|
|
136
|
+
'en-US': ''
|
|
137
|
+
},
|
|
138
|
+
desc: {
|
|
139
|
+
'zh-CN': '<p>通过添加 <code>showClose</code> 来自定义是否显示关闭按钮。默认值为 <code>false</code> </p>',
|
|
140
|
+
'en-US': ''
|
|
141
|
+
},
|
|
142
|
+
codeFiles: ['show-close.vue']
|
|
131
143
|
}
|
|
132
144
|
],
|
|
133
145
|
features: [
|
|
@@ -307,7 +307,7 @@ export const batch3Icons = [
|
|
|
307
307
|
'IconEquipment',
|
|
308
308
|
'IconExchangerate',
|
|
309
309
|
'IconFastCode',
|
|
310
|
-
'
|
|
310
|
+
'IconAIGeneral',
|
|
311
311
|
'IconGeneralPageIndigo',
|
|
312
312
|
'IconIndicatorArtifactConfiguration',
|
|
313
313
|
'IconInspectionPlan',
|
|
@@ -402,7 +402,6 @@ export const batch3Icons = [
|
|
|
402
402
|
'IconTermination',
|
|
403
403
|
'IconTimezone',
|
|
404
404
|
'IconTrain',
|
|
405
|
-
'IconTransfer',
|
|
406
405
|
'IconTransferInventoryList',
|
|
407
406
|
'IconTransferringInventoryListsAcrossOrganizations',
|
|
408
407
|
'IconTransportation',
|
|
@@ -410,3 +409,110 @@ export const batch3Icons = [
|
|
|
410
409
|
'IconWaybill',
|
|
411
410
|
'IconWorkOvertime'
|
|
412
411
|
]
|
|
412
|
+
|
|
413
|
+
export const batch4Icons = [
|
|
414
|
+
'IconAIAbout',
|
|
415
|
+
'IconAIApplication',
|
|
416
|
+
'IconAIBrowsingHistory',
|
|
417
|
+
'IconAICalendar',
|
|
418
|
+
'IconAIComputingPowerAIPolicy',
|
|
419
|
+
'IconAIConferenceManagement',
|
|
420
|
+
'IconAIDocument',
|
|
421
|
+
'IconAIDocumentQA',
|
|
422
|
+
'IconAIExternalKnowledgeAnswer',
|
|
423
|
+
'IconAIFindRecords',
|
|
424
|
+
'IconAIFollowUp',
|
|
425
|
+
'IconAIGCPainting',
|
|
426
|
+
'IconAIImageBasedTextRecognition',
|
|
427
|
+
'IconAIInformation',
|
|
428
|
+
'IconAIInternalKnowledgeAnswers',
|
|
429
|
+
'IconAIITServiceQA',
|
|
430
|
+
'IconAILabelExtraction',
|
|
431
|
+
'IconAIMemorySpace',
|
|
432
|
+
'IconAIOfficeDataSearch',
|
|
433
|
+
'IconAIOrganization',
|
|
434
|
+
'IconAIPosting',
|
|
435
|
+
'IconAIProcessQA',
|
|
436
|
+
'IconAIQuestion',
|
|
437
|
+
'IconAIReading',
|
|
438
|
+
'IconAISearch',
|
|
439
|
+
'IconAISearchPeople',
|
|
440
|
+
'IconAISearchQA',
|
|
441
|
+
'IconAISmartLookup',
|
|
442
|
+
'IconAISmartNotes',
|
|
443
|
+
'IconAISmartTranslation',
|
|
444
|
+
'IconAITakingPhotos',
|
|
445
|
+
'IconAITechnicalInsightsQA',
|
|
446
|
+
'IconAITerminologyQA',
|
|
447
|
+
'IconAITranslation',
|
|
448
|
+
'IconAIUCDSearch',
|
|
449
|
+
'IconAIWebQA',
|
|
450
|
+
'IconAIWrite',
|
|
451
|
+
'IconAIWriting',
|
|
452
|
+
'IconAnalysisTypeContainer',
|
|
453
|
+
'IconAnchor',
|
|
454
|
+
'IconApprovalFlow',
|
|
455
|
+
'IconAvatar',
|
|
456
|
+
'IconBadge',
|
|
457
|
+
'IconButton',
|
|
458
|
+
'IconButtonBar',
|
|
459
|
+
'IconCalendarView',
|
|
460
|
+
'IconCardGroup',
|
|
461
|
+
'IconCardTemplate',
|
|
462
|
+
'IconCarousel',
|
|
463
|
+
'IconCascader',
|
|
464
|
+
'IconChart',
|
|
465
|
+
'IconCheckbox',
|
|
466
|
+
'IconChooser',
|
|
467
|
+
'IconCreatePage',
|
|
468
|
+
'IconDetailsTemplatePage',
|
|
469
|
+
'IconDialogBox',
|
|
470
|
+
'IconDialogSelect',
|
|
471
|
+
'IconFavorites',
|
|
472
|
+
'IconFilterView',
|
|
473
|
+
'IconFloating',
|
|
474
|
+
'IconFlowchart',
|
|
475
|
+
'IconFoldingPanelContainers',
|
|
476
|
+
'IconForm',
|
|
477
|
+
'IconGeneralPage',
|
|
478
|
+
'IconGrid',
|
|
479
|
+
'IconImage',
|
|
480
|
+
'IconInput',
|
|
481
|
+
'IconListSheet',
|
|
482
|
+
'IconMetAlert',
|
|
483
|
+
'IconMultiColumnContainer',
|
|
484
|
+
'IconMultipleContainerGroups',
|
|
485
|
+
'IconNavigationContainer',
|
|
486
|
+
'IconNumber',
|
|
487
|
+
'IconNumeric',
|
|
488
|
+
'IconObjectInfo',
|
|
489
|
+
'IconPageLoader',
|
|
490
|
+
'IconPager',
|
|
491
|
+
'IconProcessOverview',
|
|
492
|
+
'IconProgress',
|
|
493
|
+
'IconPromptBox',
|
|
494
|
+
'IconRadio',
|
|
495
|
+
'IconRecord',
|
|
496
|
+
'IconRuleBuilder',
|
|
497
|
+
'IconSelection',
|
|
498
|
+
'IconSelectView',
|
|
499
|
+
'IconShortcut',
|
|
500
|
+
'IconSlider',
|
|
501
|
+
'IconSliderButton',
|
|
502
|
+
'IconSplitPanelContainer',
|
|
503
|
+
'IconSpreadGrid',
|
|
504
|
+
'IconStandardList',
|
|
505
|
+
'IconSteps',
|
|
506
|
+
'IconSwitch',
|
|
507
|
+
'IconSwitchCard',
|
|
508
|
+
'IconTabContainer',
|
|
509
|
+
'IconTabs',
|
|
510
|
+
'IconTag',
|
|
511
|
+
'IconTagGroup',
|
|
512
|
+
'IconTimeLine',
|
|
513
|
+
'IconTimePicker',
|
|
514
|
+
'IconTitleContainer',
|
|
515
|
+
'IconTransfer',
|
|
516
|
+
'IconTree',
|
|
517
|
+
'IconTreeMenuContainer'
|
|
518
|
+
]
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
<tiny-input v-model="underlay.scale" clearable autofocus size="small" style="width: 120px"></tiny-input>
|
|
30
30
|
</tiny-form-item>
|
|
31
31
|
</tiny-form>
|
|
32
|
+
<h3>第一批次图标</h3>
|
|
32
33
|
<div class="svgs-wrapper">
|
|
33
34
|
<div
|
|
34
35
|
v-for="name in advanceIcons"
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
</div>
|
|
52
53
|
</div>
|
|
53
54
|
<hr />
|
|
55
|
+
<h3>第二批次图标</h3>
|
|
54
56
|
<div class="svgs-wrapper">
|
|
55
57
|
<div
|
|
56
58
|
v-for="name in batch3Icons"
|
|
@@ -72,13 +74,36 @@
|
|
|
72
74
|
<span class="svgs-text" :title="name">{{ name }}</span>
|
|
73
75
|
</div>
|
|
74
76
|
</div>
|
|
77
|
+
<hr />
|
|
78
|
+
<h3>第三批次图标</h3>
|
|
79
|
+
<div class="svgs-wrapper">
|
|
80
|
+
<div
|
|
81
|
+
v-for="name in batch4Icons"
|
|
82
|
+
:key="name"
|
|
83
|
+
:class="{
|
|
84
|
+
'svg-visible': searchName === '' || name.toLowerCase().includes(searchName.toLowerCase()),
|
|
85
|
+
'svgs-item': true
|
|
86
|
+
}"
|
|
87
|
+
@click="click(name)"
|
|
88
|
+
>
|
|
89
|
+
<component
|
|
90
|
+
:is="Svgs[name] && Svgs[name]()"
|
|
91
|
+
class="svgs-icon"
|
|
92
|
+
:first-color="firstColor"
|
|
93
|
+
:second-color="secondColor"
|
|
94
|
+
:shape="shape"
|
|
95
|
+
:underlay="isUnderlay ? underlay : null"
|
|
96
|
+
></component>
|
|
97
|
+
<span class="svgs-text" :title="name">{{ name }}</span>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
75
100
|
</div>
|
|
76
101
|
</template>
|
|
77
102
|
|
|
78
103
|
<script setup lang="js">
|
|
79
104
|
import Svgs from '@opentiny/vue-icon'
|
|
80
105
|
import { TinyForm, TinyFormItem, TinyModal, TinyInput, TinyRadioGroup, TinyRadio, TinySwitch } from '@opentiny/vue'
|
|
81
|
-
import { advanceIcons, batch3Icons } from './advance-icons.js'
|
|
106
|
+
import { advanceIcons, batch3Icons, batch4Icons } from './advance-icons.js'
|
|
82
107
|
import { getCurrentInstance, ref, watch } from 'vue'
|
|
83
108
|
|
|
84
109
|
const searchName = ref('')
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
<tiny-input v-model="underlay.scale" clearable autofocus size="small" style="width: 120px"></tiny-input>
|
|
30
30
|
</tiny-form-item>
|
|
31
31
|
</tiny-form>
|
|
32
|
+
<h3>第一批次图标</h3>
|
|
32
33
|
<div class="svgs-wrapper">
|
|
33
34
|
<div
|
|
34
35
|
v-for="name in advanceIcons"
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
</div>
|
|
52
53
|
</div>
|
|
53
54
|
<hr />
|
|
55
|
+
<h3>第二批次图标</h3>
|
|
54
56
|
<div class="svgs-wrapper">
|
|
55
57
|
<div
|
|
56
58
|
v-for="name in batch3Icons"
|
|
@@ -72,6 +74,29 @@
|
|
|
72
74
|
<span class="svgs-text" :title="name">{{ name }}</span>
|
|
73
75
|
</div>
|
|
74
76
|
</div>
|
|
77
|
+
<hr />
|
|
78
|
+
<h3>第三批次图标</h3>
|
|
79
|
+
<div class="svgs-wrapper">
|
|
80
|
+
<div
|
|
81
|
+
v-for="name in batch4Icons"
|
|
82
|
+
:key="name"
|
|
83
|
+
:class="{
|
|
84
|
+
'svg-visible': searchName === '' || name.toLowerCase().includes(searchName.toLowerCase()),
|
|
85
|
+
'svgs-item': true
|
|
86
|
+
}"
|
|
87
|
+
@click="click(name)"
|
|
88
|
+
>
|
|
89
|
+
<component
|
|
90
|
+
:is="Svgs[name] && Svgs[name]()"
|
|
91
|
+
class="svgs-icon"
|
|
92
|
+
:first-color="firstColor"
|
|
93
|
+
:second-color="secondColor"
|
|
94
|
+
:shape="shape"
|
|
95
|
+
:underlay="isUnderlay ? underlay : null"
|
|
96
|
+
></component>
|
|
97
|
+
<span class="svgs-text" :title="name">{{ name }}</span>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
75
100
|
</div>
|
|
76
101
|
</template>
|
|
77
102
|
|
|
@@ -87,7 +112,7 @@ import {
|
|
|
87
112
|
TinyColorPicker,
|
|
88
113
|
TinySwitch
|
|
89
114
|
} from '@opentiny/vue'
|
|
90
|
-
import { advanceIcons, batch3Icons } from './advance-icons.js'
|
|
115
|
+
import { advanceIcons, batch3Icons, batch4Icons } from './advance-icons.js'
|
|
91
116
|
|
|
92
117
|
export default {
|
|
93
118
|
components: {
|
|
@@ -104,6 +129,7 @@ export default {
|
|
|
104
129
|
Svgs,
|
|
105
130
|
advanceIcons,
|
|
106
131
|
batch3Icons,
|
|
132
|
+
batch4Icons,
|
|
107
133
|
searchName: '',
|
|
108
134
|
shape: 'line',
|
|
109
135
|
firstColor: '#0067D1',
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
},
|
|
13
13
|
desc: {
|
|
14
14
|
'zh-CN': `
|
|
15
|
-
从 <code>@opentiny/vue-icon</code>
|
|
15
|
+
从 <code>@opentiny/vue-icon</code> 图标库中引入图标函数,图标函数执行后生成一个有效的 <code> Vue </code> 图标组件,可以在模板中使用。在组件内应该保存图标组件的变量用于绑定,要避免在模板上直接绑定图标函数的执行。<br>
|
|
16
16
|
通过修改图标的 <code>font-size</code> 的样式,指定图标的大小,通过修改<code>fill</code> 的样式指定图标的颜色。
|
|
17
17
|
<div class="tip custom-block">
|
|
18
18
|
<p class="custom block title"> 常见的图标使用方式 </p>
|
|
@@ -20,10 +20,11 @@ export default {
|
|
|
20
20
|
1、在模板中通过标签式引入。比如 <code> <tiny-shared /> </code> <br>
|
|
21
21
|
2、在模板中通过<code> <component> </code> 组件引入。比如 <code> <component :is="tinyShared" /> </code> <br>
|
|
22
22
|
3、在组件属性中传入。比如 <code> <tiny-button :icon="tinyShared" > </code> <br>
|
|
23
|
+
4、避免模板绑定图标函数的执行。不建议 <code> <component :is="IconShared()" /> </code>
|
|
23
24
|
</div>
|
|
24
25
|
`,
|
|
25
26
|
'en-US': `
|
|
26
|
-
Introduce icon functions from the <code>@opentiny/vue-icon</code> icon library. The execution of the icon function generates a valid <code> Vue </code> icon component that can be used in the template. <br>
|
|
27
|
+
Introduce icon functions from the <code>@opentiny/vue-icon</code> icon library. The execution of the icon function generates a valid <code> Vue </code> icon component that can be used in the template.Save the icon component variables for binding within the component. Avoid directly binding the icon function execution on the template. <br>
|
|
27
28
|
Specify the size of the icon by modifying the <code>font-size</code> style, and specify the color of the icon by modifying <code>fill</code>.
|
|
28
29
|
<div class="tip custom-block">
|
|
29
30
|
<p class="custom block title"> Common icon usage </p>
|
|
@@ -31,6 +32,7 @@ export default {
|
|
|
31
32
|
1. Import labels in the template. For example, <code> < tiny-shared /> </code> <br>
|
|
32
33
|
2, in the template by <code> < component> The </code> component is introduced. For example, <code> < component :is="tinyShared" /> </code> <br>
|
|
33
34
|
3. Pass in component properties. For example, <code> < tiny-button :icon="tinyShared" > </code> <br>
|
|
35
|
+
4. Avoid executing template-bound icon functions.Not recommended <code> <component :is="IconShared()" /> </code>
|
|
34
36
|
</div>
|
|
35
37
|
`
|
|
36
38
|
},
|
|
@@ -57,7 +59,7 @@ export default {
|
|
|
57
59
|
'en-US': 'Icon Set'
|
|
58
60
|
},
|
|
59
61
|
desc: {
|
|
60
|
-
'zh-CN': `Saas业务梳理
|
|
62
|
+
'zh-CN': `Saas业务梳理 600 多个标准图标,Saas业务的应用必须使用标准图标。它新增了三大功能:支持线性、面性图标切换,支持双色切换和托底效果。<br>
|
|
61
63
|
通过<code>shape</code> 属性,设置图标的线性或面性图标,它支持<code>'line' | 'filled' </code>, 默认为线性图标 。\n<br>
|
|
62
64
|
通过<code>firstColor, secondColor</code>属性,设置图标的主色和副色。\n<br>
|
|
63
65
|
通过<code>underlay</code>属性,设置图标的托底效果。默认样式: { background:'#eef3fe', borderRadius:'4px',scale:0.8 } <br>
|
|
@@ -38,7 +38,7 @@ test('可缩放文本域', async ({ page }) => {
|
|
|
38
38
|
// autosize 检查高度
|
|
39
39
|
await textarea2.nth(1).fill('')
|
|
40
40
|
defaultHeight = await textarea2
|
|
41
|
-
.nth(
|
|
41
|
+
.nth(1)
|
|
42
42
|
.boundingBox()
|
|
43
43
|
.then((box) => box?.height)
|
|
44
44
|
await textarea2.nth(1).fill(fillText + fillText)
|
|
@@ -47,5 +47,5 @@ test('可缩放文本域', async ({ page }) => {
|
|
|
47
47
|
.boundingBox()
|
|
48
48
|
.then((box) => box?.height)
|
|
49
49
|
await expect(fill1Height).not.toBeNull()
|
|
50
|
-
await expect(
|
|
50
|
+
await expect(fill1Height).toBeGreaterThanOrEqual(defaultHeight || 0)
|
|
51
51
|
})
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<p>Link 组件 target 属性示例</p>
|
|
4
|
+
<div class="demo-link-target">
|
|
5
|
+
<tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_blank">在新窗口打开</tiny-link>
|
|
6
|
+
<tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_self">在当前窗口打开</tiny-link>
|
|
7
|
+
<tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_parent">在父框架中打开</tiny-link>
|
|
8
|
+
<tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_top">在整个窗口中打开</tiny-link>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup>
|
|
14
|
+
import { TinyLink } from '@opentiny/vue'
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<style scoped>
|
|
18
|
+
.demo-link-target {
|
|
19
|
+
margin-top: 20px;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: 10px;
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test.describe('Link Target 功能', () => {
|
|
4
|
+
test('验证不同target值的链接行为', async ({ page }) => {
|
|
5
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
6
|
+
await page.goto('link#target')
|
|
7
|
+
|
|
8
|
+
// 使用正确的选择器 - 选择所有链接
|
|
9
|
+
const links = page.locator('.demo-link-target a')
|
|
10
|
+
|
|
11
|
+
// 验证链接数量
|
|
12
|
+
await expect(links).toHaveCount(4)
|
|
13
|
+
|
|
14
|
+
// 验证每个链接的target属性
|
|
15
|
+
const targets = ['_blank', '_self', '_parent', '_top']
|
|
16
|
+
for (let i = 0; i < targets.length; i++) {
|
|
17
|
+
const link = links.nth(i)
|
|
18
|
+
await expect(link).toHaveAttribute('target', targets[i])
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// 验证链接文本
|
|
22
|
+
const expectedTexts = ['在新窗口打开', '在当前窗口打开', '在父框架中打开', '在整个窗口中打开']
|
|
23
|
+
for (let i = 0; i < expectedTexts.length; i++) {
|
|
24
|
+
const link = links.nth(i)
|
|
25
|
+
await expect(link).toContainText(expectedTexts[i])
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
test('验证链接的href属性', async ({ page }) => {
|
|
30
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
31
|
+
await page.goto('link#target')
|
|
32
|
+
|
|
33
|
+
const links = page.locator('.demo-link-target a')
|
|
34
|
+
|
|
35
|
+
// 验证所有链接都有相同的href
|
|
36
|
+
for (let i = 0; i < 4; i++) {
|
|
37
|
+
const link = links.nth(i)
|
|
38
|
+
await expect(link).toHaveAttribute('href', 'https://opentiny.design/tiny-vue')
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
})
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<p>Link 组件 target 属性示例</p>
|
|
4
|
+
<div class="demo-link-target">
|
|
5
|
+
<tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_blank">在新窗口打开</tiny-link>
|
|
6
|
+
<tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_self">在当前窗口打开</tiny-link>
|
|
7
|
+
<tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_parent">在父框架中打开</tiny-link>
|
|
8
|
+
<tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_top">在整个窗口中打开</tiny-link>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
import { TinyLink } from '@opentiny/vue'
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
components: {
|
|
18
|
+
TinyLink
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<style scoped>
|
|
24
|
+
.demo-link-target {
|
|
25
|
+
margin-top: 20px;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
gap: 10px;
|
|
29
|
+
}
|
|
30
|
+
</style>
|
|
@@ -84,6 +84,20 @@ export default {
|
|
|
84
84
|
'<p>Use the <code>href</code> attribute to specify the URL to be redirected to. This attribute can be used together with the native attribute <code>target</code>. </p>'
|
|
85
85
|
},
|
|
86
86
|
codeFiles: ['config-href.vue']
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
demoId: 'target',
|
|
90
|
+
name: {
|
|
91
|
+
'zh-CN': '打开方式',
|
|
92
|
+
'en-US': 'Open mode'
|
|
93
|
+
},
|
|
94
|
+
desc: {
|
|
95
|
+
'zh-CN':
|
|
96
|
+
'<p>通过 <code>target</code> 配置链接打开方式,可选值有 <code>_self</code>、<code>_blank</code>、<code>_parent</code>、<code>_top</code>。</p>',
|
|
97
|
+
'en-US':
|
|
98
|
+
'<p>Use the <code>target</code> attribute to configure the link opening mode. The optional values are <code>_self</code>, <code>_blank</code>, <code>_parent</code>, <code>_top</code>. </p>'
|
|
99
|
+
},
|
|
100
|
+
codeFiles: ['target.vue']
|
|
87
101
|
}
|
|
88
102
|
],
|
|
89
103
|
hiddenDemo: {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<h2>消息状态:</h2>
|
|
4
|
+
<div class="content">
|
|
5
|
+
<tiny-button @click="infoClick()">信息提示图标</tiny-button>
|
|
6
|
+
<tiny-button @click="successClick()">成功提示图标</tiny-button>
|
|
7
|
+
<tiny-button @click="warningClick()">警告提示图标</tiny-button>
|
|
8
|
+
<tiny-button @click="errorClick()">错误提示图标</tiny-button>
|
|
9
|
+
<tiny-button @click="loadingClick()">加载提示图标</tiny-button>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
import { Button as TinyButton, Message } from '@opentiny/vue'
|
|
16
|
+
|
|
17
|
+
function infoClick() {
|
|
18
|
+
console.log(Message, 18)
|
|
19
|
+
Message.message({ message: '基本提示图标', status: 'info' })
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function successClick() {
|
|
23
|
+
Message.message({ message: '成功提示图标', status: 'success' })
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function warningClick() {
|
|
27
|
+
Message.message({ message: '警告提示图标', status: 'warning' })
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function errorClick() {
|
|
31
|
+
Message.message({ message: '错误提示图标', status: 'error' })
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function loadingClick() {
|
|
35
|
+
Message.message({ message: '加载提示图标', status: 'loading' })
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<style scoped>
|
|
40
|
+
h2 {
|
|
41
|
+
font-size: 16px;
|
|
42
|
+
font-weight: bold;
|
|
43
|
+
margin: 20px 0 12px;
|
|
44
|
+
}
|
|
45
|
+
.content {
|
|
46
|
+
margin: 8px;
|
|
47
|
+
}
|
|
48
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('状态和图标', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
await page.goto('message#basic-usage')
|
|
6
|
+
const message = page.locator('.type__message.is__visible')
|
|
7
|
+
|
|
8
|
+
// ----消息状态示例----
|
|
9
|
+
await page.getByRole('button', { name: '信息提示图标' }).click()
|
|
10
|
+
await expect(message).toHaveClass(/status__info/)
|
|
11
|
+
|
|
12
|
+
// ----消息状态示例----
|
|
13
|
+
await page.getByRole('button', { name: '成功提示图标' }).click()
|
|
14
|
+
await expect(message.nth(1)).toHaveClass(/status__success/)
|
|
15
|
+
|
|
16
|
+
// ----消息状态示例----
|
|
17
|
+
await page.getByRole('button', { name: '警告提示图标' }).click()
|
|
18
|
+
await expect(message.nth(2)).toHaveClass(/status__warning/)
|
|
19
|
+
|
|
20
|
+
// ----消息状态示例----
|
|
21
|
+
await page.getByRole('button', { name: '错误提示图标' }).click()
|
|
22
|
+
await expect(message.nth(3)).toHaveClass(/status__error/)
|
|
23
|
+
|
|
24
|
+
// ----消息状态示例----
|
|
25
|
+
await page.getByRole('button', { name: '加载提示图标' }).click()
|
|
26
|
+
await expect(message.nth(4)).toHaveClass(/status__loading/)
|
|
27
|
+
})
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<h2>消息状态:</h2>
|
|
4
|
+
<div class="content">
|
|
5
|
+
<tiny-button @click="infoClick()">信息提示图标</tiny-button>
|
|
6
|
+
<tiny-button @click="successClick()">成功提示图标</tiny-button>
|
|
7
|
+
<tiny-button @click="warningClick()">警告提示图标</tiny-button>
|
|
8
|
+
<tiny-button @click="errorClick()">错误提示图标</tiny-button>
|
|
9
|
+
<tiny-button @click="loadingClick()">加载提示图标</tiny-button>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import { Button, Message } from '@opentiny/vue'
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
components: {
|
|
19
|
+
TinyButton: Button
|
|
20
|
+
},
|
|
21
|
+
methods: {
|
|
22
|
+
infoClick() {
|
|
23
|
+
Message.message({ message: '基本提示图标', status: 'info' })
|
|
24
|
+
},
|
|
25
|
+
successClick() {
|
|
26
|
+
Message.message({ message: '成功提示图标', status: 'success' })
|
|
27
|
+
},
|
|
28
|
+
warningClick() {
|
|
29
|
+
Message.message({ message: '警告提示图标', status: 'warning' })
|
|
30
|
+
},
|
|
31
|
+
errorClick() {
|
|
32
|
+
Message.message({ message: '错误提示图标', status: 'error' })
|
|
33
|
+
},
|
|
34
|
+
loadingClick() {
|
|
35
|
+
Message.message({ message: '加载提示图标', status: 'loading' })
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<style scoped>
|
|
42
|
+
h2 {
|
|
43
|
+
font-size: 16px;
|
|
44
|
+
font-weight: bold;
|
|
45
|
+
margin: 20px 0 12px;
|
|
46
|
+
}
|
|
47
|
+
.content {
|
|
48
|
+
margin: 8px;
|
|
49
|
+
}
|
|
50
|
+
</style>
|