@opentiny/vue-docs 3.19.0 → 3.19.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/.eslintrc.js +2 -1
- package/demos/apis/tag-group.js +1 -1
- package/demos/apis/tag.js +1 -1
- package/demos/mobile/app/tabs/expand.vue +2 -2
- package/demos/mobile-first/app/tabs/tabdata-title.vue +4 -4
- package/demos/mobile-first/app/tabs/tabs-draggable.vue +8 -8
- package/demos/mobile-first/app/tabs/tabs-events-add.vue +3 -3
- package/demos/mobile-first/app/tabs/tabs-events-close.vue +3 -3
- package/demos/mobile-first/app/tabs/tabs-events-edit.vue +2 -2
- package/demos/mobile-first/app/tabs/tabs-tabs.vue +3 -3
- package/demos/mobile-first/app/tabs/with-add.vue +4 -4
- package/demos/pc/app/action-menu/basic-usage.spec.ts +1 -4
- package/demos/pc/app/action-menu/card-mode.spec.ts +2 -1
- package/demos/pc/app/action-menu/icon.spec.ts +1 -1
- package/demos/pc/app/button-group/show-more.spec.ts +1 -1
- package/demos/pc/app/card/card-select-composition-api.vue +1 -1
- package/demos/pc/app/card/card-select.vue +1 -1
- package/demos/pc/app/card/custom-class-composition-api.vue +1 -1
- package/demos/pc/app/card/custom-class.vue +1 -1
- package/demos/pc/app/config-provider/base.vue +1 -1
- package/demos/pc/app/date-picker/basic-usage-composition-api.vue +1 -1
- package/demos/pc/app/date-picker/basic-usage.vue +1 -1
- package/demos/pc/app/date-picker/clear-composition-api.vue +1 -1
- package/demos/pc/app/date-picker/clear.spec.ts +2 -8
- package/demos/pc/app/date-picker/clear.vue +1 -1
- package/demos/pc/app/date-picker/custom-suffix-icon-composition-api.vue +1 -1
- package/demos/pc/app/date-picker/custom-suffix-icon.vue +1 -1
- package/demos/pc/app/date-picker/custom-weeks-composition-api.vue +1 -1
- package/demos/pc/app/date-picker/custom-weeks.vue +1 -1
- package/demos/pc/app/date-picker/default-value-composition-api.vue +1 -6
- package/demos/pc/app/date-picker/default-value.vue +1 -6
- package/demos/pc/app/date-picker/disabled-composition-api.vue +1 -6
- package/demos/pc/app/date-picker/disabled.vue +1 -6
- package/demos/pc/app/date-picker/events-composition-api.vue +7 -6
- package/demos/pc/app/date-picker/events.vue +7 -6
- package/demos/pc/app/date-picker/filter-mode-composition-api.vue +1 -1
- package/demos/pc/app/date-picker/filter-mode.vue +1 -1
- package/demos/pc/app/date-picker/format-composition-api.vue +1 -1
- package/demos/pc/app/date-picker/format.vue +1 -1
- package/demos/pc/app/date-picker/label-inside-composition-api.vue +1 -8
- package/demos/pc/app/date-picker/label-inside.vue +1 -8
- package/demos/pc/app/date-picker/multiple-dates-composition-api.vue +1 -1
- package/demos/pc/app/date-picker/multiple-dates.vue +1 -1
- package/demos/pc/app/date-picker/now-composition-api.vue +1 -1
- package/demos/pc/app/date-picker/now.vue +1 -1
- package/demos/pc/app/date-picker/size-composition-api.vue +1 -6
- package/demos/pc/app/date-picker/size.vue +1 -6
- package/demos/pc/app/date-picker/step-composition-api.vue +1 -1
- package/demos/pc/app/date-picker/step.vue +1 -1
- package/demos/pc/app/date-picker/timezone-composition-api.vue +1 -1
- package/demos/pc/app/date-picker/timezone.vue +1 -1
- package/demos/pc/app/date-picker/unlink-panels-composition-api.vue +1 -1
- package/demos/pc/app/date-picker/unlink-panels.vue +1 -1
- package/demos/pc/app/date-picker/validate-event-composition-api.vue +1 -1
- package/demos/pc/app/date-picker/validate-event.vue +1 -1
- package/demos/pc/app/drawer/use-through-method-composition-api.vue +15 -4
- package/demos/pc/app/drawer/use-through-method.vue +20 -9
- package/demos/pc/app/dropdown/basic-usage.spec.ts +0 -4
- package/demos/pc/app/fall-menu/custom-menuitem.vue +2 -2
- package/demos/pc/app/fall-menu/custom-slider-icon.vue +2 -2
- package/demos/pc/app/fall-menu/data-resource.vue +1 -1
- package/demos/pc/app/grid/context-menu/cell-menu-composition-api.vue +1 -0
- package/demos/pc/app/grid/context-menu/cell-menu.vue +1 -0
- package/demos/pc/app/grid/context-menu/footer-menu-composition-api.vue +1 -0
- package/demos/pc/app/grid/context-menu/footer-menu.vue +1 -0
- package/demos/pc/app/grid/context-menu/header-menu-composition-api.vue +1 -0
- package/demos/pc/app/grid/context-menu/header-menu.vue +1 -0
- package/demos/pc/app/grid/context-menu/menu-permissions-composition-api.vue +1 -0
- package/demos/pc/app/grid/context-menu/menu-permissions.vue +1 -0
- package/demos/pc/app/grid/data-source/columns-composition-api.vue +1 -1
- package/demos/pc/app/grid/data-source/columns.vue +1 -1
- package/demos/pc/app/grid/dynamically-columns/dynamically-columns-composition-api.vue +6 -0
- package/demos/pc/app/grid/dynamically-columns/dynamically-columns.vue +6 -0
- package/demos/pc/app/grid/event/click-event-composition-api.vue +1 -0
- package/demos/pc/app/grid/event/click-event.vue +1 -0
- package/demos/pc/app/grid/event/context-menu-event-composition-api.vue +1 -0
- package/demos/pc/app/grid/event/context-menu-event.vue +1 -0
- package/demos/pc/app/grid/event/valid-error-event-composition-api.vue +1 -0
- package/demos/pc/app/grid/event/valid-error-event.vue +1 -0
- package/demos/pc/app/grid/large-data/column-anchor-clear-active-composition-api.vue +1 -1
- package/demos/pc/app/grid/large-data/column-anchor-clear-active.vue +1 -1
- package/demos/pc/app/grid/large-data/column-anchor-composition-api.vue +1 -1
- package/demos/pc/app/grid/large-data/column-anchor.vue +1 -1
- package/demos/pc/app/grid/large-data/scroll-to-composition-api.vue +1 -1
- package/demos/pc/app/grid/large-data/scroll-to.vue +1 -1
- package/demos/pc/app/grid/loading/grid-custom-loading-composition-api.vue +2 -2
- package/demos/pc/app/grid/loading/grid-custom-loading.spec.js +1 -1
- package/demos/pc/app/grid/loading/grid-custom-loading.vue +2 -2
- package/demos/pc/app/grid/operation-column/selection-operation-composition-api.vue +5 -5
- package/demos/pc/app/grid/operation-column/selection-operation.spec.js +5 -5
- package/demos/pc/app/grid/operation-column/selection-operation.vue +5 -5
- package/demos/pc/app/grid/serial-column/start-index-composition-api.vue +1 -1
- package/demos/pc/app/grid/serial-column/start-index.vue +1 -1
- package/demos/pc/app/grid/size/fixed-column-width-composition-api.vue +2 -2
- package/demos/pc/app/grid/size/fixed-column-width.spec.js +1 -1
- package/demos/pc/app/grid/size/fixed-column-width.vue +2 -2
- package/demos/pc/app/grid/webdoc/grid-import-export.js +1 -1
- package/demos/pc/app/loading/fullscreen.vue +1 -1
- package/demos/pc/app/milestone/custom-bottom-top-composition-api.vue +5 -2
- package/demos/pc/app/milestone/custom-bottom-top.vue +5 -2
- package/demos/pc/app/milestone/custom-flag-composition-api.vue +1 -1
- package/demos/pc/app/milestone/custom-flag.vue +1 -1
- package/demos/pc/app/milestone/custom-icon-slot-composition-api.vue +2 -2
- package/demos/pc/app/milestone/custom-icon-slot.vue +2 -2
- package/demos/pc/app/milestone/data-field-mapping-composition-api.vue +1 -1
- package/demos/pc/app/milestone/data-field-mapping.vue +1 -1
- package/demos/pc/app/milestone/flag-before-composition-api.vue +5 -5
- package/demos/pc/app/milestone/flag-before.spec.ts +2 -2
- package/demos/pc/app/milestone/flag-before.vue +5 -5
- package/demos/pc/app/milestone/milestone-events-composition-api.vue +1 -1
- package/demos/pc/app/milestone/milestone-events.vue +1 -1
- package/demos/pc/app/milestone/show-number-composition-api.vue +1 -1
- package/demos/pc/app/milestone/show-number.spec.ts +2 -2
- package/demos/pc/app/milestone/show-number.vue +1 -1
- package/demos/pc/app/milestone/solid-style-composition-api.vue +1 -1
- package/demos/pc/app/milestone/solid-style.spec.ts +3 -3
- package/demos/pc/app/milestone/solid-style.vue +1 -1
- package/demos/pc/app/sticky/events.vue +2 -2
- package/demos/pc/app/tabs/custom-more-icon-composition-api.vue +3 -3
- package/demos/pc/app/tabs/custom-more-icon.vue +3 -3
- package/demos/pc/app/tabs/more-show-all-composition-api.vue +3 -3
- package/demos/pc/app/tabs/more-show-all.vue +3 -3
- package/demos/pc/app/tabs/size-composition-api.vue +5 -5
- package/demos/pc/app/tabs/size.vue +5 -5
- package/demos/pc/app/tabs/tabs-draggable-composition-api.vue +8 -8
- package/demos/pc/app/tabs/tabs-draggable.vue +8 -8
- package/demos/pc/app/tabs/tabs-events-close-composition-api.vue +3 -3
- package/demos/pc/app/tabs/tabs-events-close.vue +3 -3
- package/demos/pc/app/tabs/tabs-events-edit-composition-api.vue +2 -2
- package/demos/pc/app/tabs/tabs-events-edit.vue +2 -2
- package/demos/pc/app/tabs/tabs-separator-composition-api.vue +3 -3
- package/demos/pc/app/tabs/tabs-separator.vue +3 -3
- package/demos/pc/app/tabs/with-add-composition-api.vue +3 -3
- package/demos/pc/app/tabs/with-add.vue +3 -3
- package/demos/pc/app/tag/size-composition-api.vue +0 -2
- package/demos/pc/app/tag/size.spec.ts +0 -2
- package/demos/pc/app/tag/size.vue +0 -2
- package/demos/pc/app/tag/webdoc/tag.js +2 -2
- package/demos/pc/app/tag-group/tag-group-size-composition-api.vue +0 -2
- package/demos/pc/app/tag-group/tag-group-size.spec.js +0 -4
- package/demos/pc/app/tag-group/tag-group-size.vue +0 -2
- package/demos/pc/app/time-picker/basic-usage-composition-api.vue +1 -1
- package/demos/pc/app/time-picker/basic-usage.spec.ts +4 -4
- package/demos/pc/app/time-picker/basic-usage.vue +1 -1
- package/demos/pc/app/time-picker/format.spec.ts +1 -1
- package/demos/pc/app/time-picker/is-range-composition-api.vue +1 -1
- package/demos/pc/app/time-picker/is-range.vue +1 -1
- package/demos/pc/app/time-picker/webdoc/time-picker.js +2 -2
- package/demos/pc/app/tree/edit-control-composition-api.vue +4 -3
- package/demos/pc/app/tree/edit-control.vue +4 -3
- package/demos/pc/app/tree/other-composition-api.vue +5 -4
- package/demos/pc/app/tree/other.vue +5 -4
- package/demos/pc/app/tree/slot-composition-api.vue +5 -5
- package/demos/pc/app/tree/slot.vue +5 -5
- package/demos/pc/menus.js +1 -1
- package/demos/pc/webdoc/changelog.md +4 -0
- package/demos/pc/webdoc/theme.md +8 -8
- package/package.json +9 -9
- package/src/assets/images/leftMenu/cmp-business-components.svg +16 -13
- package/src/assets/images/leftMenu/directives-custom-instruction.svg +16 -13
- package/src/views/layout/layout.vue +1 -1
package/demos/.eslintrc.js
CHANGED
package/demos/apis/tag-group.js
CHANGED
package/demos/apis/tag.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="demo-tabs">
|
|
3
3
|
<tiny-tabs v-model="activeName" show-expand-tabs expand-tabs-title="请选择" expand-tabs-mode="columns">
|
|
4
|
-
<tiny-tab-item :key="item.name" v-for="item in
|
|
4
|
+
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name"> </tiny-tab-item>
|
|
5
5
|
</tiny-tabs>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
},
|
|
17
17
|
data() {
|
|
18
18
|
return {
|
|
19
|
-
|
|
19
|
+
tabs: [
|
|
20
20
|
{
|
|
21
21
|
title: '标签 1',
|
|
22
22
|
name: '1',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<tiny-tabs v-model="activeName" v-if="showTab" tab-style="card" :with-close="true" @close="close">
|
|
3
|
-
<tiny-tab-item :key="item.name" v-for="item in
|
|
3
|
+
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
|
|
4
4
|
{{ item.content }}
|
|
5
5
|
</tiny-tab-item>
|
|
6
6
|
</tiny-tabs>
|
|
@@ -18,12 +18,12 @@ export default {
|
|
|
18
18
|
return {
|
|
19
19
|
activeName: '',
|
|
20
20
|
showTab: false,
|
|
21
|
-
|
|
21
|
+
tabs: []
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
mounted() {
|
|
25
25
|
setTimeout(() => {
|
|
26
|
-
this.
|
|
26
|
+
this.tabs = [
|
|
27
27
|
{
|
|
28
28
|
title: '表单组件',
|
|
29
29
|
name: 'first',
|
|
@@ -57,7 +57,7 @@ export default {
|
|
|
57
57
|
},
|
|
58
58
|
methods: {
|
|
59
59
|
close(name) {
|
|
60
|
-
this.
|
|
60
|
+
this.tabs = this.tabs.filter((tab) => {
|
|
61
61
|
return tab.name !== name
|
|
62
62
|
})
|
|
63
63
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
@tab-drag-over="handleOver"
|
|
13
13
|
@tab-drag-end="handleEnd"
|
|
14
14
|
>
|
|
15
|
-
<tiny-tab-item :key="item.name" v-for="item in
|
|
15
|
+
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
|
|
16
16
|
{{ item.content }}
|
|
17
17
|
</tiny-tab-item>
|
|
18
18
|
</tiny-tabs>
|
|
@@ -34,7 +34,7 @@ export default {
|
|
|
34
34
|
dropConfig: {
|
|
35
35
|
plugin: Sortable
|
|
36
36
|
},
|
|
37
|
-
|
|
37
|
+
tabs: [
|
|
38
38
|
{
|
|
39
39
|
title: 'Tab 1',
|
|
40
40
|
name: '1',
|
|
@@ -62,15 +62,15 @@ export default {
|
|
|
62
62
|
},
|
|
63
63
|
handleEnd(event) {
|
|
64
64
|
const { oldDraggableIndex, newDraggableIndex } = event
|
|
65
|
-
const tab = this.
|
|
66
|
-
this.
|
|
65
|
+
const tab = this.tabs.splice(oldDraggableIndex, 1)[0]
|
|
66
|
+
this.tabs.splice(newDraggableIndex, 0, tab)
|
|
67
67
|
|
|
68
|
-
console.log(this.
|
|
68
|
+
console.log(this.tabs)
|
|
69
69
|
},
|
|
70
70
|
handleAdd() {
|
|
71
|
-
this.
|
|
72
|
-
title: 'Tab ' + String(this.
|
|
73
|
-
name: String(this.
|
|
71
|
+
this.tabs.push({
|
|
72
|
+
title: 'Tab ' + String(this.tabs.length + 1),
|
|
73
|
+
name: String(this.tabs.length + 1),
|
|
74
74
|
content: '动态增加tabitem'
|
|
75
75
|
})
|
|
76
76
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<tiny-tabs v-model="activeName" :with-add="true" @add="add" tab-style="card">
|
|
3
|
-
<tiny-tab-item :key="item.name" v-for="item in
|
|
3
|
+
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
|
|
4
4
|
{{ item.content }}
|
|
5
5
|
</tiny-tab-item>
|
|
6
6
|
</tiny-tabs>
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
},
|
|
17
17
|
data() {
|
|
18
18
|
return {
|
|
19
|
-
|
|
19
|
+
tabs: [
|
|
20
20
|
{
|
|
21
21
|
title: '表单组件',
|
|
22
22
|
name: 'first',
|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
message: '动态增加 tabitem'
|
|
50
50
|
})
|
|
51
51
|
|
|
52
|
-
this.
|
|
52
|
+
this.tabs.push({
|
|
53
53
|
title: 'Tab ++',
|
|
54
54
|
name: ++this.tabIndex + '',
|
|
55
55
|
content: '动态增加 tabitem'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<tiny-tabs v-model="activeName" tab-style="card" :with-close="true" :before-close="beforeClose" @close="close">
|
|
3
|
-
<tiny-tab-item :key="item.name" v-for="item in
|
|
3
|
+
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
|
|
4
4
|
{{ item.content }}
|
|
5
5
|
</tiny-tab-item>
|
|
6
6
|
</tiny-tabs>
|
|
@@ -17,7 +17,7 @@ export default {
|
|
|
17
17
|
data() {
|
|
18
18
|
return {
|
|
19
19
|
activeName: 'first',
|
|
20
|
-
|
|
20
|
+
tabs: [
|
|
21
21
|
{
|
|
22
22
|
title: '表单组件',
|
|
23
23
|
name: 'first',
|
|
@@ -57,7 +57,7 @@ export default {
|
|
|
57
57
|
message: '关闭 ' + name + ' 页签'
|
|
58
58
|
})
|
|
59
59
|
|
|
60
|
-
this.
|
|
60
|
+
this.tabs = this.tabs.filter((tab) => {
|
|
61
61
|
return tab.name !== name
|
|
62
62
|
})
|
|
63
63
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<tiny-tabs v-model="activeName" tab-style="card" editable @edit="edit">
|
|
3
|
-
<tiny-tab-item :key="item.name" v-for="item in
|
|
3
|
+
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
|
|
4
4
|
{{ item.content }}
|
|
5
5
|
</tiny-tab-item>
|
|
6
6
|
</tiny-tabs>
|
|
@@ -17,7 +17,7 @@ export default {
|
|
|
17
17
|
data() {
|
|
18
18
|
return {
|
|
19
19
|
activeName: 'first',
|
|
20
|
-
|
|
20
|
+
tabs: [
|
|
21
21
|
{
|
|
22
22
|
title: '表单组件',
|
|
23
23
|
name: 'first',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<tiny-tabs v-model="activeName" v-if="showTab" tab-style="card" :with-close="true" @close="close">
|
|
3
|
-
<tiny-tab-item :key="item.name" v-for="item in
|
|
3
|
+
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
|
|
4
4
|
{{ item.content }}
|
|
5
5
|
<tiny-tabs v-model="activeName1" v-if="item.name === 'f1'">
|
|
6
6
|
<tiny-tab-item title="s1子标签页" name="s1">
|
|
@@ -32,7 +32,7 @@ export default {
|
|
|
32
32
|
activeName: 'f1',
|
|
33
33
|
activeName2: 'ss1',
|
|
34
34
|
showTab: true,
|
|
35
|
-
|
|
35
|
+
tabs: [
|
|
36
36
|
{
|
|
37
37
|
title: '表单组件',
|
|
38
38
|
name: 'f1',
|
|
@@ -53,7 +53,7 @@ export default {
|
|
|
53
53
|
},
|
|
54
54
|
methods: {
|
|
55
55
|
close(name) {
|
|
56
|
-
this.
|
|
56
|
+
this.tabs = this.tabs.filter((tab) => {
|
|
57
57
|
return tab.name !== name
|
|
58
58
|
})
|
|
59
59
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<tiny-tabs tab-style="card" :editable="false" :with-add="true" @add="handleadd" style="width: 500px" show-more-tabs>
|
|
3
|
-
<tiny-tab-item :key="item.name" v-for="item in
|
|
3
|
+
<tiny-tab-item :key="item.name" v-for="item in tabs" :title="item.title" :name="item.name">
|
|
4
4
|
{{ item.content }}
|
|
5
5
|
</tiny-tab-item>
|
|
6
6
|
</tiny-tabs>
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
},
|
|
17
17
|
data() {
|
|
18
18
|
return {
|
|
19
|
-
|
|
19
|
+
tabs: [
|
|
20
20
|
{
|
|
21
21
|
title: 'Tab 1',
|
|
22
22
|
name: '1',
|
|
@@ -35,10 +35,10 @@ export default {
|
|
|
35
35
|
methods: {
|
|
36
36
|
handleadd() {
|
|
37
37
|
// 如果tabItem数量小于指定值就可以新增
|
|
38
|
-
if (this.
|
|
38
|
+
if (this.tabs.length < this.maxCount) {
|
|
39
39
|
const name = `${++this.tabIndex}`
|
|
40
40
|
const title = `Tab ++ ${name}`
|
|
41
|
-
this.
|
|
41
|
+
this.tabs.push({ title, name, content: '动态增加tabitem - ' + name })
|
|
42
42
|
} else {
|
|
43
43
|
TinyModal.message('tabitem数量已到最大值')
|
|
44
44
|
}
|
|
@@ -16,10 +16,7 @@ test('基本用法', async ({ page }) => {
|
|
|
16
16
|
// 更多按钮
|
|
17
17
|
await expect(moreItem).toHaveText(/更多/)
|
|
18
18
|
// 图标显示
|
|
19
|
-
await expect(moreItem.locator('svg
|
|
20
|
-
'd',
|
|
21
|
-
'M8 11.43c-.15 0-.31-.06-.42-.18L1.92 5.6c-.23-.23-.23-.61 0-.85s.61-.23.85 0L8 9.98l5.23-5.23a.61.61 0 0 1 .85 0c.23.23.23.61 0 .85l-5.66 5.66c-.11.11-.27.17-.42.17z'
|
|
22
|
-
)
|
|
19
|
+
await expect(moreItem.locator('.tiny-dropdown__trigger .tiny-svg')).toBeVisible()
|
|
23
20
|
// 分割线
|
|
24
21
|
await expect(actionMenu.locator('.tiny-action-menu__item-line')).toHaveCount(2)
|
|
25
22
|
// 图标旋转
|
|
@@ -12,5 +12,6 @@ test('基本用法', async ({ page }) => {
|
|
|
12
12
|
await expect(visibleItem).toHaveCount(4)
|
|
13
13
|
await expect(moreItem).not.toHaveText(/更多/)
|
|
14
14
|
// 三点图标
|
|
15
|
-
|
|
15
|
+
const SvgPathReg = /^M2\.3 7\.78v.+219-1\.17Z$/
|
|
16
|
+
await expect(moreItem.locator('.tiny-svg path').first()).toHaveAttribute('d', SvgPathReg)
|
|
16
17
|
})
|
|
@@ -24,7 +24,7 @@ test('只显示文本', async ({ page }) => {
|
|
|
24
24
|
await page.goto('action-menu#icon')
|
|
25
25
|
|
|
26
26
|
const wrap = page.locator('#icon')
|
|
27
|
-
const actionMenu = wrap.locator('.tiny-action-menu').nth(
|
|
27
|
+
const actionMenu = wrap.locator('.tiny-action-menu').nth(1)
|
|
28
28
|
const actionMenuItem = actionMenu.locator('.tiny-action-menu__item')
|
|
29
29
|
|
|
30
30
|
await expect(actionMenuItem.nth(0).locator('.tiny-svg')).toBeHidden()
|
|
@@ -22,6 +22,6 @@ test('测试更多按钮', async ({ page }) => {
|
|
|
22
22
|
// 判断图标是否正确
|
|
23
23
|
const moreButton = buttonGroup.getByRole('button').nth(3)
|
|
24
24
|
const moreButtonSvg = moreButton.locator('svg path').first()
|
|
25
|
-
const moreSvgPathReg = /^
|
|
25
|
+
const moreSvgPathReg = /^M2\.3 7\.78v.+219-1\.17Z$/
|
|
26
26
|
await expect(moreButtonSvg).toHaveAttribute('d', moreSvgPathReg)
|
|
27
27
|
})
|
|
@@ -62,7 +62,7 @@ const dataArr = ref([
|
|
|
62
62
|
{
|
|
63
63
|
title: 'TinyVue',
|
|
64
64
|
content: '^15.0.01',
|
|
65
|
-
imageSrc: 'https://res.hc-cdn.com/tinyui-design/1.0.
|
|
65
|
+
imageSrc: 'https://res.hc-cdn.com/tinyui-design-common/1.0.5.20240823150427/assets/tinyvue.svg'
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
title: 'TinyNG',
|
|
@@ -69,7 +69,7 @@ export default {
|
|
|
69
69
|
{
|
|
70
70
|
title: 'TinyVue',
|
|
71
71
|
content: '^15.0.01',
|
|
72
|
-
imageSrc: 'https://res.hc-cdn.com/tinyui-design-common/1.0.
|
|
72
|
+
imageSrc: 'https://res.hc-cdn.com/tinyui-design-common/1.0.5.20240823150427/assets/tinyvue.svg'
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
title: 'TinyNG',
|
|
@@ -12,10 +12,7 @@ test('[DatePicker] 测试清除输入', async ({ page }) => {
|
|
|
12
12
|
// 默认显示清除按钮
|
|
13
13
|
await datePickerDefaultClearIcon.hover()
|
|
14
14
|
await expect(clearIcon).toBeVisible()
|
|
15
|
-
await expect(clearIcon.locator('path').nth(
|
|
16
|
-
'd',
|
|
17
|
-
'M4.25 3.4 8 7.15l3.75-3.75a.61.61 0 0 1 .85 0c.23.23.23.62 0 .85L8.85 8l3.75 3.75c.23.24.23.62 0 .85a.61.61 0 0 1-.85 0L8 8.85 4.25 12.6a.61.61 0 0 1-.85 0 .592.592 0 0 1 0-.85L7.15 8 3.4 4.25a.61.61 0 0 1 0-.85.61.61 0 0 1 .85 0z'
|
|
18
|
-
)
|
|
15
|
+
await expect(clearIcon.locator('path').nth(0)).toHaveAttribute('d', /^M12\.49 3\.3a.+22\.71 0Z$/)
|
|
19
16
|
|
|
20
17
|
// 隐藏清除按钮
|
|
21
18
|
await datePickerHideClearIcon.hover()
|
|
@@ -24,10 +21,7 @@ test('[DatePicker] 测试清除输入', async ({ page }) => {
|
|
|
24
21
|
// 自定义清除图标
|
|
25
22
|
await datePickerCustomClearIcon.hover()
|
|
26
23
|
await expect(clearIcon).toBeVisible()
|
|
27
|
-
await expect(clearIcon.locator('path').nth(
|
|
28
|
-
'd',
|
|
29
|
-
'M4.25 3.4 8 7.15l3.75-3.75a.61.61 0 0 1 .85 0c.23.23.23.62 0 .85L8.85 8l3.75 3.75c.23.24.23.62 0 .85a.61.61 0 0 1-.85 0L8 8.85 4.25 12.6a.61.61 0 0 1-.85 0 .592.592 0 0 1 0-.85L7.15 8 3.4 4.25a.61.61 0 0 1 0-.85.61.61 0 0 1 .85 0z'
|
|
30
|
-
)
|
|
24
|
+
await expect(clearIcon.locator('path').nth(0)).toHaveAttribute('d', /^M12\.49 3\.3a.+22\.71 0Z$/)
|
|
31
25
|
|
|
32
26
|
// 测试清除功能
|
|
33
27
|
await expect(datePickerCustomClearIcon).toHaveValue('2023-05-24')
|
|
@@ -31,12 +31,7 @@ const defaultTimeRange = ref(['09:00:00', '18:00:00'])
|
|
|
31
31
|
|
|
32
32
|
<style scoped lang="less">
|
|
33
33
|
.demo-date-picker-wrap {
|
|
34
|
-
width:
|
|
35
|
-
|
|
36
|
-
:deep(.tiny-date-editor--datetimerange.tiny-input__inner) {
|
|
37
|
-
width: 360px;
|
|
38
|
-
}
|
|
39
|
-
|
|
34
|
+
width: 360px;
|
|
40
35
|
& > * {
|
|
41
36
|
margin-top: 12px;
|
|
42
37
|
}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<tiny-layout>
|
|
3
|
-
<tiny-row>
|
|
4
|
-
<tiny-col :span="
|
|
3
|
+
<tiny-row class="demo-row">
|
|
4
|
+
<tiny-col :span="6">
|
|
5
5
|
<label class="demo-date-picker-label">focus:</label>
|
|
6
6
|
<tiny-date-picker v-model="valueFocus" @focus="handleFocus"></tiny-date-picker>
|
|
7
7
|
</tiny-col>
|
|
8
|
-
<tiny-col :span="
|
|
8
|
+
<tiny-col :span="6">
|
|
9
9
|
<label class="demo-date-picker-label">blur:</label>
|
|
10
10
|
<tiny-date-picker v-model="valueBlur" @blur="handleBlur"></tiny-date-picker>
|
|
11
11
|
</tiny-col>
|
|
12
|
-
<tiny-col :span="
|
|
12
|
+
<tiny-col :span="6">
|
|
13
13
|
<label class="demo-date-picker-label">change:</label>
|
|
14
14
|
<tiny-date-picker v-model="valueChange" @change="handleChange"></tiny-date-picker>
|
|
15
15
|
</tiny-col>
|
|
16
|
-
</tiny-row>
|
|
17
|
-
<tiny-row>
|
|
18
16
|
<tiny-col :span="6">
|
|
19
17
|
<label class="demo-date-picker-label">onPick:</label>
|
|
20
18
|
<tiny-date-picker v-model="valueOnPick" type="daterange" :picker-options="pickerOptions"></tiny-date-picker>
|
|
@@ -52,6 +50,9 @@ const pickerOptions = {
|
|
|
52
50
|
</script>
|
|
53
51
|
|
|
54
52
|
<style scoped>
|
|
53
|
+
.demo-row {
|
|
54
|
+
width: 80%;
|
|
55
|
+
}
|
|
55
56
|
.demo-date-picker-label {
|
|
56
57
|
display: inline-block;
|
|
57
58
|
margin: 12px 0;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<tiny-layout>
|
|
3
|
-
<tiny-row>
|
|
4
|
-
<tiny-col :span="
|
|
3
|
+
<tiny-row class="demo-row">
|
|
4
|
+
<tiny-col :span="6">
|
|
5
5
|
<label class="demo-date-picker-label">focus:</label>
|
|
6
6
|
<tiny-date-picker v-model="valueFocus" @focus="handleFocus"></tiny-date-picker>
|
|
7
7
|
</tiny-col>
|
|
8
|
-
<tiny-col :span="
|
|
8
|
+
<tiny-col :span="6">
|
|
9
9
|
<label class="demo-date-picker-label">blur:</label>
|
|
10
10
|
<tiny-date-picker v-model="valueBlur" @blur="handleBlur"></tiny-date-picker>
|
|
11
11
|
</tiny-col>
|
|
12
|
-
<tiny-col :span="
|
|
12
|
+
<tiny-col :span="6">
|
|
13
13
|
<label class="demo-date-picker-label">change:</label>
|
|
14
14
|
<tiny-date-picker v-model="valueChange" @change="handleChange"></tiny-date-picker>
|
|
15
15
|
</tiny-col>
|
|
16
|
-
</tiny-row>
|
|
17
|
-
<tiny-row>
|
|
18
16
|
<tiny-col :span="6">
|
|
19
17
|
<label class="demo-date-picker-label">onPick:</label>
|
|
20
18
|
<tiny-date-picker v-model="valueOnPick" type="daterange" :picker-options="pickerOptions"></tiny-date-picker>
|
|
@@ -64,6 +62,9 @@ export default {
|
|
|
64
62
|
</script>
|
|
65
63
|
|
|
66
64
|
<style scoped>
|
|
65
|
+
.demo-row {
|
|
66
|
+
width: 80%;
|
|
67
|
+
}
|
|
67
68
|
.demo-date-picker-label {
|
|
68
69
|
display: inline-block;
|
|
69
70
|
margin: 12px 0;
|
|
@@ -15,14 +15,7 @@ const dateRangeValue = ref([])
|
|
|
15
15
|
|
|
16
16
|
<style scoped lang="less">
|
|
17
17
|
.demo-date-picker-wrap {
|
|
18
|
-
width:
|
|
19
|
-
|
|
20
|
-
:deep(.tiny-date-editor--daterange.tiny-input__inner) {
|
|
21
|
-
width: 360px;
|
|
22
|
-
}
|
|
23
|
-
:deep(.tiny-range__close-icon) {
|
|
24
|
-
right: -4px;
|
|
25
|
-
}
|
|
18
|
+
width: 360px;
|
|
26
19
|
|
|
27
20
|
& > * {
|
|
28
21
|
margin-top: 12px;
|
|
@@ -23,14 +23,7 @@ export default {
|
|
|
23
23
|
|
|
24
24
|
<style scoped lang="less">
|
|
25
25
|
.demo-date-picker-wrap {
|
|
26
|
-
width:
|
|
27
|
-
|
|
28
|
-
:deep(.tiny-date-editor--daterange.tiny-input__inner) {
|
|
29
|
-
width: 360px;
|
|
30
|
-
}
|
|
31
|
-
:deep(.tiny-range__close-icon) {
|
|
32
|
-
right: -4px;
|
|
33
|
-
}
|
|
26
|
+
width: 360px;
|
|
34
27
|
|
|
35
28
|
& > * {
|
|
36
29
|
margin-top: 12px;
|