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 @@ + + + + + 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': - '

通过 titletext-splitdialog-titlelabel-titlevalue-titletipssave-buttoncancel-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 @@ 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 rightThe 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 @@ + + + + + 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 @@ + + + + + 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 值为 autoscroll 的父元素。

\n\n
\n

lazy 懒加载的图片必须是远程的图片,不支持静态图片懒加载。

\n
\n ', + '通过 lazy 开启懒加载功能,当图片滚动到可视范围内才会加载。
' + + '通过 scroll-container 来设置滚动容器,若未定义,则为最近一个 overflow 值为 autoscroll 的父元素。' + + '

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/packages/vue/src/chart-beta/chart-gauge/src/types.ts b/packages/vue/src/chart/chart-gauge/src/types.ts similarity index 100% rename from packages/vue/src/chart-beta/chart-gauge/src/types.ts rename to packages/vue/src/chart/chart-gauge/src/types.ts diff --git a/packages/vue/src/chart/chart-graph/index.ts b/packages/vue/src/chart/chart-graph/index.ts index ca0408f4c..b2bfc611e 100644 --- a/packages/vue/src/chart/chart-graph/index.ts +++ b/packages/vue/src/chart/chart-graph/index.ts @@ -1,18 +1,9 @@ -import Graph from './src/index.js' -import { version } from './package.json' +import ChartGraph from './src/chart-graph.vue' -/* istanbul ignore next */ -Graph.install = function (Vue) { - Vue.component(Graph.name, Graph) +ChartGraph.install = function (Vue: any) { + Vue.component(ChartGraph.name, ChartGraph) } -Graph.version = version +export { ChartGraph } -/* istanbul ignore next */ -if (process.env.BUILD_TARGET === 'runtime') { - if (typeof window !== 'undefined' && window.Vue) { - Graph.install(window.Vue) - } -} - -export default Graph +export default ChartGraph diff --git a/packages/vue/src/chart/chart-graph/package.json b/packages/vue/src/chart/chart-graph/package.json index 482458b5a..6a5f26845 100644 --- a/packages/vue/src/chart/chart-graph/package.json +++ b/packages/vue/src/chart/chart-graph/package.json @@ -1,23 +1,18 @@ { "name": "@opentiny/vue-chart-graph", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", "sideEffects": false, "type": "module", - "devDependencies": { - "@opentiny-internal/vue-test-utils": "workspace:*", - "vitest": "^0.31.0" - }, + "devDependencies": {}, "scripts": { "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" }, "dependencies": { - "@opentiny/vue-common": "workspace:~", - "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-chart-core": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/chart-beta/chart-graph/src/chart-graph.vue b/packages/vue/src/chart/chart-graph/src/chart-graph.vue similarity index 92% rename from packages/vue/src/chart-beta/chart-graph/src/chart-graph.vue rename to packages/vue/src/chart/chart-graph/src/chart-graph.vue index ecf66e38f..77d6755d8 100644 --- a/packages/vue/src/chart-beta/chart-graph/src/chart-graph.vue +++ b/packages/vue/src/chart/chart-graph/src/chart-graph.vue @@ -3,7 +3,7 @@ diff --git a/packages/vue/src/chart/chart-radar/index.ts b/packages/vue/src/chart/chart-radar/index.ts index daf0caf4b..dc296bd1a 100644 --- a/packages/vue/src/chart/chart-radar/index.ts +++ b/packages/vue/src/chart/chart-radar/index.ts @@ -1,21 +1,8 @@ -import Radar from './src/index.js' -import { radar } from '@opentiny/vue-renderless/chart-radar/index' -import { version } from './package.json' +import ChartRadar from './src/chart-radar.vue' -/* istanbul ignore next */ -Radar.install = function (Vue) { - Vue.component(Radar.name, Radar) +ChartRadar.install = function (Vue: any) { + Vue.component(ChartRadar.name, ChartRadar) } -Radar.version = version - -/* istanbul ignore next */ -if (process.env.BUILD_TARGET === 'runtime') { - if (typeof window !== 'undefined' && window.Vue) { - Radar.install(window.Vue) - } -} - -export { radar } - -export default Radar +export { ChartRadar } +export default ChartRadar diff --git a/packages/vue/src/chart/chart-radar/package.json b/packages/vue/src/chart/chart-radar/package.json index 7c3990a0f..79539c6fc 100644 --- a/packages/vue/src/chart/chart-radar/package.json +++ b/packages/vue/src/chart/chart-radar/package.json @@ -1,23 +1,18 @@ { "name": "@opentiny/vue-chart-radar", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", "sideEffects": false, "type": "module", - "devDependencies": { - "@opentiny-internal/vue-test-utils": "workspace:*", - "vitest": "^0.31.0" - }, + "devDependencies": {}, "scripts": { "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" }, "dependencies": { - "@opentiny/vue-common": "workspace:~", - "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-chart-core": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/chart-beta/chart-radar/src/chart-radar.vue b/packages/vue/src/chart/chart-radar/src/chart-radar.vue similarity index 94% rename from packages/vue/src/chart-beta/chart-radar/src/chart-radar.vue rename to packages/vue/src/chart/chart-radar/src/chart-radar.vue index 5f3d090fe..479cd1493 100644 --- a/packages/vue/src/chart-beta/chart-radar/src/chart-radar.vue +++ b/packages/vue/src/chart/chart-radar/src/chart-radar.vue @@ -3,7 +3,7 @@ diff --git a/packages/vue/src/credit-card/package.json b/packages/vue/src/credit-card/package.json deleted file mode 100644 index 5b3105a10..000000000 --- a/packages/vue/src/credit-card/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@opentiny/vue-credit-card", - "version": "3.7.0", - "description": "", - "main": "lib/index.js", - "module": "index.ts", - "sideEffects": false, - "type": "module", - "devDependencies": { - "@opentiny-internal/vue-test-utils": "workspace:*", - "vitest": "^0.31.0" - }, - "scripts": { - "build": "pnpm -w build:ui $npm_package_name", - "//postversion": "pnpm build" - }, - "dependencies": { - "@opentiny/vue-common": "workspace:~", - "@opentiny/vue-renderless": "workspace:~", - "@opentiny/vue-theme": "workspace:~" - }, - "license": "MIT" -} diff --git a/packages/vue/src/credit-card/src/index.ts b/packages/vue/src/credit-card/src/index.ts deleted file mode 100644 index 9e55f6c9e..000000000 --- a/packages/vue/src/credit-card/src/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) 2022 - present TinyVue Authors. - * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. - * - * Use of this source code is governed by an MIT-style license. - * - * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, - * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR - * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. - * - */ -import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common' -import template from 'virtual-template?pc' - -export default defineComponent({ - name: $prefix + 'CreditCard', - props: { - ...$props, - backgroundImage: [String, Object], - isCardNumberMasked: Boolean, - fields: { - type: Object, - default: () => ({}) - }, - labels: { - type: Object, - default: () => ({ cardCvv: '', cardMonth: '', cardName: '', cardNumber: '', cardYear: '' }) - } - }, - setup(props, context) { - return $setup({ props, context, template }) - } -}) diff --git a/packages/vue/src/credit-card/src/pc.vue b/packages/vue/src/credit-card/src/pc.vue deleted file mode 100644 index 4a0739cb2..000000000 --- a/packages/vue/src/credit-card/src/pc.vue +++ /dev/null @@ -1,149 +0,0 @@ - - - - diff --git a/packages/vue/src/crop/package.json b/packages/vue/src/crop/package.json index 0890ae94e..9b9e16155 100644 --- a/packages/vue/src/crop/package.json +++ b/packages/vue/src/crop/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-crop", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/currency/package.json b/packages/vue/src/currency/package.json index 93d0f9258..87bb5c7a4 100644 --- a/packages/vue/src/currency/package.json +++ b/packages/vue/src/currency/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-currency", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -24,4 +24,4 @@ "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/currency/src/mobile-first.vue b/packages/vue/src/currency/src/mobile-first.vue index 66544068b..21252b694 100644 --- a/packages/vue/src/currency/src/mobile-first.vue +++ b/packages/vue/src/currency/src/mobile-first.vue @@ -19,10 +19,10 @@ diff --git a/packages/vue/src/date-panel/package.json b/packages/vue/src/date-panel/package.json index 977e076db..ca9699990 100644 --- a/packages/vue/src/date-panel/package.json +++ b/packages/vue/src/date-panel/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-date-panel", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -29,4 +29,4 @@ "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/date-panel/src/index.ts b/packages/vue/src/date-panel/src/index.ts index bbc85c7f1..478dfd572 100644 --- a/packages/vue/src/date-panel/src/index.ts +++ b/packages/vue/src/date-panel/src/index.ts @@ -1,7 +1,7 @@ -import { $prefix, $props, $setup } from '@opentiny/vue-common' +import { $prefix, $props, $setup, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?pc|mobile-first' -export default { +export default defineComponent({ name: $prefix + 'DatePanel', componentName: 'DatePanel', props: { @@ -22,4 +22,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/date-picker-mobile-first/package.json b/packages/vue/src/date-picker-mobile-first/package.json index 9a3af62ba..aa67a0d75 100644 --- a/packages/vue/src/date-picker-mobile-first/package.json +++ b/packages/vue/src/date-picker-mobile-first/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-date-picker-mobile-first", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -24,4 +24,4 @@ "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" } -} +} \ No newline at end of file diff --git a/packages/vue/src/date-picker/package.json b/packages/vue/src/date-picker/package.json index 65a7f3aa1..3df790dc8 100644 --- a/packages/vue/src/date-picker/package.json +++ b/packages/vue/src/date-picker/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-date-picker", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -24,4 +24,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/date-range/package.json b/packages/vue/src/date-range/package.json index 789474ad3..60822ca32 100644 --- a/packages/vue/src/date-range/package.json +++ b/packages/vue/src/date-range/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-date-range", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -19,11 +19,10 @@ "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-input": "workspace:~", "@opentiny/vue-button": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-time": "workspace:~", "@opentiny/vue-date-table": "workspace:~", "@opentiny/vue-theme": "workspace:~", "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/date-range/src/index.ts b/packages/vue/src/date-range/src/index.ts index d2be9e9a2..050ab1690 100644 --- a/packages/vue/src/date-range/src/index.ts +++ b/packages/vue/src/date-range/src/index.ts @@ -1,4 +1,4 @@ -import { $prefix, $props, $setup } from '@opentiny/vue-common' +import { $prefix, $props, $setup, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?pc|mobile-first' const $constants = { @@ -6,7 +6,7 @@ const $constants = { endDate: new Date('2099-12-31') } -export default { +export default defineComponent({ name: $prefix + 'DateRange', componentName: 'DateRange', props: { @@ -35,4 +35,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/date-range/src/mobile-first.vue b/packages/vue/src/date-range/src/mobile-first.vue index e8482fc4e..8b300faca 100644 --- a/packages/vue/src/date-range/src/mobile-first.vue +++ b/packages/vue/src/date-range/src/mobile-first.vue @@ -3,12 +3,7 @@
@@ -249,7 +244,13 @@
- + {{ t('ui.datepicker.clear') }} import { renderless, api } from '@opentiny/vue-renderless/date-range/vue' -import { props, setup, directive } from '@opentiny/vue-common' +import { props, setup, directive, defineComponent } from '@opentiny/vue-common' import Clickoutside from '@opentiny/vue-renderless/common/deps/clickoutside' import TimePicker from '@opentiny/vue-time' import DateTable from '@opentiny/vue-date-table' @@ -278,7 +279,7 @@ import Button from '@opentiny/vue-button' import { IconDoubleRight, IconDoubleLeft, IconChevronLeft, IconChevronRight } from '@opentiny/vue-icon' import { classes } from './token' -export default { +export default defineComponent({ directives: directive({ Clickoutside }), components: { TimePicker, @@ -295,5 +296,5 @@ export default { setup(props, context) { return setup({ props, context, renderless, api, classes }) } -} +}) diff --git a/packages/vue/src/date-table/package.json b/packages/vue/src/date-table/package.json index 4aeec4994..d17e39162 100644 --- a/packages/vue/src/date-table/package.json +++ b/packages/vue/src/date-table/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-date-table", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/date-table/src/index.ts b/packages/vue/src/date-table/src/index.ts index 2efa7d540..b46eac45b 100644 --- a/packages/vue/src/date-table/src/index.ts +++ b/packages/vue/src/date-table/src/index.ts @@ -1,8 +1,8 @@ -import { $prefix, $props, $setup } from '@opentiny/vue-common' +import { $prefix, $props, $setup, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?pc|mobile-first' import { isDate } from '@opentiny/vue-renderless/common/deps/date-util' -export default { +export default defineComponent({ name: $prefix + 'DateTable', componentName: 'DateTable', props: { @@ -38,4 +38,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/date-table/src/mobile-first.vue b/packages/vue/src/date-table/src/mobile-first.vue index 3f3bd7dcc..ea1bca631 100644 --- a/packages/vue/src/date-table/src/mobile-first.vue +++ b/packages/vue/src/date-table/src/mobile-first.vue @@ -12,24 +12,24 @@
{{ t('ui.datepicker.week') }}
- +
{{ t('ui.datepicker.weeks.' + week) }}
- +
@@ -43,10 +43,10 @@ diff --git a/packages/vue/src/dept/package.json b/packages/vue/src/dept/package.json index 6a757dfa4..460ba8b8d 100644 --- a/packages/vue/src/dept/package.json +++ b/packages/vue/src/dept/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-dept", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,10 +22,9 @@ "@opentiny/vue-option": "workspace:~", "@opentiny/vue-row": "workspace:~", "@opentiny/vue-col": "workspace:~", - "@opentiny/vue-modal": "workspace:~", "@opentiny/vue-input": "workspace:~", "@opentiny/vue-theme": "workspace:~", "@opentiny/vue-dialog-box": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/dept/src/pc.vue b/packages/vue/src/dept/src/pc.vue index d45df471a..e890e23c7 100644 --- a/packages/vue/src/dept/src/pc.vue +++ b/packages/vue/src/dept/src/pc.vue @@ -38,6 +38,7 @@ remote :remote-method="searchMethod" @change="searchChange" + @clear="searchMethod('')" >
  • $constants - }, - modelValue: Array, - title: { - type: String, - default: '' - }, - textSplit: { - type: String, - default: '---' - }, - dialogTitle: { - type: String, - default: '' - }, - labelTitle: { - type: String, - default: '' - }, - tips: { - type: String, - default: '' - }, - valueTitle: { - type: String, - default: '' - }, - saveButton: { - type: String, - default: '' - }, - cancelButton: { - type: String, - default: '' - } - }, - setup(props, context) { - return $setup({ props, context, template }) - } -}) diff --git a/packages/vue/src/detail-page/src/pc.vue b/packages/vue/src/detail-page/src/pc.vue deleted file mode 100644 index c577fc7d2..000000000 --- a/packages/vue/src/detail-page/src/pc.vue +++ /dev/null @@ -1,107 +0,0 @@ - - - - diff --git a/packages/vue/src/dialog-box/package.json b/packages/vue/src/dialog-box/package.json index 638aa2bf6..3e7c8d247 100644 --- a/packages/vue/src/dialog-box/package.json +++ b/packages/vue/src/dialog-box/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-dialog-box", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -23,4 +23,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/dialog-select/package.json b/packages/vue/src/dialog-select/package.json index a08ae6e39..31de53fc8 100644 --- a/packages/vue/src/dialog-select/package.json +++ b/packages/vue/src/dialog-select/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-dialog-select", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -24,4 +24,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/dialog-select/src/index.ts b/packages/vue/src/dialog-select/src/index.ts index 001d6527a..b74fd57cc 100644 --- a/packages/vue/src/dialog-select/src/index.ts +++ b/packages/vue/src/dialog-select/src/index.ts @@ -1,11 +1,11 @@ -import { $props, $setup, $prefix } from '@opentiny/vue-common' +import { $props, $setup, $prefix, defineComponent } from '@opentiny/vue-common' import PCTemplate from './pc.vue' const template = () => { return PCTemplate } -export default { +export default defineComponent({ name: $prefix + 'DialogSelect', props: { ...$props, @@ -78,4 +78,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/divider/package.json b/packages/vue/src/divider/package.json index 469bb870a..5c55736a1 100644 --- a/packages/vue/src/divider/package.json +++ b/packages/vue/src/divider/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-divider", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -16,4 +16,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/drawer/package.json b/packages/vue/src/drawer/package.json index 70fb0ec08..dfc0a09cb 100644 --- a/packages/vue/src/drawer/package.json +++ b/packages/vue/src/drawer/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-drawer", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -19,4 +19,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/drawer/src/index.ts b/packages/vue/src/drawer/src/index.ts index d48569898..4295c9368 100644 --- a/packages/vue/src/drawer/src/index.ts +++ b/packages/vue/src/drawer/src/index.ts @@ -1,4 +1,4 @@ -import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?pc|mobile-first' const $constants = { @@ -67,10 +67,10 @@ export const drawerProps = { tipsProps: Object } -export default { +export default defineComponent({ name: $prefix + 'Drawer', props: drawerProps, setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/drawer/src/mobile-first.vue b/packages/vue/src/drawer/src/mobile-first.vue index 263ae1f85..b68ecd84d 100644 --- a/packages/vue/src/drawer/src/mobile-first.vue +++ b/packages/vue/src/drawer/src/mobile-first.vue @@ -79,11 +79,11 @@ diff --git a/packages/vue/src/drawer/src/pc.vue b/packages/vue/src/drawer/src/pc.vue index 0dcd503e0..3cc3d0f33 100644 --- a/packages/vue/src/drawer/src/pc.vue +++ b/packages/vue/src/drawer/src/pc.vue @@ -98,13 +98,13 @@ diff --git a/packages/vue/src/drop-roles/package.json b/packages/vue/src/drop-roles/package.json index def515021..aca6591c4 100644 --- a/packages/vue/src/drop-roles/package.json +++ b/packages/vue/src/drop-roles/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-drop-roles", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -23,4 +23,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/drop-times/package.json b/packages/vue/src/drop-times/package.json index 57e2b1569..c6a4ed732 100644 --- a/packages/vue/src/drop-times/package.json +++ b/packages/vue/src/drop-times/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-drop-times", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/dropdown-item/package.json b/packages/vue/src/dropdown-item/package.json index d9106b08e..6720abaa3 100644 --- a/packages/vue/src/dropdown-item/package.json +++ b/packages/vue/src/dropdown-item/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-dropdown-item", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -25,4 +25,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/dropdown-item/src/index.ts b/packages/vue/src/dropdown-item/src/index.ts index cf66123f6..5fc593a64 100644 --- a/packages/vue/src/dropdown-item/src/index.ts +++ b/packages/vue/src/dropdown-item/src/index.ts @@ -64,6 +64,10 @@ export const dropdownItemProps = { type: Number, default: () => -1 }, + tooltipContent: { + type: String, + default: '' + }, // 以下为 tiny 新增 appendToBody: { type: Boolean, diff --git a/packages/vue/src/dropdown-item/src/mobile-first.vue b/packages/vue/src/dropdown-item/src/mobile-first.vue index adc8b924e..af8fb74ff 100644 --- a/packages/vue/src/dropdown-item/src/mobile-first.vue +++ b/packages/vue/src/dropdown-item/src/mobile-first.vue @@ -41,7 +41,7 @@ import { renderless, api } from '@opentiny/vue-renderless/dropdown-item/mf' export default defineComponent({ emits: ['update:modelValue', 'change', 'closed', 'open', 'opened', 'close', 'confirm', 'reset'], - props: [...props, 'disabled', 'icon', 'itemData', 'selected', 'label', 'level', 'currentIndex'], + props: [...props, 'disabled', 'icon', 'itemData', 'selected', 'label', 'level', 'currentIndex', 'tooltipContent'], setup(props, context): any { return setup({ props, context, renderless, api }) } diff --git a/packages/vue/src/dropdown-menu/package.json b/packages/vue/src/dropdown-menu/package.json index 1574c1ebf..64205bcaa 100644 --- a/packages/vue/src/dropdown-menu/package.json +++ b/packages/vue/src/dropdown-menu/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-dropdown-menu", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -24,4 +24,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/dropdown/package.json b/packages/vue/src/dropdown/package.json index b5f60d5a5..6dbde8223 100644 --- a/packages/vue/src/dropdown/package.json +++ b/packages/vue/src/dropdown/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-dropdown", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -24,4 +24,4 @@ "@opentiny/vue-dropdown-menu": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/dynamic-scroller-item/package.json b/packages/vue/src/dynamic-scroller-item/package.json index c420545ee..db479bccb 100644 --- a/packages/vue/src/dynamic-scroller-item/package.json +++ b/packages/vue/src/dynamic-scroller-item/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-dynamic-scroller-item", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -15,4 +15,4 @@ "@opentiny/vue-renderless": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/dynamic-scroller/package.json b/packages/vue/src/dynamic-scroller/package.json index 3176e16d9..1033cca18 100644 --- a/packages/vue/src/dynamic-scroller/package.json +++ b/packages/vue/src/dynamic-scroller/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-dynamic-scroller", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -16,4 +16,4 @@ "@opentiny/vue-recycle-scroller": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/espace/package.json b/packages/vue/src/espace/package.json index d9cb52fd9..efaad7e95 100644 --- a/packages/vue/src/espace/package.json +++ b/packages/vue/src/espace/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-espace", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/exception/package.json b/packages/vue/src/exception/package.json index d635c3aa3..71b310bcc 100644 --- a/packages/vue/src/exception/package.json +++ b/packages/vue/src/exception/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-exception", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/exception/src/index.ts b/packages/vue/src/exception/src/index.ts index 9c534ef91..83e3e4803 100644 --- a/packages/vue/src/exception/src/index.ts +++ b/packages/vue/src/exception/src/index.ts @@ -1,7 +1,7 @@ -import { $setup, $prefix, $props } from '@opentiny/vue-common' +import { $setup, $prefix, $props, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?mobile|mobile-first' -export default { +export default defineComponent({ name: $prefix + 'Exception', props: { @@ -26,4 +26,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/fall-menu/package.json b/packages/vue/src/fall-menu/package.json index 9eacd2cf7..bc22d729b 100644 --- a/packages/vue/src/fall-menu/package.json +++ b/packages/vue/src/fall-menu/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-fall-menu", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -23,4 +23,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/file-upload/package.json b/packages/vue/src/file-upload/package.json index 6329aad32..011711b4c 100644 --- a/packages/vue/src/file-upload/package.json +++ b/packages/vue/src/file-upload/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-file-upload", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -34,4 +34,4 @@ "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/filter-bar/package.json b/packages/vue/src/filter-bar/package.json index 489f8cf37..67a2dff9e 100644 --- a/packages/vue/src/filter-bar/package.json +++ b/packages/vue/src/filter-bar/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-filter-bar", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" } -} +} \ No newline at end of file diff --git a/packages/vue/src/filter-box/package.json b/packages/vue/src/filter-box/package.json index 55b864bc3..46ce89009 100644 --- a/packages/vue/src/filter-box/package.json +++ b/packages/vue/src/filter-box/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-filter-box", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -18,4 +18,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/filter-panel/package.json b/packages/vue/src/filter-panel/package.json index a23539c4f..79f8a5ca7 100644 --- a/packages/vue/src/filter-panel/package.json +++ b/packages/vue/src/filter-panel/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-filter-panel", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -18,4 +18,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/filter/package.json b/packages/vue/src/filter/package.json index 8d31d618a..e09d58f20 100644 --- a/packages/vue/src/filter/package.json +++ b/packages/vue/src/filter/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-filter", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" } -} +} \ No newline at end of file diff --git a/packages/vue/src/float-button/package.json b/packages/vue/src/float-button/package.json index 89d3bd5c0..e6424d48f 100644 --- a/packages/vue/src/float-button/package.json +++ b/packages/vue/src/float-button/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-float-button", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/floatbar/package.json b/packages/vue/src/floatbar/package.json index 054c4bf25..f9d71e4ea 100644 --- a/packages/vue/src/floatbar/package.json +++ b/packages/vue/src/floatbar/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-floatbar", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/floating-button/package.json b/packages/vue/src/floating-button/package.json index f6e019855..df3fce784 100644 --- a/packages/vue/src/floating-button/package.json +++ b/packages/vue/src/floating-button/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-floating-button", - "version": "3.7.0", + "version": "3.15.0", "description": "", "module": "index.ts", "sideEffects": false, @@ -20,4 +20,4 @@ "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/floating-button/src/index.ts b/packages/vue/src/floating-button/src/index.ts index 229452346..0d3165026 100644 --- a/packages/vue/src/floating-button/src/index.ts +++ b/packages/vue/src/floating-button/src/index.ts @@ -1,4 +1,4 @@ -import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?mobile-first' export const floatingButtonProps = { @@ -45,10 +45,10 @@ export const floatingButtonProps = { } } -export default { +export default defineComponent({ name: $prefix + 'FloatingButton', props: floatingButtonProps, setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/flowchart/package.json b/packages/vue/src/flowchart/package.json index e0946188f..2c670bd8c 100644 --- a/packages/vue/src/flowchart/package.json +++ b/packages/vue/src/flowchart/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-flowchart", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -11,8 +11,7 @@ "@opentiny/vue-icon": "workspace:~", "@opentiny/vue-popover": "workspace:~", "@opentiny/vue-renderless": "workspace:~", - "@opentiny/vue-theme": "workspace:~", - "@opentiny/vue-theme-mobile": "workspace:~" + "@opentiny/vue-theme": "workspace:~" }, "license": "MIT", "devDependencies": { @@ -23,4 +22,4 @@ "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" } -} +} \ No newline at end of file diff --git a/packages/vue/src/form-item/package.json b/packages/vue/src/form-item/package.json index 649f8dc68..71bbce4b8 100644 --- a/packages/vue/src/form-item/package.json +++ b/packages/vue/src/form-item/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-form-item", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/form-item/src/mobile-first.vue b/packages/vue/src/form-item/src/mobile-first.vue index 5653baaf6..41453705f 100644 --- a/packages/vue/src/form-item/src/mobile-first.vue +++ b/packages/vue/src/form-item/src/mobile-first.vue @@ -8,7 +8,7 @@ state.formInline ? 'align-sub' : '', state.labelPosition === 'top' ? 'block mb-4' : '', state.validateState === 'error' - ? '[&_input]:border-color-error [&_textarea]:border-color-error [&_input:focus]:border-color-error [&_input:hover]:border-color-error [&_textarea:focus]:border-color-error [&_textarea:hover]:border-color-error' + ? '[&_.tiny-range-editor]:border-color-error [&_[data-tag~=tiny-range-editor]]:border-color-error [&_[data-tag=tiny-numeric-main]]:border-color-error [&_input]:border-color-error [&_textarea]:border-color-error [&_input:focus]:border-color-error [&_input:hover]:border-color-error [&_textarea:focus]:border-color-error [&_textarea:hover]:border-color-error' : '', state.labelPosition === 'top' && !state.hideRequiredAsterisk ? 'pl-0' : '', !slots.label && !label ? 'border-none' : '', @@ -27,11 +27,12 @@ :class=" m( 'py-3 sm:py-1.5 sm:min-h-[theme(spacing.7)] relative align-bottom float-left text-sm pr-3 sm:pr-4 box-border leading-5', - 'overflow-hidden text-ellipsis text-left sm:text-right', + 'overflow-hidden text-ellipsis', state.labelPosition === 'top' ? 'float-none inline-block text-left sm:text-left leading-none px-0 pt-0 pb-1.5 h-auto min-h-0 sm:py-0 sm:pb-0.5 sm:min-h-[theme(spacing.0)]' : 'min-h-[theme(spacing.9)]', - state.labelPosition === 'left' ? 'text-left' : '', + state.labelPosition === 'right' ? 'text-right sm:text-right' : '', + state.labelPosition === 'left' ? 'text-left sm:text-left' : '', state.formInline && state.labelPosition === 'top' ? 'block' : '', state.isDisplayOnly ? 'leading-none h-auto align-[inherit] pr-4' : '', tipContent ? 'pr-5 sm:pr-7' : '', diff --git a/packages/vue/src/form/package.json b/packages/vue/src/form/package.json index 80cee1d32..18bd57099 100644 --- a/packages/vue/src/form/package.json +++ b/packages/vue/src/form/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-form", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/fullscreen/package.json b/packages/vue/src/fullscreen/package.json index d081a1109..a845fcbcf 100644 --- a/packages/vue/src/fullscreen/package.json +++ b/packages/vue/src/fullscreen/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-fullscreen", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/grid-column/package.json b/packages/vue/src/grid-column/package.json index 3b6c16218..d11244189 100644 --- a/packages/vue/src/grid-column/package.json +++ b/packages/vue/src/grid-column/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-grid-column", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -18,4 +18,4 @@ "@opentiny/vue-grid": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/grid-manager/package.json b/packages/vue/src/grid-manager/package.json index 54f90c59d..7a82a5a6f 100644 --- a/packages/vue/src/grid-manager/package.json +++ b/packages/vue/src/grid-manager/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-grid-manager", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -18,4 +18,4 @@ "@opentiny/vue-grid": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/grid-toolbar/package.json b/packages/vue/src/grid-toolbar/package.json index ae8fa444f..127517015 100644 --- a/packages/vue/src/grid-toolbar/package.json +++ b/packages/vue/src/grid-toolbar/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-grid-toolbar", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -44,4 +44,4 @@ "@opentiny/vue-popover": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/grid-toolbar/src/custom-saas.vue b/packages/vue/src/grid-toolbar/src/custom-saas.vue index 893c0fc44..2c10333e0 100644 --- a/packages/vue/src/grid-toolbar/src/custom-saas.vue +++ b/packages/vue/src/grid-toolbar/src/custom-saas.vue @@ -286,7 +286,7 @@ import CustomSwitch from './custom-switch.vue' import { extend } from '@opentiny/vue-renderless/common/object' import { isNull } from '@opentiny/vue-renderless/grid/static' import Clickoutside from '@opentiny/vue-renderless/common/deps/clickoutside' -import { $props, isVue2, directive, useDefer, h } from '@opentiny/vue-common' +import { $props, isVue2, directive, useDefer, h, defineComponent } from '@opentiny/vue-common' import { GridConfig } from '@opentiny/vue-grid' import { mergeArray } from './multiple-history' import '@opentiny/vue-theme/grid-toolbar/index.less' @@ -306,7 +306,7 @@ const TitleRender = { } } -export default { +export default defineComponent({ components: { TinyModal: Modal, TinyButton: Button, @@ -1031,5 +1031,5 @@ export default { this.columns.forEach((col) => (col.numberSortVisible = false)) } } -} +}) diff --git a/packages/vue/src/grid-toolbar/src/custom-switch.vue b/packages/vue/src/grid-toolbar/src/custom-switch.vue index 1f5288e85..9fdba2905 100644 --- a/packages/vue/src/grid-toolbar/src/custom-switch.vue +++ b/packages/vue/src/grid-toolbar/src/custom-switch.vue @@ -235,9 +235,7 @@ import { t } from '@opentiny/vue-locale' import { GridTools } from '@opentiny/vue-grid' import { find } from '@opentiny/vue-renderless/grid/static' import { createCustom, getStorage, setStorage, mergeArray } from './multiple-history' -import { $props } from '@opentiny/vue-common' - -import { defineComponent } from '@opentiny/vue-common' +import { $props, defineComponent } from '@opentiny/vue-common' export default defineComponent({ name: 'TinyGridCustomSwitch', @@ -258,6 +256,7 @@ export default defineComponent({ default: null } }, + emits: ['init-storage'], props: { ...$props, customMode: String, diff --git a/packages/vue/src/grid/package.json b/packages/vue/src/grid/package.json index 8471591a2..117258b49 100644 --- a/packages/vue/src/grid/package.json +++ b/packages/vue/src/grid/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-grid", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -26,11 +26,9 @@ "@opentiny/vue-icon": "workspace:~", "@opentiny/vue-tooltip": "workspace:~", "@opentiny/vue-theme": "workspace:~", - "@opentiny/vue-button": "workspace:~", - "@opentiny/vue-popover": "workspace:~", "@opentiny/vue-tag": "workspace:~", "@opentiny/vue-loading": "workspace:~", "@opentiny/vue-common": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/grid/src/body/src/body.tsx b/packages/vue/src/grid/src/body/src/body.tsx index d9ea39644..a9f954f70 100644 --- a/packages/vue/src/grid/src/body/src/body.tsx +++ b/packages/vue/src/grid/src/body/src/body.tsx @@ -36,7 +36,7 @@ import { import { getCellLabel } from '../../tools' import GlobalConfig from '../../config' import { iconChevronRight, iconChevronDown } from '@opentiny/vue-icon' -import { h, hooks, $prefix } from '@opentiny/vue-common' +import { h, hooks, $prefix, defineComponent } from '@opentiny/vue-common' import { getTreeChildrenKey, getTreeShowKey } from '../../table/src/strategy' import { generateFixedClassName } from '../../table/src/utils/handleFixedColumn' @@ -520,12 +520,9 @@ function renderRow(args) { let { $rowIndex, $seq, $table, _vm, editStore } = args let { groupFolds, h, row, rowActived } = args let { rowClassName, rowIndex, rowKey, rowLevel, rowid, rows } = args - let { selection, seq, tableColumn, trOn, treeConfig } = args - let { scrollYLoad } = $table - let treeShowKey = getTreeShowKey({ scrollYLoad, treeConfig }) - let { hideMethod } = treeConfig || {} + let { selection, seq, tableColumn, trOn, treeConfig, isNotRenderRow } = args - if ((treeShowKey && !row[treeShowKey]) || (hideMethod && hideMethod(row, rowLevel))) { + if (isNotRenderRow) { return } @@ -645,6 +642,7 @@ function renderRowTree(args, renderRows) { h, _vm, $table, + // $seq 树表特有序号:1 --> 1.1 $seq: $seq ? `${$seq}.${seq}` : `${seq}`, rowLevel: rowLevel + 1, tableData: rowChildren, @@ -665,6 +663,8 @@ function renderRows({ h, _vm, $table, $seq, rowLevel, tableData, tableColumn, se // 子级索引是否按数字递增显示:true(子级索引按数字递增显示,父级1,子级2);false(子级索引在父级索引基础上增加,父级1,子级1.1) let isOrdered = treeConfig ? Boolean(treeConfig.ordered) : false seqCount = seqCount || { value: 0 } + let treeShowKey = getTreeShowKey({ scrollYLoad, treeConfig }) + let { hideMethod } = treeConfig || {} // 循环表格数据,生成表格主体内容VNode,此处也是性能优化的整改点 tableData.forEach((row, $rowIndex) => { @@ -672,8 +672,13 @@ function renderRows({ h, _vm, $table, $seq, rowLevel, tableData, tableColumn, se let rowIndex = $rowIndex let { actived } = editStore let rowActived = editConfig && actived.row === row + const isNotRenderRow = (treeShowKey && !row[treeShowKey]) || (hideMethod && hideMethod(row, rowLevel)) + + // 树表虚拟滚动,如果当前行被剪切不需要渲染,则无需自增序号 + if (!isNotRenderRow) { + seqCount.value = seqCount.value + 1 + } - seqCount.value = seqCount.value + 1 let seq = isOrdered ? seqCount.value : rowIndex + 1 if (scrollYLoad) { seq += startIndex @@ -687,7 +692,8 @@ function renderRows({ h, _vm, $table, $seq, rowLevel, tableData, tableColumn, se renderRowGroupData({ groupData, groupFolds, row, rowGroup, rowid, rows, tableColumn }) let args = { $rowIndex, $seq, $table, _vm, editStore, groupFolds, h, row, rowActived } Object.assign(args, { rowClassName, rowIndex, rowKey, rowLevel, rowid, rows, selection, seq }) - Object.assign(args, { tableColumn, trOn, treeConfig }) + + Object.assign(args, { tableColumn, trOn, treeConfig, isNotRenderRow }) // 输出表格行列的vnode节点列表 renderRow(args) @@ -813,7 +819,7 @@ function renderYSpace({ scrollLoad }) { ]) } -export default { +export default defineComponent({ name: `${$prefix}GridBody`, props: { collectColumn: Array, @@ -848,6 +854,10 @@ export default { $el.onscroll = this.scrollEvent $el._onscroll = this.scrollEvent }, + updated() { + const { $parent: $table, fixedType } = this + !fixedType && $table.updateTableBodyHeight() + }, setup(props, { slots }) { hooks.onBeforeUnmount(() => { const table = hooks.getCurrentInstance().proxy @@ -925,4 +935,4 @@ export default { emitEvent($table, 'scroll', [{ type: 'body', scrollTop, scrollLeft, isX, isY, $table }, event]) } } -} +}) diff --git a/packages/vue/src/grid/src/button/src/button.ts b/packages/vue/src/grid/src/button/src/button.ts index ec0ca073b..d42809c74 100644 --- a/packages/vue/src/grid/src/button/src/button.ts +++ b/packages/vue/src/grid/src/button/src/button.ts @@ -26,7 +26,7 @@ import { objectMap } from '@opentiny/vue-renderless/grid/static/' import { addClass, removeClass } from '@opentiny/vue-renderless/common/deps/dom' import { emitEvent, getEventTargetNode, getListeners } from '@opentiny/vue-renderless/grid/utils' import GlobalConfig from '../../config' -import { h, $prefix } from '@opentiny/vue-common' +import { h, $prefix, defineComponent } from '@opentiny/vue-common' function renderNoSlotDropdowns({ $slots, _vm, buttonBase, loading, tableListeners }) { let loadingVNode = [] @@ -113,7 +113,7 @@ function getButtonBase({ disabled, isText, loading, name, type, vSize }) { } } -export default { +export default defineComponent({ name: `${$prefix}GridButton`, inheritAttrs: false, props: { @@ -192,4 +192,4 @@ export default { return { slots, tableListeners } } -} +}) diff --git a/packages/vue/src/grid/src/cell/src/cell.ts b/packages/vue/src/grid/src/cell/src/cell.ts index 5d6e77cc6..9c275a70b 100644 --- a/packages/vue/src/grid/src/cell/src/cell.ts +++ b/packages/vue/src/grid/src/cell/src/cell.ts @@ -22,7 +22,7 @@ * SOFTWARE. * */ -import { get } from '@opentiny/vue-renderless/grid/static/' +import { get, isFunction } from '@opentiny/vue-renderless/grid/static/' import { random } from '@opentiny/vue-renderless/common/string' import { getColumnConfig, getFuncText, formatText } from '@opentiny/vue-renderless/grid/utils' import { Renderer } from '../../adapter' @@ -264,7 +264,7 @@ export const Cell = { let { slots, own, title } = column if (slots && slots.header) { - return slots.header(params, h) + return [h('div', { class: 'tiny-grid-cell-text' }, [slots.header(params, h)])] } if (typeof title === 'function') { @@ -379,11 +379,12 @@ export const Cell = { return Cell.renderTreeIcon(h, params).concat(Cell.renderIndexCell(h, params)) }, renderIndexCell(h, params) { - let { $seq, level, seq } = params - let { startIndex, treeConfig = {} } = params.$table - let { indexMethod, slots } = params.column - let isOrdered = !!treeConfig.ordered - let indexValue = level && !isOrdered ? `${$seq}.${seq}` : startIndex + seq + const { $seq, level, seq } = params + // startIndex:序号列的起始值 + const { startIndex, treeConfig = {} } = params.$table + const { indexMethod, slots } = params.column + const isOrdered = !!treeConfig.ordered + const indexValue = level && !isOrdered ? `${$seq}.${seq}` : startIndex + seq if (slots && slots.default) { return slots.default(params, h) @@ -893,17 +894,22 @@ export const Cell = { const renderBase = (buttonConfig, flag, classes, attrs) => { const mergeParams = { buttonConfig, ...params } - const on = isDisabled(buttonConfig) ? {} : { click: (e) => buttonConfig.click(e, mergeParams) } + const on = { + click: (e) => { + if (!isDisabled(buttonConfig) && isFunction(buttonConfig.click)) { + buttonConfig.click(e, mergeParams) + } + } + } classes = classes.join('\u{20}') const clazz = isDisabled(buttonConfig) ? [classes, 'tiny-grid__oper-col-button--disabled', disabledClass] : classes - const childNodes = - typeof buttonConfig.icon === 'function' - ? [runRender(buttonConfig.icon, h, mergeParams)] - : [h(buttonConfig.icon)] + const childNodes = isFunction(buttonConfig.icon) + ? [runRender(buttonConfig.icon, h, mergeParams)] + : [h(buttonConfig.icon)] return flag ? h('span', { class: clazz, attrs, on }, childNodes) : null } diff --git a/packages/vue/src/grid/src/fetch-data/src/methods.ts b/packages/vue/src/grid/src/fetch-data/src/methods.ts index 753e55127..8b41ba69d 100644 --- a/packages/vue/src/grid/src/fetch-data/src/methods.ts +++ b/packages/vue/src/grid/src/fetch-data/src/methods.ts @@ -18,6 +18,12 @@ export default { handleFetch(code, sortArg) { let { pager, sortData, filterData, pagerConfig, fetchOption, fetchData, dataset } = this as any + if (this.isInitialLoading) { + this.isInitialLoading = false + } else { + this.columnAnchor && this.clearActiveAnchor() + } + if (code !== 'prefetch') { this.clearRadioRow() this.resetScrollTop() @@ -71,6 +77,14 @@ export default { throw error }) }, + clearActiveAnchor() { + const { columnAnchor, columnAnchorParams = {} } = this + const { anchors = [] } = columnAnchorParams + + if (!columnAnchor || anchors.length <= 0) return + + anchors.forEach((anchor) => (anchor.active = false)) + }, loadFetchData(rest) { if (!rest) { this.tableData = [] diff --git a/packages/vue/src/grid/src/filter/src/methods.ts b/packages/vue/src/grid/src/filter/src/methods.ts index 7230881b5..755af6059 100644 --- a/packages/vue/src/grid/src/filter/src/methods.ts +++ b/packages/vue/src/grid/src/filter/src/methods.ts @@ -100,6 +100,7 @@ const columnfilters = (visibleColumn) => { filters[property] = { type, value } } + // 修改了filter状态,不能放在服务端筛选分支内,否则本地筛选会缺失此状态 filter.hasFilter = value.length || input || dateList?.some(Boolean) || input === 0 || empty !== null || type === 'custom' } @@ -261,11 +262,15 @@ export default { // 服务端请求参数 const filters = columnfilters(visibleColumn) - if (this.$grid.pagerConfig) { - this.$grid.pagerConfig.currentPage = 1 + if (remoteFilter) { + // 2、修改currentPage为1 (在服务端筛选时把当前页设置为1,本地筛选不需要) + if (this.$grid.pagerConfig) { + this.$grid.pagerConfig.currentPage = 1 + } + // 3、抛出filter-change事件(在服务端筛选时grid才会注册filter-change事件处理) + emitEvent(this, 'filter-change', [{ filters, $table: this }]) } - emitEvent(this, 'filter-change', [{ filters, $table: this }]) this.updateFooter() // 表头过滤动作应保持水平滚动条位置不变 diff --git a/packages/vue/src/grid/src/filter/src/panel.tsx b/packages/vue/src/grid/src/filter/src/panel.tsx index ece9412f2..80ff20cdd 100644 --- a/packages/vue/src/grid/src/filter/src/panel.tsx +++ b/packages/vue/src/grid/src/filter/src/panel.tsx @@ -1,3 +1,5 @@ +/* eslint-disable vue/no-mutating-props */ +/* eslint-disable vue/no-use-computed-property-like-method */ /** * MIT License * @@ -29,7 +31,7 @@ import PopperJS from '@opentiny/vue-renderless/common/deps/popper' import PopupManager from '@opentiny/vue-renderless/common/deps/popup-manager' import { extend } from '@opentiny/vue-renderless/common/object' import { t } from '@opentiny/vue-locale' -import { hooks, h, $prefix } from '@opentiny/vue-common' +import { hooks, h, $prefix, defineComponent } from '@opentiny/vue-common' import { iconCheck, iconCheckedSur, iconHalfselect, iconSearch } from '@opentiny/vue-icon' import debounce from '@opentiny/vue-renderless/common/deps/debounce' @@ -172,7 +174,7 @@ const renderEnumableOptions = ({ iconRender, _vm, filterStore, selectAll, search } } -export default { +export default defineComponent({ name: $prefix + 'GridFilter', props: { filterStore: Object, @@ -724,4 +726,4 @@ export default { instance.popperJS && instance.popperJS.destroy() && (instance.popperJS = null) }) } -} +}) diff --git a/packages/vue/src/grid/src/footer/src/footer.ts b/packages/vue/src/grid/src/footer/src/footer.ts index f168f5ed4..159abfd86 100644 --- a/packages/vue/src/grid/src/footer/src/footer.ts +++ b/packages/vue/src/grid/src/footer/src/footer.ts @@ -26,7 +26,7 @@ import { isFunction } from '@opentiny/vue-renderless/grid/static/' import { getClass, emitEvent, formatText, updateCellTitle } from '@opentiny/vue-renderless/grid/utils' import { isNull } from '@opentiny/vue-renderless/common/type' -import { h, $prefix } from '@opentiny/vue-common' +import { h, $prefix, defineComponent } from '@opentiny/vue-common' const classMap = { fixedHidden: 'fixed__column', @@ -124,8 +124,19 @@ const renderfoots = (opt) => { .map((column, $columnIndex) => { const arg1 = { $columnIndex, $rowIndex, $table, allAlign, allColumnOverflow, allFooterAlign } const arg2 = { column, footerData, footerSpanMethod, overflowX, tableListeners } - const { attrs, columnIndex, fixedHiddenColumn, footAlign, footerClassName, hasEllipsis, params, tfOns } = - buildParamFunc(Object.assign(arg1, arg2)) + const { + attrs, + columnIndex, + fixedHiddenColumn, + footAlign, + footerClassName, + hasEllipsis, + params, + tfOns, + isShowEllipsis, + isShowTitle, + showTooltip + } = buildParamFunc(Object.assign(arg1, arg2)) const { leftList, rightList } = columnStore return h( 'td', @@ -156,7 +167,15 @@ const renderfoots = (opt) => { h( 'div', { - class: ['tiny-grid-cell', { [classMap.cellSummary]: $table.summaryConfig }] + class: [ + 'tiny-grid-cell', + { + [classMap.cellSummary]: $table.summaryConfig, + 'tiny-grid-cell__title': isShowTitle, + 'tiny-grid-cell__tooltip': showTooltip || column.showTip, + 'tiny-grid-cell__ellipsis': isShowEllipsis + } + ] }, // 如果不是表格形态,就只保留表格结构(到tiny-grid-cell),不渲染具体的内容 $table.isShapeTable ? formatText(list[$table.tableColumn.indexOf(column)], 1) : null @@ -172,7 +191,7 @@ function renderTfoot(opt) { return h('tfoot', { ref: 'tfoot' }, opt.footerData.map(renderfoots(opt))) } -export default { +export default defineComponent({ name: `${$prefix}GridFooter`, props: { fixedColumn: Array, @@ -312,7 +331,19 @@ export default { // 处理行或者列的合并 doFooterSpan({ attrs, footerData, footerSpanMethod, params }) - return { attrs, columnIndex, fixedHiddenColumn, footAlign, footerClassName, hasEllipsis, params, tfOns } + return { + attrs, + columnIndex, + fixedHiddenColumn, + footAlign, + footerClassName, + hasEllipsis, + isShowEllipsis, + isShowTitle, + showTooltip, + params, + tfOns + } } } -} +}) diff --git a/packages/vue/src/grid/src/grid/grid.ts b/packages/vue/src/grid/src/grid/grid.ts index f28bdb2a5..fc1d3ef10 100644 --- a/packages/vue/src/grid/src/grid/grid.ts +++ b/packages/vue/src/grid/src/grid/grid.ts @@ -151,7 +151,8 @@ export default defineComponent({ columnAnchorParams: {}, columnAnchorKey: '', tasks: {}, - fullScreenClass: '' + fullScreenClass: '', + isInitialLoading: true // 是否首次加载数据 } }, computed: { diff --git a/packages/vue/src/grid/src/header/src/header.ts b/packages/vue/src/grid/src/header/src/header.ts index 4235ca19e..0bf68bec2 100644 --- a/packages/vue/src/grid/src/header/src/header.ts +++ b/packages/vue/src/grid/src/header/src/header.ts @@ -27,7 +27,7 @@ import { isObject, isNull } from '@opentiny/vue-renderless/common/type' import { removeClass, addClass } from '@opentiny/vue-renderless/common/deps/dom' import { isBoolean, isFunction } from '@opentiny/vue-renderless/grid/static/' import { updateCellTitle, getOffsetPos, emitEvent, getClass } from '@opentiny/vue-renderless/grid/utils' -import { h, $prefix } from '@opentiny/vue-common' +import { h, $prefix, defineComponent } from '@opentiny/vue-common' import { random } from '@opentiny/vue-renderless/common/string' function addListenerMousedown({ $table, mouseConfig, params, thOns }) { @@ -163,8 +163,9 @@ function getThPropsArg(args) { [classMap.isEditable]: column.editor, [classMap.isFilter]: isObject(column.filter), [classMap.filterActive]: column.filter && column.filter.hasFilter, - 'fixed-left-last__column': column.fixed === 'left' && leftList[leftList.length - 1] === column, - 'fixed-right-first__column': column.fixed === 'right' && rightList[0] === column + 'fixed-left-last__column': + column.fixed === 'left' && (leftList[leftList.length - 1] === column || column.isFixedLeftLast), + 'fixed-right-first__column': column.fixed === 'right' && (rightList[0] === column || column.isFixedRightFirst) }, getClass(headerClassName, params), getClass(headerCellClassName, params) @@ -408,7 +409,7 @@ const documentOnmouseup = function ({ emitEvent($table, 'resizable-change', [params]) } -export default { +export default defineComponent({ name: `${$prefix}GridHeader`, props: { collectColumn: Array, @@ -516,4 +517,4 @@ export default { handleMousemoveEvent(event) } } -} +}) diff --git a/packages/vue/src/grid/src/menu/src/children.ts b/packages/vue/src/grid/src/menu/src/children.ts index b22bb8034..8c376723a 100644 --- a/packages/vue/src/grid/src/menu/src/children.ts +++ b/packages/vue/src/grid/src/menu/src/children.ts @@ -23,9 +23,9 @@ * */ import { getFuncText, getDomNode } from '@opentiny/vue-renderless/grid/utils' -import { h, $prefix } from '@opentiny/vue-common' +import { h, $prefix, defineComponent } from '@opentiny/vue-common' -export default { +export default defineComponent({ name: $prefix + 'GridContextMenuChild', props: { item: Object, @@ -108,4 +108,4 @@ export default { } } } -} +}) diff --git a/packages/vue/src/grid/src/menu/src/panel.ts b/packages/vue/src/grid/src/menu/src/panel.ts index 80c052492..27606ef69 100644 --- a/packages/vue/src/grid/src/menu/src/panel.ts +++ b/packages/vue/src/grid/src/menu/src/panel.ts @@ -23,7 +23,7 @@ * */ import { getFuncText } from '@opentiny/vue-renderless/grid/utils' -import { h, $prefix } from '@opentiny/vue-common' +import { h, $prefix, defineComponent } from '@opentiny/vue-common' import Children from './children' const onMenuItem = ({ tableInstance, item, getEventTargetNode, toKebab }) => ({ @@ -103,7 +103,7 @@ function getMenuItemCreator({ ctxMenuStore, getEventTargetNode, tableInstance, t ) } -export default { +export default defineComponent({ name: `${$prefix}GridContextMenu`, props: { ctxMenuStore: Object @@ -134,4 +134,4 @@ export default { ) ) } -} +}) diff --git a/packages/vue/src/grid/src/mobile-first/column-content.vue b/packages/vue/src/grid/src/mobile-first/column-content.vue index 9d36a1742..4b73a68a6 100644 --- a/packages/vue/src/grid/src/mobile-first/column-content.vue +++ b/packages/vue/src/grid/src/mobile-first/column-content.vue @@ -14,7 +14,8 @@ export default defineComponent({ const { cardConfig = {} } = config const props = { attrs: { 'data-tag': 'tiny-table-column-content' }, - class: 'my-0.5 truncate space-y-2 sm:space-y-1 [&_[data-tag=tiny-input]]:leading-7' + class: + 'my-0.5 truncate space-y-2 sm:space-y-1 [&_[data-tag=tiny-input]]:leading-7 [&_[data-tag=tiny-input-textarea]>span]:pt-0' } const ons = () => ({ mouseenter: this.handleMouseenter, mouseleave: this.handleMouseleave }) diff --git a/packages/vue/src/grid/src/pager/src/methods.ts b/packages/vue/src/grid/src/pager/src/methods.ts index 763472d69..fd48d47fa 100644 --- a/packages/vue/src/grid/src/pager/src/methods.ts +++ b/packages/vue/src/grid/src/pager/src/methods.ts @@ -37,7 +37,7 @@ export default { renderPager({ $slots, _vm, loading, pager, pagerConfig, tableLoading, vSize }) { let res = null - const { isThemeSaas, isModeMobileFirst, isViewGantt, currentBreakpoint } = _vm + const { isThemeSaas, isModeMobileFirst, isViewGantt, currentBreakpoint, fetchData } = _vm const style = { display: 'none' } // 使用saas主题和多端模式时,内置Pager使用多端模板。在非gantt视图或gantt视图大屏下显示多端Pager @@ -57,7 +57,7 @@ export default { if ($slots.pager) { res = $slots.pager() } else if (pager) { - pager.component = pager.component || (_vm.fetchData ? Pager : null) + pager.component = pager.component || (fetchData && fetchData.api ? Pager : null) res = h(hooks.toRaw(pager.component), { props: { size: vSize, diff --git a/packages/vue/src/grid/src/table/src/methods.ts b/packages/vue/src/grid/src/table/src/methods.ts index 9ca22e736..183e7efe2 100644 --- a/packages/vue/src/grid/src/table/src/methods.ts +++ b/packages/vue/src/grid/src/table/src/methods.ts @@ -26,6 +26,7 @@ import { getColumnList } from '@opentiny/vue-renderless/grid/utils' import { toDecimal } from '@opentiny/vue-renderless/common/string' import { addClass, removeClass, isDisplayNone } from '@opentiny/vue-renderless/common/deps/dom' import debounce from '@opentiny/vue-renderless/common/deps/debounce' +import { fastdom } from '@opentiny/vue-renderless/common/deps/fastdom' import { isNumber, filterTree, @@ -979,7 +980,7 @@ const Methods = { autoCellWidth(headerEl, bodyEl, footerEl) { // 列宽最少限制 40px let minCellWidth = 40 - let { fit, columnStore } = this + let { fit, columnStore, columnChart, isGroup } = this let tableHeight = bodyEl.offsetHeight let overflowY = bodyEl.scrollHeight > bodyEl.clientHeight let bodyW = bodyEl.clientWidth @@ -992,7 +993,7 @@ const Methods = { let parentHeight = this.parentHeight // 经过calcTableWidth计算出了所有列的宽度,下一步设置所有冻结列sticky布局的left和right值 - calcFixedStickyPosition({ headerEl, bodyEl, columnStore, scrollbarWidth }) + calcFixedStickyPosition({ headerEl, bodyEl, columnStore, scrollbarWidth, columnChart, isGroup }) Object.assign(this, { overflowY, parentHeight, scrollbarWidth, tableHeight, tableWidth }) if (headerEl) { @@ -1364,18 +1365,28 @@ const Methods = { setRowExpansion(rows, expanded) { let { expandeds } = this let { accordion } = this.expandConfig || {} + // 是否是切换模式 let isToggle = arguments.length === 1 + + // 手风琴模式是否关闭了所有展开行 + let isAccordionCloseAll = false + if (!rows) { return this.$nextTick().then(this.recalculate) } if (!isArray(rows)) { rows = [rows] } - // 只能同时展开一个 + // 手风琴模式只能同时展开一个 if (accordion) { - expandeds.length = 0 rows = rows.slice(rows.length - 1, rows.length) + + // 如果是手风琴模式,则需要判断是当前切换时关闭还是展开,解决手风琴模式无法关闭当前行的问题 + if (rows.length && isToggle) { + isAccordionCloseAll = expandeds.includes(rows[0]) + } + expandeds.length = 0 } rows.forEach((row) => { @@ -1387,7 +1398,7 @@ const Methods = { return } // 切换模式下此行未展开,或者非切换模式下展开已合起的行,就展开此行 - if ((isToggle && !~index) || (!isToggle && expanded && !~index)) { + if ((isToggle && !isAccordionCloseAll && !~index) || (!isToggle && expanded && !~index)) { expandeds.push(row) } }) @@ -1707,21 +1718,17 @@ const Methods = { } }, scrollTo(scrollLeft, scrollTop) { - let { $refs } = this - let { tableBody, tableFooter, rightBody } = $refs - let bodyElem = tableBody.$el - let footerElem = tableFooter ? tableFooter.$el : null - let rightBodyElem = rightBody ? rightBody.$el : null + const { elemStore } = this + const tableBodyElem = elemStore['main-body-wrapper'] + const tableHeaderElem = elemStore['main-header-wrapper'] + const tableFooterElem = elemStore['main-footer-wrapper'] if (isNumber(scrollLeft)) { - if (footerElem) { - footerElem.scrollLeft = scrollLeft - } else { - bodyElem.scrollLeft = scrollLeft - } + tableBodyElem && (tableBodyElem.scrollLeft = scrollLeft) + tableFooterElem && (tableFooterElem.scrollLeft = scrollLeft) + tableHeaderElem && (tableHeaderElem.scrollLeft = scrollLeft) } if (isNumber(scrollTop)) { - rightBodyElem && (rightBodyElem.scrollTop = scrollTop) - bodyElem.scrollTop = scrollTop + tableBodyElem && (tableBodyElem.scrollTop = scrollTop) } return this.$nextTick() }, @@ -1752,7 +1759,9 @@ const Methods = { scrollToColumn(column, isDelay, move) { let hasColCache = this.fullColumnMap.has(column) column && hasColCache && colToVisible(this, column, move) - return isDelay && this.scrollYLoad + + // 虚滚场景 DOM 元素会延时渲染,DOM 元素不存在时校验会显示异常 + return isDelay && (this.scrollXLoad || this.scrollYLoad) ? new Promise((resolve) => setTimeout(() => resolve(this.$nextTick()), 50)) : this.$nextTick() }, @@ -1760,16 +1769,16 @@ const Methods = { this.lastScrollTop = 0 }, clearScroll() { - let { $refs, scrollXStore, scrollYStore } = this + let { scrollXStore, scrollYStore, elemStore } = this Object.assign(this, { lastScrollLeft: 0 }) Object.assign(scrollXStore, { startIndex: 0, visibleIndex: 0 }) Object.assign(scrollYStore, { startIndex: 0, visibleIndex: 0 }) this.$nextTick(() => { - let { tableBody, tableHeader, tableFooter } = $refs - let { tableBodyElem, tableHeaderElem, tableFooterElem } = {} - tableBodyElem = tableBody ? tableBody.$el : null - tableHeaderElem = tableHeader ? tableHeader.$el : null - tableFooterElem = tableFooter ? tableFooter.$el : null + // 从缓存中拿 DOM 元素 + const tableBodyElem = elemStore['main-body-wrapper'] + const tableHeaderElem = elemStore['main-header-wrapper'] + const tableFooterElem = elemStore['main-footer-wrapper'] + if (this.afterMounted) { tableBodyElem && Object.assign(tableBodyElem, { scrollLeft: 0, scrollTop: 0 }) tableFooterElem && Object.assign(tableFooterElem, { scrollLeft: 0 }) @@ -1950,10 +1959,12 @@ const Methods = { // 更新表体高度 updateTableBodyHeight() { if (!this.tasks.updateTableBodyHeight) { - this.tasks.updateTableBodyHeight = debounce(10, () => { - const tableBody = this.$refs.tableBody - this.tableBodyHeight = tableBody ? tableBody.$el.clientHeight : 0 - }) + this.tasks.updateTableBodyHeight = () => { + fastdom.measure(() => { + const tableBodyElem = this.elemStore['main-body-wrapper'] + this.tableBodyHeight = tableBodyElem ? tableBodyElem.clientHeight : 0 + }) + } } this.tasks.updateTableBodyHeight() diff --git a/packages/vue/src/grid/src/table/src/strategy.ts b/packages/vue/src/grid/src/table/src/strategy.ts index 0bc1e184b..0e5bd6e51 100644 --- a/packages/vue/src/grid/src/table/src/strategy.ts +++ b/packages/vue/src/grid/src/table/src/strategy.ts @@ -1,4 +1,5 @@ import { getRowkey } from '@opentiny/vue-renderless/grid/utils' +import { warn } from '../../tools' const TEMPORARY_CHILDREN = '_$children_' const TEMPORARY_SHOW = '_$show_' @@ -249,6 +250,7 @@ const sliceColumnTree = (_vm) => { const { collectColumn } = _vm const columnChart = [] const stack = [] + const fixedMap = new WeakMap() let maxLevel = 1 const buildColumnChart = (columns, columnChart, stack) => { @@ -259,12 +261,33 @@ const sliceColumnTree = (_vm) => { column.rowSpan = 1 column.colSpan = 1 + if (stack.length === 0) { + fixedMap.set(column, column.fixed || '') + } + if (Array.isArray(column.children) && column.children.length) { stack.push(column) buildColumnChart(column.children, columnChart, stack) stack.pop() } else { - columnChart.push([...stack, column]) + const chartItem = [...stack, column] + + columnChart.push(chartItem) + + if (chartItem.length > 1) { + chartItem.slice(1).forEach(({ fixed }) => { + const rootColumn = chartItem[0] + const cachedFixed = fixedMap.get(rootColumn) + + if (fixed) { + if (cachedFixed && cachedFixed !== fixed) { + warn('ui.grid.error.groupColumnFixedError') + } else if (!cachedFixed) { + fixedMap.set(rootColumn, fixed) + } + } + }) + } } } } @@ -294,9 +317,21 @@ const sliceColumnTree = (_vm) => { } } + // 如果多表头子树上存在一个冻结列,那么所有列都应该是此种冻结 + const tryRepairFixedType = (chart) => { + chart.forEach((item) => { + const rootColumn = item[0] + item.forEach((col) => { + col.fixed = fixedMap.get(rootColumn) + }) + }) + } + buildColumnChart(collectColumn, columnChart, stack) setColumnRowSpan(columnChart) + tryRepairFixedType(columnChart) + _vm.columnChart = columnChart return () => { const { tableColumn } = _vm const levelColumns = [] diff --git a/packages/vue/src/grid/src/table/src/table.ts b/packages/vue/src/grid/src/table/src/table.ts index 75e20301b..ebe512c97 100644 --- a/packages/vue/src/grid/src/table/src/table.ts +++ b/packages/vue/src/grid/src/table/src/table.ts @@ -22,7 +22,7 @@ * SOFTWARE. * */ -import { h, hooks, $prefix, resolveTheme } from '@opentiny/vue-common' +import { h, hooks, $prefix, resolveTheme, defineComponent } from '@opentiny/vue-common' import Tooltip from '@opentiny/vue-tooltip' import { extend } from '@opentiny/vue-renderless/common/object' import { isEmptyObject, isObject, isNull } from '@opentiny/vue-renderless/common/type' @@ -556,7 +556,25 @@ const getTableData = () => { return tableData } -export default { +const bindEvent = (ctx) => { + GlobalEvent.on(ctx, 'mousedown', ctx.handleGlobalMousedownEvent) + GlobalEvent.on(ctx, 'blur', ctx.handleGlobalBlurEvent) + GlobalEvent.on(ctx, 'mousewheel', ctx.handleGlobalMousewheelEvent) + GlobalEvent.on(ctx, 'keydown', ctx.handleGlobalKeydownEvent) + GlobalEvent.on(ctx, 'resize', ctx.handleGlobalResizeEvent) + GlobalEvent.on(ctx, 'contextmenu', ctx.handleGlobalContextmenuEvent) +} + +const unbindEvent = (table) => { + GlobalEvent.off(table, 'mousedown') + GlobalEvent.off(table, 'blur') + GlobalEvent.off(table, 'mousewheel') + GlobalEvent.off(table, 'keydown') + GlobalEvent.off(table, 'resize') + GlobalEvent.off(table, 'contextmenu') +} + +export default defineComponent({ name: `${$prefix}GridTable`, props: { // 所有的列对齐方式 @@ -892,12 +910,7 @@ export default { // 处理拖拽的逻辑 initDrop(this) - GlobalEvent.on(this, 'mousedown', this.handleGlobalMousedownEvent) - GlobalEvent.on(this, 'blur', this.handleGlobalBlurEvent) - GlobalEvent.on(this, 'mousewheel', this.handleGlobalMousewheelEvent) - GlobalEvent.on(this, 'keydown', this.handleGlobalKeydownEvent) - GlobalEvent.on(this, 'resize', this.handleGlobalResizeEvent) - GlobalEvent.on(this, 'contextmenu', this.handleGlobalContextmenuEvent) + bindEvent(this) // vue3下额外监控数组长度改变,解决push无响应等问题 this.watchDataForVue3() @@ -906,6 +919,12 @@ export default { this.$grid.connect({ name: 'table', vm: this }) }, mounted() { + // 复杂场景下,当表格刚开始挂载就被用户使用v-if销毁,会导致$refs全部被清空 + if (this.$refs.tableWrapper) { + // 在body上挂载弹出框类的表格内部组件:右键菜单、筛选框、提示 + document.body.appendChild(this.$refs.tableWrapper) + } + this.$nextTick().then(() => { this.afterMounted = true @@ -913,12 +932,6 @@ export default { // 使用ResizeObserver监听表格父元素尺寸,然后动态计算表格各种尺寸 this.bindResize() } - - // 复杂场景下,当表格刚开始挂载就被用户使用v-if销毁,会导致$refs全部被清空 - if (this.$refs.tableWrapper) { - // 在body上挂载弹出框类的表格内部组件:右键菜单、筛选框、提示 - document.body.appendChild(this.$refs.tableWrapper) - } }) setTimeout(() => { @@ -928,13 +941,15 @@ export default { }) }, activated() { - let { lastScrollLeft, lastScrollTop } = this + let { lastScrollLeft, lastScrollTop, scrollXLoad, scrollYLoad } = this if (lastScrollLeft || lastScrollTop) { - this.clearScroll() - .then(this.recalculate) - .then(() => this.scrollTo(lastScrollLeft, lastScrollTop)) + this.scrollTo(lastScrollLeft, lastScrollTop) + scrollXLoad && this.triggerScrollXEvent() + scrollYLoad && this.triggerScrollYEvent({ target: { scrollTop: lastScrollTop } }) } + + bindEvent(this) }, setup(props, context) { const { slots, attrs, listeners } = context @@ -971,15 +986,14 @@ export default { } }) - GlobalEvent.off(table, 'mousedown') - GlobalEvent.off(table, 'blur') - GlobalEvent.off(table, 'mousewheel') - GlobalEvent.off(table, 'keydown') - GlobalEvent.off(table, 'resize') - GlobalEvent.off(table, 'contextmenu') + unbindEvent(table) clearOnTableUnmount(table) }) + hooks.onDeactivated(() => { + unbindEvent(table) + }) + const tableListeners = getListeners(attrs, listeners) return { slots, tableListeners, tinyTheme } @@ -1055,4 +1069,4 @@ export default { return (this as any).$grid.viewCls(module) } } -} +}) diff --git a/packages/vue/src/grid/src/table/src/utils/autoCellWidth.ts b/packages/vue/src/grid/src/table/src/utils/autoCellWidth.ts index 19bed0cf7..b76318639 100644 --- a/packages/vue/src/grid/src/table/src/utils/autoCellWidth.ts +++ b/packages/vue/src/grid/src/table/src/utils/autoCellWidth.ts @@ -145,9 +145,61 @@ const setLeftOrRightPosition = ({ columnList, direction, headerEl, bodyEl, scrol }, 0) } -export const calcFixedStickyPosition = ({ headerEl, bodyEl, columnStore, scrollbarWidth }) => { +// 设置分组父表头冻结列sticky布局的left和right值 +const setGroupHeaderPosition = ({ columnChart, direction }) => { + // 这里需要浅拷贝一份,避免改变原始数据的顺序 + const colChart = columnChart.slice() + + // 如果是右测冻结则需要反转数组后再进行循环 + if (direction === 'right') { + colChart.reverse() + } + + colChart.forEach((columns) => { + const len = columns.length + if (len === 1) { + return + } + + const leafColumn = columns[len - 1] + const leafDirectionPos = leafColumn?.style?.[direction] ?? null + + if (leafDirectionPos !== null) { + columns.forEach((column) => { + column.style = column.style || {} + const pos = column.style[direction] ?? null + if (pos === null) { + column.style[direction] = leafDirectionPos + } + }) + } + }) +} + +// 设置分组父表头冻结列是否左侧最后一项,或者是否右侧第一项 +const setGroupHeaderLastOrFirst = ({ columnChart, leftList, rightList }) => { + columnChart.forEach((columns) => { + const len = columns.length + const leafColumn = columns[len - 1] + + const isFixedLeftLast = leftList[leftList.length - 1] === leafColumn + const isFixedRightFirst = rightList[0] === leafColumn + + columns.forEach((column) => { + column.isFixedLeftLast = column.isFixedLeftLast || isFixedLeftLast + column.isFixedRightFirst = column.isFixedRightFirst || isFixedRightFirst + }) + }) +} + +export const calcFixedStickyPosition = ({ headerEl, bodyEl, columnStore, scrollbarWidth, columnChart, isGroup }) => { // 获取左侧和右侧冻结列 const { leftList, rightList } = columnStore setLeftOrRightPosition({ columnList: leftList, direction: 'left', headerEl, bodyEl, scrollbarWidth }) setLeftOrRightPosition({ columnList: rightList, direction: 'right', headerEl, bodyEl, scrollbarWidth }) + if (isGroup) { + setGroupHeaderPosition({ columnChart, direction: 'left' }) + setGroupHeaderPosition({ columnChart, direction: 'right' }) + setGroupHeaderLastOrFirst({ columnChart, leftList, rightList }) + } } diff --git a/packages/vue/src/grid/src/tools/formatter.ts b/packages/vue/src/grid/src/tools/formatter.ts index 4a5dc2c42..5bef0f484 100644 --- a/packages/vue/src/grid/src/tools/formatter.ts +++ b/packages/vue/src/grid/src/tools/formatter.ts @@ -180,6 +180,13 @@ export default { return (h) => h('div', { class: 'data-ellipsis' }, [h('span', { domProps: { title: value } }, truncate(value, format.len))]) }, + /** + * rate 渲染器的计算规则: + * 如果配置了 max,就按照 value / max 计算样式百分比,按照 value / 1 计算显示百分比; + * 如果未配置 max,就按照 value / total 计算样式百分比和显示百分比; + * @param {Number} value + * @returns Function + */ rate(value) { const format = { fraction: 2, @@ -190,17 +197,34 @@ export default { const { rateMethod } = format let rate - if (typeof rateMethod === 'function') { - rate = rateMethod.call(this, value, format) - } else { - rate = toRate(value, format.total, format.fraction) + let formatTotal = format.total + + const getLengthRate = (value, config) => { + let lengthRate + + if (config.max && typeof config.max === 'number' && typeof value === 'number') { + // 如果配置了 max 那么 formatTotal 就必须是 1 + formatTotal = 1 + lengthRate = toRate(value / config.max, formatTotal, format.fraction) + } + + return lengthRate } + let lengthRate = getLengthRate(value, format) + + if (typeof rateMethod === 'function') { + rate = rateMethod.call(this, value, Object.assign({ formatTotal }, format)) + } else { + rate = toRate(value, formatTotal, format.fraction) + } + lengthRate = lengthRate || rate + let section = format.section let css = '' if (section) { - let rateValue = parseInt(rate, 10) + let rateValue = parseInt(lengthRate, 10) if (!isNumber(rateValue)) { return rate @@ -228,7 +252,7 @@ export default { h('div', { class: 'tiny-grid__data-rate' }, [ h('div', { class: `tiny-grid__rate-chart${css}`, - style: { width: rate } + style: { width: lengthRate } }), h('span', { class: 'tiny-grid__rate-text' }, rate) ]) @@ -241,7 +265,7 @@ export default { noFork: false } const format = Object.assign(defaultFormat, this.own.formatConfig) - const cellValue = !isNull(format.trueValue) ? value == format.trueValue : toBoolValue(value) + const cellValue = !isNull(format.trueValue) ? value === format.trueValue : toBoolValue(value) if (!format.htmlView) { return cellValue diff --git a/packages/vue/src/grid/src/validator/src/methods.ts b/packages/vue/src/grid/src/validator/src/methods.ts index 6bf458be2..48153d3f0 100644 --- a/packages/vue/src/grid/src/validator/src/methods.ts +++ b/packages/vue/src/grid/src/validator/src/methods.ts @@ -79,14 +79,17 @@ const onRejected = (opt, _this) => { const posAndFinish = funcPosAndFinish(params, finish) const locatRow = getLocatRow(params) + // 是否触发校验时自动定位到当前校验的单元格 const isAutoPosFalse = _this.validOpts.autoPos === false isAutoPosFalse && finish() + // 自动滚动到校验不通过的树表单元格 !isAutoPosFalse && treeConfig && _this.scrollToTreeRow(locatRow).then(posAndFinish) - // 自动滚动到校验不通过的表格单元格 - !isAutoPosFalse && !treeConfig && _this.scrollToRow(locatRow, true).then(posAndFinish) + + // 自动滚动到校验不通过的表格单元格。调用方式优化:this.scrollToRow(locatRow, true) 第二个 true 参数会导致后续 colToVisible 不会被调用 + !isAutoPosFalse && !treeConfig && _this.scrollToRow(locatRow, params.column, true).then(posAndFinish) }) } } diff --git a/packages/vue/src/guide/package.json b/packages/vue/src/guide/package.json index 4a92cff09..11b799ebe 100644 --- a/packages/vue/src/guide/package.json +++ b/packages/vue/src/guide/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-guide", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -18,4 +18,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/guide/src/index.ts b/packages/vue/src/guide/src/index.ts index cc5119779..c550cfe2e 100644 --- a/packages/vue/src/guide/src/index.ts +++ b/packages/vue/src/guide/src/index.ts @@ -1,8 +1,8 @@ -import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common' import browser from '@opentiny/vue-renderless/common/browser' import template from 'virtual-template?pc' -export default { +export default defineComponent({ name: $prefix + 'Guide', props: { ...$props, @@ -55,4 +55,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/hrapprover/package.json b/packages/vue/src/hrapprover/package.json index 61b0afe19..d5552e84a 100644 --- a/packages/vue/src/hrapprover/package.json +++ b/packages/vue/src/hrapprover/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-hrapprover", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -25,4 +25,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/image-viewer/package.json b/packages/vue/src/image-viewer/package.json index 9d4dbba8f..c056b40fb 100644 --- a/packages/vue/src/image-viewer/package.json +++ b/packages/vue/src/image-viewer/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-image-viewer", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -26,4 +26,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/image-viewer/src/index.ts b/packages/vue/src/image-viewer/src/index.ts index 8264d358d..a86cd3ac8 100644 --- a/packages/vue/src/image-viewer/src/index.ts +++ b/packages/vue/src/image-viewer/src/index.ts @@ -111,6 +111,10 @@ export default defineComponent({ bgColor: { type: String, default: 'bg-color-icon-primary' + }, + keepStyle: { + type: Boolean, + default: false } }, setup(props, context) { diff --git a/packages/vue/src/image-viewer/src/mobile-first.vue b/packages/vue/src/image-viewer/src/mobile-first.vue index 29a0c8412..4d946fdff 100644 --- a/packages/vue/src/image-viewer/src/mobile-first.vue +++ b/packages/vue/src/image-viewer/src/mobile-first.vue @@ -408,7 +408,8 @@ export default defineComponent({ 'isMenuView', 'modalView', 'modalHeight', - 'bgColor' + 'bgColor', + 'keepStyle' ], components: { TinyActionSheet: ActionSheet, diff --git a/packages/vue/src/image-viewer/src/pc.vue b/packages/vue/src/image-viewer/src/pc.vue index 912679868..c5fcdf712 100644 --- a/packages/vue/src/image-viewer/src/pc.vue +++ b/packages/vue/src/image-viewer/src/pc.vue @@ -11,7 +11,12 @@ --> @@ -61,7 +67,7 @@ export default defineComponent({ ImageViewer, Teleport }, - emits: ['load', 'error', 'delete'], + emits: ['load', 'error', 'delete', 'change-index'], props: [ ...props, 'src', @@ -74,7 +80,8 @@ export default defineComponent({ 'showHover', 'previewVisible', 'round', - 'imageSize' + 'imageSize', + 'keepStyle' ], setup(props, context): any { return setup({ diff --git a/packages/vue/src/image/src/pc.vue b/packages/vue/src/image/src/pc.vue index 97b08e243..16b11cfb8 100644 --- a/packages/vue/src/image/src/pc.vue +++ b/packages/vue/src/image/src/pc.vue @@ -34,9 +34,16 @@ ref="imageViewer" :z-index="zIndex" v-if="state.getPreview && state.showViewer" + :on-switch="handleSwitch" :on-close="closeViewer" :url-list="previewSrcList" - /> + :keep-style="keepStyle" + :show-index="showIndex" + > + +
  • @@ -52,8 +59,8 @@ export default defineComponent({ ImageViewer, Teleport }, - emits: ['load', 'error', 'delete'], - props: [...props, 'src', 'fit', 'lazy', 'scrollContainer', 'previewSrcList', 'zIndex'], + emits: ['load', 'error', 'delete', 'change-index'], + props: [...props, 'src', 'fit', 'lazy', 'scrollContainer', 'previewSrcList', 'zIndex', 'keepStyle', 'showIndex'], setup(props, context) { return setup({ props, context, renderless, api }) as unknown as IImageApi } diff --git a/packages/vue/src/index-bar-anchor/package.json b/packages/vue/src/index-bar-anchor/package.json index 5403781f7..6dd347287 100644 --- a/packages/vue/src/index-bar-anchor/package.json +++ b/packages/vue/src/index-bar-anchor/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-index-bar-anchor", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -15,10 +15,9 @@ "//postversion": "pnpm build" }, "dependencies": { - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-common": "workspace:~", "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/index-bar/package.json b/packages/vue/src/index-bar/package.json index 2b2f15252..410f332b7 100644 --- a/packages/vue/src/index-bar/package.json +++ b/packages/vue/src/index-bar/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-index-bar", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -15,10 +15,9 @@ "//postversion": "pnpm build" }, "dependencies": { - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-common": "workspace:~", "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/input/package.json b/packages/vue/src/input/package.json index d7a568e1c..d58da32c1 100644 --- a/packages/vue/src/input/package.json +++ b/packages/vue/src/input/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-input", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -24,4 +24,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/input/src/index.ts b/packages/vue/src/input/src/index.ts index 9562d7c3e..857bb8867 100644 --- a/packages/vue/src/input/src/index.ts +++ b/packages/vue/src/input/src/index.ts @@ -33,7 +33,8 @@ export const $constants = { COMPONENT_NAME: { FormItem: 'FormItem' }, - MASKSYMBOL: '******' + MASKSYMBOL: '******', + TEXTAREA_HEIGHT_MOBILE: 108 } export const inputProps = { diff --git a/packages/vue/src/input/src/mobile.vue b/packages/vue/src/input/src/mobile.vue index b4d832197..9fa6d5c05 100644 --- a/packages/vue/src/input/src/mobile.vue +++ b/packages/vue/src/input/src/mobile.vue @@ -126,28 +126,35 @@
    - - +
    + +
    {{ diff --git a/packages/vue/src/input/src/tall-storage.vue b/packages/vue/src/input/src/tall-storage.vue index 8494a32df..611cdf544 100644 --- a/packages/vue/src/input/src/tall-storage.vue +++ b/packages/vue/src/input/src/tall-storage.vue @@ -28,11 +28,11 @@ diff --git a/packages/vue/src/ip-address/package.json b/packages/vue/src/ip-address/package.json index d2447562d..c5c7b05e6 100644 --- a/packages/vue/src/ip-address/package.json +++ b/packages/vue/src/ip-address/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-ip-address", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/label/package.json b/packages/vue/src/label/package.json index 8ff99e2ca..52e813f89 100644 --- a/packages/vue/src/label/package.json +++ b/packages/vue/src/label/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-label", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/layout/package.json b/packages/vue/src/layout/package.json index d91406ebf..18a24aa5b 100644 --- a/packages/vue/src/layout/package.json +++ b/packages/vue/src/layout/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-layout", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/link-menu/package.json b/packages/vue/src/link-menu/package.json index 6b2a50961..8704d2f62 100644 --- a/packages/vue/src/link-menu/package.json +++ b/packages/vue/src/link-menu/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-link-menu", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -25,4 +25,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/link/package.json b/packages/vue/src/link/package.json index 4eabfa43c..629e0a36e 100644 --- a/packages/vue/src/link/package.json +++ b/packages/vue/src/link/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-link", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/list/package.json b/packages/vue/src/list/package.json index 2a60f09b8..11e9d5055 100644 --- a/packages/vue/src/list/package.json +++ b/packages/vue/src/list/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-list", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/loading/package.json b/packages/vue/src/loading/package.json index 9e2334fcc..a96d51c5f 100644 --- a/packages/vue/src/loading/package.json +++ b/packages/vue/src/loading/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-loading", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -16,11 +16,9 @@ }, "dependencies": { "@opentiny/vue-common": "workspace:~", - "@opentiny/vue-icon": "workspace:~", "@opentiny/vue-renderless": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-theme": "workspace:~", "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/locales/package.json b/packages/vue/src/locales/package.json index f2344f32a..ede7b0638 100644 --- a/packages/vue/src/locales/package.json +++ b/packages/vue/src/locales/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-locales", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -23,4 +23,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/logon-user/package.json b/packages/vue/src/logon-user/package.json index 8ebd59f1c..6dc9185f4 100644 --- a/packages/vue/src/logon-user/package.json +++ b/packages/vue/src/logon-user/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-logon-user", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -19,4 +19,4 @@ "@opentiny/vue-renderless": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/logout/package.json b/packages/vue/src/logout/package.json index ba1bc834b..39a502082 100644 --- a/packages/vue/src/logout/package.json +++ b/packages/vue/src/logout/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-logout", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -16,9 +16,8 @@ }, "dependencies": { "@opentiny/vue-renderless": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-theme": "workspace:~", "@opentiny/vue-common": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/mask/package.json b/packages/vue/src/mask/package.json index 841d7454b..7abc232a5 100644 --- a/packages/vue/src/mask/package.json +++ b/packages/vue/src/mask/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-mask", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/menu/package.json b/packages/vue/src/menu/package.json index ca8e06ffe..50e0ebe13 100644 --- a/packages/vue/src/menu/package.json +++ b/packages/vue/src/menu/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-menu", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-exception": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/message/package.json b/packages/vue/src/message/package.json index 4fe89d44a..4dd6a5cb1 100644 --- a/packages/vue/src/message/package.json +++ b/packages/vue/src/message/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-message", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -9,9 +9,7 @@ "dependencies": { "@opentiny/vue-common": "workspace:~", "@opentiny/vue-modal": "workspace:~", - "@opentiny/vue-renderless": "workspace:~", - "@opentiny/vue-theme": "workspace:~", - "@opentiny/vue-theme-mobile": "workspace:~" + "@opentiny/vue-renderless": "workspace:~" }, "license": "MIT", "devDependencies": { @@ -22,4 +20,4 @@ "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" } -} +} \ No newline at end of file diff --git a/packages/vue/src/milestone/package.json b/packages/vue/src/milestone/package.json index 7a4cebd99..d3818a637 100644 --- a/packages/vue/src/milestone/package.json +++ b/packages/vue/src/milestone/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-milestone", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/mind-map/package.json b/packages/vue/src/mind-map/package.json index 4e446c072..032550990 100644 --- a/packages/vue/src/mind-map/package.json +++ b/packages/vue/src/mind-map/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-mind-map", - "version": "5.12.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -8,12 +8,9 @@ "type": "module", "dependencies": { "@opentiny/vue-common": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-renderless": "workspace:~", - "@opentiny/vue-theme": "workspace:~" - }, - "license": "MIT", - "devDependencies": { + "@opentiny/vue-theme": "workspace:~", "mind-elixir": "^3.3.2" - } -} + }, + "license": "MIT" +} \ No newline at end of file diff --git a/packages/vue/src/mini-picker/package.json b/packages/vue/src/mini-picker/package.json index 77aab97fa..8e99ec9d8 100644 --- a/packages/vue/src/mini-picker/package.json +++ b/packages/vue/src/mini-picker/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-mini-picker", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/modal/package.json b/packages/vue/src/modal/package.json index 1b95276fd..913881958 100644 --- a/packages/vue/src/modal/package.json +++ b/packages/vue/src/modal/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-modal", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,11 +20,10 @@ "@opentiny/vue-button": "workspace:~", "@opentiny/vue-checkbox": "workspace:~", "@opentiny/vue-checkbox-group": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-popconfirm": "workspace:~", "@opentiny/vue-icon": "workspace:~", "@opentiny/vue-theme-mobile": "workspace:~", "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/month-range/package.json b/packages/vue/src/month-range/package.json index 341afc69a..315c1f9de 100644 --- a/packages/vue/src/month-range/package.json +++ b/packages/vue/src/month-range/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-month-range", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -17,10 +17,9 @@ "dependencies": { "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-common": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-month-table": "workspace:~", "@opentiny/vue-theme": "workspace:~", "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/month-table/package.json b/packages/vue/src/month-table/package.json index b231347fa..4b1a7c9a1 100644 --- a/packages/vue/src/month-table/package.json +++ b/packages/vue/src/month-table/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-month-table", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -17,8 +17,7 @@ "dependencies": { "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-common": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/multi-select-item/package.json b/packages/vue/src/multi-select-item/package.json index a80f270f8..769487c73 100644 --- a/packages/vue/src/multi-select-item/package.json +++ b/packages/vue/src/multi-select-item/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-multi-select-item", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -17,10 +17,9 @@ "dependencies": { "@opentiny/vue-common": "workspace:~", "@opentiny/vue-renderless": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-icon": "workspace:~", "@opentiny/vue-button": "workspace:~", "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/multi-select/package.json b/packages/vue/src/multi-select/package.json index c723642b8..edcd1dffd 100644 --- a/packages/vue/src/multi-select/package.json +++ b/packages/vue/src/multi-select/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-multi-select", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -27,4 +27,4 @@ "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/nav-bar/package.json b/packages/vue/src/nav-bar/package.json index e774c24e2..07f2a4b0b 100644 --- a/packages/vue/src/nav-bar/package.json +++ b/packages/vue/src/nav-bar/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-nav-bar", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -15,10 +15,9 @@ "//postversion": "pnpm build" }, "dependencies": { - "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-common": "workspace:~", "@opentiny/vue-theme-mobile": "workspace:~", "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/nav-menu/package.json b/packages/vue/src/nav-menu/package.json index 7d528c73b..3a1270dc9 100644 --- a/packages/vue/src/nav-menu/package.json +++ b/packages/vue/src/nav-menu/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-nav-menu", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -17,10 +17,9 @@ "dependencies": { "@opentiny/vue-common": "workspace:~", "@opentiny/vue-renderless": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-tooltip": "workspace:~", "@opentiny/vue-theme": "workspace:~", "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/notify/package.json b/packages/vue/src/notify/package.json index b9d2a95d1..a8f0a7cad 100644 --- a/packages/vue/src/notify/package.json +++ b/packages/vue/src/notify/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-notify", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/numeric/package.json b/packages/vue/src/numeric/package.json index a050113f6..91784f9d8 100644 --- a/packages/vue/src/numeric/package.json +++ b/packages/vue/src/numeric/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-numeric", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -26,4 +26,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/numeric/src/index.ts b/packages/vue/src/numeric/src/index.ts index 14b5d76b2..1b07b3a84 100644 --- a/packages/vue/src/numeric/src/index.ts +++ b/packages/vue/src/numeric/src/index.ts @@ -46,6 +46,9 @@ export const numericProps = { type: Boolean, default: false }, + emptyValue: { + default: undefined + }, circulate: Boolean, controls: { type: Boolean, diff --git a/packages/vue/src/numeric/src/mobile-first.vue b/packages/vue/src/numeric/src/mobile-first.vue index dcd1bc52a..fc2b466f8 100644 --- a/packages/vue/src/numeric/src/mobile-first.vue +++ b/packages/vue/src/numeric/src/mobile-first.vue @@ -155,6 +155,7 @@ export default defineComponent({ 'mouseWheel', 'validateEvent', 'allowEmpty', + 'emptyValue', 'format', 'unit', 'stringMode', diff --git a/packages/vue/src/numeric/src/pc.vue b/packages/vue/src/numeric/src/pc.vue index 004d2d742..f14d8aa7a 100644 --- a/packages/vue/src/numeric/src/pc.vue +++ b/packages/vue/src/numeric/src/pc.vue @@ -238,6 +238,7 @@ export default defineComponent({ 'mouseWheel', 'validateEvent', 'allowEmpty', + 'emptyValue', 'format', 'unit', 'stringMode', diff --git a/packages/vue/src/option-group/package.json b/packages/vue/src/option-group/package.json index 14e04af94..9a393e896 100644 --- a/packages/vue/src/option-group/package.json +++ b/packages/vue/src/option-group/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-option-group", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/option-group/src/index.ts b/packages/vue/src/option-group/src/index.ts index 991063d18..80845684c 100644 --- a/packages/vue/src/option-group/src/index.ts +++ b/packages/vue/src/option-group/src/index.ts @@ -1,7 +1,7 @@ -import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?pc|mobile-first' -export default { +export default defineComponent({ name: $prefix + 'OptionGroup', componentName: 'OptionGroup', props: { @@ -15,4 +15,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/option-group/src/mobile-first.vue b/packages/vue/src/option-group/src/mobile-first.vue index 78d1d49ff..bd7b24152 100644 --- a/packages/vue/src/option-group/src/mobile-first.vue +++ b/packages/vue/src/option-group/src/mobile-first.vue @@ -16,12 +16,12 @@ diff --git a/packages/vue/src/option-group/src/pc.vue b/packages/vue/src/option-group/src/pc.vue index 1fb412dc7..67bf979d8 100644 --- a/packages/vue/src/option-group/src/pc.vue +++ b/packages/vue/src/option-group/src/pc.vue @@ -5,7 +5,7 @@ {{ label }}
  • -
      +
      diff --git a/packages/vue/src/option/package.json b/packages/vue/src/option/package.json index 571d172f8..0e5e155b2 100644 --- a/packages/vue/src/option/package.json +++ b/packages/vue/src/option/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-option", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/option/src/index.ts b/packages/vue/src/option/src/index.ts index a81715f8d..51fabb48a 100644 --- a/packages/vue/src/option/src/index.ts +++ b/packages/vue/src/option/src/index.ts @@ -1,4 +1,4 @@ -import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?pc|mobile-first' export const optionsProps = { @@ -29,11 +29,11 @@ export const optionsProps = { icon: Object } -export default { +export default defineComponent({ name: $prefix + 'Option', componentName: 'Option', props: optionsProps, setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/option/src/mobile-first.vue b/packages/vue/src/option/src/mobile-first.vue index 2e15cebc3..ec5a9f8d5 100644 --- a/packages/vue/src/option/src/mobile-first.vue +++ b/packages/vue/src/option/src/mobile-first.vue @@ -51,10 +51,10 @@ diff --git a/packages/vue/src/pager-item/package.json b/packages/vue/src/pager-item/package.json index 112ccf35b..c9ffdf760 100644 --- a/packages/vue/src/pager-item/package.json +++ b/packages/vue/src/pager-item/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-pager-item", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -17,8 +17,7 @@ "dependencies": { "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-icon": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-common": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/pager-item/src/index.ts b/packages/vue/src/pager-item/src/index.ts index 20f557cb6..cfd3cdb1f 100644 --- a/packages/vue/src/pager-item/src/index.ts +++ b/packages/vue/src/pager-item/src/index.ts @@ -1,8 +1,8 @@ -import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common' import { IconPopup, IconDoubleLeft, IconDoubleRight } from '@opentiny/vue-icon' import template from 'virtual-template?pc|mobile-first' -export default { +export default defineComponent({ name: $prefix + 'PagerItem', props: { ...$props, @@ -30,4 +30,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/pager/package.json b/packages/vue/src/pager/package.json index 454615cc4..0a62b5974 100644 --- a/packages/vue/src/pager/package.json +++ b/packages/vue/src/pager/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-pager", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -18,11 +18,10 @@ "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-icon": "workspace:~", "@opentiny/vue-popover": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-pager-item": "workspace:~", "@opentiny/vue-loading": "workspace:~", "@opentiny/vue-theme": "workspace:~", "@opentiny/vue-common": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/panel/package.json b/packages/vue/src/panel/package.json index 0c65c71c2..7e6f37b6c 100644 --- a/packages/vue/src/panel/package.json +++ b/packages/vue/src/panel/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-panel", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "@opentiny/vue-renderless": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/picker-column/package.json b/packages/vue/src/picker-column/package.json index 45fc3b1ae..e6099dd12 100644 --- a/packages/vue/src/picker-column/package.json +++ b/packages/vue/src/picker-column/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-picker-column", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/picker/package.json b/packages/vue/src/picker/package.json index 33639355e..9b3d6d043 100644 --- a/packages/vue/src/picker/package.json +++ b/packages/vue/src/picker/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-picker", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -18,7 +18,6 @@ "@opentiny/vue-common": "workspace:~", "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-input": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-date-panel": "workspace:~", "@opentiny/vue-date-range": "workspace:~", "@opentiny/vue-month-range": "workspace:~", @@ -35,4 +34,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/picker/src/index.ts b/packages/vue/src/picker/src/index.ts index d7e7230af..01b6466b3 100644 --- a/packages/vue/src/picker/src/index.ts +++ b/packages/vue/src/picker/src/index.ts @@ -1,8 +1,8 @@ -import { $prefix, $props, $setup } from '@opentiny/vue-common' +import { $prefix, $props, $setup, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?pc|mobile-first' import { pickerProps } from './type' -export default { +export default defineComponent({ name: $prefix + 'Picker', componentName: 'Picker', props: { @@ -12,4 +12,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/picker/src/mobile-first.vue b/packages/vue/src/picker/src/mobile-first.vue index 6f4c99144..c653567b7 100644 --- a/packages/vue/src/picker/src/mobile-first.vue +++ b/packages/vue/src/picker/src/mobile-first.vue @@ -236,7 +236,7 @@ diff --git a/packages/vue/src/pop-upload/package.json b/packages/vue/src/pop-upload/package.json index de7d288fe..a9f71e20c 100644 --- a/packages/vue/src/pop-upload/package.json +++ b/packages/vue/src/pop-upload/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-pop-upload", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -25,4 +25,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/popconfirm/package.json b/packages/vue/src/popconfirm/package.json index eaf120d45..4cecdea0f 100644 --- a/packages/vue/src/popconfirm/package.json +++ b/packages/vue/src/popconfirm/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-popconfirm", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -10,11 +10,9 @@ "@opentiny/vue-button": "workspace:~", "@opentiny/vue-common": "workspace:~", "@opentiny/vue-icon": "workspace:~", - "@opentiny/vue-modal": "workspace:~", "@opentiny/vue-popover": "workspace:~", "@opentiny/vue-renderless": "workspace:~", - "@opentiny/vue-theme": "workspace:~", - "@opentiny/vue-theme-mobile": "workspace:~" + "@opentiny/vue-theme": "workspace:~" }, "license": "MIT", "devDependencies": { @@ -25,4 +23,4 @@ "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" } -} +} \ No newline at end of file diff --git a/packages/vue/src/popconfirm/src/index.ts b/packages/vue/src/popconfirm/src/index.ts index 9a48c7791..a2feff35d 100644 --- a/packages/vue/src/popconfirm/src/index.ts +++ b/packages/vue/src/popconfirm/src/index.ts @@ -45,6 +45,10 @@ export const popConfirmProps = { type: Boolean, default: true }, + closeOnClickOutside: { + type: Boolean, + default: true + }, title: String, placement: { type: String, @@ -53,7 +57,11 @@ export const popConfirmProps = { width: [String, Number], type: [String, Object], reference: {}, - events: Object + events: Object, + popperAppendToBody: { + type: Boolean, + default: true + } } export default defineComponent({ diff --git a/packages/vue/src/popconfirm/src/mobile-first.vue b/packages/vue/src/popconfirm/src/mobile-first.vue index 8ac7b0c15..97a6ce20b 100644 --- a/packages/vue/src/popconfirm/src/mobile-first.vue +++ b/packages/vue/src/popconfirm/src/mobile-first.vue @@ -9,6 +9,7 @@ :width="width" :title="title" :popper-class="m('min-w-[theme(spacing.44)] max-w-[theme(spacing.96)]', customClass)" + :append-to-body="popperAppendToBody" :reference="reference" @show="handleEmit('show')" @hide="handleEmit('hide')" @@ -122,6 +123,10 @@ export default defineComponent({ type: Boolean, default: true }, + closeOnClickOutside: { + type: Boolean, + default: true + }, title: String, placement: { type: String, @@ -133,7 +138,11 @@ export default defineComponent({ }, type: [String, Object], reference: {}, - events: Object + events: Object, + popperAppendToBody: { + type: Boolean, + default: true + } }, emits: ['hide', 'show', 'confirm', 'handleEmit'], setup(props, context) { diff --git a/packages/vue/src/popconfirm/src/pc.vue b/packages/vue/src/popconfirm/src/pc.vue index f9a3f1d30..d089a2e65 100644 --- a/packages/vue/src/popconfirm/src/pc.vue +++ b/packages/vue/src/popconfirm/src/pc.vue @@ -10,6 +10,7 @@ :title="title" :popper-class="m('tiny-popconfirm-popover', customClass)" :popper-options="popperOptions" + :append-to-body="popperAppendToBody" :reference="reference" @show="handleEmit('show')" @hide="handleEmit('hide')" @@ -85,6 +86,10 @@ export default defineComponent({ type: Boolean, default: true }, + closeOnClickOutside: { + type: Boolean, + default: true + }, title: String, placement: { type: String, @@ -96,7 +101,11 @@ export default defineComponent({ }, type: [String, Object], reference: {}, - events: Object + events: Object, + popperAppendToBody: { + type: Boolean, + default: true + } }, emits: ['hide', 'show', 'confirm'], setup(props, context): any { diff --git a/packages/vue/src/popeditor/package.json b/packages/vue/src/popeditor/package.json index e69720a62..43ac224e5 100644 --- a/packages/vue/src/popeditor/package.json +++ b/packages/vue/src/popeditor/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-popeditor", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -27,4 +27,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/popover/package.json b/packages/vue/src/popover/package.json index 181ac4f4c..33bec0a61 100644 --- a/packages/vue/src/popover/package.json +++ b/packages/vue/src/popover/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-popover", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/popup/package.json b/packages/vue/src/popup/package.json index f4d198b09..9c5dadd64 100644 --- a/packages/vue/src/popup/package.json +++ b/packages/vue/src/popup/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-popup", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/progress/package.json b/packages/vue/src/progress/package.json index a6040c836..293ae8b4d 100644 --- a/packages/vue/src/progress/package.json +++ b/packages/vue/src/progress/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-progress", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/pull-refresh/package.json b/packages/vue/src/pull-refresh/package.json index 18fbc5cb1..5e516b160 100644 --- a/packages/vue/src/pull-refresh/package.json +++ b/packages/vue/src/pull-refresh/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-pull-refresh", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/qr-code/package.json b/packages/vue/src/qr-code/package.json index bed92c7c6..0e1f9c8e6 100644 --- a/packages/vue/src/qr-code/package.json +++ b/packages/vue/src/qr-code/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-qr-code", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/quarter-panel/package.json b/packages/vue/src/quarter-panel/package.json index 8327c0d73..bc63512af 100644 --- a/packages/vue/src/quarter-panel/package.json +++ b/packages/vue/src/quarter-panel/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-quarter-panel", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -17,7 +17,9 @@ "dependencies": { "@opentiny/vue-common": "workspace:~", "@opentiny/vue-icon": "workspace:~", - "@opentiny/vue-renderless": "workspace:~" + "@opentiny/vue-renderless": "workspace:~", + "@opentiny/vue-year-table": "workspace:~", + "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/query-builder/package.json b/packages/vue/src/query-builder/package.json index c177bb4ae..716821135 100644 --- a/packages/vue/src/query-builder/package.json +++ b/packages/vue/src/query-builder/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-query-builder", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -18,10 +18,8 @@ "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-common": "workspace:~", "@opentiny/vue-date-picker": "workspace:~", - "@opentiny/vue-currency": "workspace:~", "@opentiny/vue-button": "workspace:~", "@opentiny/vue-input": "workspace:~", - "@opentiny/vue-popover": "workspace:~", "@opentiny/vue-select": "workspace:~", "@opentiny/vue-option": "workspace:~", "@opentiny/vue-option-group": "workspace:~", @@ -33,4 +31,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/query-builder/src/pc.vue b/packages/vue/src/query-builder/src/pc.vue index 69cffee70..abfe1cf42 100644 --- a/packages/vue/src/query-builder/src/pc.vue +++ b/packages/vue/src/query-builder/src/pc.vue @@ -12,7 +12,7 @@ diff --git a/packages/vue/src/radio-button/package.json b/packages/vue/src/radio-button/package.json index 5e49434d3..a955ad1dd 100644 --- a/packages/vue/src/radio-button/package.json +++ b/packages/vue/src/radio-button/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-radio-button", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-tooltip": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/radio-group/package.json b/packages/vue/src/radio-group/package.json index 419ecff17..ba37d7473 100644 --- a/packages/vue/src/radio-group/package.json +++ b/packages/vue/src/radio-group/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-radio-group", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/radio/package.json b/packages/vue/src/radio/package.json index bf47f603f..545738820 100644 --- a/packages/vue/src/radio/package.json +++ b/packages/vue/src/radio/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-radio", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/rate/package.json b/packages/vue/src/rate/package.json index b718f68c5..f225dd327 100644 --- a/packages/vue/src/rate/package.json +++ b/packages/vue/src/rate/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-rate", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-locale": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/record/package.json b/packages/vue/src/record/package.json index 389fb110e..294e3fb73 100644 --- a/packages/vue/src/record/package.json +++ b/packages/vue/src/record/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-record", - "version": "3.8.11", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -17,4 +17,4 @@ "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/record/src/index.ts b/packages/vue/src/record/src/index.ts index dd7022c8a..df1d7a209 100644 --- a/packages/vue/src/record/src/index.ts +++ b/packages/vue/src/record/src/index.ts @@ -1,4 +1,4 @@ -import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?mobile-first' const $constants = { @@ -16,7 +16,7 @@ const $constants = { } } -export default { +export default defineComponent({ name: $prefix + 'Record', props: { ...$props, @@ -37,4 +37,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/recycle-scroller/package.json b/packages/vue/src/recycle-scroller/package.json index 32575362a..acbb1851f 100644 --- a/packages/vue/src/recycle-scroller/package.json +++ b/packages/vue/src/recycle-scroller/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-recycle-scroller", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -16,4 +16,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/recycle-scroller/src/index.ts b/packages/vue/src/recycle-scroller/src/index.ts index 8281b0392..3f9014795 100644 --- a/packages/vue/src/recycle-scroller/src/index.ts +++ b/packages/vue/src/recycle-scroller/src/index.ts @@ -1,7 +1,7 @@ -import { $props, $setup, $prefix } from '@opentiny/vue-common' +import { $props, $setup, $prefix, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?pc' -export default { +export default defineComponent({ name: $prefix + 'RecycleScroller', props: { ...$props, @@ -33,4 +33,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/rich-text-editor/package.json b/packages/vue/src/rich-text-editor/package.json index efda02611..ea918e041 100644 --- a/packages/vue/src/rich-text-editor/package.json +++ b/packages/vue/src/rich-text-editor/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-rich-text-editor", - "version": "1.0.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -15,7 +15,6 @@ "@opentiny/vue-common": "workspace:~", "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-theme": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-icon": "workspace:~" }, "devDependencies": { @@ -46,4 +45,4 @@ "highlight.js": "^11.8.0", "lowlight": "^2.9.0" } -} +} \ No newline at end of file diff --git a/packages/vue/src/rich-text/package.json b/packages/vue/src/rich-text/package.json index 6bce44639..7f1f5c948 100644 --- a/packages/vue/src/rich-text/package.json +++ b/packages/vue/src/rich-text/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-rich-text", - "version": "3.14.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -17,8 +17,10 @@ "dependencies": { "@opentiny/vue-icon": "workspace:~", "@opentiny/vue-common": "workspace:~", - "@opentiny/vue-locale": "workspace:~", - "quill": "^1.3.7" + "quill": "^1.3.7", + "@opentiny/vue-theme": "workspace:~", + "@opentiny/vue-renderless": "workspace:~", + "@opentiny/vue-modal": "workspace:~" }, "license": "MIT" } \ No newline at end of file diff --git a/packages/vue/src/river/package.json b/packages/vue/src/river/package.json index fe9de0e9f..69f56afaf 100644 --- a/packages/vue/src/river/package.json +++ b/packages/vue/src/river/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-river", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -9,8 +9,6 @@ "dependencies": { "@opentiny/vue-common": "workspace:~", "@opentiny/vue-renderless": "workspace:~", - "@opentiny/vue-theme": "workspace:~", - "@opentiny/vue-theme-mobile": "workspace:~", "echarts": "5.4.1" }, "license": "MIT", @@ -22,4 +20,4 @@ "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" } -} +} \ No newline at end of file diff --git a/packages/vue/src/river/src/pc.vue b/packages/vue/src/river/src/pc.vue index 9b5e04136..ad5774524 100644 --- a/packages/vue/src/river/src/pc.vue +++ b/packages/vue/src/river/src/pc.vue @@ -4,11 +4,9 @@ diff --git a/packages/vue/src/search/package.json b/packages/vue/src/search/package.json index cb7d04042..1281c2d98 100644 --- a/packages/vue/src/search/package.json +++ b/packages/vue/src/search/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-search", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -25,4 +25,4 @@ "@opentiny/vue-button": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/select-dropdown/package.json b/packages/vue/src/select-dropdown/package.json index 459474ba3..26d8e613a 100644 --- a/packages/vue/src/select-dropdown/package.json +++ b/packages/vue/src/select-dropdown/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-select-dropdown", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -23,4 +23,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/select-dropdown/src/mobile-first.vue b/packages/vue/src/select-dropdown/src/mobile-first.vue index 3d1f306af..7af1f23b9 100644 --- a/packages/vue/src/select-dropdown/src/mobile-first.vue +++ b/packages/vue/src/select-dropdown/src/mobile-first.vue @@ -119,12 +119,12 @@ diff --git a/packages/vue/src/select-mobile/package.json b/packages/vue/src/select-mobile/package.json index f8a41c397..2771fe5db 100644 --- a/packages/vue/src/select-mobile/package.json +++ b/packages/vue/src/select-mobile/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-select-mobile", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -12,8 +12,6 @@ "@opentiny/vue-common": "workspace:~", "@opentiny/vue-icon": "workspace:~", "@opentiny/vue-renderless": "workspace:~", - "@opentiny/vue-theme": "workspace:~", - "@opentiny/vue-theme-mobile": "workspace:~", "@opentiny/vue-exception": "workspace:~", "@opentiny/vue-input": "workspace:~", "@opentiny/vue-cell": "workspace:~" @@ -27,4 +25,4 @@ "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" } -} +} \ No newline at end of file diff --git a/packages/vue/src/select-view/package.json b/packages/vue/src/select-view/package.json index 2c417e644..d17e03ab5 100644 --- a/packages/vue/src/select-view/package.json +++ b/packages/vue/src/select-view/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-select-view", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -23,4 +23,4 @@ "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" } -} +} \ No newline at end of file diff --git a/packages/vue/src/select/package.json b/packages/vue/src/select/package.json index ba23ca23b..609e3719f 100644 --- a/packages/vue/src/select/package.json +++ b/packages/vue/src/select/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-select", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -19,21 +19,19 @@ "@opentiny/vue-common": "workspace:~", "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-tag": "workspace:~", - "@opentiny/vue-loading": "workspace:~", "@opentiny/vue-input": "workspace:~", "@opentiny/vue-option": "workspace:~", "@opentiny/vue-scrollbar": "workspace:~", "@opentiny/vue-icon": "workspace:~", "@opentiny/vue-select-dropdown": "workspace:~", - "@opentiny/vue-search": "workspace:~", "@opentiny/vue-grid": "workspace:~", "@opentiny/vue-tree": "workspace:~", "@opentiny/vue-tooltip": "workspace:~", "@opentiny/vue-filter-box": "workspace:~", "@opentiny/vue-checkbox": "workspace:~", - "@opentiny/vue-popover": "workspace:~", "@opentiny/vue-theme": "workspace:~", - "@opentiny/vue-recycle-scroller": "workspace:~" + "@opentiny/vue-recycle-scroller": "workspace:~", + "@opentiny/vue-button": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/select/src/index.ts b/packages/vue/src/select/src/index.ts index e63dc7f9b..466c79a11 100644 --- a/packages/vue/src/select/src/index.ts +++ b/packages/vue/src/select/src/index.ts @@ -56,7 +56,19 @@ const $constants = { AURORA_HEIGHT: 180, ITEM_HEIGHT: 34, SAFE_MARGIN: 4 - } + }, + SAAS_SIZE: { + mini: 24, + small: 28, + medium: 32 + }, + AURORA_SIZE: { + mini: 24, + small: 36, + medium: 42 + }, + SPACING_HEIGHT: 0, + MAX_VISIBLE_ROWS: 1 // 多选默认最大显示行数,超出后自动隐藏 } export default defineComponent({ @@ -316,6 +328,14 @@ export default defineComponent({ showProportion: { type: Boolean, default: false + }, + clickExpand: { + type: Boolean, + default: false + }, + maxVisibleRows: { + type: Number, + default: $constants.MAX_VISIBLE_ROWS } }, setup(props, context) { diff --git a/packages/vue/src/select/src/mobile-first.vue b/packages/vue/src/select/src/mobile-first.vue index fb92b14cb..cc7116e01 100644 --- a/packages/vue/src/select/src/mobile-first.vue +++ b/packages/vue/src/select/src/mobile-first.vue @@ -387,18 +387,20 @@ @@ -539,7 +541,7 @@ diff --git a/packages/vue/src/select/src/pc.vue b/packages/vue/src/select/src/pc.vue index 154cce849..6ad1935c3 100644 --- a/packages/vue/src/select/src/pc.vue +++ b/packages/vue/src/select/src/pc.vue @@ -20,9 +20,11 @@ state.collapseTags ? 'tiny-select__collapse-tags' : '', filterable ? 'tiny-select__filterable' : '', multiple ? 'tiny-select__multiple' : '', - state.inputHovering || state.visible ? 'is-hover' : '', + (state.inputHovering || state.visible) && !clickExpand ? 'is-hover' : '', state.isDisplayOnly ? 'is-display-only' : '', hoverExpand ? 'is-hover-expand' : '', + clickExpand ? 'is-click-expand' : '', + state.showCollapseTag ? 'collapse-tag-clicked' : '', state.selectDisabled ? 'is-disabled' : '', $parent.$attrs.class, inputBoxType === 'underline' ? 'tiny-select__underline' : '' @@ -69,7 +71,7 @@
      @@ -120,20 +122,22 @@ - + {{ state.collapseTagsLength }} + + - + + + + {{ t('ui.select.collapse') }} + + @@ -217,8 +231,7 @@ :style="{ 'flex-grow': '1', width: state.inputLength / (state.inputWidth - 32) + '%', - 'max-width': state.inputWidth - 42 + 'px', - height: 'auto' + 'max-width': state.inputWidth - 42 + 'px' }" />
      @@ -263,12 +276,19 @@ @@ -552,6 +574,7 @@ import TinyInput from '@opentiny/vue-input' import TinyOption from '@opentiny/vue-option' import TinyScrollbar from '@opentiny/vue-scrollbar' import TinySelectDropdown from '@opentiny/vue-select-dropdown' +import TinyButton from '@opentiny/vue-button' import Clickoutside from '@opentiny/vue-renderless/common/deps/clickoutside' import { IconClose, @@ -561,7 +584,9 @@ import { IconCopy, IconPlus, IconDeltaDown, - IconSearch + IconSearch, + IconEllipsis, + IconChevronUp } from '@opentiny/vue-icon' import Grid from '@opentiny/vue-grid' import Tree from '@opentiny/vue-tree' @@ -618,6 +643,7 @@ export default defineComponent({ TinyOption, TinyGrid: Grid, TinyTree: Tree, + TinyButton, IconClose: IconClose(), TinyScrollbar, IconCopy: IconCopy(), @@ -632,7 +658,9 @@ export default defineComponent({ // tiny 新增, IconSearch: IconSearch(), IconDeltaDown: IconDeltaDown(), // 默认下拉图标 - TinyCheckbox + TinyCheckbox, + IconEllipsis: IconEllipsis(), + IconChevronUp: IconChevronUp() }, props: [ ...props, @@ -716,7 +744,9 @@ export default defineComponent({ 'inputBoxType', 'tagType', 'clearNoMatchValue', - 'showProportion' + 'showProportion', + 'clickExpand', + 'maxVisibleRows' ], setup(props, context) { return setup({ props, context, renderless, api }) diff --git a/packages/vue/src/selected-box/package.json b/packages/vue/src/selected-box/package.json index fbd13c14a..39ff36b61 100644 --- a/packages/vue/src/selected-box/package.json +++ b/packages/vue/src/selected-box/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-selected-box", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" } -} +} \ No newline at end of file diff --git a/packages/vue/src/selected-box/src/index.ts b/packages/vue/src/selected-box/src/index.ts index e21cbf8ae..fa4ba5c2b 100644 --- a/packages/vue/src/selected-box/src/index.ts +++ b/packages/vue/src/selected-box/src/index.ts @@ -1,7 +1,7 @@ -import { $props, $setup, $prefix } from '@opentiny/vue-common' +import { $props, $setup, $prefix, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?pc|mobile-first' -export default { +export default defineComponent({ name: $prefix + 'SelectedBox', props: { ...$props, @@ -13,4 +13,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/signature/package.json b/packages/vue/src/signature/package.json index 8567143d4..23b3dd5cd 100644 --- a/packages/vue/src/signature/package.json +++ b/packages/vue/src/signature/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-signature", - "version": "3.12.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -23,4 +23,4 @@ "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-icon": "workspace:~" } -} +} \ No newline at end of file diff --git a/packages/vue/src/signature/src/index.ts b/packages/vue/src/signature/src/index.ts index 59bf44ba3..5f1d49017 100644 --- a/packages/vue/src/signature/src/index.ts +++ b/packages/vue/src/signature/src/index.ts @@ -1,8 +1,8 @@ -import { $props, $setup, $prefix } from '@opentiny/vue-common' +import { $props, $setup, $prefix, defineComponent } from '@opentiny/vue-common' import { t } from '@opentiny/vue-locale' import template from 'virtual-template?mobile-first' -export default { +export default defineComponent({ name: $prefix + 'Signature', props: { ...$props, @@ -40,4 +40,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/skeleton-item/package.json b/packages/vue/src/skeleton-item/package.json index 9737167dd..3c9b24f34 100644 --- a/packages/vue/src/skeleton-item/package.json +++ b/packages/vue/src/skeleton-item/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-skeleton-item", - "version": "3.13.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -17,4 +17,4 @@ "vitest": "^0.31.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/skeleton/package.json b/packages/vue/src/skeleton/package.json index 621e72ea3..e94eb972d 100644 --- a/packages/vue/src/skeleton/package.json +++ b/packages/vue/src/skeleton/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-skeleton", - "version": "3.13.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -17,4 +17,4 @@ "@opentiny-internal/vue-test-utils": "workspace:*", "vitest": "0.31.0" } -} +} \ No newline at end of file diff --git a/packages/vue/src/skeleton/src/index.ts b/packages/vue/src/skeleton/src/index.ts index 6f8dfa06b..04c4ccfc6 100644 --- a/packages/vue/src/skeleton/src/index.ts +++ b/packages/vue/src/skeleton/src/index.ts @@ -27,7 +27,7 @@ export const skeletonProps = { type: Array as PropType<(string | number)[]>, default: () => [] }, - active: { + animated: { type: Boolean, default: true } diff --git a/packages/vue/src/skeleton/src/pc.vue b/packages/vue/src/skeleton/src/pc.vue index 600301a2d..9c0e9c35d 100644 --- a/packages/vue/src/skeleton/src/pc.vue +++ b/packages/vue/src/skeleton/src/pc.vue @@ -30,7 +30,7 @@ import SkeletonItem from '@opentiny/vue-skeleton-item' export default defineComponent({ emits: ['update:modelValue'], - props: [...props, 'modelValue', 'loading', 'rows', 'avatar', 'rowsWidth', 'active'], + props: [...props, 'modelValue', 'loading', 'rows', 'avatar', 'rowsWidth', 'animated'], components: { TinySkeletonItem: SkeletonItem }, diff --git a/packages/vue/src/slide-bar/__tests__/slide-bar.test.tsx b/packages/vue/src/slide-bar/__tests__/slide-bar.test.tsx deleted file mode 100644 index a82468f92..000000000 --- a/packages/vue/src/slide-bar/__tests__/slide-bar.test.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import SlideBar from '@opentiny/vue-slide-bar' -import { describe, expect, test, vi } from 'vitest' -import { mountPcMode } from '@opentiny-internal/vue-test-utils' - -describe('PC Mode', () => { - const mount = mountPcMode - - const slideBarMockData = [ - { title: 'a', lang: 'en_US' }, - { title: 'b', lang: 'zh-CN' }, - { title: 'c', lang: 'en_US' }, - { title: 'd', lang: 'en_US' }, - { title: 'e', lang: 'en_US' }, - { title: 'f', lang: 'en_US' }, - { title: 'g', lang: 'en_US' }, - { title: 'h', lang: 'en_US' }, - { title: 'i', lang: 'en_US' } - ] - - const _mount = (props: any = {}) => { - return mount(() => ) - } - - /** - * attrs - */ - test('value', async () => { - const wrapper = _mount() - const slideBar = wrapper.findComponent({ name: 'TinySlideBar' }) - expect(slideBar.vm.modelValue.length).toBe(9) - }) - - test.todo('init-blocks 初始时需要显示的块数') - - test.todo('wheel-blocks 鼠标滚轮上下滚动的时候,滚动的块数长度。默认为 1') - - test.todo('tag 设置组件的 Dom 标签。默认值为 ul') - - test.todo('sub-tag 设置组件的子级 Dom 标签。默认为 li') - - /** - * slots - */ - test('default slot', async () => { - const wrapper = mount(() => ( - - {{ - default: ({ slotData }) => ( -
      - 标题:{slotData.title} -
      语言:{slotData.lang}
      -
      - ) - }} -
      - )) - const items = wrapper.findAll('.tiny-slide-bar__list > li') - expect(items.length).toBe(9) - }) - - /** - * events - */ - test('before-click', async () => { - const beforeClickHandler = vi.fn() - const wrapper = _mount({ - onBeforeClick: beforeClickHandler - }) - const item = wrapper.find('.tiny-slide-bar__list > li') - await item.trigger('click') - expect(beforeClickHandler).toBeCalled() - }) - - test.todo('click 滑动块点击事件;data: 点击的滑块数据,index: 点击的滑块索引值') -}) diff --git a/packages/vue/src/slide-bar/index.ts b/packages/vue/src/slide-bar/index.ts deleted file mode 100644 index b94fa04e7..000000000 --- a/packages/vue/src/slide-bar/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (c) 2022 - present TinyVue Authors. - * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. - * - * Use of this source code is governed by an MIT-style license. - * - * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, - * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR - * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. - * - */ -import SlideBar from './src/index' -import '@opentiny/vue-theme/slide-bar/index.less' -import { version } from './package.json' - -SlideBar.model = { - prop: 'modelValue', - event: 'update:modelValue' -} - -/* istanbul ignore next */ -SlideBar.install = function (Vue) { - Vue.component(SlideBar.name, SlideBar) -} - -SlideBar.version = version - -/* istanbul ignore next */ -if (process.env.BUILD_TARGET === 'runtime') { - if (typeof window !== 'undefined' && window.Vue) { - SlideBar.install(window.Vue) - } -} - -export default SlideBar diff --git a/packages/vue/src/slide-bar/package.json b/packages/vue/src/slide-bar/package.json deleted file mode 100644 index 47fcc306d..000000000 --- a/packages/vue/src/slide-bar/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@opentiny/vue-slide-bar", - "version": "3.7.0", - "description": "", - "main": "lib/index.js", - "module": "index.ts", - "sideEffects": false, - "type": "module", - "devDependencies": { - "@opentiny-internal/vue-test-utils": "workspace:*", - "vitest": "^0.31.0" - }, - "scripts": { - "build": "pnpm -w build:ui $npm_package_name", - "//postversion": "pnpm build" - }, - "dependencies": { - "@opentiny/vue-renderless": "workspace:~", - "@opentiny/vue-common": "workspace:~", - "@opentiny/vue-icon": "workspace:~", - "@opentiny/vue-theme": "workspace:~" - }, - "license": "MIT" -} diff --git a/packages/vue/src/slide-bar/src/index.ts b/packages/vue/src/slide-bar/src/index.ts deleted file mode 100644 index 74946d1b3..000000000 --- a/packages/vue/src/slide-bar/src/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (c) 2022 - present TinyVue Authors. - * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. - * - * Use of this source code is governed by an MIT-style license. - * - * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, - * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR - * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. - * - */ -import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common' -import template from 'virtual-template?pc' - -export default defineComponent({ - name: $prefix + 'SlideBar', - props: { - ...$props, - initBlocks: Number, - wheelBlocks: { - type: Number, - default: 1 - }, - modelValue: Array, - tag: { - type: String, - default: 'ul' - }, - subTag: { - type: String, - default: 'li' - } - }, - setup(props, context) { - return $setup({ props, context, template }) - } -}) diff --git a/packages/vue/src/slide-bar/src/pc.vue b/packages/vue/src/slide-bar/src/pc.vue deleted file mode 100644 index 624bdb67f..000000000 --- a/packages/vue/src/slide-bar/src/pc.vue +++ /dev/null @@ -1,79 +0,0 @@ - - - - diff --git a/packages/vue/src/slider-button-group/package.json b/packages/vue/src/slider-button-group/package.json index b3f9fa91b..d369b7edf 100644 --- a/packages/vue/src/slider-button-group/package.json +++ b/packages/vue/src/slider-button-group/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-slider-button-group", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/slider-button/package.json b/packages/vue/src/slider-button/package.json index ffcc779a8..431263c07 100644 --- a/packages/vue/src/slider-button/package.json +++ b/packages/vue/src/slider-button/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-slider-button", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -19,4 +19,4 @@ "@opentiny/vue-common": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/slider/package.json b/packages/vue/src/slider/package.json index c0140eada..f34be2f0e 100644 --- a/packages/vue/src/slider/package.json +++ b/packages/vue/src/slider/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-slider", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/split/package.json b/packages/vue/src/split/package.json index 9f088c62b..35b874e31 100644 --- a/packages/vue/src/split/package.json +++ b/packages/vue/src/split/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-split", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/standard-list-item/package.json b/packages/vue/src/standard-list-item/package.json index 53dcf7f60..31ddb21be 100644 --- a/packages/vue/src/standard-list-item/package.json +++ b/packages/vue/src/standard-list-item/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-standard-list-item", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-tag-group": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/statistic/package.json b/packages/vue/src/statistic/package.json index bb1be9233..548701286 100644 --- a/packages/vue/src/statistic/package.json +++ b/packages/vue/src/statistic/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-statistic", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -17,10 +17,7 @@ "dependencies": { "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-common": "workspace:~", - "@opentiny/vue-layout": "workspace:~", - "@opentiny/vue-row": "workspace:~", - "@opentiny/vue-col": "workspace:~", "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/steps/package.json b/packages/vue/src/steps/package.json index a11172255..eaa6095bd 100644 --- a/packages/vue/src/steps/package.json +++ b/packages/vue/src/steps/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-steps", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/svg-icon/package.json b/packages/vue/src/svg-icon/package.json index ff8e0936b..bd0d7b120 100644 --- a/packages/vue/src/svg-icon/package.json +++ b/packages/vue/src/svg-icon/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-svg-icon", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -15,9 +15,8 @@ "//postversion": "pnpm build" }, "dependencies": { - "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-common": "workspace:~", "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/switch/package.json b/packages/vue/src/switch/package.json index 98acd3493..8dcdaf0e6 100644 --- a/packages/vue/src/switch/package.json +++ b/packages/vue/src/switch/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-switch", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/tab-item/package.json b/packages/vue/src/tab-item/package.json index 0a1377735..ec9e0606c 100644 --- a/packages/vue/src/tab-item/package.json +++ b/packages/vue/src/tab-item/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-tab-item", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -19,4 +19,4 @@ "@opentiny/vue-common": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/tabbar-item/package.json b/packages/vue/src/tabbar-item/package.json index 88ee2a403..680112c74 100644 --- a/packages/vue/src/tabbar-item/package.json +++ b/packages/vue/src/tabbar-item/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-tabbar-item", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-badge": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/tabbar-item/src/index.ts b/packages/vue/src/tabbar-item/src/index.ts index 6239faba1..1a105df1c 100644 --- a/packages/vue/src/tabbar-item/src/index.ts +++ b/packages/vue/src/tabbar-item/src/index.ts @@ -1,7 +1,7 @@ -import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?mobile|mobile-first' -export default { +export default defineComponent({ name: $prefix + 'TabbarItem', componentName: 'TabbarItem', props: { @@ -23,4 +23,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/tabbar/package.json b/packages/vue/src/tabbar/package.json index bbd885e2e..84d40b1e9 100644 --- a/packages/vue/src/tabbar/package.json +++ b/packages/vue/src/tabbar/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-tabbar", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/tabbar/src/index.ts b/packages/vue/src/tabbar/src/index.ts index 21017716f..cdbccf0df 100644 --- a/packages/vue/src/tabbar/src/index.ts +++ b/packages/vue/src/tabbar/src/index.ts @@ -1,7 +1,7 @@ -import { $props, $prefix, $setup } from '@opentiny/vue-common' +import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common' import template from 'virtual-template?mobile|mobile-first' -export default { +export default defineComponent({ name: $prefix + 'Tabbar', componentName: 'Tabbar', props: { @@ -36,4 +36,4 @@ export default { setup(props, context) { return $setup({ props, context, template }) } -} +}) diff --git a/packages/vue/src/table/package.json b/packages/vue/src/table/package.json index 435f7274a..2e85ce132 100644 --- a/packages/vue/src/table/package.json +++ b/packages/vue/src/table/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-table", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/tabs/package.json b/packages/vue/src/tabs/package.json index 2ad47fe81..3933769aa 100644 --- a/packages/vue/src/tabs/package.json +++ b/packages/vue/src/tabs/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-tabs", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -23,9 +23,8 @@ "@opentiny/vue-tooltip": "workspace:~", "@opentiny/vue-icon": "workspace:~", "@opentiny/vue-locale": "workspace:~", - "@opentiny/vue-popover": "workspace:~", "@opentiny/vue-theme": "workspace:~", "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/tabs/src/index.ts b/packages/vue/src/tabs/src/index.ts index 423d239cf..b8de98950 100644 --- a/packages/vue/src/tabs/src/index.ts +++ b/packages/vue/src/tabs/src/index.ts @@ -70,7 +70,6 @@ export const tabsProps = { export default defineComponent({ name: $prefix + 'Tabs', - emits: ['tab-nav-update'], props: tabsProps, setup(props, context) { return $setup({ props, context, template }) diff --git a/packages/vue/src/tabs/src/pc.vue b/packages/vue/src/tabs/src/pc.vue index 5b95591eb..333e88882 100644 --- a/packages/vue/src/tabs/src/pc.vue +++ b/packages/vue/src/tabs/src/pc.vue @@ -18,7 +18,17 @@ import '@opentiny/vue-theme/tabs/index.less' import type { ITabsApi } from '@opentiny/vue-renderless/types/tabs.type' export default defineComponent({ - emits: ['add', 'click', 'close', 'edit', 'update:modelValue', 'tab-drag-start', 'tab-drag-over', 'tab-drag-end'], + emits: [ + 'add', + 'click', + 'close', + 'edit', + 'update:modelValue', + 'tab-nav-update', + 'tab-drag-start', + 'tab-drag-over', + 'tab-drag-end' + ], props: [ ...props, 'tabStyle', diff --git a/packages/vue/src/tabs/src/tab-nav/mb.vue b/packages/vue/src/tabs/src/tab-nav/mb.vue index 72bbdfe5e..9ba935789 100644 --- a/packages/vue/src/tabs/src/tab-nav/mb.vue +++ b/packages/vue/src/tabs/src/tab-nav/mb.vue @@ -10,7 +10,7 @@ * --> diff --git a/packages/vue/src/tabs/src/tab-nav/pc.vue b/packages/vue/src/tabs/src/tab-nav/pc.vue index e70075b8d..95bea9c3c 100644 --- a/packages/vue/src/tabs/src/tab-nav/pc.vue +++ b/packages/vue/src/tabs/src/tab-nav/pc.vue @@ -10,7 +10,7 @@ * --> diff --git a/packages/vue/src/tabs/src/tab-nav/tab-bar.vue b/packages/vue/src/tabs/src/tab-nav/tab-bar.vue index 8ab9824cc..e9188061b 100644 --- a/packages/vue/src/tabs/src/tab-nav/tab-bar.vue +++ b/packages/vue/src/tabs/src/tab-nav/tab-bar.vue @@ -17,16 +17,16 @@ diff --git a/packages/vue/src/tag-group/package.json b/packages/vue/src/tag-group/package.json index c1173cd09..e9676778b 100644 --- a/packages/vue/src/tag-group/package.json +++ b/packages/vue/src/tag-group/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-tag-group", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -23,4 +23,4 @@ "build": "pnpm -w build:ui $npm_package_name", "//postversion": "pnpm build" } -} +} \ No newline at end of file diff --git a/packages/vue/src/tag/package.json b/packages/vue/src/tag/package.json index 8d459a63e..dec1edb7c 100644 --- a/packages/vue/src/tag/package.json +++ b/packages/vue/src/tag/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-tag", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-theme-mobile": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/tag/src/index.ts b/packages/vue/src/tag/src/index.ts index 89169679c..f23b926dd 100644 --- a/packages/vue/src/tag/src/index.ts +++ b/packages/vue/src/tag/src/index.ts @@ -19,7 +19,10 @@ export const tagProps = { type: String, theme: String, size: String, - color: String, + color: { + type: [String, Array], + default: '' + }, closable: Boolean, operable: Boolean, disabled: Boolean, diff --git a/packages/vue/src/tag/src/pc.vue b/packages/vue/src/tag/src/pc.vue index 05151bdaa..ed8484628 100644 --- a/packages/vue/src/tag/src/pc.vue +++ b/packages/vue/src/tag/src/pc.vue @@ -27,6 +27,8 @@ export default defineComponent({ render() { const { type, size, hit, effect, slots, closable, color, handleClose, handleClick, disabled, state, value } = this + let styles = {} + const classes = [ 'tiny-tag', type ? `tiny-tag--${type}` : '', @@ -36,9 +38,19 @@ export default defineComponent({ disabled ? 'is-disabled' : '' ] + if (color) { + if (Array.isArray(color)) { + styles = { background: color[0], color: color[1] } + } else if (['red', 'orange', 'green', 'blue', 'purple', 'brown', 'grey', 'gold'].includes(color)) { + classes.push(`tiny-tag--${color}`) + } else { + styles = { background: color } + } + } + const tagElement = value || (slots.default && slots.default()) ? ( - + {value ? {value} : slots.default && slots.default()} {closable && } diff --git a/packages/vue/src/text-popup/package.json b/packages/vue/src/text-popup/package.json index 8d5d0a92c..9fe731362 100644 --- a/packages/vue/src/text-popup/package.json +++ b/packages/vue/src/text-popup/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-text-popup", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/time-line/package.json b/packages/vue/src/time-line/package.json index b1488b9f5..5e8a08f19 100644 --- a/packages/vue/src/time-line/package.json +++ b/packages/vue/src/time-line/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-time-line", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -23,4 +23,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/time-line/src/pc.vue b/packages/vue/src/time-line/src/pc.vue index 7d0a1ac89..062eaa07c 100644 --- a/packages/vue/src/time-line/src/pc.vue +++ b/packages/vue/src/time-line/src/pc.vue @@ -25,6 +25,7 @@ :space="space" :line-width="lineWidth" :shape="shape" + :autoColorField="autoColorField" @click="handleClick({ index, node })" > @@ -33,7 +39,7 @@ export default defineComponent({ components: { TinyCascaderSelect: CascaderSelect }, - emits: ['update:modelValue', 'confirm', 'update:visible'], + emits: ['update:modelValue', 'confirm', 'update:visible', 'clear'], props: { ...$props, modelValue: Array, @@ -59,6 +65,10 @@ export default defineComponent({ showSeconds: { type: Boolean, default: true + }, + clearable: { + type: Boolean, + default: true } }, setup(props, context) { diff --git a/packages/vue/src/time-picker/package.json b/packages/vue/src/time-picker/package.json index 9f424ef82..790845cd2 100644 --- a/packages/vue/src/time-picker/package.json +++ b/packages/vue/src/time-picker/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-time-picker", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-common": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/time-range/package.json b/packages/vue/src/time-range/package.json index 96f38b409..1910ad799 100644 --- a/packages/vue/src/time-range/package.json +++ b/packages/vue/src/time-range/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-time-range", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -17,9 +17,8 @@ "dependencies": { "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-common": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-time-spinner": "workspace:~", "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/time-range/src/pc.vue b/packages/vue/src/time-range/src/pc.vue index 5b9545ee2..c4a9a958c 100644 --- a/packages/vue/src/time-range/src/pc.vue +++ b/packages/vue/src/time-range/src/pc.vue @@ -30,6 +30,7 @@ :show-seconds="state.showSeconds" :am-pm-mode="state.amPmMode" @change="handleMinChange" + :end-date="state.maxDate" :arrow-control="state.arrowControl" @select-range="setMinSelectionRange" :date="state.minDate" @@ -53,6 +54,7 @@ :show-seconds="state.showSeconds" :am-pm-mode="state.amPmMode" @change="handleMaxChange" + :start-date="state.minDate" :arrow-control="state.arrowControl" @select-range="setMaxSelectionRange" :date="state.maxDate" diff --git a/packages/vue/src/time-select/package.json b/packages/vue/src/time-select/package.json index 234b6d308..0339f7fa3 100644 --- a/packages/vue/src/time-select/package.json +++ b/packages/vue/src/time-select/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-time-select", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -21,4 +21,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/time-spinner/package.json b/packages/vue/src/time-spinner/package.json index 1b693ec9b..abbe6fb0f 100644 --- a/packages/vue/src/time-spinner/package.json +++ b/packages/vue/src/time-spinner/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-time-spinner", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -22,4 +22,4 @@ "@opentiny/vue-icon": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/time-spinner/src/index.ts b/packages/vue/src/time-spinner/src/index.ts index 6108c85e6..5a448d25b 100644 --- a/packages/vue/src/time-spinner/src/index.ts +++ b/packages/vue/src/time-spinner/src/index.ts @@ -40,6 +40,14 @@ export default defineComponent({ value || value === 0 ? Math.floor(value) === value && value > 0 && value <= range : true ) } + }, + startDate: { + type: Object, + default: () => ({}) + }, + endDate: { + type: Object, + default: () => ({}) } }, setup(props, context) { diff --git a/packages/vue/src/time-spinner/src/pc.vue b/packages/vue/src/time-spinner/src/pc.vue index a4fd192bd..f5f31ae26 100644 --- a/packages/vue/src/time-spinner/src/pc.vue +++ b/packages/vue/src/time-spinner/src/pc.vue @@ -168,7 +168,7 @@ export default defineComponent({ directives: directive({ repeatClick: { bind } }), - props: [...props, 'date', 'defaultValue', 'showSeconds', 'arrowControl', 'amPmMode', 'step'], + props: [...props, 'date', 'defaultValue', 'showSeconds', 'arrowControl', 'amPmMode', 'step', 'startDate', 'endDate'], setup(props, context) { return setup({ props, context, renderless, api }) diff --git a/packages/vue/src/time/package.json b/packages/vue/src/time/package.json index 7dccab3b7..83684b1f9 100644 --- a/packages/vue/src/time/package.json +++ b/packages/vue/src/time/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-time", - "version": "3.7.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -17,10 +17,9 @@ "dependencies": { "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-common": "workspace:~", - "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-time-spinner": "workspace:~", "@opentiny/vue-theme": "workspace:~", "@opentiny/vue-button": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/timeline-item/package.json b/packages/vue/src/timeline-item/package.json index fc39913cc..84f64aba4 100644 --- a/packages/vue/src/timeline-item/package.json +++ b/packages/vue/src/timeline-item/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-timeline-item", - "version": "3.9.0", + "version": "3.15.0", "description": "", "main": "lib/index.js", "module": "index.ts", @@ -20,4 +20,4 @@ "@opentiny/vue-theme": "workspace:~" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/vue/src/timeline-item/src/index.ts b/packages/vue/src/timeline-item/src/index.ts index 11d819fd7..f6e19fd9a 100644 --- a/packages/vue/src/timeline-item/src/index.ts +++ b/packages/vue/src/timeline-item/src/index.ts @@ -39,6 +39,10 @@ export const timelineItemProps = { lineWidth: { type: [String, Number], default: '' + }, + autoColorField: { + type: String, + default: 'autoColor' } } diff --git a/packages/vue/src/timeline-item/src/pc.vue b/packages/vue/src/timeline-item/src/pc.vue index 8552b1b0a..f649ee07e 100644 --- a/packages/vue/src/timeline-item/src/pc.vue +++ b/packages/vue/src/timeline-item/src/pc.vue @@ -13,16 +13,24 @@