@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.
Files changed (161) hide show
  1. package/demos/.eslintrc.js +2 -1
  2. package/demos/apis/tag-group.js +1 -1
  3. package/demos/apis/tag.js +1 -1
  4. package/demos/mobile/app/tabs/expand.vue +2 -2
  5. package/demos/mobile-first/app/tabs/tabdata-title.vue +4 -4
  6. package/demos/mobile-first/app/tabs/tabs-draggable.vue +8 -8
  7. package/demos/mobile-first/app/tabs/tabs-events-add.vue +3 -3
  8. package/demos/mobile-first/app/tabs/tabs-events-close.vue +3 -3
  9. package/demos/mobile-first/app/tabs/tabs-events-edit.vue +2 -2
  10. package/demos/mobile-first/app/tabs/tabs-tabs.vue +3 -3
  11. package/demos/mobile-first/app/tabs/with-add.vue +4 -4
  12. package/demos/pc/app/action-menu/basic-usage.spec.ts +1 -4
  13. package/demos/pc/app/action-menu/card-mode.spec.ts +2 -1
  14. package/demos/pc/app/action-menu/icon.spec.ts +1 -1
  15. package/demos/pc/app/button-group/show-more.spec.ts +1 -1
  16. package/demos/pc/app/card/card-select-composition-api.vue +1 -1
  17. package/demos/pc/app/card/card-select.vue +1 -1
  18. package/demos/pc/app/card/custom-class-composition-api.vue +1 -1
  19. package/demos/pc/app/card/custom-class.vue +1 -1
  20. package/demos/pc/app/config-provider/base.vue +1 -1
  21. package/demos/pc/app/date-picker/basic-usage-composition-api.vue +1 -1
  22. package/demos/pc/app/date-picker/basic-usage.vue +1 -1
  23. package/demos/pc/app/date-picker/clear-composition-api.vue +1 -1
  24. package/demos/pc/app/date-picker/clear.spec.ts +2 -8
  25. package/demos/pc/app/date-picker/clear.vue +1 -1
  26. package/demos/pc/app/date-picker/custom-suffix-icon-composition-api.vue +1 -1
  27. package/demos/pc/app/date-picker/custom-suffix-icon.vue +1 -1
  28. package/demos/pc/app/date-picker/custom-weeks-composition-api.vue +1 -1
  29. package/demos/pc/app/date-picker/custom-weeks.vue +1 -1
  30. package/demos/pc/app/date-picker/default-value-composition-api.vue +1 -6
  31. package/demos/pc/app/date-picker/default-value.vue +1 -6
  32. package/demos/pc/app/date-picker/disabled-composition-api.vue +1 -6
  33. package/demos/pc/app/date-picker/disabled.vue +1 -6
  34. package/demos/pc/app/date-picker/events-composition-api.vue +7 -6
  35. package/demos/pc/app/date-picker/events.vue +7 -6
  36. package/demos/pc/app/date-picker/filter-mode-composition-api.vue +1 -1
  37. package/demos/pc/app/date-picker/filter-mode.vue +1 -1
  38. package/demos/pc/app/date-picker/format-composition-api.vue +1 -1
  39. package/demos/pc/app/date-picker/format.vue +1 -1
  40. package/demos/pc/app/date-picker/label-inside-composition-api.vue +1 -8
  41. package/demos/pc/app/date-picker/label-inside.vue +1 -8
  42. package/demos/pc/app/date-picker/multiple-dates-composition-api.vue +1 -1
  43. package/demos/pc/app/date-picker/multiple-dates.vue +1 -1
  44. package/demos/pc/app/date-picker/now-composition-api.vue +1 -1
  45. package/demos/pc/app/date-picker/now.vue +1 -1
  46. package/demos/pc/app/date-picker/size-composition-api.vue +1 -6
  47. package/demos/pc/app/date-picker/size.vue +1 -6
  48. package/demos/pc/app/date-picker/step-composition-api.vue +1 -1
  49. package/demos/pc/app/date-picker/step.vue +1 -1
  50. package/demos/pc/app/date-picker/timezone-composition-api.vue +1 -1
  51. package/demos/pc/app/date-picker/timezone.vue +1 -1
  52. package/demos/pc/app/date-picker/unlink-panels-composition-api.vue +1 -1
  53. package/demos/pc/app/date-picker/unlink-panels.vue +1 -1
  54. package/demos/pc/app/date-picker/validate-event-composition-api.vue +1 -1
  55. package/demos/pc/app/date-picker/validate-event.vue +1 -1
  56. package/demos/pc/app/drawer/use-through-method-composition-api.vue +15 -4
  57. package/demos/pc/app/drawer/use-through-method.vue +20 -9
  58. package/demos/pc/app/dropdown/basic-usage.spec.ts +0 -4
  59. package/demos/pc/app/fall-menu/custom-menuitem.vue +2 -2
  60. package/demos/pc/app/fall-menu/custom-slider-icon.vue +2 -2
  61. package/demos/pc/app/fall-menu/data-resource.vue +1 -1
  62. package/demos/pc/app/grid/context-menu/cell-menu-composition-api.vue +1 -0
  63. package/demos/pc/app/grid/context-menu/cell-menu.vue +1 -0
  64. package/demos/pc/app/grid/context-menu/footer-menu-composition-api.vue +1 -0
  65. package/demos/pc/app/grid/context-menu/footer-menu.vue +1 -0
  66. package/demos/pc/app/grid/context-menu/header-menu-composition-api.vue +1 -0
  67. package/demos/pc/app/grid/context-menu/header-menu.vue +1 -0
  68. package/demos/pc/app/grid/context-menu/menu-permissions-composition-api.vue +1 -0
  69. package/demos/pc/app/grid/context-menu/menu-permissions.vue +1 -0
  70. package/demos/pc/app/grid/data-source/columns-composition-api.vue +1 -1
  71. package/demos/pc/app/grid/data-source/columns.vue +1 -1
  72. package/demos/pc/app/grid/dynamically-columns/dynamically-columns-composition-api.vue +6 -0
  73. package/demos/pc/app/grid/dynamically-columns/dynamically-columns.vue +6 -0
  74. package/demos/pc/app/grid/event/click-event-composition-api.vue +1 -0
  75. package/demos/pc/app/grid/event/click-event.vue +1 -0
  76. package/demos/pc/app/grid/event/context-menu-event-composition-api.vue +1 -0
  77. package/demos/pc/app/grid/event/context-menu-event.vue +1 -0
  78. package/demos/pc/app/grid/event/valid-error-event-composition-api.vue +1 -0
  79. package/demos/pc/app/grid/event/valid-error-event.vue +1 -0
  80. package/demos/pc/app/grid/large-data/column-anchor-clear-active-composition-api.vue +1 -1
  81. package/demos/pc/app/grid/large-data/column-anchor-clear-active.vue +1 -1
  82. package/demos/pc/app/grid/large-data/column-anchor-composition-api.vue +1 -1
  83. package/demos/pc/app/grid/large-data/column-anchor.vue +1 -1
  84. package/demos/pc/app/grid/large-data/scroll-to-composition-api.vue +1 -1
  85. package/demos/pc/app/grid/large-data/scroll-to.vue +1 -1
  86. package/demos/pc/app/grid/loading/grid-custom-loading-composition-api.vue +2 -2
  87. package/demos/pc/app/grid/loading/grid-custom-loading.spec.js +1 -1
  88. package/demos/pc/app/grid/loading/grid-custom-loading.vue +2 -2
  89. package/demos/pc/app/grid/operation-column/selection-operation-composition-api.vue +5 -5
  90. package/demos/pc/app/grid/operation-column/selection-operation.spec.js +5 -5
  91. package/demos/pc/app/grid/operation-column/selection-operation.vue +5 -5
  92. package/demos/pc/app/grid/serial-column/start-index-composition-api.vue +1 -1
  93. package/demos/pc/app/grid/serial-column/start-index.vue +1 -1
  94. package/demos/pc/app/grid/size/fixed-column-width-composition-api.vue +2 -2
  95. package/demos/pc/app/grid/size/fixed-column-width.spec.js +1 -1
  96. package/demos/pc/app/grid/size/fixed-column-width.vue +2 -2
  97. package/demos/pc/app/grid/webdoc/grid-import-export.js +1 -1
  98. package/demos/pc/app/loading/fullscreen.vue +1 -1
  99. package/demos/pc/app/milestone/custom-bottom-top-composition-api.vue +5 -2
  100. package/demos/pc/app/milestone/custom-bottom-top.vue +5 -2
  101. package/demos/pc/app/milestone/custom-flag-composition-api.vue +1 -1
  102. package/demos/pc/app/milestone/custom-flag.vue +1 -1
  103. package/demos/pc/app/milestone/custom-icon-slot-composition-api.vue +2 -2
  104. package/demos/pc/app/milestone/custom-icon-slot.vue +2 -2
  105. package/demos/pc/app/milestone/data-field-mapping-composition-api.vue +1 -1
  106. package/demos/pc/app/milestone/data-field-mapping.vue +1 -1
  107. package/demos/pc/app/milestone/flag-before-composition-api.vue +5 -5
  108. package/demos/pc/app/milestone/flag-before.spec.ts +2 -2
  109. package/demos/pc/app/milestone/flag-before.vue +5 -5
  110. package/demos/pc/app/milestone/milestone-events-composition-api.vue +1 -1
  111. package/demos/pc/app/milestone/milestone-events.vue +1 -1
  112. package/demos/pc/app/milestone/show-number-composition-api.vue +1 -1
  113. package/demos/pc/app/milestone/show-number.spec.ts +2 -2
  114. package/demos/pc/app/milestone/show-number.vue +1 -1
  115. package/demos/pc/app/milestone/solid-style-composition-api.vue +1 -1
  116. package/demos/pc/app/milestone/solid-style.spec.ts +3 -3
  117. package/demos/pc/app/milestone/solid-style.vue +1 -1
  118. package/demos/pc/app/sticky/events.vue +2 -2
  119. package/demos/pc/app/tabs/custom-more-icon-composition-api.vue +3 -3
  120. package/demos/pc/app/tabs/custom-more-icon.vue +3 -3
  121. package/demos/pc/app/tabs/more-show-all-composition-api.vue +3 -3
  122. package/demos/pc/app/tabs/more-show-all.vue +3 -3
  123. package/demos/pc/app/tabs/size-composition-api.vue +5 -5
  124. package/demos/pc/app/tabs/size.vue +5 -5
  125. package/demos/pc/app/tabs/tabs-draggable-composition-api.vue +8 -8
  126. package/demos/pc/app/tabs/tabs-draggable.vue +8 -8
  127. package/demos/pc/app/tabs/tabs-events-close-composition-api.vue +3 -3
  128. package/demos/pc/app/tabs/tabs-events-close.vue +3 -3
  129. package/demos/pc/app/tabs/tabs-events-edit-composition-api.vue +2 -2
  130. package/demos/pc/app/tabs/tabs-events-edit.vue +2 -2
  131. package/demos/pc/app/tabs/tabs-separator-composition-api.vue +3 -3
  132. package/demos/pc/app/tabs/tabs-separator.vue +3 -3
  133. package/demos/pc/app/tabs/with-add-composition-api.vue +3 -3
  134. package/demos/pc/app/tabs/with-add.vue +3 -3
  135. package/demos/pc/app/tag/size-composition-api.vue +0 -2
  136. package/demos/pc/app/tag/size.spec.ts +0 -2
  137. package/demos/pc/app/tag/size.vue +0 -2
  138. package/demos/pc/app/tag/webdoc/tag.js +2 -2
  139. package/demos/pc/app/tag-group/tag-group-size-composition-api.vue +0 -2
  140. package/demos/pc/app/tag-group/tag-group-size.spec.js +0 -4
  141. package/demos/pc/app/tag-group/tag-group-size.vue +0 -2
  142. package/demos/pc/app/time-picker/basic-usage-composition-api.vue +1 -1
  143. package/demos/pc/app/time-picker/basic-usage.spec.ts +4 -4
  144. package/demos/pc/app/time-picker/basic-usage.vue +1 -1
  145. package/demos/pc/app/time-picker/format.spec.ts +1 -1
  146. package/demos/pc/app/time-picker/is-range-composition-api.vue +1 -1
  147. package/demos/pc/app/time-picker/is-range.vue +1 -1
  148. package/demos/pc/app/time-picker/webdoc/time-picker.js +2 -2
  149. package/demos/pc/app/tree/edit-control-composition-api.vue +4 -3
  150. package/demos/pc/app/tree/edit-control.vue +4 -3
  151. package/demos/pc/app/tree/other-composition-api.vue +5 -4
  152. package/demos/pc/app/tree/other.vue +5 -4
  153. package/demos/pc/app/tree/slot-composition-api.vue +5 -5
  154. package/demos/pc/app/tree/slot.vue +5 -5
  155. package/demos/pc/menus.js +1 -1
  156. package/demos/pc/webdoc/changelog.md +4 -0
  157. package/demos/pc/webdoc/theme.md +8 -8
  158. package/package.json +9 -9
  159. package/src/assets/images/leftMenu/cmp-business-components.svg +16 -13
  160. package/src/assets/images/leftMenu/directives-custom-instruction.svg +16 -13
  161. package/src/views/layout/layout.vue +1 -1
@@ -3,6 +3,7 @@
3
3
  /** @type {import('eslint').Linter.Config} */
4
4
  module.exports = {
5
5
  rules: {
6
- 'no-console': 'off'
6
+ 'no-console': 'off',
7
+ 'vue/no-unused-vars': 'off'
7
8
  }
8
9
  }
@@ -32,7 +32,7 @@ export default {
32
32
  },
33
33
  {
34
34
  name: 'size',
35
- type: "'medium' | 'small' | 'mini'",
35
+ type: "'medium' | 'small'",
36
36
  defaultValue: "'medium'",
37
37
  desc: {
38
38
  'zh-CN': '尺寸',
package/demos/apis/tag.js CHANGED
@@ -271,7 +271,7 @@ type IEffect = 'dark' | 'light' | 'plain'
271
271
  name: 'ISize',
272
272
  type: 'type',
273
273
  code: `
274
- type ISize = 'medium' | 'small' | 'mini' | ''
274
+ type ISize = 'medium' | 'small' | ''
275
275
  `
276
276
  },
277
277
  {
@@ -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 Tabs" :title="item.title" :name="item.name"> </tiny-tab-item>
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
- TinyTabs: [
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 Tabs" :title="item.title" :name="item.name">
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
- TinyTabs: []
21
+ tabs: []
22
22
  }
23
23
  },
24
24
  mounted() {
25
25
  setTimeout(() => {
26
- this.TinyTabs = [
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.TinyTabs = this.TinyTabs.filter((tab) => {
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 Tabs" :title="item.title" :name="item.name">
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
- TinyTabs: [
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.TinyTabs.splice(oldDraggableIndex, 1)[0]
66
- this.TinyTabs.splice(newDraggableIndex, 0, tab)
65
+ const tab = this.tabs.splice(oldDraggableIndex, 1)[0]
66
+ this.tabs.splice(newDraggableIndex, 0, tab)
67
67
 
68
- console.log(this.TinyTabs)
68
+ console.log(this.tabs)
69
69
  },
70
70
  handleAdd() {
71
- this.TinyTabs.push({
72
- title: 'Tab ' + String(this.TinyTabs.length + 1),
73
- name: String(this.TinyTabs.length + 1),
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 Tabs" :title="item.title" :name="item.name">
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
- TinyTabs: [
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.TinyTabs.push({
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 Tabs" :title="item.title" :name="item.name">
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
- TinyTabs: [
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.TinyTabs = this.TinyTabs.filter((tab) => {
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 Tabs" :title="item.title" :name="item.name">
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
- TinyTabs: [
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 Tabs" :title="item.title" :name="item.name">
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
- TinyTabs: [
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.TinyTabs = this.TinyTabs.filter((tab) => {
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 Tabs" :title="item.title" :name="item.name">
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
- TinyTabs: [
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.TinyTabs.length < this.maxCount) {
38
+ if (this.tabs.length < this.maxCount) {
39
39
  const name = `${++this.tabIndex}`
40
40
  const title = `Tab ++ ${name}`
41
- this.TinyTabs.push({ title, name, content: '动态增加tabitem - ' + name })
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 > path').nth(0)).toHaveAttribute(
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
- await expect(moreItem.locator('circle')).toHaveCount(3)
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(2)
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 = /^M292\.768 449\.694c2\.491\.515.+002-12.555-\.002z$/
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.7.20240711104855/home/images/tinyvue.svg'
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.7.20240711104855/assets/tinyvue.svg'
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',
@@ -49,6 +49,6 @@ const options = ref([
49
49
  padding: 16px;
50
50
  }
51
51
  .my-card {
52
- background-color: rgba(0, 0, 0, 0.3);
52
+ background-color: rgba(0, 0, 0, 0.1);
53
53
  }
54
54
  </style>
@@ -57,6 +57,6 @@ export default {
57
57
  padding: 16px;
58
58
  }
59
59
  .my-card {
60
- background-color: rgba(0, 0, 0, 0.3);
60
+ background-color: rgba(0, 0, 0, 0.1);
61
61
  }
62
62
  </style>
@@ -21,7 +21,7 @@ export default {
21
21
  name: 'smb', // 设计规范名称
22
22
  version: '1.0.0', // 设计规范版本号
23
23
  components: {
24
- TinyAlert: {
24
+ Alert: {
25
25
  icons: {
26
26
  warning: iconWarningTriangle()
27
27
  },
@@ -23,7 +23,7 @@ const yearValue = ref('')
23
23
 
24
24
  <style scoped lang="less">
25
25
  .demo-date-picker-wrap {
26
- width: 280px;
26
+ width: 360px;
27
27
 
28
28
  & > * {
29
29
  margin-top: 12px;
@@ -31,7 +31,7 @@ export default {
31
31
 
32
32
  <style scoped lang="less">
33
33
  .demo-date-picker-wrap {
34
- width: 280px;
34
+ width: 360px;
35
35
 
36
36
  & > * {
37
37
  margin-top: 12px;
@@ -31,6 +31,6 @@ const IconClose = iconClose()
31
31
 
32
32
  <style scoped>
33
33
  .demo-date-picker-wrap {
34
- width: 280px;
34
+ width: 360px;
35
35
  }
36
36
  </style>
@@ -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(1)).toHaveAttribute(
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(1)).toHaveAttribute(
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')
@@ -41,6 +41,6 @@ export default {
41
41
 
42
42
  <style scoped>
43
43
  .demo-date-picker-wrap {
44
- width: 280px;
44
+ width: 360px;
45
45
  }
46
46
  </style>
@@ -15,7 +15,7 @@ const IconMinus = iconMinus()
15
15
 
16
16
  <style>
17
17
  .demo-date-picker-wrap {
18
- width: 280px;
18
+ width: 360px;
19
19
  }
20
20
 
21
21
  .my-date-picker {
@@ -23,7 +23,7 @@ export default {
23
23
 
24
24
  <style>
25
25
  .demo-date-picker-wrap {
26
- width: 280px;
26
+ width: 360px;
27
27
  }
28
28
 
29
29
  .my-date-picker {
@@ -48,6 +48,6 @@ function formatWeeks(customWeeks, weekFirstDays) {
48
48
 
49
49
  <style scoped>
50
50
  .demo-date-picker-wrap {
51
- width: 280px;
51
+ width: 360px;
52
52
  }
53
53
  </style>
@@ -57,6 +57,6 @@ export default {
57
57
 
58
58
  <style scoped>
59
59
  .demo-date-picker-wrap {
60
- width: 280px;
60
+ width: 360px;
61
61
  }
62
62
  </style>
@@ -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: 280px;
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
  }
@@ -39,12 +39,7 @@ export default {
39
39
 
40
40
  <style scoped lang="less">
41
41
  .demo-date-picker-wrap {
42
- width: 280px;
43
-
44
- :deep(.tiny-date-editor--datetimerange.tiny-input__inner) {
45
- width: 360px;
46
- }
47
-
42
+ width: 360px;
48
43
  & > * {
49
44
  margin-top: 12px;
50
45
  }
@@ -50,12 +50,7 @@ const pickerOptions = {
50
50
 
51
51
  <style scoped lang="less">
52
52
  .demo-date-picker-wrap {
53
- width: 280px;
54
-
55
- :deep(.tiny-date-editor--daterange.tiny-input__inner) {
56
- width: 360px;
57
- }
58
-
53
+ width: 360px;
59
54
  & > * {
60
55
  margin-top: 12px;
61
56
  }
@@ -57,12 +57,7 @@ export default {
57
57
 
58
58
  <style scoped lang="less">
59
59
  .demo-date-picker-wrap {
60
- width: 280px;
61
-
62
- :deep(.tiny-date-editor--daterange.tiny-input__inner) {
63
- width: 360px;
64
- }
65
-
60
+ width: 360px;
66
61
  & > * {
67
62
  margin-top: 12px;
68
63
  }
@@ -1,20 +1,18 @@
1
1
  <template>
2
2
  <tiny-layout>
3
- <tiny-row>
4
- <tiny-col :span="4">
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="4">
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="4">
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="4">
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="4">
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="4">
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,7 +15,7 @@ const rangeValue = ref('')
15
15
 
16
16
  <style scoped lang="less">
17
17
  .demo-date-picker-wrap {
18
- width: 280px;
18
+ width: 360px;
19
19
 
20
20
  & > * {
21
21
  margin-top: 12px;
@@ -23,7 +23,7 @@ export default {
23
23
 
24
24
  <style scoped lang="less">
25
25
  .demo-date-picker-wrap {
26
- width: 280px;
26
+ width: 360px;
27
27
 
28
28
  & > * {
29
29
  margin-top: 12px;
@@ -35,7 +35,7 @@ const selectedValue = ref(1590076800000)
35
35
 
36
36
  <style scoped lang="less">
37
37
  .demo-date-picker-wrap {
38
- width: 280px;
38
+ width: 360px;
39
39
 
40
40
  & > * {
41
41
  margin-top: 12px;
@@ -43,7 +43,7 @@ export default {
43
43
 
44
44
  <style scoped lang="less">
45
45
  .demo-date-picker-wrap {
46
- width: 280px;
46
+ width: 360px;
47
47
 
48
48
  & > * {
49
49
  margin-top: 12px;
@@ -15,14 +15,7 @@ const dateRangeValue = ref([])
15
15
 
16
16
  <style scoped lang="less">
17
17
  .demo-date-picker-wrap {
18
- width: 280px;
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: 280px;
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;