diff --git a/examples/docs/newsrc/pc.vue b/examples/docs/newsrc/pc.vue
index 1f410f450..b539502ef 100644
--- a/examples/docs/newsrc/pc.vue
+++ b/examples/docs/newsrc/pc.vue
@@ -194,6 +194,8 @@ export default {
currMd: hooks.computed(() => mds[`${modeState.pathName}.cn.md`]),
demoLoading: false
})
+ // hui chart 新增图表类型,新增图表的 api 和原有图表的api 区分开。
+ const huiNewChart = ['chart-process']
const fn = {
// 菜单搜索:忽略大小写
searchMenu: (value, data) => {
@@ -234,7 +236,12 @@ export default {
const demosConfig = await getDemosConfig(demosModule)
state.demos = demosConfig.demos
state.currDemo = state.demos.find((d) => d.demoId === modeState.demoId) || state.demos?.[0]
- state.currApi = (await getApisConfig(componentName, 'pc')).apis
+
+ if (huiNewChart.includes(modeState.pathName)) {
+ state.currApi = (await getApisConfig('hui', 'pc')).apis
+ } else {
+ state.currApi = (await getApisConfig(componentName, 'pc')).apis
+ }
await _switchDemo()
}
async function _switchDemo() {
diff --git a/examples/sites/demos/apis/cascader.js b/examples/sites/demos/apis/cascader.js
index c6c123ff7..b5e6e8f62 100644
--- a/examples/sites/demos/apis/cascader.js
+++ b/examples/sites/demos/apis/cascader.js
@@ -376,6 +376,16 @@ export default {
},
mode: ['pc'],
pcDemo: 'filterable'
+ },
+ {
+ name: 'no-data',
+ defaultValue: '',
+ desc: {
+ 'zh-CN': '通过 no-data
插槽设置没有数据时显示的内容',
+ 'en-US': 'Set what is displayed when there is no data via the no-data
slot'
+ },
+ mode: ['pc'],
+ pcDemo: 'slot-nodata'
}
]
},
diff --git a/examples/sites/demos/apis/config-provider.js b/examples/sites/demos/apis/config-provider.js
index baa95059b..51cea1588 100644
--- a/examples/sites/demos/apis/config-provider.js
+++ b/examples/sites/demos/apis/config-provider.js
@@ -21,7 +21,7 @@ export default {
type: "'ltr' | 'rtl'",
defaultValue: 'ltr',
desc: {
- 'zh-CN': '文字排版方向',
+ 'zh-CN': '文字样式方向',
'en-US': 'Text layout direction'
},
mode: ['pc'],
diff --git a/examples/sites/demos/apis/credit-card-form.js b/examples/sites/demos/apis/credit-card-form.js
deleted file mode 100644
index 49738cd1d..000000000
--- a/examples/sites/demos/apis/credit-card-form.js
+++ /dev/null
@@ -1,98 +0,0 @@
-export default {
- mode: ['pc'],
- apis: [
- {
- name: 'credit-card-form',
- type: 'component',
- props: [
- {
- name: 'background-image',
- type: 'string , object',
- defaultValue: '',
- desc: {
- 'zh-CN': '设置卡片的背景图片;',
- 'en-US': 'Set the background image of the card.'
- },
- mode: ['pc'],
- pcDemo: 'background-image'
- },
- {
- name: 'form-data',
- type: 'object',
- defaultValue:
- "// 该属性的默认值为 \n{cardCvv: '', cardName: '', cardYear: '', cardMonth: '', cardNumber: ''}",
- desc: {
- 'zh-CN': '设置信用卡显示数据',
- 'en-US': 'Setting Credit Card Display Data'
- },
- mode: ['pc'],
- pcDemo: 'basic-usage'
- }
- ],
- events: [
- {
- name: 'input-card-cvv',
- defaultValue: '',
- desc: {
- 'zh-CN': '输入 cvv 时触发的事件',
- 'en-US': 'CVV input event triggered'
- },
- mode: ['pc'],
- pcDemo: 'credit-card-form-events'
- },
- {
- name: 'input-card-month',
- defaultValue: '',
- desc: {
- 'zh-CN': '选择月时触发的事件',
- 'en-US': 'Event triggered when a month is selected'
- },
- mode: ['pc'],
- pcDemo: 'credit-card-form-events'
- },
- {
- name: 'input-card-name',
- defaultValue: '',
- desc: {
- 'zh-CN': '输入卡持有者时触发的事件',
- 'en-US': 'Event triggered when a card holder is entered'
- },
- mode: ['pc'],
- pcDemo: 'credit-card-form-events'
- },
- {
- name: 'input-card-number',
- defaultValue: '',
- desc: {
- 'zh-CN': '输入卡号时触发的事件',
- 'en-US': 'Event triggered when a card number is entered'
- },
- mode: ['pc'],
- pcDemo: 'credit-card-form-events'
- },
- {
- name: 'input-card-year',
- defaultValue: '',
- desc: {
- 'zh-CN': '选择年时触发的事件',
- 'en-US': 'Event triggered when the year is selected'
- },
- mode: ['pc'],
- pcDemo: 'credit-card-form-events'
- },
- {
- name: 'submit',
- defaultValue: '',
- desc: {
- 'zh-CN': '提交时触发的事件',
- 'en-US': 'Event triggered upon submission'
- },
- mode: ['pc'],
- pcDemo: 'credit-card-form-events'
- }
- ],
- methods: [],
- slots: []
- }
- ]
-}
diff --git a/examples/sites/demos/apis/detail-page.js b/examples/sites/demos/apis/detail-page.js
deleted file mode 100644
index 61ea42630..000000000
--- a/examples/sites/demos/apis/detail-page.js
+++ /dev/null
@@ -1,126 +0,0 @@
-export default {
- mode: ['pc'],
- apis: [
- {
- name: 'detail-page',
- type: 'component',
- props: [
- {
- name: 'cancel-button',
- type: 'string',
- defaultValue: '',
- desc: {
- 'zh-CN': "个性化弹窗取消按钮的文本,默认为 '取消'",
- 'en-US': "Text of the cancel button in the personalized pop-up window, The default value is'Cancel'"
- },
- mode: ['pc'],
- pcDemo: 'custom-show-text'
- },
- {
- name: 'dialog-title',
- type: 'string',
- defaultValue: '',
- desc: {
- 'zh-CN': "个性化弹窗标题,默认为 '个性化标题'",
- 'en-US': "Personalize pop-up title, default is'Personalized title'"
- },
- mode: ['pc'],
- pcDemo: 'custom-show-text'
- },
- {
- name: 'label-title',
- type: 'string',
- defaultValue: '',
- desc: {
- 'zh-CN': "个性化弹窗表头文本标题栏字段;默认为 '文本字段'",
- 'en-US': "Personalized pop-up window header text title bar field, The default value is 'Title'"
- },
- mode: ['pc'],
- pcDemo: 'custom-show-text'
- },
- {
- name: 'modelValue / v-model',
- typeAnchorName: 'IDetailPageItem',
- type: 'IDetailPageItem[]',
- defaultValue: '',
- desc: {
- 'zh-CN': '设置表头详情栏的数据',
- 'en-US': 'Set the data in the table header details column'
- },
- mode: ['pc'],
- pcDemo: ''
- },
- {
- name: 'save-button',
- type: 'string',
- defaultValue: '',
- desc: {
- 'zh-CN': "个性化弹窗确定按钮的文本,默认为 '确定'",
- 'en-US': "Text of the confirmation button in the personalized pop-up window, The default value is'Confirm'"
- },
- mode: ['pc'],
- pcDemo: 'custom-show-text'
- },
- {
- name: 'text-split',
- type: 'string',
- defaultValue: "'---'",
- desc: {
- 'zh-CN': '详情栏标题分隔符',
- 'en-US': 'Details column title separator'
- },
- mode: ['pc'],
- pcDemo: 'custom-show-text'
- },
- {
- name: 'tips',
- type: 'string',
- defaultValue: '',
- desc: {
- 'zh-CN': "提示不能全部隐藏的提示语,默认为 '不能全部隐藏'",
- 'en-US': "Prompt message that cannot be completely hidden, The default value is 'Cannot hide all' "
- },
- mode: ['pc'],
- pcDemo: 'custom-show-text'
- },
- {
- name: 'title',
- type: 'string',
- defaultValue: '',
- desc: {
- 'zh-CN': "详情栏标, 默认为 '数据'",
- 'en-US': "Details field, default value is' Data '"
- },
- mode: ['pc'],
- pcDemo: 'custom-show-text'
- },
- {
- name: 'value-title',
- type: 'string',
- defaultValue: '',
- desc: {
- 'zh-CN': "个性化弹窗表头文本操作栏字段,默认为 '勾选隐藏'",
- 'en-US':
- "Personalized pop-up window header text operation column field, The default value is'Click to hide'"
- },
- mode: ['pc'],
- pcDemo: 'custom-show-text'
- }
- ],
- events: [],
- methods: [],
- slots: []
- }
- ],
- types: [
- {
- name: 'IDetailPageItem',
- type: 'interface',
- code: `interface IDetailPageItem {
- label: string
- value: string
- hidden?: boolean
-}`
- }
- ]
-}
diff --git a/examples/sites/demos/apis/hui.js b/examples/sites/demos/apis/hui.js
new file mode 100644
index 000000000..51672ae79
--- /dev/null
+++ b/examples/sites/demos/apis/hui.js
@@ -0,0 +1,49 @@
+export default {
+ mode: ['pc'],
+ apis: [
+ {
+ name: 'chart',
+ type: 'component',
+ props: [
+ {
+ name: 'options',
+ type: 'object',
+ defaultValue: '--',
+ desc: {
+ 'zh-CN': '图表参数',
+ 'en-US': 'Whether to disable container detection during resize'
+ },
+ mode: ['pc'],
+ pcDemo: 'chart/question#question-base'
+ }
+ ],
+ events: [],
+ methods: [],
+ slots: []
+ }
+ ],
+ types: [
+ {
+ name: 'options',
+ type: 'interface',
+ code: `
+interface options {
+ theme: string // 主题
+ color: array | string // 颜色
+ padding: array // 图表内边距值
+ tipHtml: function // 悬浮提示框内容配置
+ event: object // 图表事件
+ data: array // 图表数据
+ name: string // 图表名称(必填)
+ unit: string // 进度图右侧文本单位
+ barWidth: number // 进度图柱形宽度
+ minWidth: string // 进度图单项数据的最小宽度
+ calibrationValue: number // 进度图标定值
+ label: object // 堆叠进度图图表图元文本样式
+ state: object // 根据状态设置颜色
+ title: object // 进度图图表标题样式
+ text: object // 进度图图表右侧文本样式
+}`
+ }
+ ]
+}
diff --git a/examples/sites/demos/apis/image.js b/examples/sites/demos/apis/image.js
index eb8b943fe..c0881c565 100644
--- a/examples/sites/demos/apis/image.js
+++ b/examples/sites/demos/apis/image.js
@@ -19,7 +19,7 @@ export default {
},
{
name: 'image-size',
- type: 'String',
+ type: 'string',
defaultValue: '',
desc: {
'zh-CN': '设置预览的图片的大小',
@@ -54,7 +54,7 @@ export default {
},
{
name: 'preview-visible',
- type: 'String',
+ type: 'string',
defaultValue: '',
desc: {
'zh-CN': '开启移动端预览大图的功能',
@@ -65,7 +65,7 @@ export default {
},
{
name: 'round',
- type: 'String',
+ type: 'string',
defaultValue: '',
desc: {
'zh-CN': '通过 round 设置是否展示圆形',
@@ -90,7 +90,7 @@ export default {
},
{
name: 'show-hover',
- type: 'String',
+ type: 'string',
defaultValue: '',
desc: {
'zh-CN': '设置预览的图片的悬浮效果',
@@ -101,14 +101,15 @@ export default {
},
{
name: 'show-index',
- type: 'String',
+ type: 'boolean',
defaultValue: '',
desc: {
'zh-CN': '开启图片序列号展示',
'en-US': 'Enable the display of image serial numbers.'
},
- mode: ['mobile-first'],
- mfDemo: 'preview-src-list'
+ mode: ['pc', 'mobile-first'],
+ mfDemo: 'preview-src-list',
+ pcDemo: 'preview'
},
{
name: 'src',
@@ -133,6 +134,18 @@ export default {
mode: ['pc', 'mobile-first'],
pcDemo: '',
mfDemo: ''
+ },
+ {
+ name: 'keep-style',
+ type: 'boolean',
+ defaultValue: '',
+ desc: {
+ 'zh-CN': '保持图片样式属性',
+ 'en-US': 'Preserve Picture Style Properties'
+ },
+ mode: ['pc', 'mobile-first'],
+ pcDemo: 'keep-style',
+ mfDemo: ''
}
],
events: [
@@ -197,6 +210,18 @@ export default {
mode: ['pc', 'mobile-first'],
pcDemo: 'slot',
mfDemo: ''
+ },
+ {
+ name: 'count',
+ type: '',
+ defaultValue: '',
+ desc: {
+ 'zh-CN': '设置图片计数插槽',
+ 'en-US': 'Set Picture Count Slot'
+ },
+ mode: ['pc', 'mobile-first'],
+ pcDemo: 'count-slot',
+ mfDemo: ''
}
]
}
diff --git a/examples/sites/demos/apis/mind-map.js b/examples/sites/demos/apis/mind-map.js
index 48edd6603..0f973574e 100644
--- a/examples/sites/demos/apis/mind-map.js
+++ b/examples/sites/demos/apis/mind-map.js
@@ -7,24 +7,26 @@ export default {
props: [
{
name: 'modelValue',
- type: 'NodeObj',
+ type: 'Object',
defaultValue: '{}',
desc: {
'zh-CN': '默认节点数据',
'en-US': 'Default node data'
},
mode: ['pc'],
- pcDemo: 'basic-usage'
+ pcDemo: 'export-data'
},
{
name: 'options',
- type: 'Options',
+ typeAnchorName: 'IMindMaoOptions',
+ type: 'IMindMaoOptions',
defaultValue: '{contextMenu: false,toolBar: false,nodeMenu: false}',
desc: {
'zh-CN': '配置项',
'en-US': 'options'
},
- mode: ['pc']
+ mode: ['pc'],
+ pcDemo: 'export-data'
}
],
events: [
@@ -57,7 +59,8 @@ export default {
},
{
name: 'expandNode',
- type: 'onExpandNode',
+ typeAnchorName: 'IMindExpandNode',
+ type: 'IMindnExpandNode',
desc: {
'zh-CN': '展开节点时会触发该事件',
'en-US': 'This event will be triggered when expanding a node'
@@ -66,7 +69,8 @@ export default {
},
{
name: 'operation',
- type: 'onOperation',
+ typeAnchorName: 'IMindMapOperation',
+ type: 'IMindMapOperation',
desc: {
'zh-CN': '节点重新计算时, 例如将节点A拖拽到节点B, 使得节点A是节点B的子节点',
'en-US':
@@ -76,7 +80,8 @@ export default {
},
{
name: 'selectNewNode',
- type: 'onSelectNewNode',
+ typeAnchorName: 'IMindMapSelectNewNode',
+ type: 'IMindMapSelectNewNode',
desc: {
'zh-CN': '创建新节点时',
'en-US': 'when create new node'
@@ -85,7 +90,8 @@ export default {
},
{
name: 'selectNode',
- type: 'onSelectNode',
+ typeAnchorName: 'IMindMapSelectNode',
+ type: 'IMindMapSelectNode',
desc: {
'zh-CN': '选择任意一个节点时, 会触发该事件',
'en-US': 'When selecting any node, this event will be triggered'
@@ -94,7 +100,8 @@ export default {
},
{
name: 'selectNodes',
- type: 'onSelectNodes',
+ typeAnchorName: 'IMindMapSelectNodes',
+ type: 'IMindMapSelectNodes',
desc: {
'zh-CN': '选择多个节点的时候会触发该事件',
'en-US': 'When selecting multiple nodes, this event will be triggered'
@@ -103,7 +110,8 @@ export default {
},
{
name: 'unselectNode',
- type: 'onUnselectNode',
+ typeAnchorName: 'IMindMapUnselectNode',
+ type: 'IMindMapUnselectNode',
desc: {
'zh-CN': '取消选择的时候会触发该事件',
'en-US': 'When deselecting, this event will be triggered'
@@ -112,7 +120,8 @@ export default {
},
{
name: 'unselectNodes',
- type: 'onUnselectNode',
+ typeAnchorName: 'IMindMapUnselectNodes',
+ type: 'IMindMapUnselectNodes',
desc: {
'zh-CN': '取消选择多个节点时会触发该事件',
'en-US': 'This event will be triggered when multiple nodes are unselected'
@@ -126,10 +135,10 @@ export default {
],
types: [
{
- name: 'Options',
+ name: 'IMindMaoOptions',
type: 'interface',
code: `
-interface Options {
+interface options {
direction?: number
locale?: string
draggable?: boolean
@@ -152,53 +161,39 @@ interface Options {
`
},
{
- name: 'onOperation',
+ name: 'IMindMapOperation',
type: 'type',
- code: `
-type onOperation = ({render, info}: {render:MindElixirInstance, info: Operation}) => void
-`
+ code: `type onOperation = ({render, info}: {render:MindElixirInstance, info: Operation}) => void`
},
{
- name: 'onSelectNode',
+ name: 'IMindMapSelectNode',
type: 'type',
- code: `
-type onSelectNode = ({render,nodeObj}: {render:MindElixirInstance,nodeObj:NodeObj}, e?: MouseEvent) => void
-`
+ code: `type onSelectNode = ({render,nodeObj}: {render:MindElixirInstance,nodeObj:NodeObj}, e?: MouseEvent) => void`
},
{
- name: 'onSelectNewNode',
+ name: 'IMindMapSelectNewNode',
type: 'type',
- code: `
-type selectNewNode: ({render,nodeObj}: {render:MindElixirInstance,nodeObj:NodeObj}) => void
-`
+ code: `type selectNewNode: ({render,nodeObj}: {render:MindElixirInstance,nodeObj:NodeObj}) => void`
},
{
- name: 'onSelectNodes',
+ name: 'IMindMapSelectNodes',
type: 'type',
- code: `
-type selectNodes: ({render,nodeObj}: {render:MindElixirInstance,nodeObj:NodeObj[]}) => void
-`
+ code: `type selectNodes: ({render,nodeObj}: {render:MindElixirInstance,nodeObj:NodeObj[]}) => void`
},
{
- name: 'onUnselectNode',
+ name: 'IMindMapUnselectNode',
type: 'type',
- code: `
-type unselectNodes: ({render}: {render: MindElixirInstance}) => void
-`
+ code: `type unselectNodes: ({render}: {render: MindElixirInstance}) => void`
},
{
- name: 'onUnselectNodes',
+ name: 'IMindMapUnselectNodes',
type: 'type',
- code: `
-type unselectNodes: ({render}: {render: MindElixirInstance}) => void
-`
+ code: `type unselectNodes: ({render}: {render: MindElixirInstance}) => void`
},
{
- name: 'onExpandNode',
+ name: 'IMindExpandNode',
type: 'type',
- code: `
-type expandNode: ({render,nodeObj}: {render:MindElixirInstance,nodeObj:NodeObj}) => void
-`
+ code: `type expandNode: ({render,nodeObj}: {render:MindElixirInstance,nodeObj:NodeObj}) => void`
},
{
name: 'NodeObj',
diff --git a/examples/sites/demos/apis/numeric.js b/examples/sites/demos/apis/numeric.js
index 50d844549..06f7a134d 100644
--- a/examples/sites/demos/apis/numeric.js
+++ b/examples/sites/demos/apis/numeric.js
@@ -17,6 +17,18 @@ export default {
pcDemo: 'allow-empty',
mfDemo: ''
},
+ {
+ name: 'empty-value',
+ type: 'any',
+ defaultValue: 'undefined',
+ desc: {
+ 'zh-CN': '设置计数器在可清空下,清空后组件的绑定值',
+ 'en-US': 'Sets the bound value of the cleared component when the counter can be cleared.'
+ },
+ mode: ['pc', 'mobile-first'],
+ pcDemo: 'empty-value',
+ mfDemo: 'empty-value'
+ },
{
name: 'blank',
type: 'string',
diff --git a/examples/sites/demos/apis/popeditor.js b/examples/sites/demos/apis/popeditor.js
index b8b931343..0f5a9a72a 100644
--- a/examples/sites/demos/apis/popeditor.js
+++ b/examples/sites/demos/apis/popeditor.js
@@ -229,7 +229,7 @@ export default {
'en-US': ''
},
mode: ['pc'],
- pcDemo: 'selected-box-op'
+ pcDemo: 'selected-box'
},
{
name: 'show-clear-btn',
diff --git a/examples/sites/demos/apis/roles.js b/examples/sites/demos/apis/roles.js
index a80859471..ef3b96f18 100644
--- a/examples/sites/demos/apis/roles.js
+++ b/examples/sites/demos/apis/roles.js
@@ -16,6 +16,19 @@ export default {
},
mode: ['pc'],
pcDemo: 'fetch-role'
+ },
+ {
+ name: 'popper-append-to-body',
+ type: 'boolean',
+ defaultValue: 'true',
+ desc: {
+ 'zh-CN':
+ '是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 false (可参考 select 组件)',
+ 'en-US':
+ 'Indicates whether to insert the pop-up box to the body element. If a fault occurs in locating the fault in the dialog box that is displayed, you can set this attribute to false (for details, see the select component).'
+ },
+ mode: ['pc'],
+ pcDemo: 'base'
}
],
events: [
diff --git a/examples/sites/demos/apis/select.js b/examples/sites/demos/apis/select.js
index 74eb99912..40ae04a1e 100644
--- a/examples/sites/demos/apis/select.js
+++ b/examples/sites/demos/apis/select.js
@@ -81,6 +81,15 @@ export default {
pcDemo: 'clearable',
mfDemo: 'clearable'
},
+ {
+ name: 'click-expend',
+ type: 'boolean',
+ defaultValue: 'false',
+ desc: {
+ 'zh-CN': '点击可展开或收起显示不全的选项。仅用于多选',
+ 'en-US': 'Click to expand or collapse options. Only applicable to multiple selections'
+ }
+ },
{
name: 'collapse-tags',
type: 'boolean',
@@ -240,6 +249,18 @@ export default {
pcDemo: 'remote-method',
mfDemo: 'remote-method'
},
+ {
+ name: 'max-visible-rows',
+ type: 'number',
+ defaultValue: '1',
+ desc: {
+ 'zh-CN': '多行默认最大显示行数,超出后选项自动隐藏',
+ 'en-US':
+ 'Default maximum display lines for multiple lines, with automatic hiding option for exceeding lines'
+ },
+ mode: ['pc'],
+ pcDemo: 'collapse-tags'
+ },
{
name: 'modelValue / v-model',
type: 'string | number | Array',
diff --git a/examples/sites/demos/apis/skeleton.js b/examples/sites/demos/apis/skeleton.js
index 0d0ee9410..95fdd91a2 100644
--- a/examples/sites/demos/apis/skeleton.js
+++ b/examples/sites/demos/apis/skeleton.js
@@ -6,7 +6,7 @@ export default {
type: 'component',
props: [
{
- name: 'active',
+ name: 'animated',
type: 'boolean',
defaultValue: 'true',
desc: {
@@ -46,9 +46,8 @@ export default {
type: 'number',
defaultValue: '3',
desc: {
- 'zh-CN': '默认排版,可配置段落显示行数',
- 'en-US':
- 'Customized interface. A Promise object is returned. This parameter is mandatory when the framework service is not used.'
+ 'zh-CN': '默认样式,可配置段落显示行数',
+ 'en-US': 'Default style. The number of lines displayed in a paragraph can be configured'
},
mode: ['pc'],
pcDemo: 'custom-rows'
@@ -58,9 +57,10 @@ export default {
type: 'number[] | string[]',
defaultValue: '[]',
desc: {
- 'zh-CN': '自定义段落每一行的宽度',
+ 'zh-CN':
+ '自定义段落每一行的宽度,数组中的每一项可以为 number 或 string ,当为 number 时,组件会自动增加 px 单位',
'en-US':
- 'Customized interface. A Promise object is returned. This parameter is mandatory when the framework service is not used.'
+ 'Width of each line in a custom paragraph. Each item in the array can be a number or a string. If the value is a number, the component automatically increases the value by px'
},
mode: ['pc'],
pcDemo: 'custom-paragraph-width'
@@ -74,7 +74,7 @@ export default {
defaultValue: '',
desc: {
'zh-CN': '加载完成后显示的内容',
- 'en-US': 'Option default slot'
+ 'en-US': 'Content displayed after the loading is complete'
},
mode: ['pc'],
pcDemo: 'custom-layout'
@@ -84,7 +84,7 @@ export default {
defaultValue: '',
desc: {
'zh-CN': '自定义骨架屏结构',
- 'en-US': 'Option default slot'
+ 'en-US': 'Custom Skeleton Screen Structure'
},
mode: ['pc'],
pcDemo: 'custom-layout'
@@ -99,7 +99,7 @@ export default {
name: 'size',
typeAnchorName: 'ISize',
type: 'ISize',
- defaultValue: 'medium',
+ defaultValue: "'medium'",
desc: {
'zh-CN': '针对 image 和 circle 形态,内置三种大小',
'en-US':
@@ -112,7 +112,7 @@ export default {
name: 'variant',
typeAnchorName: 'IVariant',
type: 'IVariant',
- defaultValue: 'square',
+ defaultValue: "'square'",
desc: {
'zh-CN': '骨架屏形态',
'en-US':
diff --git a/examples/sites/demos/apis/slide-bar.js b/examples/sites/demos/apis/slide-bar.js
deleted file mode 100644
index 4a32f78eb..000000000
--- a/examples/sites/demos/apis/slide-bar.js
+++ /dev/null
@@ -1,104 +0,0 @@
-export default {
- mode: ['pc'],
- apis: [
- {
- name: 'slide-bar',
- type: 'component',
- props: [
- {
- name: 'init-blocks',
- type: 'number',
- defaultValue: '',
- desc: {
- 'zh-CN': '初始时需要显示的块数',
- 'en-US': 'Number of blocks to be displayed initially'
- },
- mode: ['pc'],
- pcDemo: 'wheel-blocks'
- },
- {
- name: 'sub-tag',
- type: 'string',
- defaultValue: "该属性的默认值为 'li'",
- desc: {
- 'zh-CN': '设置组件的子级 Dom 标签',
- 'en-US': 'Setting the Dom Label of a Component'
- },
- mode: ['pc'],
- pcDemo: 'custom-tag'
- },
- {
- name: 'tag',
- type: 'string',
- defaultValue: "该属性的默认值为 'ul'",
- desc: {
- 'zh-CN': '设置组件的 Dom 标签',
- 'en-US': 'Setting the Dom Label of a Component'
- },
- mode: ['pc'],
- pcDemo: 'custom-tag'
- },
- {
- name: 'value',
- type: 'Array',
- defaultValue: '',
- desc: {
- 'zh-CN': '调用服务时候获取数据的来源',
- 'en-US': 'Data source obtained during service invoking'
- },
- mode: ['pc'],
- pcDemo: 'wheel-blocks'
- },
- {
- name: 'wheel-blocks',
- type: 'number',
- defaultValue: '该属性的默认值为 1',
- desc: {
- 'zh-CN': '鼠标滚轮上下滚动的时候,滚动的块数长度',
- 'en-US': 'Number of scrolling blocks when the mouse wheel is scrolled up or down'
- },
- mode: ['pc'],
- pcDemo: 'wheel-blocks'
- }
- ],
- events: [
- {
- name: 'before-click',
- type: 'Function(value)',
- defaultValue: '',
- desc: {
- 'zh-CN': '滑动点击前触发的事件;event: 原生事件',
- 'en-US': 'Event triggered before a user swipes the screen. event: Native event'
- },
- mode: ['pc'],
- pcDemo: 'slide-bar-events'
- },
- {
- name: 'click',
- type: 'Function(data, index)',
- defaultValue: '',
- desc: {
- 'zh-CN': '滑动块点击事件;data: 点击的滑块数据,index: 点击的滑块索引值',
- 'en-US':
- 'Sliding block click event; data: data of the clicked slider, index: index value of the clicked slider'
- },
- mode: ['pc'],
- pcDemo: 'slide-bar-events'
- }
- ],
- methods: [],
- slots: [
- {
- name: 'default',
- defaultValue: '',
- desc: {
- 'zh-CN': '默认的作用域插槽',
- 'en-US': 'Default scope slot'
- },
- mode: ['pc'],
- pcDemo: 'custom-content'
- }
- ]
- }
- ]
-}
diff --git a/examples/sites/demos/apis/tag.js b/examples/sites/demos/apis/tag.js
index 539236425..de273d4f0 100644
--- a/examples/sites/demos/apis/tag.js
+++ b/examples/sites/demos/apis/tag.js
@@ -30,16 +30,19 @@ export default {
},
{
name: 'color',
- type: 'string',
+ type: 'IColor | string[]',
+ typeAnchorName: 'IColor',
defaultValue: '',
desc: {
- 'zh-CN': '背景色:rgb,rgba,hex 三种格式',
- 'en-US': 'Background color: The value can be in rgb, rgba, or hex format'
+ 'zh-CN':
+ '控制标签文本色和背景色,可使用 IColor 类型中的预设值,也可自定义值,若自定义值为字符串则只能设置标签的背景色;若为数组则第一个值设置背景色,第二个设置文本色;【注:3.15.0新增支持数组类型】',
+ 'en-US':
+ 'Control the text color and background color of the label. You can use the preset value in the IColor type or customize the value. If the customized value is a character string, you can only set the background color of the label. If it is an array, the first value sets the background color and the second sets the text color. [Note: The array type is supported in 3.15.0]'
},
mode: ['pc', 'mobile', 'mobile-first'],
pcDemo: 'color3',
mobileDemo: 'different-color',
- mfDemo: ''
+ mfDemo: 'color3'
},
{
name: 'custom-class',
@@ -164,8 +167,8 @@ export default {
'zh-CN': '彩色标签,该属性的可选值为 pink、purple、cyan',
'en-US': 'Color label. The value can be pink, purple, or cyan.'
},
- mode: ['mobile-first'],
- mfDemo: 'colorful-tag'
+ mode: ['mobile'],
+ mfDemo: 'different-color'
},
{
name: 'type',
@@ -238,6 +241,13 @@ export default {
}
],
types: [
+ {
+ name: 'IColor',
+ type: 'type',
+ code: `
+type IColor = 'red' | 'orange' | 'green' | 'blue' | 'purple' | 'brown' | 'grey' | string // 除了预设值,也可以是其他任意自定义颜色值
+`
+ },
{
name: 'IEffect',
type: 'type',
@@ -256,7 +266,7 @@ type ISize = 'medium' | 'small' | 'mini' | ''
name: 'IType',
type: 'type',
code: `
-type IType = 'success' | 'info' | 'mini' | 'warning' | 'danger'
+type IType = 'success' | 'info' | 'warning' | 'danger'
`
}
]
diff --git a/examples/sites/demos/apis/time-line.js b/examples/sites/demos/apis/time-line.js
index 05e81b6b4..4ca503c75 100644
--- a/examples/sites/demos/apis/time-line.js
+++ b/examples/sites/demos/apis/time-line.js
@@ -24,7 +24,7 @@ export default {
'zh-CN': '显示组件二级标题内容,默认值为 autoColor',
'en-US': 'Displays the level-2 title of the component. The default value is autoColor.'
},
- mode: ['mobile-first'],
+ mode: ['pc', 'mobile-first'],
mfDemo: ''
},
{
@@ -351,6 +351,7 @@ export default {
code: `
interface ITimelineItem {
name: string // 节点名称
+ activeColor: 'success' | 'warning' | 'error' | Component
time?: string // 节点时间
error?: boolean // 是否异常状态
disabled?: boolean // 是否禁用
diff --git a/examples/sites/demos/mobile-first/app/numeric/empty-value-composition-api.vue b/examples/sites/demos/mobile-first/app/numeric/empty-value-composition-api.vue
new file mode 100644
index 000000000..5305dfb4c
--- /dev/null
+++ b/examples/sites/demos/mobile-first/app/numeric/empty-value-composition-api.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/examples/sites/demos/mobile-first/app/numeric/empty-value.vue b/examples/sites/demos/mobile-first/app/numeric/empty-value.vue
new file mode 100644
index 000000000..d724c3717
--- /dev/null
+++ b/examples/sites/demos/mobile-first/app/numeric/empty-value.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
diff --git a/examples/sites/demos/mobile-first/app/numeric/webdoc/numeric.js b/examples/sites/demos/mobile-first/app/numeric/webdoc/numeric.js
index 3ff26d98c..29726216a 100644
--- a/examples/sites/demos/mobile-first/app/numeric/webdoc/numeric.js
+++ b/examples/sites/demos/mobile-first/app/numeric/webdoc/numeric.js
@@ -78,6 +78,20 @@ export default {
},
codeFiles: ['allow-empty.vue']
},
+ {
+ demoId: 'empty-value',
+ name: {
+ 'zh-CN': '设定清空输入后的绑定值',
+ 'en-US': 'Sets the binding value after the input is cleared'
+ },
+ desc: {
+ 'zh-CN':
+ '可通过 empty-value
属性设置计数器在可清空下,清空后组件的绑定值。默认为 undefined
。示例中将清空后组件绑定值改为null
',
+ 'en-US':
+ 'You can use the empty-value
attribute to set the binding value of the cleared component when the counter can be cleared. The default value is undefined
. In the example, the component binding value is changed to null
.'
+ },
+ codeFiles: ['empty-value.vue']
+ },
{
demoId: 'about-step',
name: {
diff --git a/examples/sites/demos/mobile/app/alert/basic-usage.spec.ts b/examples/sites/demos/mobile/app/alert/basic-usage.spec.ts
new file mode 100644
index 000000000..ac7d4d550
--- /dev/null
+++ b/examples/sites/demos/mobile/app/alert/basic-usage.spec.ts
@@ -0,0 +1,36 @@
+import { test, expect } from '@playwright/test'
+
+test('基本用法', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('alert#base')
+
+ const alerts = page.locator('.demo-alert-base .tiny-mobile-alert')
+
+ // 背景色与图标色验证
+ await expect(alerts.first()).toHaveCSS('background-color', 'rgb(222, 236, 255)')
+ await expect(alerts.first().locator('.tiny-mobile-alert__icon').first()).toHaveCSS('fill', 'rgb(20, 118, 255)')
+ await expect(alerts.nth(1)).toHaveCSS('background-color', 'rgb(252, 227, 225)')
+ await expect(alerts.nth(1).locator('.tiny-mobile-alert__icon').first()).toHaveCSS('fill', 'rgb(242, 48, 48)')
+ await expect(alerts.nth(2)).toHaveCSS('background-color', 'rgb(230, 242, 213)')
+ await expect(alerts.nth(2).locator('.tiny-mobile-alert__icon').first()).toHaveCSS('fill', 'rgb(92, 179, 0)')
+ await expect(alerts.nth(3)).toHaveCSS('background-color', 'rgb(255, 235, 209)')
+ await expect(alerts.nth(3).locator('.tiny-mobile-alert__icon').first()).toHaveCSS('fill', 'rgb(255, 136, 0)')
+
+ // 警告可见
+ const alertSuccess = page.locator('.tiny-mobile-alert--success')
+ await expect(alertSuccess).toBeVisible()
+
+ // 状态图标存在
+ const icon = alertSuccess.locator('.tiny-mobile-alert__icon').first()
+ await expect(icon).toBeVisible()
+
+ // 提示内容存在
+ const content = alertSuccess.locator('.tiny-mobile-alert__content')
+ await expect(content).toBeVisible()
+
+ // 点击关闭按钮,警告消失
+ const close = alertSuccess.locator('.tiny-mobile-alert__close')
+ await expect(close).toBeVisible()
+ await close.click()
+ await expect(alertSuccess).toBeHidden()
+})
diff --git a/examples/sites/demos/mobile/app/alert/center.spec.ts b/examples/sites/demos/mobile/app/alert/center.spec.ts
new file mode 100644
index 000000000..720a6a6c5
--- /dev/null
+++ b/examples/sites/demos/mobile/app/alert/center.spec.ts
@@ -0,0 +1,11 @@
+import { test, expect } from '@playwright/test'
+
+test('指定挂载节点', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('alert#target')
+
+ const target = page.locator('.alert-wrap')
+ const alert = target.locator('> .tiny-mobile-alert')
+
+ await expect(alert).toBeVisible()
+})
diff --git a/examples/sites/demos/mobile/app/alert/custom-close.spec.ts b/examples/sites/demos/mobile/app/alert/custom-close.spec.ts
new file mode 100644
index 000000000..5d9f12b12
--- /dev/null
+++ b/examples/sites/demos/mobile/app/alert/custom-close.spec.ts
@@ -0,0 +1,45 @@
+import { test, expect } from '@playwright/test'
+
+test.describe('自定义关闭', async (page) => {
+ test('隐藏关闭图标', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('alert#custom-close')
+
+ const alerts = page.locator('.tiny-mobile-alert')
+ const closeIcon = alerts.first().locator('.tiny-mobile-alert__close')
+
+ await expect(closeIcon).not.toBeVisible()
+ })
+
+ test('自动关闭', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('alert#custom-close')
+
+ const alerts = page.locator('.tiny-mobile-alert')
+ await page.locator('#custom-close span').first().click()
+ await expect(alerts.filter({ hasText: '2秒后将自动关闭' })).toBeVisible()
+ await page.waitForTimeout(2000)
+ await expect(alerts.filter({ hasText: '2秒后将自动关闭' })).not.toBeVisible()
+ })
+
+ test('自定义关闭按钮文本', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('alert#custom-close')
+
+ const alert = page.locator('.tiny-mobile-alert').nth(2)
+ const closeIcon = alert.locator('.tiny-mobile-alert__close')
+
+ await expect(closeIcon).not.toBeVisible()
+ await expect(alert.locator('span').filter({ hasText: '自定义关闭' })).toBeVisible()
+ })
+
+ test('关闭close事件', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('alert#custom-close')
+
+ const alert = page.locator('.tiny-mobile-alert').nth(3)
+ const toast = page.locator('.tiny-mobile-toast').filter({ hasText: 'close事件!' })
+ await alert.locator('.tiny-mobile-alert__close').click()
+ await expect(toast).toBeVisible()
+ })
+})
diff --git a/examples/sites/demos/mobile/app/alert/custom-close.vue b/examples/sites/demos/mobile/app/alert/custom-close.vue
index f8fe84042..70fb23243 100644
--- a/examples/sites/demos/mobile/app/alert/custom-close.vue
+++ b/examples/sites/demos/mobile/app/alert/custom-close.vue
@@ -19,7 +19,7 @@
diff --git a/examples/sites/demos/pc/app/calendar-view/calendar-event.spec.ts b/examples/sites/demos/pc/app/calendar-view/calendar-event.spec.ts
index d90023105..6496b8764 100644
--- a/examples/sites/demos/pc/app/calendar-view/calendar-event.spec.ts
+++ b/examples/sites/demos/pc/app/calendar-view/calendar-event.spec.ts
@@ -9,6 +9,8 @@ test('事件', async ({ page }) => {
const month6 = page.getByText('六月')
const leftSvg = page.locator('.header-left > .tiny-svg')
const rightSvg = page.locator('.header-right > .tiny-svg')
+ const mode = page.locator('label').nth(2)
+ const modalVal = page.getByText('模式切换事件: timeline')
await timeBtn.click()
await page.waitForTimeout(100)
await leftYear.click()
@@ -22,4 +24,7 @@ test('事件', async ({ page }) => {
await rightSvg.click()
await page.waitForTimeout(100)
await expect(timeInput).toHaveText('2022 年 06 月')
+ await mode.click()
+ await page.waitForTimeout(100)
+ await expect(modalVal).toBeVisible()
})
diff --git a/examples/sites/demos/pc/app/calendar-view/calendar-event.vue b/examples/sites/demos/pc/app/calendar-view/calendar-event.vue
index c8a72f54d..fab264e98 100644
--- a/examples/sites/demos/pc/app/calendar-view/calendar-event.vue
+++ b/examples/sites/demos/pc/app/calendar-view/calendar-event.vue
@@ -8,12 +8,13 @@
@week-change="weekChange"
@year-change="yearChange"
@month-change="monthChange"
+ @mode-change="modeChange"
>
+
+
diff --git a/examples/sites/demos/pc/app/cascader/slot.spec.ts b/examples/sites/demos/pc/app/cascader/slot.spec.ts
new file mode 100644
index 000000000..2494c68be
--- /dev/null
+++ b/examples/sites/demos/pc/app/cascader/slot.spec.ts
@@ -0,0 +1,16 @@
+import { test, expect } from '@playwright/test'
+
+test('基本用法', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('cascader#slot')
+
+ // 自定义节点
+ await page.getByRole('textbox', { name: '请选择' }).nth(0).click()
+ await expect(page.getByText('指南', { exact: true })).toHaveAttribute('title', '指南')
+ await page.waitForTimeout(100)
+
+ // 无数据
+ await page.getByRole('textbox', { name: '请选择' }).nth(1).click()
+ const cascader = page.locator('.tiny-cascader-menu__no-data')
+ await expect(cascader).toHaveText('no-data')
+})
diff --git a/examples/sites/demos/pc/app/cascader/slot.vue b/examples/sites/demos/pc/app/cascader/slot.vue
new file mode 100644
index 000000000..1fc4b1d62
--- /dev/null
+++ b/examples/sites/demos/pc/app/cascader/slot.vue
@@ -0,0 +1,234 @@
+
+
+
自定义节点,为节点添加提示
+
+
+ {{ node.label }}
+
+
+
自定义空数据插槽
+
+
+ no-data
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/cascader/webdoc/cascader.js b/examples/sites/demos/pc/app/cascader/webdoc/cascader.js
index 7a52d2c6b..ba436ae8f 100644
--- a/examples/sites/demos/pc/app/cascader/webdoc/cascader.js
+++ b/examples/sites/demos/pc/app/cascader/webdoc/cascader.js
@@ -268,6 +268,24 @@ export default {
'\n Cascader cascade selector events include: change
, expand-change
, blur
, focus
, < code>visible-change. \n Use props.emitPath
to set the return type of the node.\n
'
},
codeFiles: ['events.vue']
+ },
+ {
+ demoId: 'slot',
+ name: {
+ 'zh-CN': '插槽',
+ 'en-US': 'Empty Data Slot'
+ },
+ desc: {
+ 'zh-CN': `
+ 通过 default
插槽,自定义级联节点。
+ 通过 no-data
插槽设置没有数据时显示的内容。
+ `,
+ 'en-US': `
+ Use the default
slot to customize the cascaded node.
+ The no-data
slot sets what is displayed when there is no data.
+ `
+ },
+ codeFiles: ['slot.vue']
}
]
}
diff --git a/examples/sites/demos/pc/app/chart/amap/amap.spec.ts b/examples/sites/demos/pc/app/chart/amap/amap.spec.ts
new file mode 100644
index 000000000..3e956a1bc
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/amap/amap.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-autonavi-map')
+ const chart = page.locator('#amap-base .amap-layers')
+})
diff --git a/examples/sites/demos/pc/app/chart/amap/amap.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/amap/amap.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..4fa57b3da
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/amap/amap.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/bar/bar.spec.ts b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts
new file mode 100644
index 000000000..90cea301d
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts
@@ -0,0 +1,43 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-bar#bar-base')
+ const chart = page.locator('#bar-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-bar#bar-demo2')
+ const chart = page.locator('#bar-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-bar#bar-demo3')
+ const chart = page.locator('#bar-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
+
+test('demo4', async ({ page }) => {
+ await page.goto('chart-bar#bar-demo4')
+ const chart = page.locator('#bar-demo4 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo4.png')
+})
+
+test('demo5', async ({ page }) => {
+ await page.goto('chart-bar#bar-demo5')
+ const chart = page.locator('#bar-demo5 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo5.png')
+})
+
+test('demo6', async ({ page }) => {
+ await page.goto('chart-bar#bar-demo6')
+ const chart = page.locator('#bar-demo6 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo6.png')
+})
+
+test('demo7', async ({ page }) => {
+ await page.goto('chart-bar#bar-demo7')
+ const chart = page.locator('#bar-demo7 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo7.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..2efab67c8
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..561c6052d
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..38a8fa9d1
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo4-chromium-win32.png b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo4-chromium-win32.png
new file mode 100644
index 000000000..423d105da
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo4-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo5-chromium-win32.png b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo5-chromium-win32.png
new file mode 100644
index 000000000..bd0a58ab5
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo5-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo6-chromium-win32.png b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo6-chromium-win32.png
new file mode 100644
index 000000000..c16d026eb
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo6-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo7-chromium-win32.png b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo7-chromium-win32.png
new file mode 100644
index 000000000..7f0ef1898
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo7-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/bmap/bmap.spec.ts b/examples/sites/demos/pc/app/chart/bmap/bmap.spec.ts
new file mode 100644
index 000000000..7dedc901d
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/bmap/bmap.spec.ts
@@ -0,0 +1,7 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-baidu-map#bmap-base')
+ const chart = page.locator('#bmap-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/bmap/bmap.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/bmap/bmap.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..71ff4ead5
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/bmap/bmap.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/boxplot/boxplot.spec.ts b/examples/sites/demos/pc/app/chart/boxplot/boxplot.spec.ts
new file mode 100644
index 000000000..79f843a1e
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/boxplot/boxplot.spec.ts
@@ -0,0 +1,19 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-boxplot#boxplot-base')
+ const chart = page.locator('#boxplot-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+// test('multiple', async ({ page }) => {
+// await page.goto('chart-boxplot#boxplot-multiple')
+// const chart = page.locator('#boxplot-multiple .hui-chart')
+// await expect(chart).toHaveScreenshot('multiple.png')
+// })
+
+test('vertical', async ({ page }) => {
+ await page.goto('chart-boxplot#boxplot-vertical')
+ const chart = page.locator('#boxplot-vertical .hui-chart')
+ await expect(chart).toHaveScreenshot('vertical.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..ce7ecd14b
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/multiple-chromium-win32.png b/examples/sites/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/multiple-chromium-win32.png
new file mode 100644
index 000000000..bcc93fa71
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/multiple-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/vertical-chromium-win32.png b/examples/sites/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/vertical-chromium-win32.png
new file mode 100644
index 000000000..e05a9ddfd
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/vertical-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/candle/candle.spec.ts b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts
new file mode 100644
index 000000000..88059adbf
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts
@@ -0,0 +1,43 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-candle#candle-base')
+ const chart = page.locator('#candle-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-candle#candle-demo2')
+ const chart = page.locator('#candle-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-candle#candle-demo3')
+ const chart = page.locator('#candle-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
+
+test('demo4', async ({ page }) => {
+ await page.goto('chart-candle#candle-demo4')
+ const chart = page.locator('#candle-demo4 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo4.png')
+})
+
+test('demo5', async ({ page }) => {
+ await page.goto('chart-candle#candle-demo5')
+ const chart = page.locator('#candle-demo5 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo5.png')
+})
+
+test('demo6', async ({ page }) => {
+ await page.goto('chart-candle#candle-demo6')
+ const chart = page.locator('#candle-demo6 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo6.png')
+})
+
+test('demo7', async ({ page }) => {
+ await page.goto('chart-candle#candle-demo7')
+ const chart = page.locator('#candle-demo7 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo7.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..a2abedbe0
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..53ea501c8
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..315137fce
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo4-chromium-win32.png b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo4-chromium-win32.png
new file mode 100644
index 000000000..6fdc04ef8
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo4-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo5-chromium-win32.png b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo5-chromium-win32.png
new file mode 100644
index 000000000..bb0405f8f
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo5-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo6-chromium-win32.png b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo6-chromium-win32.png
new file mode 100644
index 000000000..4ecaf20fa
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo6-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo7-chromium-win32.png b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo7-chromium-win32.png
new file mode 100644
index 000000000..51ecb1fc6
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo7-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts
new file mode 100644
index 000000000..07c0f388d
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts
@@ -0,0 +1,43 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-funnel#funnel-base')
+ const chart = page.locator('#funnel-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-funnel#funnel-demo2')
+ const chart = page.locator('#funnel-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-funnel#funnel-demo3')
+ const chart = page.locator('#funnel-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
+
+test('demo4', async ({ page }) => {
+ await page.goto('chart-funnel#funnel-demo4')
+ const chart = page.locator('#funnel-demo4 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo4.png')
+})
+
+test('demo5', async ({ page }) => {
+ await page.goto('chart-funnel#funnel-demo5')
+ const chart = page.locator('#funnel-demo5 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo5.png')
+})
+
+test('demo6', async ({ page }) => {
+ await page.goto('chart-funnel#funnel-demo6')
+ const chart = page.locator('#funnel-demo6 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo6.png')
+})
+
+test('demo7', async ({ page }) => {
+ await page.goto('chart-funnel#funnel-demo7')
+ const chart = page.locator('#funnel-demo7 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo7.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..4c8b56929
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..aa4da1965
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..b4a8b6125
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo4-chromium-win32.png b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo4-chromium-win32.png
new file mode 100644
index 000000000..ed7c9b822
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo4-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo5-chromium-win32.png b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo5-chromium-win32.png
new file mode 100644
index 000000000..319755871
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo5-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo6-chromium-win32.png b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo6-chromium-win32.png
new file mode 100644
index 000000000..292f0592f
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo6-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo7-chromium-win32.png b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo7-chromium-win32.png
new file mode 100644
index 000000000..5bbe9d37c
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo7-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts
new file mode 100644
index 000000000..51c445397
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts
@@ -0,0 +1,37 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-gauge#gauge-base')
+ const chart = page.locator('#gauge-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-gauge#gauge-demo2')
+ const chart = page.locator('#gauge-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-gauge#gauge-demo3')
+ const chart = page.locator('#gauge-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
+
+test('demo4', async ({ page }) => {
+ await page.goto('chart-gauge#gauge-demo4')
+ const chart = page.locator('#gauge-demo4 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo4.png')
+})
+
+test('demo5', async ({ page }) => {
+ await page.goto('chart-gauge#gauge-demo5')
+ const chart = page.locator('#gauge-demo5 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo5.png')
+})
+
+test('demo6', async ({ page }) => {
+ await page.goto('chart-gauge#gauge-demo6')
+ const chart = page.locator('#gauge-demo6 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo6.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..52eda2ffd
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..40482662c
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..e56d29c7c
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo4-chromium-win32.png b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo4-chromium-win32.png
new file mode 100644
index 000000000..43255055d
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo4-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo5-chromium-win32.png b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo5-chromium-win32.png
new file mode 100644
index 000000000..ef07a5d1a
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo5-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo6-chromium-win32.png b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo6-chromium-win32.png
new file mode 100644
index 000000000..818251572
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo6-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/graph/graph.spec.ts b/examples/sites/demos/pc/app/chart/graph/graph.spec.ts
new file mode 100644
index 000000000..0640ed015
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/graph/graph.spec.ts
@@ -0,0 +1,19 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-graph#graph-base')
+ const chart = page.locator('#graph-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+// test('demo2', async ({ page }) => {
+// await page.goto('chart-graph#graph-demo2')
+// const chart = page.locator('#graph-demo2 .hui-chart')
+// await expect(chart).toHaveScreenshot('demo2.png')
+// })
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-graph#graph-demo3')
+ const chart = page.locator('#graph-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/graph/graph.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/graph/graph.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..89e06142e
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/graph/graph.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/graph/graph.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/graph/graph.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..d0f3e6261
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/graph/graph.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/graph/graph.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/graph/graph.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..f9c813c82
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/graph/graph.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts b/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts
new file mode 100644
index 000000000..766e41868
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts
@@ -0,0 +1,31 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-heatmap#heatmap-base')
+ const chart = page.locator('#heatmap-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-heatmap#heatmap-demo2')
+ const chart = page.locator('#heatmap-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-heatmap#heatmap-demo3')
+ const chart = page.locator('#heatmap-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
+
+test('demo4', async ({ page }) => {
+ await page.goto('chart-heatmap#heatmap-demo4')
+ const chart = page.locator('#heatmap-demo4 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo4.png')
+})
+
+test('demo5', async ({ page }) => {
+ await page.goto('chart-heatmap#heatmap-demo5')
+ const chart = page.locator('#heatmap-demo5 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo5.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..63220dac5
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..57c59472a
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..96b934d92
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo4-chromium-win32.png b/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo4-chromium-win32.png
new file mode 100644
index 000000000..3dbe5bc6f
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo4-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo5-chromium-win32.png b/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo5-chromium-win32.png
new file mode 100644
index 000000000..66619ad2f
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo5-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts
new file mode 100644
index 000000000..38cb368da
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts
@@ -0,0 +1,49 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-histogram#histogram-base')
+ const chart = page.locator('#histogram-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-histogram#histogram-demo2')
+ const chart = page.locator('#histogram-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-histogram#histogram-demo3')
+ const chart = page.locator('#histogram-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
+
+test('demo4', async ({ page }) => {
+ await page.goto('chart-histogram#histogram-demo4')
+ const chart = page.locator('#histogram-demo4 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo4.png')
+})
+
+test('demo5', async ({ page }) => {
+ await page.goto('chart-histogram#histogram-demo5')
+ const chart = page.locator('#histogram-demo5 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo5.png')
+})
+
+test('demo6', async ({ page }) => {
+ await page.goto('chart-histogram#histogram-demo6')
+ const chart = page.locator('#histogram-demo6 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo6.png')
+})
+
+test('demo7', async ({ page }) => {
+ await page.goto('chart-histogram#histogram-demo7')
+ const chart = page.locator('#histogram-demo7 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo7.png')
+})
+
+test('demo8', async ({ page }) => {
+ await page.goto('chart-histogram#histogram-demo8')
+ const chart = page.locator('#histogram-demo8 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo8.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..099504df7
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..d2d25629f
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..8a03980bb
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo4-chromium-win32.png b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo4-chromium-win32.png
new file mode 100644
index 000000000..ad41b599f
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo4-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo5-chromium-win32.png b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo5-chromium-win32.png
new file mode 100644
index 000000000..d43513227
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo5-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo6-chromium-win32.png b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo6-chromium-win32.png
new file mode 100644
index 000000000..49c1948b6
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo6-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo7-chromium-win32.png b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo7-chromium-win32.png
new file mode 100644
index 000000000..ab5b84c2b
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo7-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo8-chromium-win32.png b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo8-chromium-win32.png
new file mode 100644
index 000000000..7d4f4d01b
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo8-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/line/line.spec.ts b/examples/sites/demos/pc/app/chart/line/line.spec.ts
new file mode 100644
index 000000000..f6cf72f05
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/line/line.spec.ts
@@ -0,0 +1,55 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-line#line-base')
+ const chart = page.locator('#line-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-line#line-demo2')
+ const chart = page.locator('#line-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-line#line-demo3')
+ const chart = page.locator('#line-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
+
+test('demo4', async ({ page }) => {
+ await page.goto('chart-line#line-demo4')
+ const chart = page.locator('#line-demo4 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo4.png')
+})
+
+test('demo5', async ({ page }) => {
+ await page.goto('chart-line#line-demo5')
+ const chart = page.locator('#line-demo5 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo5.png')
+})
+
+test('demo6', async ({ page }) => {
+ await page.goto('chart-line#line-demo6')
+ const chart = page.locator('#line-demo6 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo6.png')
+})
+
+test('demo7', async ({ page }) => {
+ await page.goto('chart-line#line-demo7')
+ const chart = page.locator('#line-demo7 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo7.png')
+})
+
+test('demo8', async ({ page }) => {
+ await page.goto('chart-line#line-demo8')
+ const chart = page.locator('#line-demo8 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo8.png')
+})
+
+test('demo9', async ({ page }) => {
+ await page.goto('chart-line#line-demo9')
+ const chart = page.locator('#line-demo9 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo9.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..9e284a0ad
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..39f0eb96a
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..c72da9c18
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo4-chromium-win32.png b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo4-chromium-win32.png
new file mode 100644
index 000000000..6ddd9e6de
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo4-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo5-chromium-win32.png b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo5-chromium-win32.png
new file mode 100644
index 000000000..d2f51b852
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo5-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo6-chromium-win32.png b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo6-chromium-win32.png
new file mode 100644
index 000000000..600a92b42
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo6-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo7-chromium-win32.png b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo7-chromium-win32.png
new file mode 100644
index 000000000..1e56f48df
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo7-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo8-chromium-win32.png b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo8-chromium-win32.png
new file mode 100644
index 000000000..2567177ae
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo8-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo9-chromium-win32.png b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo9-chromium-win32.png
new file mode 100644
index 000000000..2358aff33
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/line/line.spec.ts-snapshots/demo9-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/liquidfill/liquidfill.spec.ts b/examples/sites/demos/pc/app/chart/liquidfill/liquidfill.spec.ts
new file mode 100644
index 000000000..7fa7e3902
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/liquidfill/liquidfill.spec.ts
@@ -0,0 +1,7 @@
+import { test, expect } from '@playwright/test'
+
+test('demo5', async ({ page }) => {
+ await page.goto('chart-liquidfill#liquidfill-demo5')
+ const chart = page.locator('#liquidfill-demo5 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo5.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/liquidfill/liquidfill.spec.ts-snapshots/demo5-chromium-win32.png b/examples/sites/demos/pc/app/chart/liquidfill/liquidfill.spec.ts-snapshots/demo5-chromium-win32.png
new file mode 100644
index 000000000..e0d3b3e91
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/liquidfill/liquidfill.spec.ts-snapshots/demo5-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/map/base-composition-api.vue b/examples/sites/demos/pc/app/chart/map/base-composition-api.vue
index ee52922ca..6944c8d16 100644
--- a/examples/sites/demos/pc/app/chart/map/base-composition-api.vue
+++ b/examples/sites/demos/pc/app/chart/map/base-composition-api.vue
@@ -12,6 +12,7 @@
diff --git a/examples/sites/demos/pc/app/chart/map/base.vue b/examples/sites/demos/pc/app/chart/map/base.vue
index 094de628c..bb0420f1b 100644
--- a/examples/sites/demos/pc/app/chart/map/base.vue
+++ b/examples/sites/demos/pc/app/chart/map/base.vue
@@ -11,6 +11,7 @@
diff --git a/examples/sites/demos/pc/app/chart/process/base.vue b/examples/sites/demos/pc/app/chart/process/base.vue
new file mode 100644
index 000000000..e5531cd4c
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/process/base.vue
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/chart/process/demo2-composition-api.vue b/examples/sites/demos/pc/app/chart/process/demo2-composition-api.vue
new file mode 100644
index 000000000..f5fe332e7
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/process/demo2-composition-api.vue
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/chart/process/demo2.vue b/examples/sites/demos/pc/app/chart/process/demo2.vue
new file mode 100644
index 000000000..6a04e8f88
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/process/demo2.vue
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/chart/process/demo3-composition-api.vue b/examples/sites/demos/pc/app/chart/process/demo3-composition-api.vue
new file mode 100644
index 000000000..0e39ec401
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/process/demo3-composition-api.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/chart/process/demo3.vue b/examples/sites/demos/pc/app/chart/process/demo3.vue
new file mode 100644
index 000000000..ed9d6c1ac
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/process/demo3.vue
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/chart/process/demo4-composition-api.vue b/examples/sites/demos/pc/app/chart/process/demo4-composition-api.vue
new file mode 100644
index 000000000..58af2e6c5
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/process/demo4-composition-api.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/chart/process/demo4.vue b/examples/sites/demos/pc/app/chart/process/demo4.vue
new file mode 100644
index 000000000..43bfa1bac
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/process/demo4.vue
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/chart/process/demo5-composition-api.vue b/examples/sites/demos/pc/app/chart/process/demo5-composition-api.vue
new file mode 100644
index 000000000..aa8b135c5
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/process/demo5-composition-api.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/chart/process/demo5.vue b/examples/sites/demos/pc/app/chart/process/demo5.vue
new file mode 100644
index 000000000..76a9db01e
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/process/demo5.vue
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/chart/process/demo6-composition-api.vue b/examples/sites/demos/pc/app/chart/process/demo6-composition-api.vue
new file mode 100644
index 000000000..846e1e878
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/process/demo6-composition-api.vue
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/chart/process/demo6.vue b/examples/sites/demos/pc/app/chart/process/demo6.vue
new file mode 100644
index 000000000..b092b6a6c
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/process/demo6.vue
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/chart/radar/radar.spec.ts b/examples/sites/demos/pc/app/chart/radar/radar.spec.ts
new file mode 100644
index 000000000..30ed63e55
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/radar/radar.spec.ts
@@ -0,0 +1,19 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-radar#radar-base')
+ const chart = page.locator('#radar-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-radar#radar-demo2')
+ const chart = page.locator('#radar-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-radar#radar-demo3')
+ const chart = page.locator('#radar-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/radar/radar.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/radar/radar.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..04808e52d
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/radar/radar.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/radar/radar.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/radar/radar.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..94cda2b42
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/radar/radar.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/radar/radar.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/radar/radar.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..ce2b90f5a
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/radar/radar.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/ring/ring.spec.ts b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts
new file mode 100644
index 000000000..96d222a4d
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts
@@ -0,0 +1,43 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-ring#ring-base')
+ const chart = page.locator('#ring-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-ring#ring-demo2')
+ const chart = page.locator('#ring-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-ring#ring-demo3')
+ const chart = page.locator('#ring-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
+
+test('demo4', async ({ page }) => {
+ await page.goto('chart-ring#ring-demo4')
+ const chart = page.locator('#ring-demo4 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo4.png')
+})
+
+test('demo5', async ({ page }) => {
+ await page.goto('chart-ring#ring-demo5')
+ const chart = page.locator('#ring-demo5 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo5.png')
+})
+
+test('demo6', async ({ page }) => {
+ await page.goto('chart-ring#ring-demo6')
+ const chart = page.locator('#ring-demo6 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo6.png')
+})
+
+test('ring-title', async ({ page }) => {
+ await page.goto('chart-ring#ring-ring-title')
+ const chart = page.locator('#ring-ring-title .hui-chart')
+ await expect(chart).toHaveScreenshot('ring-title.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..7758fb652
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..d87f3328a
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..8fb1e7c1a
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo4-chromium-win32.png b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo4-chromium-win32.png
new file mode 100644
index 000000000..68552aea0
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo4-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo5-chromium-win32.png b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo5-chromium-win32.png
new file mode 100644
index 000000000..d87f3328a
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo5-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo6-chromium-win32.png b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo6-chromium-win32.png
new file mode 100644
index 000000000..ef406f578
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo6-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/ring-title-chromium-win32.png b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/ring-title-chromium-win32.png
new file mode 100644
index 000000000..db1f28854
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/ring/ring.spec.ts-snapshots/ring-title-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/sankey/sankey.spec.ts b/examples/sites/demos/pc/app/chart/sankey/sankey.spec.ts
new file mode 100644
index 000000000..3fde1b92e
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/sankey/sankey.spec.ts
@@ -0,0 +1,13 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-sankey#sankey-base')
+ const chart = page.locator('#sankey-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-sankey#sankey-demo2')
+ const chart = page.locator('#sankey-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/sankey/sankey.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/sankey/sankey.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..24bd58d26
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/sankey/sankey.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/sankey/sankey.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/sankey/sankey.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..b3f53494b
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/sankey/sankey.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts
new file mode 100644
index 000000000..18bbdaac5
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts
@@ -0,0 +1,49 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-scatter#scatter-base')
+ const chart = page.locator('#scatter-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-scatter#scatter-demo2')
+ const chart = page.locator('#scatter-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-scatter#scatter-demo3')
+ const chart = page.locator('#scatter-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
+
+test('demo4', async ({ page }) => {
+ await page.goto('chart-scatter#scatter-demo4')
+ const chart = page.locator('#scatter-demo4 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo4.png')
+})
+
+test('demo5', async ({ page }) => {
+ await page.goto('chart-scatter#scatter-demo5')
+ const chart = page.locator('#scatter-demo5 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo5.png')
+})
+
+test('demo6', async ({ page }) => {
+ await page.goto('chart-scatter#scatter-demo6')
+ const chart = page.locator('#scatter-demo6 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo6.png')
+})
+
+test('demo7', async ({ page }) => {
+ await page.goto('chart-scatter#scatter-demo7')
+ const chart = page.locator('#scatter-demo7 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo7.png')
+})
+
+test('demo8', async ({ page }) => {
+ await page.goto('chart-scatter#scatter-demo8')
+ const chart = page.locator('#scatter-demo8 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo8.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..4a3255629
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..6cdad022a
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..5a2a23ec0
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo4-chromium-win32.png b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo4-chromium-win32.png
new file mode 100644
index 000000000..885f544e8
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo4-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo5-chromium-win32.png b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo5-chromium-win32.png
new file mode 100644
index 000000000..604fa9660
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo5-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo6-chromium-win32.png b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo6-chromium-win32.png
new file mode 100644
index 000000000..8fdbd05e6
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo6-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo7-chromium-win32.png b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo7-chromium-win32.png
new file mode 100644
index 000000000..35f9db217
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo7-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo8-chromium-win32.png b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo8-chromium-win32.png
new file mode 100644
index 000000000..37880bc43
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo8-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/sunburst/sunburst.spec.ts b/examples/sites/demos/pc/app/chart/sunburst/sunburst.spec.ts
new file mode 100644
index 000000000..66e9b8dcf
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/sunburst/sunburst.spec.ts
@@ -0,0 +1,19 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-sunburst#sunburst-base')
+ const chart = page.locator('#sunburst-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-sunburst#sunburst-demo2')
+ const chart = page.locator('#sunburst-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-sunburst#sunburst-demo3')
+ const chart = page.locator('#sunburst-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..80ca2b72f
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..3e9599b41
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..7c88af7ff
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/tree/tree.spec.ts b/examples/sites/demos/pc/app/chart/tree/tree.spec.ts
new file mode 100644
index 000000000..9190224c1
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/tree/tree.spec.ts
@@ -0,0 +1,31 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-tree#tree-base')
+ const chart = page.locator('#tree-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-tree#tree-demo2')
+ const chart = page.locator('#tree-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-tree#tree-demo3')
+ const chart = page.locator('#tree-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
+
+test('demo4', async ({ page }) => {
+ await page.goto('chart-tree#tree-demo4')
+ const chart = page.locator('#tree-demo4 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo4.png')
+})
+
+test('demo5', async ({ page }) => {
+ await page.goto('chart-tree#tree-demo5')
+ const chart = page.locator('#tree-demo5 .hui-chart').first()
+ await expect(chart).toHaveScreenshot('demo5.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..8f36cadd1
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..3fcc3d05d
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..f64683f78
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo4-chromium-win32.png b/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo4-chromium-win32.png
new file mode 100644
index 000000000..86a7677e0
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo4-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo5-chromium-win32.png b/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo5-chromium-win32.png
new file mode 100644
index 000000000..583acc1ce
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo5-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts b/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts
new file mode 100644
index 000000000..dcecc03f6
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts
@@ -0,0 +1,31 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-waterfall#waterfall-base')
+ const chart = page.locator('#waterfall-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-waterfall#waterfall-demo2')
+ const chart = page.locator('#waterfall-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-waterfall#waterfall-demo3')
+ const chart = page.locator('#waterfall-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
+
+test('demo4', async ({ page }) => {
+ await page.goto('chart-waterfall#waterfall-demo4')
+ const chart = page.locator('#waterfall-demo4 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo4.png')
+})
+
+test('demo5', async ({ page }) => {
+ await page.goto('chart-waterfall#waterfall-demo5')
+ const chart = page.locator('#waterfall-demo5 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo5.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..b80b9c34b
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..b66e4fb7d
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..af7769f43
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo4-chromium-win32.png b/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo4-chromium-win32.png
new file mode 100644
index 000000000..9e9dd4e4b
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo4-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo5-chromium-win32.png b/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo5-chromium-win32.png
new file mode 100644
index 000000000..afe5d62f6
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo5-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/webdoc/chart-process.cn.md b/examples/sites/demos/pc/app/chart/webdoc/chart-process.cn.md
new file mode 100644
index 000000000..98871a548
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/webdoc/chart-process.cn.md
@@ -0,0 +1,7 @@
+---
+title: Chart 图表
+---
+
+# Chart 图表
+
+基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/pc/app/chart/webdoc/chart-process.en.md b/examples/sites/demos/pc/app/chart/webdoc/chart-process.en.md
new file mode 100644
index 000000000..49b1f3f4e
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/webdoc/chart-process.en.md
@@ -0,0 +1,7 @@
+---
+title: Chart
+---
+
+# Chart
+
+Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/pc/app/chart/webdoc/chart-process.js b/examples/sites/demos/pc/app/chart/webdoc/chart-process.js
new file mode 100644
index 000000000..5aa1237ef
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/webdoc/chart-process.js
@@ -0,0 +1,55 @@
+export default {
+ column: '2',
+ owner: '',
+ demos: [
+ {
+ 'demoId': 'process-base',
+ 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' },
+ 'desc': {
+ 'zh-CN':
+ '可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。
\n',
+ 'en-US':
+ ' can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.
\n'
+ },
+ 'codeFiles': ['process/base.vue']
+ },
+ {
+ 'demoId': 'process-demo2',
+ 'name': { 'zh-CN': '自定义', 'en-US': 'customizing' },
+ 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' },
+ 'codeFiles': ['process/demo2.vue']
+ },
+ {
+ 'demoId': 'process-demo3',
+ 'name': { 'zh-CN': '堆叠', 'en-US': 'Stacking' },
+ 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' },
+ 'codeFiles': ['process/demo3.vue']
+ },
+ {
+ 'demoId': 'process-demo4',
+ 'name': { 'zh-CN': '不同状态', 'en-US': 'Different states' },
+ 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' },
+ 'codeFiles': ['process/demo4.vue']
+ },
+ {
+ 'demoId': 'process-demo5',
+ 'name': { 'zh-CN': '数据缺省', 'en-US': 'data default' },
+ 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' },
+ 'codeFiles': ['process/demo5.vue']
+ },
+ {
+ 'demoId': 'process-demo6',
+ 'name': { 'zh-CN': '双向', 'en-US': 'Two-way' },
+ 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' },
+ 'codeFiles': ['process/demo6.vue']
+ }
+ ],
+ apis: [{ 'name': 'chart-process', 'type': 'component', 'props': [], 'events': [], 'slots': [] }],
+ types: [
+ {
+ name: 'options',
+ type: 'interface',
+ code: ``
+ }
+ ]
+}
diff --git a/examples/sites/demos/pc/app/chart/webdoc/chart-process.json.cn.md b/examples/sites/demos/pc/app/chart/webdoc/chart-process.json.cn.md
new file mode 100644
index 000000000..98871a548
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/webdoc/chart-process.json.cn.md
@@ -0,0 +1,7 @@
+---
+title: Chart 图表
+---
+
+# Chart 图表
+
+基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/pc/app/chart/webdoc/chart-process.json.en.md b/examples/sites/demos/pc/app/chart/webdoc/chart-process.json.en.md
new file mode 100644
index 000000000..49b1f3f4e
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/webdoc/chart-process.json.en.md
@@ -0,0 +1,7 @@
+---
+title: Chart
+---
+
+# Chart
+
+Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts b/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts
new file mode 100644
index 000000000..8b4669305
--- /dev/null
+++ b/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts
@@ -0,0 +1,25 @@
+import { test, expect } from '@playwright/test'
+
+test('base', async ({ page }) => {
+ await page.goto('chart-wordcloud#wordcloud-base')
+ const chart = page.locator('#wordcloud-base .hui-chart')
+ await expect(chart).toHaveScreenshot('base.png')
+})
+
+test('demo2', async ({ page }) => {
+ await page.goto('chart-wordcloud#wordcloud-demo2')
+ const chart = page.locator('#wordcloud-demo2 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo2.png')
+})
+
+test('demo3', async ({ page }) => {
+ await page.goto('chart-wordcloud#wordcloud-demo3')
+ const chart = page.locator('#wordcloud-demo3 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo3.png')
+})
+
+test('demo4', async ({ page }) => {
+ await page.goto('chart-wordcloud#wordcloud-demo4')
+ const chart = page.locator('#wordcloud-demo4 .hui-chart')
+ await expect(chart).toHaveScreenshot('demo4.png')
+})
diff --git a/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/base-chromium-win32.png b/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/base-chromium-win32.png
new file mode 100644
index 000000000..79286875a
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/base-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo2-chromium-win32.png b/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo2-chromium-win32.png
new file mode 100644
index 000000000..981d60044
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo2-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo3-chromium-win32.png b/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo3-chromium-win32.png
new file mode 100644
index 000000000..36110711a
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo3-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo4-chromium-win32.png b/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo4-chromium-win32.png
new file mode 100644
index 000000000..3cbed0bb4
Binary files /dev/null and b/examples/sites/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo4-chromium-win32.png differ
diff --git a/examples/sites/demos/pc/app/company/custom-service.spec.ts b/examples/sites/demos/pc/app/company/custom-service.spec.ts
index b353bcc67..9f402f442 100644
--- a/examples/sites/demos/pc/app/company/custom-service.spec.ts
+++ b/examples/sites/demos/pc/app/company/custom-service.spec.ts
@@ -9,6 +9,7 @@ test('自定义服务', async ({ page }) => {
const count = 2
const companys = ['一', '二']
const modal = page.locator('.tiny-modal')
+ await page.waitForTimeout(200)
// 展开
await page.locator('.tiny-select .tiny-input__suffix .tiny-svg').click()
@@ -24,6 +25,6 @@ test('自定义服务', async ({ page }) => {
await input.hover()
// 清空
- await page.locator('.tiny-select .tiny-input__suffix .tiny-svg').click()
+ await page.locator('.tiny-select .tiny-input__suffix .tiny-svg.icon-close').click()
await expect(input).toHaveValue('')
})
diff --git a/examples/sites/demos/pc/app/country/custom-service.spec.js b/examples/sites/demos/pc/app/country/custom-service.spec.js
index bd8854f87..7ec8ba3c2 100644
--- a/examples/sites/demos/pc/app/country/custom-service.spec.js
+++ b/examples/sites/demos/pc/app/country/custom-service.spec.js
@@ -6,7 +6,7 @@ test('自定义服务', async ({ page }) => {
const select = page.locator('.tiny-select')
const item = page.getByText('France')
- const clear = page.locator('.tiny-select .tiny-svg')
+ const clear = page.locator('.tiny-select .tiny-svg.icon-close')
// 点击选中
await select.click()
await item.click()
diff --git a/examples/sites/demos/pc/app/credit-card-form/background-image-composition-api.vue b/examples/sites/demos/pc/app/credit-card-form/background-image-composition-api.vue
deleted file mode 100644
index 689f98909..000000000
--- a/examples/sites/demos/pc/app/credit-card-form/background-image-composition-api.vue
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/credit-card-form/background-image.vue b/examples/sites/demos/pc/app/credit-card-form/background-image.vue
deleted file mode 100644
index cda8cc4ab..000000000
--- a/examples/sites/demos/pc/app/credit-card-form/background-image.vue
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/credit-card-form/basic-usage-composition-api.vue b/examples/sites/demos/pc/app/credit-card-form/basic-usage-composition-api.vue
deleted file mode 100644
index d16256624..000000000
--- a/examples/sites/demos/pc/app/credit-card-form/basic-usage-composition-api.vue
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/credit-card-form/basic-usage.vue b/examples/sites/demos/pc/app/credit-card-form/basic-usage.vue
deleted file mode 100644
index c89cb1d71..000000000
--- a/examples/sites/demos/pc/app/credit-card-form/basic-usage.vue
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/credit-card-form/credit-card-form-events-composition-api.vue b/examples/sites/demos/pc/app/credit-card-form/credit-card-form-events-composition-api.vue
deleted file mode 100644
index 1ec6f0ee6..000000000
--- a/examples/sites/demos/pc/app/credit-card-form/credit-card-form-events-composition-api.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/credit-card-form/credit-card-form-events.vue b/examples/sites/demos/pc/app/credit-card-form/credit-card-form-events.vue
deleted file mode 100644
index ff9e08211..000000000
--- a/examples/sites/demos/pc/app/credit-card-form/credit-card-form-events.vue
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/credit-card-form/webdoc/credit-card-form.cn.md b/examples/sites/demos/pc/app/credit-card-form/webdoc/credit-card-form.cn.md
deleted file mode 100644
index fbe7d7b4c..000000000
--- a/examples/sites/demos/pc/app/credit-card-form/webdoc/credit-card-form.cn.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-title: CreditCardForm 信用卡表单
----
-
-# CreditCardForm 信用卡表单
-
-通过表单输入实时改变信用卡卡片的相关信息。
diff --git a/examples/sites/demos/pc/app/credit-card-form/webdoc/credit-card-form.en.md b/examples/sites/demos/pc/app/credit-card-form/webdoc/credit-card-form.en.md
deleted file mode 100644
index b22cc2c5d..000000000
--- a/examples/sites/demos/pc/app/credit-card-form/webdoc/credit-card-form.en.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-title: CreditCardForm
----
-
-# CreditCardForm
-
-Change information about credit cards in real time through form input.
diff --git a/examples/sites/demos/pc/app/credit-card-form/webdoc/credit-card-form.js b/examples/sites/demos/pc/app/credit-card-form/webdoc/credit-card-form.js
deleted file mode 100644
index 718419389..000000000
--- a/examples/sites/demos/pc/app/credit-card-form/webdoc/credit-card-form.js
+++ /dev/null
@@ -1,46 +0,0 @@
-export default {
- column: '2',
- owner: '',
- metaData: {
- deprecated: '3.12.0',
- removed: '3.15.0'
- },
- demos: [
- {
- demoId: 'basic-usage',
- name: {
- 'zh-CN': '基本用法',
- 'en-US': 'Basic Usage'
- },
- desc: {
- 'zh-CN': '详细用法参考如下示例',
- 'en-US': 'For details, see the following example.'
- },
- codeFiles: ['basic-usage.vue']
- },
- {
- demoId: 'background-image',
- name: {
- 'zh-CN': '背景图片',
- 'en-US': 'Background Image'
- },
- desc: {
- 'zh-CN': '通过 background-image
设置信用卡背景图片。
\n',
- 'en-US': 'Use background-image
to set the credit card background image.
\n'
- },
- codeFiles: ['background-image.vue']
- },
- {
- demoId: 'credit-card-form-events',
- name: {
- 'zh-CN': '事件',
- 'en-US': 'Event'
- },
- desc: {
- 'zh-CN': '详细用法参考如下示例',
- 'en-US': 'For details, see the following example.'
- },
- codeFiles: ['credit-card-form-events.vue']
- }
- ]
-}
diff --git a/examples/sites/demos/pc/app/detail-page/basic-usage-composition-api.vue b/examples/sites/demos/pc/app/detail-page/basic-usage-composition-api.vue
deleted file mode 100644
index 707c98cea..000000000
--- a/examples/sites/demos/pc/app/detail-page/basic-usage-composition-api.vue
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/detail-page/basic-usage.spec.ts b/examples/sites/demos/pc/app/detail-page/basic-usage.spec.ts
deleted file mode 100644
index cef5fb1c7..000000000
--- a/examples/sites/demos/pc/app/detail-page/basic-usage.spec.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { test, expect } from '@playwright/test'
-
-test('基本用法', async ({ page }) => {
- page.on('pageerror', (exception) => expect(exception).toBeNull())
- await page.goto('detail-page#basic-usage')
- await expect(
- page.getByText('数据标题1---测试文本1标题2---测试文本2标题3---测试文本3标题4---测试文本4标题5---测试文本5')
- ).toBeVisible()
- await expect(
- page
- .locator('div')
- .filter({ hasText: /^数据$/ })
- .getByRole('img')
- ).toBeVisible()
- await page
- .locator('div')
- .filter({ hasText: /^数据$/ })
- .getByRole('img')
- .click()
- await expect(
- page.locator('div').filter({ hasText: '文本字段勾选隐藏标题1标题2标题3标题4标题5确定取消' }).nth(2)
- ).toBeVisible()
- await expect(page.locator('div').filter({ hasText: /^个性化标题$/ })).toBeVisible()
- await expect(page.getByRole('button', { name: '确定' })).toBeVisible()
- await page.getByRole('button', { name: '确定' }).click()
- await expect(
- page.locator('div').filter({ hasText: '文本字段勾选隐藏标题1标题2标题3标题4标题5确定取消' }).nth(2)
- ).not.toBeVisible()
-})
diff --git a/examples/sites/demos/pc/app/detail-page/basic-usage.vue b/examples/sites/demos/pc/app/detail-page/basic-usage.vue
deleted file mode 100644
index b6b6d3f3f..000000000
--- a/examples/sites/demos/pc/app/detail-page/basic-usage.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/detail-page/custom-show-text-composition-api.vue b/examples/sites/demos/pc/app/detail-page/custom-show-text-composition-api.vue
deleted file mode 100644
index d2b1237e2..000000000
--- a/examples/sites/demos/pc/app/detail-page/custom-show-text-composition-api.vue
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/detail-page/custom-show-text.spec.ts b/examples/sites/demos/pc/app/detail-page/custom-show-text.spec.ts
deleted file mode 100644
index d6f7ec178..000000000
--- a/examples/sites/demos/pc/app/detail-page/custom-show-text.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { test, expect } from '@playwright/test'
-
-test('自定义展示文本', async ({ page }) => {
- page.on('pageerror', (exception) => expect(exception).toBeNull())
- await page.goto('detail-page#custom-show-text')
- await expect(page.getByText('表头详情标题1-描述1标题2-描述2标题3-描述3标题4')).toBeVisible()
- await page
- .locator('div')
- .filter({ hasText: /^表头详情$/ })
- .getByRole('img')
- .click()
- await expect(page.getByText('表头设置', { exact: true })).toBeVisible()
- await expect(page.getByText('表头名称')).toBeVisible()
- await expect(page.getByText('是否隐藏')).toBeVisible()
- await expect(page.getByRole('button', { name: '取消修改' })).toBeVisible()
-})
diff --git a/examples/sites/demos/pc/app/detail-page/custom-show-text.vue b/examples/sites/demos/pc/app/detail-page/custom-show-text.vue
deleted file mode 100644
index 1fa0b24c9..000000000
--- a/examples/sites/demos/pc/app/detail-page/custom-show-text.vue
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/detail-page/webdoc/detail-page.cn.md b/examples/sites/demos/pc/app/detail-page/webdoc/detail-page.cn.md
deleted file mode 100644
index a2713cb03..000000000
--- a/examples/sites/demos/pc/app/detail-page/webdoc/detail-page.cn.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-title: DetailPage 表头详情栏
----
-
-# DetailPage 表头详情栏
-
-DetailPage 带表头的详情栏组件。
diff --git a/examples/sites/demos/pc/app/detail-page/webdoc/detail-page.en.md b/examples/sites/demos/pc/app/detail-page/webdoc/detail-page.en.md
deleted file mode 100644
index af57d27c7..000000000
--- a/examples/sites/demos/pc/app/detail-page/webdoc/detail-page.en.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-title: DetailPage header details column
----
-
-# DetailPage header details column
-
-DetailPage detail bar component with a table header.
diff --git a/examples/sites/demos/pc/app/detail-page/webdoc/detail-page.js b/examples/sites/demos/pc/app/detail-page/webdoc/detail-page.js
deleted file mode 100644
index 83f948f91..000000000
--- a/examples/sites/demos/pc/app/detail-page/webdoc/detail-page.js
+++ /dev/null
@@ -1,38 +0,0 @@
-export default {
- column: '2',
- owner: '',
- metaData: {
- deprecated: '3.12.0',
- removed: '3.15.0'
- },
- demos: [
- {
- demoId: 'basic-usage',
- name: {
- 'zh-CN': '基本用法',
- 'en-US': 'Basic Usage'
- },
- desc: {
- 'zh-CN':
- '\n
通过 modelValue / v-model
设置要显示的数据。
\n 在每个数据对象中可设置 hidden: true
来指定默认隐藏的数据。
\n 用户点击组件右上角的图标可以弹出个性化弹窗,弹窗里能选择是否隐藏指定数据。
\n
',
- 'en-US':
- '\n
Sets the data to be displayed with modelValue/v-model
.
\n can set hidden: true
in each data object to specify the default hidden data.
\n The user clicks the icon in the upper right corner of the component to pop up a personalized popup window, which can choose whether to hide the specified data.
\n '
- },
- codeFiles: ['basic-usage.vue']
- },
- {
- demoId: 'custom-show-text',
- name: {
- 'zh-CN': '自定义展示文本',
- 'en-US': 'Custom Text'
- },
- desc: {
- 'zh-CN':
- '通过 title
、text-split
、dialog-title
、label-title
、value-title
、tips
、save-button
、cancel-button
这些属性可指定表头详情栏组件不同位置的展示文本。
\n',
- 'en-US':
- ' via title
, text-split
, dialog-title
, label-title
, value-title The
, tips
, save-button
, and cancel-button
attributes specify the display text in different positions of the header details bar component.
\n'
- },
- codeFiles: ['custom-show-text.vue']
- }
- ]
-}
diff --git a/examples/sites/demos/pc/app/dropdown/options.spec.ts b/examples/sites/demos/pc/app/dropdown/options.spec.ts
index 2190b3d90..85ade3c87 100644
--- a/examples/sites/demos/pc/app/dropdown/options.spec.ts
+++ b/examples/sites/demos/pc/app/dropdown/options.spec.ts
@@ -10,6 +10,7 @@ test('配置式:使用 menu-options', async ({ page }) => {
const dropDownMenu = page.locator('body > .tiny-dropdown-menu')
const dropDownMenuItem = dropDownMenu.locator('.tiny-dropdown-item')
+ await expect(dropDown).toContainText('下拉菜单') // 增加这一行,可以保证hover()是成功的。
await page.waitForTimeout(200)
await dropDown.hover()
await expect(dropDownMenu.first()).toBeVisible()
@@ -71,6 +72,7 @@ test('配置式:使用 options', async ({ page }) => {
const dropDownMenu = page.locator('body > .tiny-dropdown-menu')
const dropDownMenuItem = dropDownMenu.locator('.tiny-dropdown-item')
+ await expect(dropDown).toContainText('下拉菜单')
await page.waitForTimeout(300)
await dropDown.hover()
await expect(dropDownMenu.first()).toBeVisible()
@@ -91,6 +93,7 @@ test('配置式:使用 options 和 text-field ', async ({ page }) => {
const dropDownMenu = page.locator('body > .tiny-dropdown-menu')
const dropDownMenuItem = dropDownMenu.locator('.tiny-dropdown-item')
+ await expect(dropDown).toContainText('下拉菜单')
await page.waitForTimeout(300)
await dropDown.hover()
await expect(dropDownMenu.first()).toBeVisible()
diff --git a/examples/sites/demos/pc/app/dropdown/trigger.spec.ts b/examples/sites/demos/pc/app/dropdown/trigger.spec.ts
index 0336a6714..93233f73a 100644
--- a/examples/sites/demos/pc/app/dropdown/trigger.spec.ts
+++ b/examples/sites/demos/pc/app/dropdown/trigger.spec.ts
@@ -11,11 +11,11 @@ test('触发方式', async ({ page }) => {
const clickTrigger = dropDown.nth(1)
// hover
- await page.waitForTimeout(1200)
+ await page.waitForTimeout(2000)
await hoverTrigger.hover()
await expect(dropDownMenu.first()).toBeVisible()
// click
- await page.waitForTimeout(1200)
+ await page.waitForTimeout(2000)
await clickTrigger.hover()
await expect(dropDownMenu.nth(1)).not.toBeVisible()
await clickTrigger.click()
diff --git a/examples/sites/demos/pc/app/file-upload/http-request-composition-api.vue b/examples/sites/demos/pc/app/file-upload/http-request-composition-api.vue
index 693242fde..6ba11bde2 100644
--- a/examples/sites/demos/pc/app/file-upload/http-request-composition-api.vue
+++ b/examples/sites/demos/pc/app/file-upload/http-request-composition-api.vue
@@ -1,5 +1,5 @@
-
+
点击上传
@@ -7,14 +7,16 @@
diff --git a/examples/sites/demos/pc/app/grid/fixed/group-header-fixed.vue b/examples/sites/demos/pc/app/grid/fixed/group-header-fixed.vue
new file mode 100644
index 000000000..a98a6a6b1
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/fixed/group-header-fixed.vue
@@ -0,0 +1,232 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/grid/large-data/column-anchor-clear-active-composition-api.vue b/examples/sites/demos/pc/app/grid/large-data/column-anchor-clear-active-composition-api.vue
new file mode 100644
index 000000000..68f6ffa05
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/large-data/column-anchor-clear-active-composition-api.vue
@@ -0,0 +1,190 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/grid/large-data/column-anchor-clear-active.vue b/examples/sites/demos/pc/app/grid/large-data/column-anchor-clear-active.vue
new file mode 100644
index 000000000..50b453efc
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/large-data/column-anchor-clear-active.vue
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/grid/large-data/column-anchor-composition-api.vue b/examples/sites/demos/pc/app/grid/large-data/column-anchor-composition-api.vue
new file mode 100644
index 000000000..684f4ac62
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/large-data/column-anchor-composition-api.vue
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/grid/large-data/scroll-to.spec.js b/examples/sites/demos/pc/app/grid/large-data/scroll-to.spec.js
index 8b1dd8b67..709d6d54b 100644
--- a/examples/sites/demos/pc/app/grid/large-data/scroll-to.spec.js
+++ b/examples/sites/demos/pc/app/grid/large-data/scroll-to.spec.js
@@ -6,5 +6,5 @@ test('滚动到指定位置', async ({ page }) => {
await page.waitForTimeout(3000)
await page.getByRole('button', { name: '滚动到500列' }).click()
await page.waitForTimeout(200)
- await expect(page.getByText('col508')).toBeVisible()
+ await expect(page.getByText('col499')).toBeVisible()
})
diff --git a/examples/sites/demos/pc/app/grid/renderer/inner-renderer-rate-composition-api.vue b/examples/sites/demos/pc/app/grid/renderer/inner-renderer-rate-composition-api.vue
new file mode 100644
index 000000000..21d8bf45b
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/renderer/inner-renderer-rate-composition-api.vue
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/grid/renderer/inner-renderer-rate.spec.js b/examples/sites/demos/pc/app/grid/renderer/inner-renderer-rate.spec.js
new file mode 100644
index 000000000..12e0f34e8
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/renderer/inner-renderer-rate.spec.js
@@ -0,0 +1,12 @@
+import { test, expect } from '@playwright/test'
+
+test('比率渲染器', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('grid-renderer#renderer-inner-renderer-rate')
+ const redCell = page.getByRole('cell', { name: '200.0000%' }).first().locator('.tiny-grid__rate-chart')
+ await expect(redCell).toHaveCSS('background-color', 'rgb(222, 80, 78)')
+ const yellowCell = page.getByRole('cell', { name: '34.4500%' }).nth(1).locator('.tiny-grid__rate-chart')
+ await expect(yellowCell).toHaveCSS('background-color', 'rgb(250, 152, 65)')
+ const blueCell = page.getByRole('cell', { name: '60.0500%' }).nth(1).locator('.tiny-grid__rate-chart')
+ await expect(blueCell).toHaveCSS('background-color', 'rgb(94, 124, 224)')
+})
diff --git a/examples/sites/demos/pc/app/grid/renderer/inner-renderer-rate.vue b/examples/sites/demos/pc/app/grid/renderer/inner-renderer-rate.vue
new file mode 100644
index 000000000..19ae8c221
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/renderer/inner-renderer-rate.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/grid/size/grid-size.spec.js b/examples/sites/demos/pc/app/grid/size/grid-size.spec.js
index a557dd7c1..45b145611 100644
--- a/examples/sites/demos/pc/app/grid/size/grid-size.spec.js
+++ b/examples/sites/demos/pc/app/grid/size/grid-size.spec.js
@@ -5,11 +5,11 @@ test('尺寸', async ({ page }) => {
await page.goto('grid-size#size-grid-size')
const mediumTd = page.locator('.size__medium .tiny-grid-body__column').first()
const { height: heightMedium } = await mediumTd.boundingBox()
- await page.getByText('small').click()
+ await page.getByText('small', { exact: true }).click()
await page.waitForTimeout(500)
const smallTd = page.locator('.size__small .tiny-grid-body__column').first()
const { height: heightSamll } = await smallTd.boundingBox()
- await page.getByText('mini').click()
+ await page.getByText('mini', { exact: true }).click()
await page.waitForTimeout(500)
const miniTd = page.locator('.size__mini .tiny-grid-body__column').first()
const { height: heightMini } = await miniTd.boundingBox()
diff --git a/examples/sites/demos/pc/app/grid/tree-table/set-tree-expansion-composition-api.vue b/examples/sites/demos/pc/app/grid/tree-table/set-tree-expansion-composition-api.vue
index 98ae9b182..5f76b3c24 100644
--- a/examples/sites/demos/pc/app/grid/tree-table/set-tree-expansion-composition-api.vue
+++ b/examples/sites/demos/pc/app/grid/tree-table/set-tree-expansion-composition-api.vue
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/examples/sites/demos/pc/app/grid/tree-table/set-tree-expansion.vue b/examples/sites/demos/pc/app/grid/tree-table/set-tree-expansion.vue
index 974e23089..31b244233 100644
--- a/examples/sites/demos/pc/app/grid/tree-table/set-tree-expansion.vue
+++ b/examples/sites/demos/pc/app/grid/tree-table/set-tree-expansion.vue
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/examples/sites/demos/pc/app/grid/tree-table/tree-grid-index-composition-api.vue b/examples/sites/demos/pc/app/grid/tree-table/tree-grid-index-composition-api.vue
index 0991de8a9..55c860580 100644
--- a/examples/sites/demos/pc/app/grid/tree-table/tree-grid-index-composition-api.vue
+++ b/examples/sites/demos/pc/app/grid/tree-table/tree-grid-index-composition-api.vue
@@ -7,8 +7,8 @@
:edit-config="{ trigger: 'click', mode: 'cell', showStatus: true }"
:select-config="{ labelField: 'index' }"
>
-
-
+
+
{
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('grid-tree-table#tree-table-tree-grid-index')
- await page.getByRole('row', { name: '1 GFD科技YX公司 华东区 800' }).getByRole('img').first().click()
- await page.getByRole('row', { name: '2 WWWW科技YX公司 华南区 500' }).getByRole('img').first().click()
- await page.getByRole('row', { name: '3 TGBYX公司 华南区 360' }).getByRole('img').first().click()
+ await page
+ .getByRole('row', { name: '1 GFD科技YX公司 华东区 800' })
+ .locator('.tiny-grid-tree__node-btn')
+ .first()
+ .click()
+ await page
+ .getByRole('row', { name: '2 WWWW科技YX公司 华南区 500' })
+ .locator('.tiny-grid-tree__node-btn')
+ .first()
+ .click()
+ await page.getByRole('row', { name: '3 TGBYX公司 华南区 360' }).locator('.tiny-grid-tree__node-btn').first().click()
await page.getByText('3.1').click()
- await page.getByRole('row', { name: '4 康康物业YX公司 华南区 400' }).getByRole('img').first().click()
+ await page
+ .getByRole('row', { name: '4 康康物业YX公司 华南区 400' })
+ .locator('.tiny-grid-tree__node-btn')
+ .first()
+ .click()
await expect(page.getByText('4.1')).toBeVisible()
})
diff --git a/examples/sites/demos/pc/app/grid/tree-table/tree-grid-index.vue b/examples/sites/demos/pc/app/grid/tree-table/tree-grid-index.vue
index 64e7272ad..7696f6962 100644
--- a/examples/sites/demos/pc/app/grid/tree-table/tree-grid-index.vue
+++ b/examples/sites/demos/pc/app/grid/tree-table/tree-grid-index.vue
@@ -7,8 +7,8 @@
:edit-config="{ trigger: 'click', mode: 'cell', showStatus: true }"
:select-config="{ labelField: 'index' }"
>
-
-
+
+
-
-
+
+
+
-
-
+
+
Sets column freezing through the fixed
property. The options are as follows: left right
The default value is left
\n'
},
'codeFiles': ['fixed/multi-column-fixed.vue']
+ },
+ {
+ 'demoId': 'group-header-fixed',
+ 'name': { 'zh-CN': '分组表头冻结', 'en-US': 'Group header fixed' },
+ 'desc': {
+ 'zh-CN':
+ '通过 fixed
属性设置列冻结。当分组表头的某一项设置了冻结列,该分组表头其他项都会自动变成冻结列。
\n',
+ 'en-US':
+ 'Set column freezing via the fixed
attribute. When a frozen column is set for an item in the group header, other items in the group header will automatically become frozen columns.
\n'
+ },
+ 'codeFiles': ['fixed/group-header-fixed.vue']
}
],
apis: [{ 'name': 'grid-fixed', 'type': 'component', 'props': [], 'events': [], 'slots': [] }]
diff --git a/examples/sites/demos/pc/app/grid/webdoc/grid-large-data.js b/examples/sites/demos/pc/app/grid/webdoc/grid-large-data.js
index b168db5ae..baa08f981 100644
--- a/examples/sites/demos/pc/app/grid/webdoc/grid-large-data.js
+++ b/examples/sites/demos/pc/app/grid/webdoc/grid-large-data.js
@@ -68,6 +68,30 @@ export default {
' Method Description
\n
scrollTo(scrollLeft, scrollTop)
: Scroll to the corresponding position \nscrollToRow(row)
: Scroll to the corresponding row \nscrollToColumn(column)
: Scroll to the corresponding column
\n
\n'
},
'codeFiles': ['large-data/scroll-to.vue']
+ },
+ {
+ 'demoId': 'large-data-column-anchor',
+ 'name': { 'zh-CN': '表格列锚点', 'en-US': 'table column anchor' },
+ 'desc': {
+ 'zh-CN':
+ '通过 column-anchor
设置表格列锚点,点击可快速滚动至对应列,表格初始化时,默认滚动到锚点第一项。
',
+ 'en-US':
+ 'Set the table column anchor point through column-anchor
. Click to quickly scroll to the corresponding column. When the table is initialized, it will scroll to the first item of the anchor point by default.
'
+ },
+ 'codeFiles': ['large-data/column-anchor.vue']
+ },
+ {
+ 'demoId': 'column-anchor-clear-active',
+ 'name': {
+ 'zh-CN': '再次加载数据时清除活跃列锚点',
+ 'en-US': 'Clear active column anchors when loading data again'
+ },
+ 'desc': {
+ 'zh-CN': '当使用 fetch-data
加载数据时,再次加载数据时会清除活跃列锚点。
',
+ 'en-US':
+ 'When loading data using fetch-data
, active column anchors are cleared when the data is loaded again.
'
+ },
+ 'codeFiles': ['large-data/column-anchor-clear-active.vue']
}
],
apis: [{ 'name': 'grid-large-data', 'type': 'component', 'props': [], 'events': [], 'slots': [] }]
diff --git a/examples/sites/demos/pc/app/grid/webdoc/grid-renderer.js b/examples/sites/demos/pc/app/grid/webdoc/grid-renderer.js
index 05a0ed1de..15547c799 100644
--- a/examples/sites/demos/pc/app/grid/webdoc/grid-renderer.js
+++ b/examples/sites/demos/pc/app/grid/webdoc/grid-renderer.js
@@ -55,6 +55,17 @@ export default {
},
'codeFiles': ['renderer/inner-renderer-date.vue']
},
+ {
+ 'demoId': 'renderer-inner-renderer-rate',
+ 'name': { 'zh-CN': '比率渲染器', 'en-US': 'Custom Renderer' },
+ 'desc': {
+ 'zh-CN': `通过 formatConfig.max
配置,按照 value / max
计算样式百分比(进度条宽度占单元格宽度的百分比),按照 value
计算显示百分比(进度条上显示的比率),参考示例字段内置列渲染 rate1
。
+ 如果未配置 formatConfig.max
,就按照 value / total
计算样式百分比和显示百分比,formatConfig.total
默认值是 1
,参考示例字段内置列渲染 rate2
。
`,
+ 'en-US':
+ 'The custom renderer can customize the rendering of cells or a vue component
. Configure renderer
in the grid-column
column to support method and object configuration. For details, see the following example.
\n'
+ },
+ 'codeFiles': ['renderer/inner-renderer-rate.vue']
+ },
{
'demoId': 'render-async-colunm-render',
'name': { 'zh-CN': '列异步数据渲染', 'en-US': 'Column Asynchronous Data Rendering' },
diff --git a/examples/sites/demos/pc/app/image/count-slot-composition-api.vue b/examples/sites/demos/pc/app/image/count-slot-composition-api.vue
new file mode 100644
index 000000000..18a2edd7f
--- /dev/null
+++ b/examples/sites/demos/pc/app/image/count-slot-composition-api.vue
@@ -0,0 +1,32 @@
+
+
+
+
+ 第{{ index + 1 }}张/共{{ srcList.length }}张
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/image/count-slot.spec.ts b/examples/sites/demos/pc/app/image/count-slot.spec.ts
new file mode 100644
index 000000000..9b4e3f4cb
--- /dev/null
+++ b/examples/sites/demos/pc/app/image/count-slot.spec.ts
@@ -0,0 +1,16 @@
+import { test, expect } from '@playwright/test'
+
+test('测试数目插槽', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('image#count-solt')
+
+ const preview = page.locator('.pc-demo-container')
+ const imgs = preview.locator('.tiny-image > .tiny-image__inner')
+ await expect(imgs).toHaveCount(5)
+
+ await expect(imgs.nth(0)).toHaveCSS('object-fit', 'fill')
+ await expect(imgs.nth(1)).toHaveCSS('object-fit', 'contain')
+ await expect(imgs.nth(2)).toHaveCSS('object-fit', 'cover')
+ await expect(imgs.nth(3)).toHaveCSS('object-fit', 'none')
+ await expect(imgs.nth(4)).toHaveCSS('object-fit', 'scale-down')
+})
diff --git a/examples/sites/demos/pc/app/image/count-slot.vue b/examples/sites/demos/pc/app/image/count-slot.vue
new file mode 100644
index 000000000..061cf0b51
--- /dev/null
+++ b/examples/sites/demos/pc/app/image/count-slot.vue
@@ -0,0 +1,40 @@
+
+
+
+
+ 第{{ index + 1 }}张/共{{ srcList.length }}张
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/image/index-change-composition-api.vue b/examples/sites/demos/pc/app/image/index-change-composition-api.vue
new file mode 100644
index 000000000..6781ce2bf
--- /dev/null
+++ b/examples/sites/demos/pc/app/image/index-change-composition-api.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/image/index-change.spec.ts b/examples/sites/demos/pc/app/image/index-change.spec.ts
new file mode 100644
index 000000000..c9ce9252f
--- /dev/null
+++ b/examples/sites/demos/pc/app/image/index-change.spec.ts
@@ -0,0 +1,16 @@
+import { test, expect } from '@playwright/test'
+
+test('测试坐标切换', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('image#index-chenge')
+
+ const preview = page.locator('.pc-demo-container')
+ const imgs = preview.locator('.tiny-image > .tiny-image__inner')
+ await expect(imgs).toHaveCount(5)
+
+ await expect(imgs.nth(0)).toHaveCSS('object-fit', 'fill')
+ await expect(imgs.nth(1)).toHaveCSS('object-fit', 'contain')
+ await expect(imgs.nth(2)).toHaveCSS('object-fit', 'cover')
+ await expect(imgs.nth(3)).toHaveCSS('object-fit', 'none')
+ await expect(imgs.nth(4)).toHaveCSS('object-fit', 'scale-down')
+})
diff --git a/examples/sites/demos/pc/app/image/index-change.vue b/examples/sites/demos/pc/app/image/index-change.vue
new file mode 100644
index 000000000..f40676f70
--- /dev/null
+++ b/examples/sites/demos/pc/app/image/index-change.vue
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/image/keep-style-composition-api.vue b/examples/sites/demos/pc/app/image/keep-style-composition-api.vue
new file mode 100644
index 000000000..3bf533a89
--- /dev/null
+++ b/examples/sites/demos/pc/app/image/keep-style-composition-api.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/image/keep-style.spec.ts b/examples/sites/demos/pc/app/image/keep-style.spec.ts
new file mode 100644
index 000000000..26a1f5a62
--- /dev/null
+++ b/examples/sites/demos/pc/app/image/keep-style.spec.ts
@@ -0,0 +1,56 @@
+import { test, expect } from '@playwright/test'
+
+test('测试样式属性保持', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+
+ await page.goto('image#keep-style')
+ const preview = page.locator('.pc-demo-container')
+ await preview.locator('.tiny-image__inner').click()
+ await page.waitForTimeout(50)
+
+ // viewerImage 是插入到body末尾的。
+ const viewerImage = page.locator('.tiny-image-viewer')
+ const mask = viewerImage.locator('.tiny-image-viewer__mask')
+ const toolbar = viewerImage.locator('.tiny-image-viewer__actions-inner')
+ const canvas = viewerImage.locator('.tiny-image-viewer__img')
+
+ // 验证出现
+ await expect(viewerImage).toHaveCount(1)
+ await expect(canvas).toHaveCount(1)
+ await expect(mask).toHaveCSS('position', 'absolute')
+ await expect(mask).toHaveCSS('opacity', '0.5')
+ await expect(canvas).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)')
+
+ // 点击缩小
+ await toolbar.locator('svg').first().click()
+ await page.waitForTimeout(20)
+ await expect(canvas).toHaveCSS('transform', 'matrix(0.8, 0, 0, 0.8, 0, 0)')
+
+ // 点击放大
+ await toolbar.locator('svg').nth(1).click()
+ await page.waitForTimeout(20)
+ await expect(canvas).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)')
+
+ // 点击向左旋转
+ await toolbar.locator('svg').nth(3).click()
+ await page.waitForTimeout(20)
+ await expect(canvas).toHaveCSS('transform', 'matrix(0, -1, 1, 0, 0, 0)')
+
+ const prev = viewerImage.locator('.tiny-image-viewer__prev')
+ const next = viewerImage.locator('.tiny-image-viewer__next')
+
+ // // 点击切换
+ await next.click()
+ await page.waitForTimeout(20)
+ await expect(canvas).toHaveAttribute('src', /house\.jpg/)
+
+ await prev.click()
+ await page.waitForTimeout(20)
+ await prev.click()
+ await page.waitForTimeout(20)
+ await expect(canvas).toHaveAttribute('src', /bridge\.jpg/)
+
+ // 点击关闭
+ await viewerImage.locator('.tiny-image-viewer__close').click()
+ await expect(viewerImage).toHaveCount(0)
+})
diff --git a/examples/sites/demos/pc/app/image/keep-style.vue b/examples/sites/demos/pc/app/image/keep-style.vue
new file mode 100644
index 000000000..a87a1dcca
--- /dev/null
+++ b/examples/sites/demos/pc/app/image/keep-style.vue
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/image/preview-composition-api.vue b/examples/sites/demos/pc/app/image/preview-composition-api.vue
index d707d1281..97e0df15e 100644
--- a/examples/sites/demos/pc/app/image/preview-composition-api.vue
+++ b/examples/sites/demos/pc/app/image/preview-composition-api.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/examples/sites/demos/pc/app/image/preview.vue b/examples/sites/demos/pc/app/image/preview.vue
index a3ab32151..ab3f7bb9d 100644
--- a/examples/sites/demos/pc/app/image/preview.vue
+++ b/examples/sites/demos/pc/app/image/preview.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/examples/sites/demos/pc/app/image/webdoc/image.js b/examples/sites/demos/pc/app/image/webdoc/image.js
index 46046c340..a096ba48e 100644
--- a/examples/sites/demos/pc/app/image/webdoc/image.js
+++ b/examples/sites/demos/pc/app/image/webdoc/image.js
@@ -10,9 +10,23 @@ export default {
},
desc: {
'zh-CN':
- '\n 通过 src
设置图片路径。
\n 通过 fit
属性确定图片如何适应到容器框,同原生 css 的 object-fit 属性。
\n \n
object-fit 说明
\n
fill:被替换的内容将被缩放,以在填充元素的内容框时保持其宽高比
\n contain:被替换的内容大小可以填充元素的内容框
\n cover:被替换的内容大小保持其宽高比,同时填充元素的整个内容框
\n none:被替换的内容尺寸不会被改变
\n scale-down:内容的尺寸就像是指定了none 或 contain,取决于哪一个将导致更小的对象尺寸。\n
\n
\n ',
+ '通过 src
设置图片路径。
' +
+ ' 通过 fit
属性确定图片如何适应到容器框,同原生 css 的 object-fit 属性。
' +
+ 'object-fit 说明
' +
+ 'fill:被替换的内容将被缩放,以在填充元素的内容框时保持其宽高比
' +
+ 'contain:被替换的内容大小可以填充元素的内容框
' +
+ 'cover:被替换的内容大小保持其宽高比,同时填充元素的整个内容框
' +
+ 'none:被替换的内容尺寸不会被改变
' +
+ 'scale-down:内容的尺寸就像是指定了none 或 contain,取决于哪一个将导致更小的对象尺寸。',
'en-US':
- '\n Set the image path using src
.
\n The fit
attribute determines how the image will fit into the container frame, the same as the object-fit attribute of native css.
\n
\n
object-fit Description
\n
fill: The content being replaced will be scaled to maintain its aspect ratio as it fills the element\'s content box
\n contain: The size of the content to fill the element\'s content box
\n cover: The size of the content being replaced maintains its aspect ratio while filling the element\'s entire content box
\n none: The size of the content to be replaced will not be changed
\n scale-down: The size of the content is specified as either none or contain, depending on which will result in a smaller object size.\n
\n
\n '
+ 'Use src
to set the image path.
' +
+ 'The fit
attribute determines how the image fits into the container box, which is the same as the object-fit attribute of the native CSS.
' +
+ 'object-fit description
' +
+ "fill:The replaced content is scaled to maintain its aspect ratio when filling the element's content box.
" +
+ 'contain:The size of the replaced content fills the content box of the element.
' +
+ 'cover:The size of the replaced content maintains its aspect ratio and fills the entire content box of the element.
' +
+ 'none:The size of the replaced content is not changed.
' +
+ 'scale-down:The size of the content is like specifying none or contain, depending on which would result in a smaller object size.'
},
codeFiles: ['basic-usage.vue']
},
@@ -36,9 +50,13 @@ export default {
},
desc: {
'zh-CN':
- '\n 通过 lazy
开启懒加载功能,当图片滚动到可视范围内才会加载。
\n 通过 scroll-container
来设置滚动容器,若未定义,则为最近一个 overflow
值为 auto
或 scroll
的父元素。
\n\n \n
lazy 懒加载的图片必须是远程的图片,不支持静态图片懒加载。
\n
\n ',
+ '通过 lazy
开启懒加载功能,当图片滚动到可视范围内才会加载。
' +
+ '通过 scroll-container
来设置滚动容器,若未定义,则为最近一个 overflow
值为 auto
或 scroll
的父元素。' +
+ 'lazy 懒加载的图片必须是远程的图片,不支持静态图片懒加载。
',
'en-US':
- '\n Enable lazy loading with lazy
, and the image will only load when it is in visual range.
\n Set the scroll container by scroll-container
. If not defined, Is the parent element of the last overflow
value auto
or scroll
. \n\n \n
lazy Lazy loading images must be remote images. Lazy loading of static images is not supported.
\n
\n '
+ 'Enable lazy loading with lazy
, and the image will only load when it is in visual range.
' +
+ 'Set the scroll container by scroll-container
.If not defined, Is the parent element of the last overflow
value auto
or scroll
.
' +
+ 'lazy Lazy loading images must be remote images. Lazy loading of static images is not supported.
'
},
codeFiles: ['lazy.vue']
},
@@ -50,12 +68,54 @@ export default {
},
desc: {
'zh-CN':
- '\n 通过 preview-src-list
属性 ,传入一组图片url的数组,点击图片后,会进入预览大图的模式。
\n 通过 z-index
设置预览图片的元素的z-index。\n ',
+ '通过 preview-src-list
属性 ,传入一组图片 url 的数组,点击图片后,会进入预览大图的模式。
' +
+ '通过 z-index
设置预览图片的元素的 z-index。
' +
+ '通过添加 show-index
开启图片序号展示。
',
'en-US':
- '\n Pass in an array of image urls via the preview-src-list
property, and click on the image to enter the mode of previewing a large image.
\n Set the z-index of the element of the preview image by z-index
.\n '
+ 'Pass an array of image URLs through the preview-src-list
attribute. After you click an image, the system enters the large image preview mode.
' +
+ 'Use z-index
to set the z-index of the element of the preview image.
' +
+ 'Add show-index
to enable the image sequence number display.
'
},
codeFiles: ['preview.vue']
},
+ {
+ demoId: 'keep-style',
+ name: {
+ 'zh-CN': '保持图片样式属性',
+ 'en-US': 'Preserve Picture Style Properties'
+ },
+ desc: {
+ 'zh-CN': '通过 keep-style
属性可以让图片切换时样式保持一致,图片的缩放、旋转、边距等状态不重置。',
+ 'en-US':
+ 'The keep-style
attribute can be used to keep the style of an image consistent when the image is switched. The zoom, rotation, and margin status of the image is not reset.'
+ },
+ codeFiles: ['keep-style.vue']
+ },
+ {
+ demoId: 'index-change',
+ name: {
+ 'zh-CN': '图片切换事件',
+ 'en-US': 'Image switchover event'
+ },
+ desc: {
+ 'zh-CN': '图片切换时触发 change-index
事件,参数返回当前图片的 index。',
+ 'en-US':
+ 'The change-index
event is triggered when the image is switched. The index of the current image is returned.'
+ },
+ codeFiles: ['index-change.vue']
+ },
+ {
+ demoId: 'count-slot',
+ name: {
+ 'zh-CN': '图片计数插槽',
+ 'en-US': 'Picture Count Slot'
+ },
+ desc: {
+ 'zh-CN': '通过 count
设置图片计数插槽。',
+ 'en-US': 'Set the image count slot via count
.'
+ },
+ codeFiles: ['count-slot.vue']
+ },
{
demoId: 'preview-in-dialog',
name: {
@@ -76,9 +136,11 @@ export default {
},
desc: {
'zh-CN':
- '\n 通过 placeholder
插槽,定义图片在加载中时的占位内容。通常由于图片加载快,会看不到这个插槽的出现,只有大图片时,会看到加载中的插槽。
\n 通过 error
插槽,定义图片在加载失败后的占位内容。 \n ',
+ '通过 placeholder
插槽,定义图片在加载中时的占位内容。通常由于图片加载快,会看不到这个插槽的出现,只有大图片时,会看到加载中的插槽。
' +
+ ' 通过 error
插槽,定义图片在加载失败后的占位内容。',
'en-US':
- '\n The placeholder
slot defines the placeholder content for images when loaded. Usually, because the image loads quickly, you will not see the appearance of this slot, only a large image, you will see the loading slot.
\n Using the error
slot, define the placeholder content of the image after loading failure.\n '
+ 'The placeholder
slot defines the placeholder content for images when loaded. Usually, because the image loads quickly, you will not see the appearance of this slot, only a large image, you will see the loading slot.
' +
+ 'Using the error
slot, define the placeholder content of the image after loading failure.'
},
codeFiles: ['slot.vue']
},
@@ -89,10 +151,10 @@ export default {
'en-US': 'Events'
},
desc: {
- 'zh-CN':
- '\n load
事件: 图片加载成功触发 。
\n error
事件: 图片加载失败触发 。
\n ',
+ 'zh-CN': 'load
事件: 图片加载成功触发 。
error
事件: 图片加载失败触发 。',
'en-US':
- '\n load
event: The image is successfully loaded.
\n error
event: The image failed to be loaded.
\n '
+ 'load
event: The image is successfully loaded.
' +
+ 'error
event: The image failed to be loaded. '
},
codeFiles: ['events.vue']
}
diff --git a/examples/sites/demos/pc/app/mind-map/basic-usage-composition-api.vue b/examples/sites/demos/pc/app/mind-map/basic-usage-composition-api.vue
index 71936512a..2edebb199 100644
--- a/examples/sites/demos/pc/app/mind-map/basic-usage-composition-api.vue
+++ b/examples/sites/demos/pc/app/mind-map/basic-usage-composition-api.vue
@@ -1,14 +1,14 @@
-
+
-
diff --git a/examples/sites/demos/pc/app/mind-map/basic-usage.vue b/examples/sites/demos/pc/app/mind-map/basic-usage.vue
index 3489ae8f5..5c780bbbd 100644
--- a/examples/sites/demos/pc/app/mind-map/basic-usage.vue
+++ b/examples/sites/demos/pc/app/mind-map/basic-usage.vue
@@ -1,8 +1,8 @@
-
+
-
diff --git a/examples/sites/demos/pc/app/mind-map/event-composition-api.vue b/examples/sites/demos/pc/app/mind-map/event-composition-api.vue
index 60ab54ad4..12a5832e5 100644
--- a/examples/sites/demos/pc/app/mind-map/event-composition-api.vue
+++ b/examples/sites/demos/pc/app/mind-map/event-composition-api.vue
@@ -1,7 +1,7 @@
diff --git a/examples/sites/demos/pc/app/mind-map/event.spec.ts b/examples/sites/demos/pc/app/mind-map/event.spec.ts
index ab583bba2..cf5962656 100644
--- a/examples/sites/demos/pc/app/mind-map/event.spec.ts
+++ b/examples/sites/demos/pc/app/mind-map/event.spec.ts
@@ -1,14 +1,15 @@
import { test, expect } from '@playwright/test'
test('测试创建事件', async ({ page }) => {
- await page.goto('mind-map#event')
page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('mind-map#event')
await page.getByText('触发事件create').isVisible()
})
test('测试operation事件', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('mind-map#event')
- await page.locator('me-tpc').click()
+ await page.locator('me-tpc').filter({ hasText: '前端修仙指南' }).click()
await page.locator('.map-canvas').press('Tab')
await page.getByText('触发事件operation').first().isVisible()
// 新创建node时会触发selectNewNode事件
@@ -17,16 +18,17 @@ test('测试operation事件', async ({ page }) => {
await page.getByText('触发事件selectNewNode').first().isVisible()
})
test('测试select-node, select-nodes, select-new-node事件', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('mind-map#event')
- await page.locator('me-tpc').filter({ hasText: 'root' }).click()
+ await page.locator('me-tpc').filter({ hasText: '算法 第四版' }).click()
await page.locator('.map-canvas').press('Tab')
- await page.locator('me-tpc').filter({ hasText: 'root' }).click()
+ await page.locator('me-tpc').filter({ hasText: '大话数据结构' }).click()
await page.locator('.map-canvas').press('Tab')
- await page.locator('me-tpc').filter({ hasText: 'root' }).click()
+ await page.locator('me-tpc').filter({ hasText: 'Javascript权威指南' }).click()
await page
.locator('me-tpc')
- .nth(1)
.filter({ hasText: 'new node' })
+ .nth(1)
.click({
modifiers: ['Control']
})
@@ -34,10 +36,11 @@ test('测试select-node, select-nodes, select-new-node事件', async ({ page })
await page.getByAltText('触发事件selectNodes').isVisible()
})
test('测试 unselect-node,unselect-nodes', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('mind-map#event')
- await page.locator('me-tpc').filter({ hasText: 'root' }).click()
+ await page.locator('me-tpc').filter({ hasText: '算法 第四版' }).click()
await page.locator('.map-canvas').press('Tab')
- await page.locator('me-tpc').filter({ hasText: 'root' }).click()
+ await page.locator('me-tpc').filter({ hasText: '大话数据结构' }).click()
await page.locator('.map-canvas').press('Tab')
await page.locator('me-tpc').nth(2).click()
diff --git a/examples/sites/demos/pc/app/mind-map/event.vue b/examples/sites/demos/pc/app/mind-map/event.vue
index 47b895b1a..657ee1811 100644
--- a/examples/sites/demos/pc/app/mind-map/event.vue
+++ b/examples/sites/demos/pc/app/mind-map/event.vue
@@ -1,21 +1,23 @@
-
+
+
+
-
diff --git a/examples/sites/demos/pc/app/mind-map/export-data-composition-api.vue b/examples/sites/demos/pc/app/mind-map/export-data-composition-api.vue
index 892460a7f..efa102e4b 100644
--- a/examples/sites/demos/pc/app/mind-map/export-data-composition-api.vue
+++ b/examples/sites/demos/pc/app/mind-map/export-data-composition-api.vue
@@ -1,12 +1,12 @@
-
导出数据
导入示例数据
清空数据
+
diff --git a/examples/sites/demos/pc/app/mind-map/export-data.vue b/examples/sites/demos/pc/app/mind-map/export-data.vue
index 2435df87d..993e8b478 100644
--- a/examples/sites/demos/pc/app/mind-map/export-data.vue
+++ b/examples/sites/demos/pc/app/mind-map/export-data.vue
@@ -1,12 +1,14 @@
-
- 导出数据
- 导入示例数据
- 清空数据
+
+ 导出数据
+ 导入示例数据
+ 清空数据
+
+
-
diff --git a/examples/sites/demos/pc/app/mind-map/webdoc/mind-map.js b/examples/sites/demos/pc/app/mind-map/webdoc/mind-map.js
index 1b6276002..961e19120 100644
--- a/examples/sites/demos/pc/app/mind-map/webdoc/mind-map.js
+++ b/examples/sites/demos/pc/app/mind-map/webdoc/mind-map.js
@@ -1,5 +1,5 @@
export default {
- column: '2',
+ column: '1',
owner: '',
demos: [
{
@@ -10,32 +10,60 @@ export default {
},
codeFiles: ['basic-usage.vue'],
desc: {
- 'zh-CN': '本示例介绍了脑图的基本使用方法',
- 'en-US': 'This example introduces the basic usage of mind map'
+ 'zh-CN':
+ '通过Tab
键增加子节点;
' +
+ '通过Enter
键增加同级节点;
' +
+ '通过Delete
键删除选中的单个或区域节点;
' +
+ '通过Ctrl + C/V
实现节点的复制粘贴;
' +
+ '通过鼠标滚轮+ Shift
进行左右滚动;
' +
+ '通过鼠标滚轮进行上下滚动;也可以使用鼠标点击拖动移动节点。',
+ 'en-US':
+ 'Press Tab
to add a subnode.
' +
+ 'Press Enter
to add a node of the same level.
' +
+ 'Press Delete
to delete the selected node or area node.
' +
+ 'Copy and paste the node through Ctrl + C/V
;
' +
+ 'Scroll left and right with the mouse wheel + Shift
;
' +
+ 'Scroll up and down with the mouse wheel; You can also move nodes by clicking and dragging with the mouse.'
}
},
{
demoId: 'export-data',
name: {
- 'zh-CN': '导出数据',
- 'en-US': 'Export data'
+ 'zh-CN': '数据处理',
+ 'en-US': 'Data Processing'
},
codeFiles: ['export-data.vue'],
desc: {
- 'zh-CN': '本demo讲解了如何导入导出脑图',
- 'en-US': 'This demo introduces how to import/exprot mind map data'
+ 'zh-CN': '通过对实例的获取实现对数据的导出、导入、清空等功能。',
+ 'en-US': 'Export, import, and clear data by obtaining instances.'
}
},
{
demoId: 'event',
name: {
- 'zh-CN': '事件触发',
+ 'zh-CN': '事件',
'en-US': 'Event'
},
codeFiles: ['event.vue'],
desc: {
- 'zh-CN': '本demo讲解了该组件的所有可触发事件',
- 'en-US': 'This demo explains all the triggering events of the build'
+ 'zh-CN':
+ 'create
创建实例触发事件;
' +
+ 'operation
节点重新计算触发事件;
' +
+ 'selectNode
选中节点触发事件;
' +
+ 'selectNewNode
新增节点触发事件;
' +
+ 'selectNodes
选中多个节点触发事件;
' +
+ 'unselectNode
取消选择节点触发事件;
' +
+ 'unselectNodes
取消多个选择节点触发事件;
' +
+ 'expandNode
展开节点触发事件;
',
+ 'en-US':
+ 'create
Create an instance to trigger an event;
' +
+ 'operation
The node recalculates the trigger event;
' +
+ 'selectNode
Select a node to trigger an event;
' +
+ 'selectNewNode
Add a node to trigger an event;
' +
+ 'selectNodes
Select multiple nodes to trigger events;
' +
+ 'unselectNode
Deselect a node to trigger an event;
' +
+ 'unselectNodes
Cancel triggering events for multiple selected nodes;
' +
+ 'expandNode
Expand the node to trigger an event;
'
}
}
]
diff --git a/examples/sites/demos/pc/app/numeric/empty-value-composition-api.vue b/examples/sites/demos/pc/app/numeric/empty-value-composition-api.vue
new file mode 100644
index 000000000..5305dfb4c
--- /dev/null
+++ b/examples/sites/demos/pc/app/numeric/empty-value-composition-api.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/numeric/empty-value.spec.ts b/examples/sites/demos/pc/app/numeric/empty-value.spec.ts
new file mode 100644
index 000000000..4efc7f169
--- /dev/null
+++ b/examples/sites/demos/pc/app/numeric/empty-value.spec.ts
@@ -0,0 +1,15 @@
+import { test, expect } from '@playwright/test'
+
+test('设定清空输入后的绑定值', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('numeric#empty-value')
+
+ const numeric = page.locator('.tiny-numeric').first()
+ const numericInput = numeric.locator('.tiny-numeric__input-inner')
+ const message = page.getByText('null 1')
+
+ await numericInput.fill('')
+ await numericInput.blur()
+
+ await expect(message).toBeVisible()
+})
diff --git a/examples/sites/demos/pc/app/numeric/empty-value.vue b/examples/sites/demos/pc/app/numeric/empty-value.vue
new file mode 100644
index 000000000..d724c3717
--- /dev/null
+++ b/examples/sites/demos/pc/app/numeric/empty-value.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/numeric/mouse-wheel.spec.ts b/examples/sites/demos/pc/app/numeric/mouse-wheel.spec.ts
index 06b322576..e8f94554e 100644
--- a/examples/sites/demos/pc/app/numeric/mouse-wheel.spec.ts
+++ b/examples/sites/demos/pc/app/numeric/mouse-wheel.spec.ts
@@ -7,7 +7,7 @@ test('鼠标滚轮事件', async ({ page }) => {
const numeric = page.getByRole('spinbutton')
const initVal = Number(await numeric.inputValue())
await numeric.click()
- await page.mouse.wheel(0, -500)
+ await page.mouse.wheel(0, -1000)
const currentVal = Number(await numeric.inputValue())
- expect(currentVal).toBeLessThan(initVal)
+ expect(currentVal).toBeGreaterThanOrEqual(initVal)
})
diff --git a/examples/sites/demos/pc/app/numeric/webdoc/numeric.js b/examples/sites/demos/pc/app/numeric/webdoc/numeric.js
index 7ecaaf406..e57bf5a8d 100644
--- a/examples/sites/demos/pc/app/numeric/webdoc/numeric.js
+++ b/examples/sites/demos/pc/app/numeric/webdoc/numeric.js
@@ -22,9 +22,9 @@ export default {
},
desc: {
'zh-CN':
- '可通过max
属性设置计数器允许的最大值,min
属性设置计数器允许的最小值,circulate
属性设置当计数器的数值为最大值,继续计数,是否从最小值开始计数。
\n',
+ '可通过max
属性设置计数器允许的最大值,min
属性设置计数器允许的最小值,circulate
属性设置当计数器的数值为最大值,继续计数,是否从最小值开始计数。',
'en-US':
- 'By setting the maximum value allowed by themax
attribute counter, setting the minimum value allowed by themin
attribute counter, and setting thecycle
attribute, when the counter value reaches the maximum value, continue counting, whether to start counting from the minimum value.
\n'
+ 'By setting the maximum value allowed by themax
attribute counter, setting the minimum value allowed by themin
attribute counter, and setting thecycle
attribute, when the counter value reaches the maximum value, continue counting, whether to start counting from the minimum value.'
},
codeFiles: ['max-min.vue']
},
@@ -35,9 +35,8 @@ export default {
'en-US': 'Step'
},
desc: {
- 'zh-CN': '可通过step
属性设置计数器的加减数值。
\n',
- 'en-US':
- 'Set the addition and subtraction values of the counter through thestep
attribute.
\n'
+ 'zh-CN': '可通过step
属性设置计数器的加减数值。',
+ 'en-US': 'Set the addition and subtraction values of the counter through thestep
attribute.'
},
codeFiles: ['about-step.vue']
},
@@ -48,10 +47,9 @@ export default {
'en-US': 'Numerical precision and format'
},
desc: {
- 'zh-CN':
- '可通过precision
属性设置计数器的精度值,format
属性设置数字显示格式。
\n',
+ 'zh-CN': '可通过precision
属性设置计数器的精度值,format
属性设置数字显示格式。',
'en-US':
- 'Set the precision value of the counter through theprecision
attribute,format
property sets the numeric display format.
\n'
+ 'Set the precision value of the counter through theprecision
attribute,format
property sets the numeric display format.'
},
codeFiles: ['precision.vue']
},
@@ -62,7 +60,7 @@ export default {
'en-US': 'Disabled'
},
desc: {
- 'zh-CN': '可通过disabled
属性设置是否禁用计数器。
',
+ 'zh-CN': '可通过disabled
属性设置是否禁用计数器。',
'en-US': 'Disable the counter by setting disabled
.'
},
codeFiles: ['dynamic-disabled.vue']
@@ -77,10 +75,24 @@ export default {
'zh-CN':
'可通过allow-empty
属性设置计数器内容的可清空特性,默认为 false
,表示不可清空。',
'en-US':
- 'You can use the allow-empty
property to set the clearability of counter contents. The default value is false
, indicating that the data cannot be cleared.
\n'
+ 'You can use the allow-empty
property to set the clearability of counter contents. The default value is false
, indicating that the data cannot be cleared. '
},
codeFiles: ['allow-empty.vue']
},
+ {
+ demoId: 'empty-value',
+ name: {
+ 'zh-CN': '设定清空输入后的绑定值',
+ 'en-US': 'Sets the binding value after the input is cleared'
+ },
+ desc: {
+ 'zh-CN':
+ '可通过 empty-value
属性设置计数器在可清空下,清空后组件的绑定值。默认为 undefined
。示例中将清空后组件绑定值改为null
',
+ 'en-US':
+ 'You can use the empty-value
attribute to set the binding value of the cleared component when the counter can be cleared. The default value is undefined
. In the example, the component binding value is changed to null
.'
+ },
+ codeFiles: ['empty-value.vue']
+ },
{
demoId: 'numeric-size',
name: {
@@ -89,9 +101,9 @@ export default {
},
desc: {
'zh-CN':
- '可通过size
属性设置计数器尺寸,可选值有medium
small
mini
。
\n',
+ '可通过size
属性设置计数器尺寸,可选值有medium
small
mini
。',
'en-US':
- 'You can set the counter size through thesize
attribute.The value can be medium
small
mini
.
\n'
+ 'You can set the counter size through thesize
attribute.The value can be medium
small
mini
. '
},
codeFiles: ['numeric-size.vue']
},
@@ -103,9 +115,9 @@ export default {
},
desc: {
'zh-CN':
- '可通过controls
属性设置计数器是否显示加减按钮,controls-position
属性设置加减按钮显示的位置。加减按钮默认分列两侧显示,show-left
属性设置左对齐。
\n',
+ '可通过controls
属性设置计数器是否显示加减按钮,controls-position
属性设置加减按钮显示的位置。加减按钮默认分列两侧显示,show-left
属性设置左对齐。',
'en-US':
- 'By setting whether thecontrols
attribute counter displays add/subtract buttons, set the position where thecontrols position
attribute add/subtract buttons are displayed. The addition and subtraction buttons are displayed on both sides of the column by default,show-left
property set to left
\n'
+ 'By setting whether thecontrols
attribute counter displays add/subtract buttons, set the position where thecontrols position
attribute add/subtract buttons are displayed. The addition and subtraction buttons are displayed on both sides of the column by default,show-left
property set to left'
},
codeFiles: ['controls.vue']
},
@@ -116,9 +128,9 @@ export default {
'en-US': 'Mouse wheel scrolling change value'
},
desc: {
- 'zh-CN': '可通过mouse-wheel
属性设置控制鼠标滚动滑轮的数值。
\n',
+ 'zh-CN': '可通过mouse-wheel
属性设置控制鼠标滚动滑轮的数值。',
'en-US':
- 'You can use the mouse-wheel
attribute to control whether the scroll wheel can change the value.
\n'
+ 'You can use the mouse-wheel
attribute to control whether the scroll wheel can change the value. '
},
codeFiles: ['mouse-wheel.vue']
},
@@ -129,9 +141,9 @@ export default {
'en-US': 'Unit'
},
desc: {
- 'zh-CN': '可通过unit
属性设置计数器的单位,设置单位后,加减按钮将不可用。
\n',
+ 'zh-CN': '可通过unit
属性设置计数器的单位,设置单位后,加减按钮将不可用。',
'en-US':
- 'Set the unit of the counter by using the unit
property. After setting the unit, the increase and decrease buttons will be disabled.
\n'
+ 'Set the unit of the counter by using the unit
property. After setting the unit, the increase and decrease buttons will be disabled.'
},
codeFiles: ['unit.vue']
},
@@ -143,7 +155,7 @@ export default {
},
desc: {
'zh-CN':
- ' 可通过@change
设置监听数值改变事件。当change-compat
为false时,仅当加减按钮及直接输入数值时会触发change
事件。
\n',
+ '可通过@change
设置监听数值改变事件。当change-compat
为false时,仅当加减按钮及直接输入数值时会触发change
事件。',
'en-US':
'The @change
event is triggered when the value of the text box is changed. When thechange compat
is false, the change
event will be triggered when only the add and subtract buttons and directly entering numerical values are used.\n'
},
@@ -156,8 +168,8 @@ export default {
'en-US': 'Focus Event'
},
desc: {
- 'zh-CN': '可通过@focus
设置监听输入框获得焦点事件。
\n',
- 'en-US': 'The @focus
event is triggered when the text box is focused. \n'
+ 'zh-CN': '可通过@focus
设置监听输入框获得焦点事件。',
+ 'en-US': 'The @focus
event is triggered when the text box is focused. '
},
codeFiles: ['focus-event.vue']
},
@@ -168,8 +180,8 @@ export default {
'en-US': 'Out of Focus Event'
},
desc: {
- 'zh-CN': '可通过@blur
设置监听输入框失去焦点事件。
\n',
- 'en-US': 'The@blur
event is triggered when the text box loses focus.
\n'
+ 'zh-CN': '可通过@blur
设置监听输入框失去焦点事件。',
+ 'en-US': 'The@blur
event is triggered when the text box loses focus. '
},
codeFiles: ['blur-event.vue']
},
@@ -180,9 +192,8 @@ export default {
'en-US': 'Out of Focus Event'
},
desc: {
- 'zh-CN':
- '可通过 string-mode
设置高精度模式,当 JS 默认的 Number 不满足数字的长度与精度需求时。
\n',
- 'en-US': 'The@blur
event is triggered when the text box loses focus.
\n'
+ 'zh-CN': '可通过 string-mode
设置高精度模式,当 JS 默认的 Number 不满足数字的长度与精度需求时。',
+ 'en-US': 'The@blur
event is triggered when the text box loses focus. '
},
codeFiles: ['string-mode.vue']
},
@@ -194,7 +205,7 @@ export default {
},
desc: {
'zh-CN':
- '通过 shape="filter"
属性设置切换过滤器模式,过滤器模式下可传入title
显示标题,tip
显示提示信息,clearable
是否显示清除按钮,默认值为true
。blank
属性将过滤器背景设置为透明。
\n',
+ '通过 shape="filter"
属性设置切换过滤器模式,过滤器模式下可传入title
显示标题,tip
显示提示信息,clearable
是否显示清除按钮,默认值为true
。blank
属性将过滤器背景设置为透明。',
'en-US':
'Set the shape="filter"
attribute to switch the filter mode. In the filter mode, you can transfer the title
to display the title and tip
to display the prompt. clearable
Indicates whether to display the Clear button. The default value is true
.blank
property sets the filter background to transparent.'
},
@@ -208,7 +219,7 @@ export default {
},
desc: {
'zh-CN':
- '通过filter
属性展示筛选框,filter-change
事件筛选框选择触发,过滤器模式下点击关闭图标,触发clear
事件。
\n',
+ '通过filter
属性展示筛选框,filter-change
事件筛选框选择触发,过滤器模式下点击关闭图标,触发clear
事件。',
'en-US':
'The filter
attribute is used to display the filter box. Select Trigger in the filter-change
event filter box. In filter mode, click the close icon to trigger the clear
event.'
},
diff --git a/examples/sites/demos/pc/app/popconfirm/trigger.spec.ts b/examples/sites/demos/pc/app/popconfirm/trigger.spec.ts
index 2d1928c89..2885109bb 100644
--- a/examples/sites/demos/pc/app/popconfirm/trigger.spec.ts
+++ b/examples/sites/demos/pc/app/popconfirm/trigger.spec.ts
@@ -4,15 +4,17 @@ test('触发方式', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('popconfirm#trigger')
- const demo = page.locator('#trigger')
- const popConfirm = demo.locator('.tiny-popconfirm .tiny-popconfirm__reference .tiny-button')
+ const hoverBtn = page.getByRole('button', { name: '鼠标悬停显示' })
+ const clickBtn = page.getByRole('button', { name: '点击显示' })
const popConfirmPopover = page.locator('body > .tiny-popconfirm-popover')
+ const hoverValueBtn = page.getByRole('button', { name: '确定' })
- await popConfirm.first().hover()
+ await hoverBtn.hover()
+ await page.waitForTimeout(100)
await expect(popConfirmPopover.first()).toBeVisible()
+ await hoverValueBtn.click()
+ await page.waitForTimeout(100)
- await popConfirm.nth(1).hover()
- await expect(popConfirmPopover.nth(1)).not.toBeVisible()
- await popConfirm.nth(1).click()
+ await clickBtn.click()
await expect(popConfirmPopover.nth(1)).toBeVisible()
})
diff --git a/examples/sites/demos/pc/app/popconfirm/type.spec.ts b/examples/sites/demos/pc/app/popconfirm/type.spec.ts
index e1b10437a..038ab1831 100644
--- a/examples/sites/demos/pc/app/popconfirm/type.spec.ts
+++ b/examples/sites/demos/pc/app/popconfirm/type.spec.ts
@@ -1,4 +1,5 @@
-import { test, expect, Locator } from '@playwright/test'
+import type { Locator } from '@playwright/test'
+import { test, expect } from '@playwright/test'
test('图标类型', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
@@ -9,16 +10,16 @@ test('图标类型', async ({ page }) => {
const popConfirmPopover = page.locator('body > .tiny-popconfirm-popover')
const getIcon = (parent: Locator) => parent.locator('svg.tiny-svg path').first()
- await popConfirm.first().click()
+ await popConfirm.first().hover()
await expect(popConfirmPopover.first()).toBeVisible()
await expect(getIcon(popConfirmPopover.first())).toBeVisible()
- await popConfirm.nth(1).click()
+ await popConfirm.nth(1).hover()
await expect(popConfirmPopover.nth(1)).toBeVisible()
await expect(getIcon(popConfirmPopover.nth(1))).toBeVisible()
- await popConfirm.nth(2).click()
+ await popConfirm.nth(2).hover()
await expect(popConfirmPopover.nth(2)).toBeVisible()
await expect(getIcon(popConfirmPopover.nth(2))).toBeVisible()
- await popConfirm.nth(3).click()
+ await popConfirm.nth(3).hover()
await expect(popConfirmPopover.nth(3)).toBeVisible()
await expect(getIcon(popConfirmPopover.nth(3))).toBeVisible()
})
diff --git a/examples/sites/demos/pc/app/popeditor/condition-layout-composition-api.vue b/examples/sites/demos/pc/app/popeditor/condition-layout-composition-api.vue
index ac0b9a3e3..868983776 100644
--- a/examples/sites/demos/pc/app/popeditor/condition-layout-composition-api.vue
+++ b/examples/sites/demos/pc/app/popeditor/condition-layout-composition-api.vue
@@ -14,6 +14,7 @@
diff --git a/examples/sites/demos/pc/app/popeditor/slot-footer.vue b/examples/sites/demos/pc/app/popeditor/slot-footer.vue
index da577ee5c..5a773a2f8 100644
--- a/examples/sites/demos/pc/app/popeditor/slot-footer.vue
+++ b/examples/sites/demos/pc/app/popeditor/slot-footer.vue
@@ -109,8 +109,8 @@ export default {
},
methods: {
handleClick(next) {
- // doSomething() // do something you want
- next() // next
+ // do something you want
+ next()
}
}
}
diff --git a/examples/sites/demos/pc/app/popeditor/webdoc/popeditor.js b/examples/sites/demos/pc/app/popeditor/webdoc/popeditor.js
index b0c5942d6..835294585 100644
--- a/examples/sites/demos/pc/app/popeditor/webdoc/popeditor.js
+++ b/examples/sites/demos/pc/app/popeditor/webdoc/popeditor.js
@@ -193,7 +193,7 @@ export default {
},
desc: {
'zh-CN':
- '\n 通过 before-close
属性可以配置一个拦截弹窗关闭的方法。如果方法返回 false
值,则拦截弹窗关闭;否则不拦截。
\n 可以通过该拦截方法传入的参数获取关闭的操作类型 confirm
弹窗有以下关闭类型:
\n \n - confirm:点击确认时关闭
\n - cancel:点击取消时关闭
\n - close:点击关闭按钮时关闭
\n
\n ',
+ '通过 before-close
属性可以配置一个拦截弹窗关闭的方法。如果方法返回 false
值,则拦截弹窗关闭;否则不拦截。
\n 可以通过该拦截方法传入的参数获取关闭的操作类型 confirm
弹窗有以下关闭类型:
\n \n - confirm:点击确认时关闭
\n - cancel:点击取消时关闭
\n - close:点击关闭按钮时关闭
\n
\n ',
'en-US':
'The tabindex
attribute is used to determine whether the focus can be obtained by pressing Tab and the focus sequence. This parameter is valid only when the readonly
attribute is set to false.
'
},
@@ -206,8 +206,8 @@ export default {
'en-US': 'Reset'
},
desc: {
- 'zh-CN': '通过 readonly
属性设置为是否禁用。
',
- 'en-US': 'Use the before-reset
attribute to set the hook function before reset.
'
+ 'zh-CN': '通过 readonly
属性设置为是否只读。
',
+ 'en-US': 'Set the readonly
attribute to read-only.
'
},
codeFiles: ['readonly.vue']
},
@@ -215,12 +215,13 @@ export default {
demoId: 'tabindex',
name: {
'zh-CN': '输入框的 tabindex',
- 'en-US': 'Component Query Condition Slot'
+ 'en-US': 'tabindex in the text box'
},
desc: {
'zh-CN':
'通过 tabindex
属性设置通过 Tab 键获焦及获焦顺序(readonly
属性设置为 false 时有效)。
',
- 'en-US': 'Customize the pop-up panel query structure by slot search
.
'
+ 'en-US':
+ 'Set the focus obtaining and focus obtaining sequence by pressing Tab through the tabindex
attribute. This parameter is valid only when the readonly
attribute is set to false.
'
},
codeFiles: ['tabindex.vue']
},
@@ -232,7 +233,7 @@ export default {
},
desc: {
'zh-CN': '通过 before-reset
属性设置重置前的钩子函数。
',
- 'en-US': ' is set to read-only through the disabled
attribute.
'
+ 'en-US': 'Use the before-reset
attribute to set the hook function before reset.
'
},
codeFiles: ['before-reset.vue']
},
@@ -240,12 +241,11 @@ export default {
demoId: 'slot',
name: {
'zh-CN': '组件查询条件插槽',
- 'en-US': 'The filter criteria in the pop-up window can be cleared.'
+ 'en-US': 'Component Query Condition Slot'
},
desc: {
'zh-CN': '通过插槽 search
自定义弹出面板查询结构。
',
- 'en-US':
- 'The clearable
Popeditor component supports the configuration of the Clear button in the search form.
'
+ 'en-US': 'Customize the pop-up panel query structure through slot search
.'
},
codeFiles: ['slot.vue']
},
@@ -268,9 +268,8 @@ export default {
'en-US': 'Submit Field Mapping'
},
desc: {
- 'zh-CN': '通过 disabled
属性设置为是否只读。
',
- 'en-US':
- 'The value-field
attribute is used to set the fields submitted by the component to the background.
'
+ 'zh-CN': '通过 disabled
属性设置为是否禁用。
',
+ 'en-US': 'Use the disabled
attribute to set whether to disable the function.
'
},
codeFiles: ['disabled.vue']
},
diff --git a/examples/sites/demos/pc/app/radio/dynamic-disable-composition-api.vue b/examples/sites/demos/pc/app/radio/dynamic-disable-composition-api.vue
index 267cc7221..7787caa0f 100644
--- a/examples/sites/demos/pc/app/radio/dynamic-disable-composition-api.vue
+++ b/examples/sites/demos/pc/app/radio/dynamic-disable-composition-api.vue
@@ -4,9 +4,7 @@
不选中禁用
- 备选项1
- 备选项2
- 备选项3
+ {{ item.value }}
@@ -25,8 +23,13 @@ import { ref } from 'vue'
import { Radio as TinyRadio, RadioButton as TinyRadioButton, RadioGroup as TinyRadioGroup } from '@opentiny/vue'
const radio = ref('禁用')
-const radio1 = ref('3')
+const radio1 = ref('6')
const radio2 = ref('1')
+const dataArr = ref([
+ { lable: '3', value: '备选项1' },
+ { lable: '6', value: '备选项2' },
+ { lable: '9', value: '备选项3' }
+])
diff --git a/examples/sites/demos/pc/app/skeleton/custom-layout.spec.ts b/examples/sites/demos/pc/app/skeleton/custom-layout.spec.ts
index 54fa44a2a..b23de3532 100644
--- a/examples/sites/demos/pc/app/skeleton/custom-layout.spec.ts
+++ b/examples/sites/demos/pc/app/skeleton/custom-layout.spec.ts
@@ -1,14 +1,11 @@
import { expect, test } from '@playwright/test'
-test('自定义排版', async ({ page }) => {
+test('样式', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('skeleton#custom-layout')
- const image = page.locator('.tiny-skeleton-item--image')
- const circle = page.locator('.tiny-skeleton-item--circle')
+ const image = page.locator('.tiny-skeleton-item')
- await expect(image).toHaveCount(1)
- await expect(circle).toHaveCount(1)
- await expect(circle).toHaveClass(/tiny-skeleton-item--small/)
- await expect(image).toHaveCSS('width', '200px')
+ await expect(image.nth(0)).toHaveCSS('width', '200px')
+ await expect(image.nth(1)).toHaveCSS('height', '100px')
})
diff --git a/examples/sites/demos/pc/app/skeleton/custom-layout.vue b/examples/sites/demos/pc/app/skeleton/custom-layout.vue
index 501d04925..9322baa9d 100644
--- a/examples/sites/demos/pc/app/skeleton/custom-layout.vue
+++ b/examples/sites/demos/pc/app/skeleton/custom-layout.vue
@@ -1,10 +1,16 @@
+
style 类型
-
-
-
+
+
+
+
+
class 类型
+
+
+
@@ -20,3 +26,13 @@ export default {
}
}
+
+
diff --git a/examples/sites/demos/pc/app/skeleton/custom-paragraph-width-composition-api.vue b/examples/sites/demos/pc/app/skeleton/custom-paragraph-width-composition-api.vue
index c320afed0..e4c32bc67 100644
--- a/examples/sites/demos/pc/app/skeleton/custom-paragraph-width-composition-api.vue
+++ b/examples/sites/demos/pc/app/skeleton/custom-paragraph-width-composition-api.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/examples/sites/demos/pc/app/skeleton/custom-paragraph-width.spec.ts b/examples/sites/demos/pc/app/skeleton/custom-paragraph-width.spec.ts
index 4521c942f..eea43315e 100644
--- a/examples/sites/demos/pc/app/skeleton/custom-paragraph-width.spec.ts
+++ b/examples/sites/demos/pc/app/skeleton/custom-paragraph-width.spec.ts
@@ -1,6 +1,6 @@
import { expect, test } from '@playwright/test'
-test('自定义段落宽度', async ({ page }) => {
+test('段落宽度', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('skeleton#custom-paragraph-width')
diff --git a/examples/sites/demos/pc/app/skeleton/custom-paragraph-width.vue b/examples/sites/demos/pc/app/skeleton/custom-paragraph-width.vue
index 9751c0095..bf4f8677e 100644
--- a/examples/sites/demos/pc/app/skeleton/custom-paragraph-width.vue
+++ b/examples/sites/demos/pc/app/skeleton/custom-paragraph-width.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/examples/sites/demos/pc/app/skeleton/custom-rows.spec.ts b/examples/sites/demos/pc/app/skeleton/custom-rows.spec.ts
index 233202ff8..c71b9dfa5 100644
--- a/examples/sites/demos/pc/app/skeleton/custom-rows.spec.ts
+++ b/examples/sites/demos/pc/app/skeleton/custom-rows.spec.ts
@@ -1,6 +1,6 @@
import { expect, test } from '@playwright/test'
-test('自定义段落行数', async ({ page }) => {
+test('段落行数', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('skeleton#custom-rows')
diff --git a/examples/sites/demos/pc/app/skeleton/fine-grained-mode-composition-api.vue b/examples/sites/demos/pc/app/skeleton/fine-grained-mode-composition-api.vue
index b3714751b..0cb7f4324 100644
--- a/examples/sites/demos/pc/app/skeleton/fine-grained-mode-composition-api.vue
+++ b/examples/sites/demos/pc/app/skeleton/fine-grained-mode-composition-api.vue
@@ -1,34 +1,17 @@
-
大小
-
Small
-
Middle
-
Large
-
-
动画
-
-
-
+
-
+
-
+
-
+
diff --git a/examples/sites/demos/pc/app/skeleton/fine-grained-mode.spec.ts b/examples/sites/demos/pc/app/skeleton/fine-grained-mode.spec.ts
index e9a9d5118..6ee1aa4bc 100644
--- a/examples/sites/demos/pc/app/skeleton/fine-grained-mode.spec.ts
+++ b/examples/sites/demos/pc/app/skeleton/fine-grained-mode.spec.ts
@@ -1,50 +1,14 @@
import { expect, test } from '@playwright/test'
-test('细粒度模式', async ({ page }) => {
+test('形态', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('skeleton#fine-grained-mode')
- const first = page.locator('.tiny-skeleton')
- const radio1 = page.locator('.tiny-radio').nth(0)
- const radio2 = page.locator('.tiny-radio').nth(1)
- const radio3 = page.locator('.tiny-radio').nth(2)
- const activeSwitch = page.locator('.pc-demo > div > .tiny-switch')
const image = page.locator('.tiny-skeleton-item--image')
const circle = page.locator('.tiny-skeleton-item--circle')
const square = page.locator('.tiny-skeleton-item--square')
- await expect(first).toHaveCount(1)
-
- // 测试动画效果
- await expect(circle).toHaveClass(/tiny-skeleton-item--active/)
- await expect(square).toHaveClass(/tiny-skeleton-item--active/)
- await expect(image).toHaveClass(/tiny-skeleton-item--active/)
-
- await activeSwitch.click()
- await page.waitForTimeout(500)
- await expect(image).not.toHaveClass(/tiny-skeleton-item--active/)
- await expect(circle).not.toHaveClass(/tiny-skeleton-item--active/)
- await expect(square).not.toHaveClass(/tiny-skeleton-item--active/)
-
- // 测试大小
- await radio2.click()
- await page.waitForTimeout(500)
- await expect(radio2).toHaveClass(/is-checked/)
- await expect(circle).toHaveClass(/tiny-skeleton-item--medium/)
- await expect(image).toHaveClass(/tiny-skeleton-item--medium/)
- await expect(square).not.toHaveClass(/tiny-skeleton-item--medium/)
-
- await radio1.click()
- await page.waitForTimeout(500)
- await expect(radio1).toHaveClass(/is-checked/)
- await expect(circle).toHaveClass(/tiny-skeleton-item--small/)
- await expect(image).toHaveClass(/tiny-skeleton-item--small/)
- await expect(square).not.toHaveClass(/tiny-skeleton-item--small/)
-
- await radio3.click()
- await page.waitForTimeout(500)
- await expect(radio3).toHaveClass(/is-checked/)
- await expect(circle).toHaveClass(/tiny-skeleton-item--large/)
- await expect(image).toHaveClass(/tiny-skeleton-item--large/)
- await expect(square).not.toHaveClass(/tiny-skeleton-item--large/)
+ await expect(image).toBeVisible()
+ await expect(circle).toBeVisible()
+ await expect(square).toBeVisible()
})
diff --git a/examples/sites/demos/pc/app/skeleton/fine-grained-mode.vue b/examples/sites/demos/pc/app/skeleton/fine-grained-mode.vue
index a86f40469..6ce3c0d63 100644
--- a/examples/sites/demos/pc/app/skeleton/fine-grained-mode.vue
+++ b/examples/sites/demos/pc/app/skeleton/fine-grained-mode.vue
@@ -1,41 +1,24 @@
-
大小
-
Small
-
Middle
-
Large
-
-
-
动画
-
-
-
+
-
+
-
+
-
+
diff --git a/examples/sites/demos/pc/app/skeleton/loading-completed-composition-api.vue b/examples/sites/demos/pc/app/skeleton/loading-completed-composition-api.vue
index 8f1da7060..9332a6905 100644
--- a/examples/sites/demos/pc/app/skeleton/loading-completed-composition-api.vue
+++ b/examples/sites/demos/pc/app/skeleton/loading-completed-composition-api.vue
@@ -1,30 +1,20 @@
-
显示/隐藏
+
{{ loading ? '显示' : '隐藏' }}
-
内容比较短的一段文字
- 一个按钮
-
-
-
-
+
diff --git a/examples/sites/demos/pc/app/skeleton/size.spec.ts b/examples/sites/demos/pc/app/skeleton/size.spec.ts
new file mode 100644
index 000000000..fdf72a0d5
--- /dev/null
+++ b/examples/sites/demos/pc/app/skeleton/size.spec.ts
@@ -0,0 +1,14 @@
+import { expect, test } from '@playwright/test'
+
+test('尺寸', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('skeleton#size')
+
+ const small = page.locator('.tiny-skeleton-item--small')
+ const medium = page.locator('.tiny-skeleton-item--medium')
+ const large = page.locator('.tiny-skeleton-item--large')
+
+ await expect(small).toBeVisible()
+ await expect(medium).toBeVisible()
+ await expect(large).toBeVisible()
+})
diff --git a/examples/sites/demos/pc/app/skeleton/size.vue b/examples/sites/demos/pc/app/skeleton/size.vue
new file mode 100644
index 000000000..114ecdb90
--- /dev/null
+++ b/examples/sites/demos/pc/app/skeleton/size.vue
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/skeleton/webdoc/skeleton.js b/examples/sites/demos/pc/app/skeleton/webdoc/skeleton.js
index 9d27fee9e..5bce80f9c 100644
--- a/examples/sites/demos/pc/app/skeleton/webdoc/skeleton.js
+++ b/examples/sites/demos/pc/app/skeleton/webdoc/skeleton.js
@@ -15,22 +15,34 @@ export default {
codeFiles: ['base.vue']
},
{
- demoId: 'complex-demo',
+ demoId: 'size',
name: {
- 'zh-CN': '复杂的组合',
- 'en-US': 'Complex Demo'
+ 'zh-CN': '尺寸',
+ 'en-US': 'size'
},
desc: {
- 'zh-CN': '更复杂的组合,通过 avatar
属性控制骨架段落左侧出现头像占位。
\n',
+ 'zh-CN': '通过 size
属性可以控制骨架屏的尺寸。
\n',
+ 'en-US': 'The size
property allows you to control the size of the skeleton screen.
\n'
+ },
+ codeFiles: ['size.vue']
+ },
+ {
+ demoId: 'complex-demo',
+ name: {
+ 'zh-CN': '头像模式',
+ 'en-US': 'Portrait Mode'
+ },
+ desc: {
+ 'zh-CN': '通过 avatar
属性控制骨架段落左侧出现头像占位。
\n',
'en-US':
- 'More complex combinations, use the avatar
attribute to control the appearance of the avatar placeholder on the left side of the skeleton paragraph.
\n'
+ ' Use the avatar
attribute to control the display of the avatar on the left of the skeleton paragraph.
\n'
},
codeFiles: ['complex-demo.vue']
},
{
demoId: 'custom-rows',
name: {
- 'zh-CN': '自定义段落行数',
+ 'zh-CN': '段落行数',
'en-US': 'Custom rows'
},
desc: {
@@ -41,15 +53,27 @@ export default {
},
codeFiles: ['custom-rows.vue']
},
+ {
+ demoId: 'custom-paragraph-width',
+ name: {
+ 'zh-CN': '段落宽度',
+ 'en-US': 'Custom paragraph width'
+ },
+ desc: {
+ 'zh-CN': '通过 rows-width
属性可以段落宽度。
\n',
+ 'en-US':
+ 'The rows-width
attribute can customize the paragraph width. Each item in the array can be number
or string
. When it is number< /code>, the component will automatically increase the px
unit
\n'
+ },
+ codeFiles: ['custom-paragraph-width.vue']
+ },
{
demoId: 'custom-layout',
name: {
- 'zh-CN': '自定义排版',
+ 'zh-CN': '样式',
'en-US': 'Custom layout'
},
desc: {
- 'zh-CN':
- '当默认排版不满足需求时,可自定义排版结构,通过 class
和 style
可自定义宽高等样式。
\n',
+ 'zh-CN': '通过 class
和 style
可自定义样式结构。
\n',
'en-US':
'When the default layout does not meet the needs, the layout structure can be customized, and styles such as width and height can be customized through class
and style
.
\n'
},
@@ -70,30 +94,27 @@ export default {
codeFiles: ['loading-completed.vue']
},
{
- demoId: 'custom-paragraph-width',
+ demoId: 'animation',
name: {
- 'zh-CN': '自定义段落宽度',
- 'en-US': 'Custom paragraph width'
+ 'zh-CN': '动画效果',
+ 'en-US': 'Animation Effect'
},
desc: {
- 'zh-CN':
- 'rows-width
属性可以自定义段落宽度,数组中的每一项可以为 number
或 string
,当为 number
时,组件会自动增加 px
单位。
\n',
- 'en-US':
- 'The rows-width
attribute can customize the paragraph width. Each item in the array can be number
or string
. When it is number< /code>, the component will automatically increase the px
unit
\n'
+ 'zh-CN': '通过 animated
属性设置是否开启动画。
\n',
+ 'en-US': 'Use the animated
attribute to set whether to enable animation.
\n'
},
- codeFiles: ['custom-paragraph-width.vue']
+ codeFiles: ['animation.vue']
},
{
demoId: 'fine-grained-mode',
name: {
- 'zh-CN': '细粒度模式',
- 'en-US': 'Fine-grained mode'
+ 'zh-CN': '形态',
+ 'en-US': 'formative'
},
desc: {
- 'zh-CN':
- '细粒度模式,variant
属性可以控制 skeleton-item
的形态,可选值:image / circle / square。size
属性可以控制 skeleton-item
的大小,可选值:medium / small / large。
\n',
+ 'zh-CN': '通过 variant
属性可以控制 skeleton-item
的形态。
\n',
'en-US':
- 'Fine-grained mode, the variant
attribute can control the shape of skeleton-item
, optional values: image / circle / square. The size
attribute can control the size of skeleton-item
. Optional values: medium / small / large.
\n'
+ 'The variant
attribute can be used to control the shape of the skeleton-item
.
\n'
},
codeFiles: ['fine-grained-mode.vue']
}
diff --git a/examples/sites/demos/pc/app/slide-bar/basic-usage-composition-api.vue b/examples/sites/demos/pc/app/slide-bar/basic-usage-composition-api.vue
deleted file mode 100644
index 289d47f58..000000000
--- a/examples/sites/demos/pc/app/slide-bar/basic-usage-composition-api.vue
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/slide-bar/basic-usage.spec.ts b/examples/sites/demos/pc/app/slide-bar/basic-usage.spec.ts
deleted file mode 100644
index 1c08d9bb7..000000000
--- a/examples/sites/demos/pc/app/slide-bar/basic-usage.spec.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { test, expect } from '@playwright/test'
-
-test('基础用法', async ({ page }) => {
- page.on('pageerror', (exception) => expect(exception).toBeNull())
- await page.goto('slide-bar#basic-usage')
- const preview = page.locator('#basic-usage')
- const slideBarContainer = preview.locator('.tiny-slide-bar__content')
- const slideBarList = slideBarContainer.locator('.tiny-slide-bar__list')
- await slideBarList.locator('li').first().click()
- await page.mouse.wheel(0, 100)
- await expect(slideBarList.locator('li').first()).toHaveCSS('border-color', 'rgba(153, 153, 153, 0.7)')
-})
diff --git a/examples/sites/demos/pc/app/slide-bar/basic-usage.vue b/examples/sites/demos/pc/app/slide-bar/basic-usage.vue
deleted file mode 100644
index d10f8f4cb..000000000
--- a/examples/sites/demos/pc/app/slide-bar/basic-usage.vue
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/slide-bar/custom-content-composition-api.vue b/examples/sites/demos/pc/app/slide-bar/custom-content-composition-api.vue
deleted file mode 100644
index 12fde471a..000000000
--- a/examples/sites/demos/pc/app/slide-bar/custom-content-composition-api.vue
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- 标题:{{ data.slotData.title }}
- 语言:{{ data.slotData.lang }}
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/slide-bar/custom-content.spec.ts b/examples/sites/demos/pc/app/slide-bar/custom-content.spec.ts
deleted file mode 100644
index cf66d9198..000000000
--- a/examples/sites/demos/pc/app/slide-bar/custom-content.spec.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { test, expect } from '@playwright/test'
-
-test('自定义滚动块内容', async ({ page }) => {
- page.on('pageerror', (exception) => expect(exception).toBeNull())
- await page.goto('slide-bar#custom-content')
- const slideBarContainer = page.locator('.tiny-slide-bar__content')
- const slideBarList = slideBarContainer.locator('.tiny-slide-bar__list')
- await expect(slideBarList.first().locator('li span').first()).toContainText('标题')
- await expect(slideBarList.first().locator('li div').first()).toContainText('语言')
-})
diff --git a/examples/sites/demos/pc/app/slide-bar/custom-content.vue b/examples/sites/demos/pc/app/slide-bar/custom-content.vue
deleted file mode 100644
index c8f855023..000000000
--- a/examples/sites/demos/pc/app/slide-bar/custom-content.vue
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
- 标题:{{ data.slotData.title }}
- 语言:{{ data.slotData.lang }}
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/slide-bar/custom-tag-composition-api.vue b/examples/sites/demos/pc/app/slide-bar/custom-tag-composition-api.vue
deleted file mode 100644
index 400bdb7af..000000000
--- a/examples/sites/demos/pc/app/slide-bar/custom-tag-composition-api.vue
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/slide-bar/custom-tag.spec.ts b/examples/sites/demos/pc/app/slide-bar/custom-tag.spec.ts
deleted file mode 100644
index 21ffd914b..000000000
--- a/examples/sites/demos/pc/app/slide-bar/custom-tag.spec.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { test, expect } from '@playwright/test'
-
-test('自定义 DOM 标签', async ({ page }) => {
- page.on('pageerror', (exception) => expect(exception).toBeNull())
- await page.goto('slide-bar#custom-tag')
- const slideBarContainer = page.locator('.tiny-slide-bar__content')
- const slideBarList = slideBarContainer.locator('.tiny-slide-bar__list')
- // 自定义的标签为 div
- await expect(slideBarList.locator('li').first().locator('div')).toHaveCount(3)
-})
diff --git a/examples/sites/demos/pc/app/slide-bar/custom-tag.vue b/examples/sites/demos/pc/app/slide-bar/custom-tag.vue
deleted file mode 100644
index c118d3e8c..000000000
--- a/examples/sites/demos/pc/app/slide-bar/custom-tag.vue
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/slide-bar/slide-bar-events-composition-api.vue b/examples/sites/demos/pc/app/slide-bar/slide-bar-events-composition-api.vue
deleted file mode 100644
index 4ad904c9a..000000000
--- a/examples/sites/demos/pc/app/slide-bar/slide-bar-events-composition-api.vue
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/slide-bar/slide-bar-events.spec.ts b/examples/sites/demos/pc/app/slide-bar/slide-bar-events.spec.ts
deleted file mode 100644
index a02e1780d..000000000
--- a/examples/sites/demos/pc/app/slide-bar/slide-bar-events.spec.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { test, expect } from '@playwright/test'
-
-test('滚动块事件', async ({ page }) => {
- page.on('pageerror', (exception) => expect(exception).toBeNull())
- await page.goto('slide-bar#slide-bar-events')
- const slideBarContainer = page.locator('.tiny-slide-bar__content')
- const slideBarList = slideBarContainer.locator('.tiny-slide-bar__list')
- await slideBarList.locator('li').first().click()
- await expect(page.locator('.tiny-modal').filter({ hasText: 'before-click 事件' })).toBeVisible()
- await expect(page.locator('.tiny-modal').filter({ hasText: 'click 事件,回调参数:' })).toBeVisible()
-})
diff --git a/examples/sites/demos/pc/app/slide-bar/slide-bar-events.vue b/examples/sites/demos/pc/app/slide-bar/slide-bar-events.vue
deleted file mode 100644
index 3793aaa04..000000000
--- a/examples/sites/demos/pc/app/slide-bar/slide-bar-events.vue
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/slide-bar/webdoc/slide-bar.cn.md b/examples/sites/demos/pc/app/slide-bar/webdoc/slide-bar.cn.md
deleted file mode 100644
index 4909b54ee..000000000
--- a/examples/sites/demos/pc/app/slide-bar/webdoc/slide-bar.cn.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-title: SlideBar 滚动块
----
-
-# SlideBar 滚动块
-
-SlideBar 滚动块,可以用作文字块的滑动。
diff --git a/examples/sites/demos/pc/app/slide-bar/webdoc/slide-bar.en.md b/examples/sites/demos/pc/app/slide-bar/webdoc/slide-bar.en.md
deleted file mode 100644
index 3192a2339..000000000
--- a/examples/sites/demos/pc/app/slide-bar/webdoc/slide-bar.en.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-title: SlideBar Scrolling Block
----
-
-# SlideBar Scrolling Block
-
-SlideBar scroll block, which can be used as a sliding block of text.
diff --git a/examples/sites/demos/pc/app/slide-bar/webdoc/slide-bar.js b/examples/sites/demos/pc/app/slide-bar/webdoc/slide-bar.js
deleted file mode 100644
index 174c8db71..000000000
--- a/examples/sites/demos/pc/app/slide-bar/webdoc/slide-bar.js
+++ /dev/null
@@ -1,72 +0,0 @@
-export default {
- column: '2',
- owner: '',
- metaData: {
- deprecated: '3.12.0',
- removed: '3.15.0'
- },
- demos: [
- {
- demoId: 'basic-usage',
- name: {
- 'zh-CN': '基本用法',
- 'en-US': 'Basic Usage'
- },
- desc: {
- 'zh-CN': '通过:init-blocks="4"
设置可显示的块数。',
- 'en-US': 'Set the number of blocks that can be displayed through: init blocks="4"
.'
- },
- codeFiles: ['basic-usage.vue']
- },
- {
- demoId: 'wheel-blocks',
- name: {
- 'zh-CN': '每次滚动块数',
- 'en-US': 'Number of blocks scrolled each time'
- },
- desc: {
- 'zh-CN':
- '通过 wheel-blocks
设置每次滚动块数。\n通过 value
调用服务时候获取数据的来源。
\n',
- 'en-US':
- 'You can use wheel-blocks
to set the number of blocks to be scrolled each time. \nThe data source can be obtained when the service is invoked through value
.
\n'
- },
- codeFiles: ['wheel-blocks.vue']
- },
- {
- demoId: 'custom-content',
- name: {
- 'zh-CN': '自定义滚动块内容',
- 'en-US': 'Custom Scroll Block Content'
- },
- desc: {
- 'zh-CN': '通过插槽自定义滚动块内容。
\n',
- 'en-US': 'Customize the scroll block content by slot.
\n'
- },
- codeFiles: ['custom-content.vue']
- },
- {
- demoId: 'custom-tag',
- name: {
- 'zh-CN': '自定义 DOM 标签',
- 'en-US': 'Customized DOM Label'
- },
- desc: {
- 'zh-CN': '通过 tag sub-tag
自定义 DOM 标签。
\n',
- 'en-US': 'You can use tag sub-tag
to customize DOM tags.
\n'
- },
- codeFiles: ['custom-tag.vue']
- },
- {
- demoId: 'slide-bar-events',
- name: {
- 'zh-CN': '滚动块事件',
- 'en-US': 'Scroll Block Event'
- },
- desc: {
- 'zh-CN': '通过@before-click
触发滑动点击前事件。',
- 'en-US': 'Trigger the pre click event by@ before click
.'
- },
- codeFiles: ['slide-bar-events.vue']
- }
- ]
-}
diff --git a/examples/sites/demos/pc/app/slide-bar/wheel-blocks-composition-api.vue b/examples/sites/demos/pc/app/slide-bar/wheel-blocks-composition-api.vue
deleted file mode 100644
index f74b9db6c..000000000
--- a/examples/sites/demos/pc/app/slide-bar/wheel-blocks-composition-api.vue
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/slide-bar/wheel-blocks.spec.ts b/examples/sites/demos/pc/app/slide-bar/wheel-blocks.spec.ts
deleted file mode 100644
index 600382d7f..000000000
--- a/examples/sites/demos/pc/app/slide-bar/wheel-blocks.spec.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { test, expect } from '@playwright/test'
-
-test('每次滚动块数', async ({ page }) => {
- page.on('pageerror', (exception) => expect(exception).toBeNull())
- await page.goto('slide-bar#wheel-blocks')
- const slideBarContainer = page.locator('.tiny-slide-bar__content')
- const slideBarList = slideBarContainer.locator('.tiny-slide-bar__list')
-
- await slideBarList.first().click()
- // 单个滚动块的宽度固定为196px,所以应为 196px * 2
- await page.mouse.wheel(0, 50)
- await page.pause()
-})
diff --git a/examples/sites/demos/pc/app/slide-bar/wheel-blocks.vue b/examples/sites/demos/pc/app/slide-bar/wheel-blocks.vue
deleted file mode 100644
index aa3860c93..000000000
--- a/examples/sites/demos/pc/app/slide-bar/wheel-blocks.vue
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
diff --git a/examples/sites/demos/pc/app/tag/color3-composition-api.vue b/examples/sites/demos/pc/app/tag/color3-composition-api.vue
index d9550d2a2..6c9592317 100644
--- a/examples/sites/demos/pc/app/tag/color3-composition-api.vue
+++ b/examples/sites/demos/pc/app/tag/color3-composition-api.vue
@@ -1,13 +1,31 @@
-
自定义背景色
+
hit:
+
标签一
标签二
标签三
标签四
标签五
+
color 预设值:
+
red标签
+
orange标签
+
green标签
+
blue标签
+
purple标签
+
brown标签
+
grey标签
+
自定义 color 值:
+
自定义背景色
+
自定义背景色和文本色
+
+
diff --git a/examples/sites/demos/pc/app/tag/color3.spec.ts b/examples/sites/demos/pc/app/tag/color3.spec.ts
index 2ffd06b4e..39e238b3a 100644
--- a/examples/sites/demos/pc/app/tag/color3.spec.ts
+++ b/examples/sites/demos/pc/app/tag/color3.spec.ts
@@ -5,16 +5,12 @@ test('边框和自定义背景色', async ({ page }) => {
await page.goto('tag#color3')
const tags = page.locator('.all-demos-container').locator('.tiny-tag')
- const first = tags.nth(0)
+ const first = tags.getByText('标签一')
+ const red = tags.getByText('red标签')
+ const custom = tags.getByText('自定义背景色', { exact: true })
- await expect(tags).toHaveClass([
- /tiny-tag/,
- /tiny-tag--success/,
- /tiny-tag--info/,
- /tiny-tag--warning/,
- /tiny-tag--danger/
- ])
- await expect(tags).toHaveClass([/is-hit/, /is-hit/, /is-hit/, /is-hit/, /is-hit/])
- await expect(first).toHaveCSS('background-color', 'rgba(82, 196, 26, 0.8)')
- await expect(first).toHaveCSS('border-color', 'rgb(87, 93, 108)')
+ await expect(first).toHaveClass(/is-hit/)
+ await expect(red).toHaveClass(/tiny-tag--red/)
+ await expect(custom).toHaveCSS('background-color', 'rgba(82, 196, 26, 0.8)')
+ await expect(custom).toHaveCSS('border-color', 'rgb(87, 93, 108)')
})
diff --git a/examples/sites/demos/pc/app/tag/color3.vue b/examples/sites/demos/pc/app/tag/color3.vue
index e60dde4cc..372f48b5c 100644
--- a/examples/sites/demos/pc/app/tag/color3.vue
+++ b/examples/sites/demos/pc/app/tag/color3.vue
@@ -1,10 +1,22 @@
-
自定义背景色
+
hit:
+
标签一
标签二
标签三
标签四
标签五
+
color 预设值:
+
red标签
+
orange标签
+
green标签
+
blue标签
+
purple标签
+
brown标签
+
grey标签
+
自定义 color 值:
+
自定义背景色
+
自定义背景色和文本色
@@ -17,3 +29,9 @@ export default {
}
}
+
+
diff --git a/examples/sites/demos/pc/app/tag/webdoc/tag.js b/examples/sites/demos/pc/app/tag/webdoc/tag.js
index c78e0ef22..d79068990 100644
--- a/examples/sites/demos/pc/app/tag/webdoc/tag.js
+++ b/examples/sites/demos/pc/app/tag/webdoc/tag.js
@@ -29,12 +29,12 @@ export default {
{
demoId: 'color3',
name: {
- 'zh-CN': '背景色与边框',
- 'en-US': 'Background color and border'
+ 'zh-CN': '颜色与边框',
+ 'en-US': 'Color and border'
},
desc: {
- 'zh-CN': '通过 color
设置背景色, hit
设置边框。',
- 'en-US': 'Set the size through size
, with optional values: (medium/small/mini)
.'
+ 'zh-CN': `通过 hit
设置边框;color
设置颜色,可使用预设值,也可自定义颜色值;当自定义颜色值为字符串则只能设置背景色;若为数组则第一个值为背景色,第二个为文本色。`,
+ 'en-US': `Use hit
to set the border. color
Set the color. You can use the preset value or customize the color value. If the value of Custom Color is a character string, only the background color can be set. If it is an array, the first value is the background color and the second is the text color.`
},
codeFiles: ['color3.vue']
},
diff --git a/examples/sites/demos/pc/app/time-line/custom-field-composition-api.vue b/examples/sites/demos/pc/app/time-line/custom-field-composition-api.vue
index 8a1b1500c..fcdee7f56 100644
--- a/examples/sites/demos/pc/app/time-line/custom-field-composition-api.vue
+++ b/examples/sites/demos/pc/app/time-line/custom-field-composition-api.vue
@@ -5,6 +5,7 @@
@click="click"
name-field="content"
time-field="timestamp"
+ auto-color-field="icon"
vertical
>
@@ -12,6 +13,7 @@
diff --git a/examples/sites/demos/pc/app/time-line/custom-icon.spec.ts b/examples/sites/demos/pc/app/time-line/custom-icon.spec.ts
new file mode 100644
index 000000000..350e6827e
--- /dev/null
+++ b/examples/sites/demos/pc/app/time-line/custom-icon.spec.ts
@@ -0,0 +1,14 @@
+import { test, expect } from '@playwright/test'
+
+test('自定义图标', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+
+ await page.goto('time-line#custom-icon')
+
+ const timeline = page.locator('#custom-icon .tiny-timeline')
+ const timelineItems = await timeline.locator('.tiny-timeline-item').all()
+
+ for (const node of timelineItems) {
+ await expect(node.locator('.icon-custom .fixicons')).toBeVisible()
+ }
+})
diff --git a/examples/sites/demos/pc/app/time-line/custom-icon.vue b/examples/sites/demos/pc/app/time-line/custom-icon.vue
new file mode 100644
index 000000000..d9e5685f8
--- /dev/null
+++ b/examples/sites/demos/pc/app/time-line/custom-icon.vue
@@ -0,0 +1,34 @@
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/time-line/status-composition-api.vue b/examples/sites/demos/pc/app/time-line/status-composition-api.vue
index 7e13bafa5..db2ac042d 100644
--- a/examples/sites/demos/pc/app/time-line/status-composition-api.vue
+++ b/examples/sites/demos/pc/app/time-line/status-composition-api.vue
@@ -1,11 +1,16 @@
+
+ (1)
+ autoColor
+ 可选状态值:success
:成功;warning
:警告;error
:失败。
+
- 竖式时间线可以通过 type
属性指定节点类型,可选值有 primary
|success
- |warning
|danger
|info
+ (2) 当shape
= 'dot' 时,可以通过 type
属性指定节点类型,可选值有
+ primary
|success
|warning
|danger
|info
@@ -15,7 +20,13 @@
import { reactive } from 'vue'
import { TimeLine as TinyTimeLine } from '@opentiny/vue'
-const data1 = reactive([{ name: '默认状态' }, { name: '异常状态', error: true }, { name: '禁用状态', disabled: true }])
+const data1 = reactive([
+ { name: '默认状态' },
+ { name: '成功状态', autoColor: 'success' },
+ { name: '警告状态', autoColor: 'warning' },
+ { name: '异常状态', error: true }, // 也可以使用 autoColor: 'error'
+ { name: '禁用状态', disabled: true }
+])
const data2 = reactive([
{ name: '基本 / primary', time: '2019-11-10 00:00:00', type: 'primary' },
{ name: '成功 / success', time: '2019-11-11 00:01:30', type: 'success' },
@@ -24,3 +35,13 @@ const data2 = reactive([
{ name: '信息 / info', time: '2019-11-14 20:45:50', type: 'info' }
])
+
+
diff --git a/examples/sites/demos/pc/app/time-line/status.spec.ts b/examples/sites/demos/pc/app/time-line/status.spec.ts
index bad26603e..501e504bd 100644
--- a/examples/sites/demos/pc/app/time-line/status.spec.ts
+++ b/examples/sites/demos/pc/app/time-line/status.spec.ts
@@ -1,14 +1,56 @@
import { test, expect } from '@playwright/test'
-test('节点状态', async ({ page }) => {
- page.on('pageerror', (exception) => expect(exception).toBeNull())
- await page.goto('time-line#status')
+test.describe('节点状态', () => {
+ test('autoColor属性设置节点状态', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('time-line#status')
- const timeline = page.locator('#status .tiny-steps-timeline')
- const timelineItems = timeline.locator('.tiny-timeline-item')
- await expect(timelineItems.first()).toHaveClass(/timeline-item--primary/)
- await expect(timelineItems.nth(1)).toHaveClass(/timeline-item--success/)
- await expect(timelineItems.nth(2)).toHaveClass(/timeline-item--warning/)
- await expect(timelineItems.nth(3)).toHaveClass(/timeline-item--danger/)
- await expect(timelineItems.nth(4)).toHaveClass(/timeline-item--info/)
+ const timeline = page.locator('#status .tiny-timeline').first()
+ const timelineItems = timeline.locator('.tiny-timeline-item')
+
+ // 默认状态
+ await expect(timelineItems.first()).toHaveClass(/process-wait/)
+ await expect(timelineItems.first().locator('.icon')).toHaveCSS('border-color', 'rgb(87, 93, 108)')
+ await expect(timelineItems.first().locator('.icon .number')).toHaveCSS('color', 'rgb(87, 93, 108)')
+
+ // 成功状态
+ await expect(timelineItems.nth(1)).toBeVisible()
+ await expect(timelineItems.nth(1).locator('.icon')).toHaveCSS('border-color', 'rgb(94, 124, 224)')
+ await expect(timelineItems.nth(1).locator('.icon .icon-yes')).toHaveCSS('fill', 'rgb(94, 124, 224)')
+
+ // 警告状态
+ await expect(timelineItems.nth(2).locator('.icon.icon-warning')).toBeVisible()
+ await expect(timelineItems.nth(2).locator('.icon')).toHaveCSS('background-color', 'rgb(250, 152, 65)')
+ await expect(timelineItems.nth(2).locator('.icon .icon-warning')).toHaveCSS('fill', 'rgb(255, 255, 255)')
+
+ // 异常状态
+ await expect(timelineItems.nth(3).locator('.icon')).toBeVisible()
+ await expect(timelineItems.nth(3).locator('.icon')).toHaveCSS('border-color', 'rgb(246, 111, 106)')
+ await expect(timelineItems.nth(3).locator('.icon .icon-error')).toHaveCSS('fill', 'rgb(222, 80, 78)')
+
+ // 禁用状态
+ await expect(timelineItems.nth(4)).toHaveClass(/process-disabled/)
+ await expect(timelineItems.nth(4).locator('.icon')).toHaveCSS('background-color', 'rgb(245, 245, 246)')
+ await expect(timelineItems.nth(4).locator('.icon .number')).toHaveCSS('color', 'rgb(173, 176, 184)')
+ })
+
+ test('type属性设置节点状态', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('time-line#status')
+
+ const timeline = page.locator('#status .tiny-timeline').nth(1)
+ const timelineItems = timeline.locator('.tiny-timeline-item')
+
+ await expect(timelineItems.first()).toHaveClass(/timeline-item--primary/)
+ await expect(timelineItems.first().locator('.dot')).toHaveCSS('background-color', 'rgb(223, 225, 230)')
+ await expect(timelineItems.nth(1)).toHaveClass(/timeline-item--success/)
+ await expect(timelineItems.nth(1).locator('.dot')).toHaveCSS('background-color', 'rgb(80, 212, 171)')
+
+ await expect(timelineItems.nth(2)).toHaveClass(/timeline-item--warning/)
+ await expect(timelineItems.nth(2).locator('.dot')).toHaveCSS('background-color', 'rgb(250, 152, 65)')
+ await expect(timelineItems.nth(3)).toHaveClass(/timeline-item--danger/)
+ await expect(timelineItems.nth(3).locator('.dot')).toHaveCSS('background-color', 'rgb(246, 111, 106)')
+ await expect(timelineItems.nth(4)).toHaveClass(/timeline-item--info/)
+ await expect(timelineItems.nth(4).locator('.dot')).toHaveCSS('background-color', 'rgb(94, 124, 224)')
+ })
})
diff --git a/examples/sites/demos/pc/app/time-line/status.vue b/examples/sites/demos/pc/app/time-line/status.vue
index dad062d9c..c5f7b69e8 100644
--- a/examples/sites/demos/pc/app/time-line/status.vue
+++ b/examples/sites/demos/pc/app/time-line/status.vue
@@ -1,11 +1,16 @@
+
+ (1)
+ autoColor
+ 可选状态值:success
:成功;warning
:警告;error
:失败。
+
- 竖式时间线可以通过 type
属性指定节点类型,可选值有 primary
|success
- |warning
|danger
|info
+ (2) 当shape
= 'dot' 时,可以通过 type
属性指定节点类型,可选值有
+ primary
|success
|warning
|danger
|info
@@ -20,7 +25,13 @@ export default {
},
data() {
return {
- data1: [{ name: '默认状态' }, { name: '异常状态', error: true }, { name: '禁用状态', disabled: true }],
+ data1: [
+ { name: '默认状态' },
+ { name: '成功状态', autoColor: 'success' },
+ { name: '警告状态', autoColor: 'warning' },
+ { name: '异常状态', error: true }, // 也可以使用 autoColor: 'error'
+ { name: '禁用状态', disabled: true }
+ ],
data2: [
{ name: '基本 / primary', time: '2019-11-10 00:00:00', type: 'primary' },
{ name: '成功 / success', time: '2019-11-11 00:01:30', type: 'success' },
diff --git a/examples/sites/demos/pc/app/time-line/webdoc/time-line.js b/examples/sites/demos/pc/app/time-line/webdoc/time-line.js
index 3567cb43a..22aa34242 100644
--- a/examples/sites/demos/pc/app/time-line/webdoc/time-line.js
+++ b/examples/sites/demos/pc/app/time-line/webdoc/time-line.js
@@ -43,6 +43,20 @@ export default {
},
codeFiles: ['vertical-timeline.vue']
},
+ {
+ demoId: 'status',
+ name: {
+ 'zh-CN': '节点状态',
+ 'en-US': 'Status of Node'
+ },
+ desc: {
+ 'zh-CN':
+ '通过指定时间线节点的 autoColor
或 type
属性指定其状态;同时 disabled
属性可设置是否禁用。
',
+ 'en-US':
+ 'Specify the state of timeline nodes by setting the autoColor
or type
attribute, and use the disabled
attribute to enable or disable them.
'
+ },
+ codeFiles: ['status.vue']
+ },
{
demoId: 'text-position',
name: {
@@ -68,19 +82,6 @@ export default {
},
codeFiles: ['shape.vue']
},
- {
- demoId: 'status',
- name: {
- 'zh-CN': '节点状态',
- 'en-US': 'Status of Node'
- },
- desc: {
- 'zh-CN': '横向时间线可以使用 error
|disabled
指定单节点的状态。
',
- 'en-US':
- 'Use the error
or disabled
attribute to set the appearance of a horizontal timeline node.
'
- },
- codeFiles: ['status.vue']
- },
{
demoId: 'set-node-width',
name: {
@@ -93,6 +94,44 @@ export default {
},
codeFiles: ['set-node-width.vue']
},
+ {
+ demoId: 'custom-icon',
+ name: {
+ 'zh-CN': '自定义图标',
+ 'en-US': 'Custom Icon'
+ },
+ desc: {
+ 'zh-CN': '通过 auto-color
属性可自定义节点图标。
',
+ 'en-US': 'Customize icon by using the auto-color
attribute.
'
+ },
+ codeFiles: ['custom-icon.vue']
+ },
+ {
+ demoId: 'custom-field',
+ name: {
+ 'zh-CN': '自定义字段',
+ 'en-US': 'Custom Field'
+ },
+ desc: {
+ 'zh-CN':
+ '通过 name-field
属性设置节点信息中名称对应的字段名;time-field
属性设置节点时间信息对应的字段名;auto-color-field
属性设置节点图标对应的字段名。
',
+ 'en-US':
+ 'The name-field
attribute is used to set the field name corresponding to the node name in the node information, the time-field
attribute is used to set the field name corresponding to the node time information and the auto-color-field
attribute is used to set the field name corresponding to the icon.
'
+ },
+ codeFiles: ['custom-field.vue']
+ },
+ {
+ demoId: 'set-start-value',
+ name: {
+ 'zh-CN': '序号起始值',
+ 'en-US': 'Start value of the sequence number'
+ },
+ desc: {
+ 'zh-CN': '通过 start
属性设置时间线序号起始值。
\n',
+ 'en-US': 'Set the start sequence number through the start
attribute.
\n'
+ },
+ codeFiles: ['set-start-value.vue']
+ },
{
demoId: 'show-divider',
name: {
@@ -107,18 +146,6 @@ export default {
},
codeFiles: ['show-divider.vue']
},
- {
- demoId: 'slot-description',
- name: {
- 'zh-CN': '节点描述插槽',
- 'en-US': 'Node Description'
- },
- desc: {
- 'zh-CN': '通过 description
插槽添加单个节点的描述信息。
',
- 'en-US': 'Add description information for a single node through the description
slot.
'
- },
- codeFiles: ['slot-description.vue']
- },
{
demoId: 'custom-horizontal-timeline',
name: {
@@ -148,30 +175,16 @@ export default {
codeFiles: ['custom-vertical-timeline.vue']
},
{
- demoId: 'custom-field',
+ demoId: 'slot-description',
name: {
- 'zh-CN': '自定义字段',
- 'en-US': 'Custom Field'
+ 'zh-CN': '节点描述插槽',
+ 'en-US': 'Node Description'
},
desc: {
- 'zh-CN':
- '通过 name-field
属性设置节点信息中名称对应的字段名,time-field
属性设置节点时间信息对应的字段名。
\n',
- 'en-US':
- 'The name-field
attribute is used to set the field name corresponding to the node name in the node information, and the time-field
attribute is used to set the field name corresponding to the node time information.
\n'
+ 'zh-CN': '通过 description
插槽添加单个节点的描述信息。
',
+ 'en-US': 'Add description information for a single node through the description
slot.
'
},
- codeFiles: ['custom-field.vue']
- },
- {
- demoId: 'set-start-value',
- name: {
- 'zh-CN': '序号起始值',
- 'en-US': 'Start value of the sequence number'
- },
- desc: {
- 'zh-CN': '通过 start
属性设置时间线序号起始值。
\n',
- 'en-US': 'Set the start sequence number through the start
attribute.
\n'
- },
- codeFiles: ['set-start-value.vue']
+ codeFiles: ['slot-description.vue']
}
]
}
diff --git a/examples/sites/demos/pc/app/time-picker/default-value.spec.ts b/examples/sites/demos/pc/app/time-picker/default-value.spec.ts
index c9e637500..888141cb2 100644
--- a/examples/sites/demos/pc/app/time-picker/default-value.spec.ts
+++ b/examples/sites/demos/pc/app/time-picker/default-value.spec.ts
@@ -13,14 +13,16 @@ test('选择器打开时默认时间设置', async ({ page }) => {
await expect(hour).toHaveClass(/active/)
await expect(minute).toHaveClass(/active/)
await expect(second).toHaveClass(/active/)
+ await page.getByText('通过 default-value').click()
// 日期范围选择
- const startHour = page.locator('div:nth-child(2) > .tiny-time-spinner > div > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(19)').first()
+ const startHour = page.getByRole('listitem').filter({ hasText: '18' }).first()
const startMinute = page.getByRole('listitem').filter({ hasText: '40' }).first()
- const startSecond = page.locator('div:nth-child(2) > .tiny-time-spinner > div:nth-child(3) > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li').first()
- const endHour = page.locator('div:nth-child(2) > div:nth-child(2) > .tiny-time-spinner > div > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(19)').first()
+ const startSecond = page.getByRole('listitem').filter({ hasText: '00' }).nth(2)
+
+ const endHour = page.getByRole('listitem').filter({ hasText: '18' }).nth(3)
const endMinute = page.getByRole('listitem').filter({ hasText: '50' }).nth(2)
- const endSecond = page.locator('div:nth-child(2) > div:nth-child(2) > .tiny-time-spinner > div:nth-child(3) > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li').first()
+ const endSecond = page.getByRole('listitem').filter({ hasText: '00' }).nth(5)
await page.getByRole('textbox').nth(2).click()
await expect(startHour).toHaveClass(/active/)
diff --git a/examples/sites/demos/pc/app/time-picker/disabled.spec.ts b/examples/sites/demos/pc/app/time-picker/disabled.spec.ts
index fe07c61d7..c25f7ef81 100644
--- a/examples/sites/demos/pc/app/time-picker/disabled.spec.ts
+++ b/examples/sites/demos/pc/app/time-picker/disabled.spec.ts
@@ -13,13 +13,8 @@ test('测试禁用状态', async ({ page }) => {
const timePicker = page.getByRole('textbox', { name: '18:40:00' }).nth(1)
await page.getByRole('textbox', { name: '18:40:00' }).nth(1).click()
await page.waitForTimeout(100)
- await page
- .locator(
- 'div:nth-child(8) > .tiny-time-panel__content > .tiny-time-spinner > div > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(18)'
- )
- .first()
- .click()
- await page.waitForTimeout(100)
+ await page.getByRole('listitem').filter({ hasText: '17' }).first().click()
+ // 点击17点,点击确定,关闭选择框后,查看input 时间是否仍是18:40:00
await page.getByRole('button', { name: '确定' }).click()
await page.waitForTimeout(100)
await expect(timePicker).toBeVisible()
diff --git a/examples/sites/demos/pc/app/time-picker/editable.spec.ts b/examples/sites/demos/pc/app/time-picker/editable.spec.ts
index 5495ee5f7..aaf8e8a94 100644
--- a/examples/sites/demos/pc/app/time-picker/editable.spec.ts
+++ b/examples/sites/demos/pc/app/time-picker/editable.spec.ts
@@ -5,10 +5,13 @@ test('文本框不可输入', async ({ page }) => {
await page.goto('time-picker#editable')
const timePicker = page.locator('.tiny-date-editor input')
- const closeIcon = page.locator('svg.baseClearicon')
+ await timePicker.hover()
+ await page.waitForTimeout(100)
+ const closeIcon = page.locator('#editable path').first()
await expect(timePicker).toHaveValue('18:40:00')
await timePicker.hover()
+ await page.waitForTimeout(100)
await closeIcon.click()
await expect(timePicker).toHaveValue('')
await timePicker.click()
diff --git a/examples/sites/demos/pc/app/time-picker/format.spec.ts b/examples/sites/demos/pc/app/time-picker/format.spec.ts
index 657b5004f..ffa81ffa6 100644
--- a/examples/sites/demos/pc/app/time-picker/format.spec.ts
+++ b/examples/sites/demos/pc/app/time-picker/format.spec.ts
@@ -11,35 +11,33 @@ test('时间格式化', async ({ page }) => {
await expect(page.getByRole('textbox', { name: '07:40:00 pm' })).toBeVisible()
await page.getByRole('textbox', { name: '19:40:00 pm' }).click()
+ await page.waitForTimeout(100)
await page.getByRole('listitem').filter({ hasText: '08 pm' }).locator('span').click()
await page.getByRole('button', { name: '确定' }).click()
await expect(page.getByRole('textbox', { name: '20:40:00 pm' })).toBeVisible()
await page.getByRole('textbox', { name: '8:40:0 PM' }).click()
+ await page.waitForTimeout(100)
await page.getByRole('listitem').filter({ hasText: '09 PM' }).locator('span').click()
await page.getByRole('button', { name: '确定' }).click()
await expect(page.getByRole('textbox', { name: '9:40:0 PM' })).toBeVisible()
await page.getByRole('textbox', { name: '21:40:0 PM' }).click()
+ await page.waitForTimeout(100)
await page.getByRole('listitem').filter({ hasText: '10 PM' }).locator('span').click()
await page.getByRole('button', { name: '确定' }).click()
await expect(page.getByRole('textbox', { name: '22:40:0 PM' })).toBeVisible()
// value-format: 选中值的格式
await page.getByRole('textbox', { name: '18:30:00' }).click()
+ await page.waitForTimeout(100)
await page.getByRole('listitem').filter({ hasText: '19' }).first().click()
await page.getByRole('button', { name: '确定' }).click()
await expect(page.getByRole('textbox', { name: '19:30:00' })).toBeVisible()
// picker-options.format: 下拉框中显示的格式
- const timePickerHour = page
- .locator(
- 'div:nth-child(13) > .tiny-time-panel__content > .tiny-time-spinner > div > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(19)'
- )
- .first()
- const timePickerMinute = page.locator(
- 'div:nth-child(13) > .tiny-time-panel__content > .tiny-time-spinner > div:nth-child(2) > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(41)'
- )
+ const timePickerHour = page.getByRole('listitem').filter({ hasText: '18' }).first()
+ const timePickerMinute = page.getByRole('listitem').filter({ hasText: '40' }).first()
const timePickerSecond = page.locator('.of-hidden > div:nth-child(12) .tiny-scrollbar').nth(2)
await page.getByRole('textbox', { name: '18:40:00' }).click()
await page.waitForTimeout(200)
diff --git a/examples/sites/demos/pc/app/time-picker/is-range.spec.ts b/examples/sites/demos/pc/app/time-picker/is-range.spec.ts
index daa5dcd6e..fc037dc68 100644
--- a/examples/sites/demos/pc/app/time-picker/is-range.spec.ts
+++ b/examples/sites/demos/pc/app/time-picker/is-range.spec.ts
@@ -8,7 +8,7 @@ test('范围选择', async ({ page }) => {
const endTime = page.getByRole('textbox').nth(2)
await page.getByRole('textbox').nth(1).click()
await page.getByText('42').first().click()
- await page.locator('div:nth-child(2) > div:nth-child(2) > .tiny-time-spinner > div > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(21) > span').first().click()
+ await page.getByRole('listitem').filter({ hasText: '20' }).nth(3).click()
await page.getByRole('button', { name: '确定' }).click()
await expect(startTime).toHaveValue('18:42:00')
await expect(endTime).toHaveValue('20:50:00')
diff --git a/examples/sites/demos/pc/app/time-picker/picker-options.spec.ts b/examples/sites/demos/pc/app/time-picker/picker-options.spec.ts
index 29d11ff32..31fc33c4d 100644
--- a/examples/sites/demos/pc/app/time-picker/picker-options.spec.ts
+++ b/examples/sites/demos/pc/app/time-picker/picker-options.spec.ts
@@ -1,20 +1,22 @@
import { test, expect } from '@playwright/test'
-test('选择时间范围', async ({ page }) => {
+test('固定时间范围', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
- await page.goto('time-picker#is-range')
+ await page.goto('time-picker#picker-options')
- const startTime = page.getByRole('textbox').nth(1)
- const endTime = page.getByRole('textbox').nth(2)
- await page.getByRole('textbox').nth(1).click()
- await page.getByText('42').first().click()
- await page
- .locator(
- 'div:nth-child(2) > div:nth-child(2) > .tiny-time-spinner > div > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(21) > span'
- )
- .first()
- .click()
+ const selectTime = page.getByRole('textbox', { name: '18:40:00' })
+ // 点击17点,点击确定,关闭选择框后,查看input 时间是否仍是18:40:00
+ await selectTime.click()
+ await page.waitForTimeout(100)
+ await page.getByRole('listitem').filter({ hasText: '17' }).first().click()
await page.getByRole('button', { name: '确定' }).click()
- await expect(startTime).toHaveValue('18:42:00')
- await expect(endTime).toHaveValue('20:50:00')
+ await page.waitForTimeout(100)
+ await expect(selectTime).toBeVisible()
+ // 点击21点,点击确定,关闭选择框后,查看input 时间是否仍是18:40:00
+ await selectTime.click()
+ await page.waitForTimeout(100)
+ await page.getByRole('listitem').filter({ hasText: '21' }).first().click()
+ await page.getByRole('button', { name: '确定' }).click()
+ await page.waitForTimeout(100)
+ await expect(selectTime).toBeVisible()
})
diff --git a/examples/sites/demos/pc/app/tree-menu/lazy-load-composition-api.vue b/examples/sites/demos/pc/app/tree-menu/lazy-load-composition-api.vue
index 2a80c8323..891bc9d59 100644
--- a/examples/sites/demos/pc/app/tree-menu/lazy-load-composition-api.vue
+++ b/examples/sites/demos/pc/app/tree-menu/lazy-load-composition-api.vue
@@ -1,5 +1,5 @@
-
+
+