diff --git a/examples/sites/demos/apis/dialog-select.js b/examples/sites/demos/apis/dialog-select.js index 652492222..c59d30a0d 100644 --- a/examples/sites/demos/apis/dialog-select.js +++ b/examples/sites/demos/apis/dialog-select.js @@ -434,6 +434,20 @@ export default { mode: ['pc'], pcDemo: '' }, + { + name: 'footer-buttons', + type: 'Slot', + defaultValue: '', + desc: { + 'zh-CN': '自定义弹窗底部按钮', + 'en-US': 'Custom Pop Up Bottom buttons' + }, + metaData: { + new: '3.18.0' + }, + mode: ['pc'], + pcDemo: '' + }, { name: 'option', type: 'Slot', diff --git a/examples/sites/demos/apis/dropdown.js b/examples/sites/demos/apis/dropdown.js index eb85d5092..87624dcdf 100644 --- a/examples/sites/demos/apis/dropdown.js +++ b/examples/sites/demos/apis/dropdown.js @@ -228,6 +228,22 @@ export default { }, mode: ['pc'], pcDemo: 'visible-arrow' + }, + { + name: 'lazy-show-popper', + type: 'boolean', + defaultValue: 'false', + desc: { + 'zh-CN': '是否懒加载下拉菜单及内部的项,以优化性能,默认初始全加载菜单及内部项。', + 'en-US': + 'Indicates whether to lazily load the drop-down menu and internal items to optimize performance. The default value is false. The menu and internal items are loaded initially.' + }, + mode: ['pc', 'mobile-first'], + pcDemo: 'lazy-show-popper', + mfDemo: '', + metaData: { + experimental: '3.18.0' + } } ], events: [ diff --git a/examples/sites/demos/apis/file-upload.js b/examples/sites/demos/apis/file-upload.js index 0b4fa48a1..ced644b7b 100644 --- a/examples/sites/demos/apis/file-upload.js +++ b/examples/sites/demos/apis/file-upload.js @@ -262,7 +262,8 @@ export default { 'zh-CN': '限制文件大小,单位为 KB;当为 Number 类型时,小于该值停止上传;为数组时[min,max] 设置上传范围', 'en-US': '' }, - mode: ['mobile-first'], + mode: ['pc', 'mobile-first'], + pcDemo: 'file-size', mfDemo: '' }, { diff --git a/examples/sites/demos/apis/grid.js b/examples/sites/demos/apis/grid.js index f883c38d6..d0c60e882 100644 --- a/examples/sites/demos/apis/grid.js +++ b/examples/sites/demos/apis/grid.js @@ -1073,6 +1073,19 @@ export default { } ], events: [ + { + name: 'after-refresh-column', + type: '()=> void', + defaultValue: '', + desc: { + 'zh-CN': '在新增或者删除列后,列配置是异步更新的,列配置刷新后触发的回调', + 'en-US': + 'After adding or deleting a column, the column configuration is updated asynchronously, and the callback is triggered after the column configuration is refreshed.' + }, + mode: ['pc', 'mobile-first'], + pcDemo: 'grid-dynamically-columns#column-switching-scroll', + mfDemo: '' + }, { name: 'before-page-change', typeAnchorName: 'IBeforePageChangeArgs', diff --git a/examples/sites/demos/apis/guide.js b/examples/sites/demos/apis/guide.js index a8159384c..6d973be0b 100644 --- a/examples/sites/demos/apis/guide.js +++ b/examples/sites/demos/apis/guide.js @@ -175,7 +175,7 @@ interface IDomData { //销毁的回调函数 destroy: () => void // 完成的回调函数 - completey: () => void + complete: () => void // 需要设置的按钮组 button: { diff --git a/examples/sites/demos/apis/input.js b/examples/sites/demos/apis/input.js index 415a6ce86..1c64313ca 100644 --- a/examples/sites/demos/apis/input.js +++ b/examples/sites/demos/apis/input.js @@ -396,6 +396,21 @@ export default { mobileDemo: 'counter', mfDemo: '' }, + { + name: 'show-tooltip', + type: 'boolean', + defaultValue: 'true', + metaData: { + new: '3.18.0' + }, + desc: { + 'zh-CN': '只读状态下,文本超出是否悬浮提示', + 'en-US': 'In the read-only state, whether the text exceeds the floating prompt' + }, + mode: ['pc', 'mobile-first'], + pcDemo: 'size', + mfDemo: '' + }, { name: 'size', type: "'medium' | 'small' | 'mini'", diff --git a/examples/sites/demos/apis/tree.js b/examples/sites/demos/apis/tree.js index bd9ada2b5..b4a762026 100644 --- a/examples/sites/demos/apis/tree.js +++ b/examples/sites/demos/apis/tree.js @@ -491,6 +491,17 @@ export default { }, mode: ['pc'], pcDemo: 'edit' + }, + { + name: 'highlight-query', + type: 'boolean', + defaultValue: 'false', + desc: { + 'zh-CN': '通过 highlightQuery 属性,是否在匹配的节点中,高亮搜索文字。
', + 'en-US': 'Indicates whether to highlight the search text in the matched node.' + }, + mode: ['pc'], + pcDemo: 'filter-view' } ], events: [ diff --git a/examples/sites/demos/mobile-first/app/file-upload/file-size-array.vue b/examples/sites/demos/mobile-first/app/file-upload/file-size-array.vue new file mode 100644 index 000000000..68e6ec2cd --- /dev/null +++ b/examples/sites/demos/mobile-first/app/file-upload/file-size-array.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/sites/demos/mobile-first/app/file-upload/file-size.vue b/examples/sites/demos/mobile-first/app/file-upload/file-size.vue new file mode 100644 index 000000000..421ce9c3a --- /dev/null +++ b/examples/sites/demos/mobile-first/app/file-upload/file-size.vue @@ -0,0 +1,76 @@ + + + diff --git a/examples/sites/demos/mobile-first/app/file-upload/webdoc/file-upload.js b/examples/sites/demos/mobile-first/app/file-upload/webdoc/file-upload.js index 8d7993fe5..c97bea825 100644 --- a/examples/sites/demos/mobile-first/app/file-upload/webdoc/file-upload.js +++ b/examples/sites/demos/mobile-first/app/file-upload/webdoc/file-upload.js @@ -38,6 +38,30 @@ export default { }, codeFiles: ['file-list.vue'] }, + { + demoId: 'file-size', + name: { + 'zh-CN': '上传的文件大小限制', + 'en-US': 'Uploaded file size limit' + }, + desc: { + 'zh-CN': '

通过 file-size 配置上传文件的大小。

', + 'en-US': '

Use file-size to configure the size of the uploaded file.

' + }, + codeFiles: ['file-size.vue'] + }, + { + demoId: 'file-size-array', + name: { + 'zh-CN': '上传的文件大小范围', + 'en-US': 'Uploaded file size range' + }, + desc: { + 'zh-CN': '

通过 file-size 配置为数组类型限制上传文件的大小范围。

', + 'en-US': '

Set file-size to an array to limit the size of the file to be uploaded.

' + }, + codeFiles: ['file-size-array.vue'] + }, { demoId: 'show-title', name: { diff --git a/examples/sites/demos/mobile-first/app/grid/basic-usage.vue b/examples/sites/demos/mobile-first/app/grid/basic-usage.vue index 98ce58af1..b4c9a2d09 100644 --- a/examples/sites/demos/mobile-first/app/grid/basic-usage.vue +++ b/examples/sites/demos/mobile-first/app/grid/basic-usage.vue @@ -5,6 +5,7 @@ 卡片视图 列表视图 甘特视图 + custom视图 + diff --git a/examples/sites/demos/pc/app/cascader-panel/multiple-composition-api.vue b/examples/sites/demos/pc/app/cascader-panel/multiple-composition-api.vue new file mode 100644 index 000000000..1e89bcd76 --- /dev/null +++ b/examples/sites/demos/pc/app/cascader-panel/multiple-composition-api.vue @@ -0,0 +1,226 @@ + + + + + diff --git a/examples/sites/demos/pc/app/cascader-panel/multiple.spec.ts b/examples/sites/demos/pc/app/cascader-panel/multiple.spec.ts new file mode 100644 index 000000000..2330c49ba --- /dev/null +++ b/examples/sites/demos/pc/app/cascader-panel/multiple.spec.ts @@ -0,0 +1,15 @@ +import { test, expect } from '@playwright/test' + +test('多选', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('cascader-panel#multiple') + const multipleText1 = page.getByText( + '选中值:[ [ "zhinan", "anzhuang", "xiangmudengji" ], [ "zhinan", "anzhuang", "huanjingzhunbei" ], [ "zhinan", "anzhuang", "anzhuangcli" ], [ "zhinan", "kaifa", "monishuju" ] ]' + ) + await expect(multipleText1).toBeVisible() + await page.getByRole('menuitem', { name: '创建项目' }).locator('span').nth(1).click() + const multipleText2 = page.getByText( + '选中值:[ [ "zhinan", "anzhuang", "xiangmudengji" ], [ "zhinan", "anzhuang", "huanjingzhunbei" ], [ "zhinan", "anzhuang", "anzhuangcli" ], [ "zhinan", "anzhuang", "chuangjianxiangmu" ], [ "zhinan", "kaifa", "monishuju" ] ]' + ) + await expect(multipleText2).toBeVisible() +}) diff --git a/examples/sites/demos/pc/app/cascader-panel/multiple.vue b/examples/sites/demos/pc/app/cascader-panel/multiple.vue new file mode 100644 index 000000000..168d0896f --- /dev/null +++ b/examples/sites/demos/pc/app/cascader-panel/multiple.vue @@ -0,0 +1,234 @@ + + + + + diff --git a/examples/sites/demos/pc/app/cascader-panel/webdoc/cascader-panel.js b/examples/sites/demos/pc/app/cascader-panel/webdoc/cascader-panel.js index ac6059068..d36421abf 100644 --- a/examples/sites/demos/pc/app/cascader-panel/webdoc/cascader-panel.js +++ b/examples/sites/demos/pc/app/cascader-panel/webdoc/cascader-panel.js @@ -30,6 +30,18 @@ export default { }, codeFiles: ['custom-option-content.vue'] }, + { + demoId: 'multiple', + name: { + 'zh-CN': '多选', + 'en-US': 'Multiple Choices' + }, + desc: { + 'zh-CN': '

通过 props.multiple = true 来开启多选模式。

\n', + 'en-US': '

Use props.multiple = true to enable the multi-selection mode.

\n' + }, + codeFiles: ['multiple.vue'] + }, { demoId: 'cascader-panel-props', name: { diff --git a/examples/sites/demos/pc/app/directives/highlight-query/avoid-composition-api.vue b/examples/sites/demos/pc/app/directives/highlight-query/avoid-composition-api.vue new file mode 100644 index 000000000..fe88e4bc1 --- /dev/null +++ b/examples/sites/demos/pc/app/directives/highlight-query/avoid-composition-api.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/examples/sites/demos/pc/app/directives/highlight-query/avoid.spec.js b/examples/sites/demos/pc/app/directives/highlight-query/avoid.spec.js new file mode 100644 index 000000000..27f9058d5 --- /dev/null +++ b/examples/sites/demos/pc/app/directives/highlight-query/avoid.spec.js @@ -0,0 +1,15 @@ +import { test, expect } from '@playwright/test' + +test('避免用法', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('directives-highlight-query#avoid') + + const input = page.locator('.pc-demo-container .tiny-input-inner').first() + const hlNode = page.locator('.pc-demo-container .tiny-hl-query-node') + const button = page.locator('.pc-demo-container .tiny-button') + + await expect(hlNode).toHaveCount(12) + + await button.click() + await expect(hlNode).toHaveCount(6) +}) diff --git a/examples/sites/demos/pc/app/directives/highlight-query/avoid.vue b/examples/sites/demos/pc/app/directives/highlight-query/avoid.vue new file mode 100644 index 000000000..b097af80a --- /dev/null +++ b/examples/sites/demos/pc/app/directives/highlight-query/avoid.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/examples/sites/demos/pc/app/directives/highlight-query/basic-usage-composition-api.vue b/examples/sites/demos/pc/app/directives/highlight-query/basic-usage-composition-api.vue new file mode 100644 index 000000000..e4847734c --- /dev/null +++ b/examples/sites/demos/pc/app/directives/highlight-query/basic-usage-composition-api.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/examples/sites/demos/pc/app/directives/highlight-query/basic-usage.spec.js b/examples/sites/demos/pc/app/directives/highlight-query/basic-usage.spec.js new file mode 100644 index 000000000..b7bf67f28 --- /dev/null +++ b/examples/sites/demos/pc/app/directives/highlight-query/basic-usage.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('directives-highlight-query#basic-usage') + + const input = page.locator('.pc-demo-container .tiny-input__inner') + const hlNode = page.locator('.pc-demo-container .tiny-hl-query-node') + + await input.fill('一片') + await expect(hlNode).toHaveCount(3) +}) diff --git a/examples/sites/demos/pc/app/directives/highlight-query/basic-usage.vue b/examples/sites/demos/pc/app/directives/highlight-query/basic-usage.vue new file mode 100644 index 000000000..d50c55e7b --- /dev/null +++ b/examples/sites/demos/pc/app/directives/highlight-query/basic-usage.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/examples/sites/demos/pc/app/directives/webdoc/directives-highlight-query.cn.md b/examples/sites/demos/pc/app/directives/webdoc/directives-highlight-query.cn.md new file mode 100644 index 000000000..50714a5a9 --- /dev/null +++ b/examples/sites/demos/pc/app/directives/webdoc/directives-highlight-query.cn.md @@ -0,0 +1,7 @@ +--- +title: HighlightQuery 高亮搜索字 +--- + +# HighlightQuery 高亮搜索字 + +
HighlightQuery 高亮搜索字指令,用于高亮区个区域的匹配字符。
diff --git a/examples/sites/demos/pc/app/directives/webdoc/directives-highlight-query.en.md b/examples/sites/demos/pc/app/directives/webdoc/directives-highlight-query.en.md new file mode 100644 index 000000000..3805adbbf --- /dev/null +++ b/examples/sites/demos/pc/app/directives/webdoc/directives-highlight-query.en.md @@ -0,0 +1,7 @@ +--- +title: HighlightQuery Highlight search word +--- + +# HighlightQuery Highlight search word + +
HighlightQuery Highlight search word command, which is used to match characters in each area of the highlight area.
diff --git a/examples/sites/demos/pc/app/directives/webdoc/directives-highlight-query.js b/examples/sites/demos/pc/app/directives/webdoc/directives-highlight-query.js new file mode 100644 index 000000000..7a193dee8 --- /dev/null +++ b/examples/sites/demos/pc/app/directives/webdoc/directives-highlight-query.js @@ -0,0 +1,39 @@ +export default { + column: '2', + owner: '', + metaData: { + stable: '3.18.0' + }, + versionTipOption: { + stages: ['stable'] + }, + demos: [ + { + demoId: 'basic-usage', + name: { + 'zh-CN': '基本用法', + 'en-US': 'Basic Usage' + }, + desc: { + 'zh-CN': '通过自动高亮搜索字指令,可以自动高亮某个节点下,所有匹配的字符。', + 'en-US': + 'You can use the automatic highlight search word command to automatically highlight all matched characters under a node.' + }, + codeFiles: ['highlight-query/basic-usage.vue'] + }, + { + demoId: 'avoid', + name: { + 'zh-CN': '避免场景', + 'en-US': 'Basic Usage' + }, + desc: { + 'zh-CN': + '纯文字节点在Vue 编译时有特殊处理。自动高亮搜索字的指令是直接处理Dom节点的内容,所以要避免纯文本节点。以下2个场景会造成Vue 更新机制失败。', + 'en-US': + 'Plain text nodes are specially processed during Vue compilation. The instruction for automatically highlighting search words is to directly process the contents of the Dom node, so avoid plain text nodes. The Vue update mechanism fails in the following scenarios:' + }, + codeFiles: ['highlight-query/avoid.vue'] + } + ] +} diff --git a/examples/sites/demos/pc/app/dropdown/lazy-show-popper-composition-api.vue b/examples/sites/demos/pc/app/dropdown/lazy-show-popper-composition-api.vue new file mode 100644 index 000000000..509306369 --- /dev/null +++ b/examples/sites/demos/pc/app/dropdown/lazy-show-popper-composition-api.vue @@ -0,0 +1,43 @@ + + + diff --git a/examples/sites/demos/pc/app/dropdown/lazy-show-popper.spec.ts b/examples/sites/demos/pc/app/dropdown/lazy-show-popper.spec.ts new file mode 100644 index 000000000..3ea061027 --- /dev/null +++ b/examples/sites/demos/pc/app/dropdown/lazy-show-popper.spec.ts @@ -0,0 +1,20 @@ +import { test, expect } from '@playwright/test' + +test('基本用法', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('dropdown#lazy-show-popper') + + const wrap = page.locator('#lazy-show-popper') + const dropDownLi = wrap.locator('.tiny-dropdown li') + const dropDownOnBody = page.locator('body .tiny-dropdown-menu li') + + const dropDown2 = wrap.locator('.tiny-dropdown').nth(1) + + // 2个示例应该是10个菜单项, 懒加载成功的话,应该只加载5个。 + await expect(dropDownLi).toHaveCount(5) + + // 点击后,应该加载10个, 但展开的5项是 appendToBody的。 + await dropDown2.click() + await expect(dropDownLi).toHaveCount(5) + await expect(dropDownOnBody).toHaveCount(5) +}) diff --git a/examples/sites/demos/pc/app/dropdown/lazy-show-popper.vue b/examples/sites/demos/pc/app/dropdown/lazy-show-popper.vue new file mode 100644 index 000000000..dd1a4c318 --- /dev/null +++ b/examples/sites/demos/pc/app/dropdown/lazy-show-popper.vue @@ -0,0 +1,47 @@ + + + diff --git a/examples/sites/demos/pc/app/dropdown/webdoc/dropdown.js b/examples/sites/demos/pc/app/dropdown/webdoc/dropdown.js index 111b9c106..9cea4ceee 100644 --- a/examples/sites/demos/pc/app/dropdown/webdoc/dropdown.js +++ b/examples/sites/demos/pc/app/dropdown/webdoc/dropdown.js @@ -231,6 +231,19 @@ export default { '

button-click: When the button type is selected, listen for the left button click event.

\n

item-click: Listens for menu item click events

\n

visible-change: Listens for changes in the display and hiding of dropdown pop ups.

\n' }, codeFiles: ['events.vue'] + }, + { + demoId: 'lazy-show-popper', + name: { + 'zh-CN': '懒加载菜单和子项', + 'en-US': 'Lazy Load Menus and Subitems' + }, + desc: { + 'zh-CN': '通过 lazy-show-popper 属性,指定是否懒加载下拉菜单及内部的项', + 'en-US': + 'The lazy-show-popper property specifies whether to lazy load the drop-down menu and internal items.' + }, + codeFiles: ['lazy-show-popper.vue'] } ] } diff --git a/examples/sites/demos/pc/app/file-upload/file-size-array.vue b/examples/sites/demos/pc/app/file-upload/file-size-array.vue new file mode 100644 index 000000000..3d39344a9 --- /dev/null +++ b/examples/sites/demos/pc/app/file-upload/file-size-array.vue @@ -0,0 +1,85 @@ + + + diff --git a/examples/sites/demos/pc/app/file-upload/file-size.vue b/examples/sites/demos/pc/app/file-upload/file-size.vue new file mode 100644 index 000000000..d4cef901f --- /dev/null +++ b/examples/sites/demos/pc/app/file-upload/file-size.vue @@ -0,0 +1,78 @@ + + + diff --git a/examples/sites/demos/pc/app/file-upload/webdoc/file-upload.js b/examples/sites/demos/pc/app/file-upload/webdoc/file-upload.js index 2341f424e..e7f0117ca 100644 --- a/examples/sites/demos/pc/app/file-upload/webdoc/file-upload.js +++ b/examples/sites/demos/pc/app/file-upload/webdoc/file-upload.js @@ -189,6 +189,30 @@ export default { }, codeFiles: ['upload-file-list.vue'] }, + { + demoId: 'file-size', + name: { + 'zh-CN': '文件大小限制', + 'en-US': 'Uploaded file size limit' + }, + desc: { + 'zh-CN': '

通过 file-size 配置上传文件的大小。

', + 'en-US': '

Use file-size to configure the size of the uploaded file.

' + }, + codeFiles: ['file-size.vue'] + }, + { + demoId: 'file-size-array', + name: { + 'zh-CN': '文件大小范围', + 'en-US': 'Uploaded file size range' + }, + desc: { + 'zh-CN': '

通过 file-size 配置为数组类型限制上传文件的大小范围。

', + 'en-US': '

Set file-size to an array to limit the size of the file to be uploaded.

' + }, + codeFiles: ['file-size-array.vue'] + }, { demoId: 'upload-file-list-slot', name: { diff --git a/examples/sites/demos/pc/app/grid/dynamically-columns/column-switching-scroll-composition-api.vue b/examples/sites/demos/pc/app/grid/dynamically-columns/column-switching-scroll-composition-api.vue new file mode 100644 index 000000000..a2cdfa035 --- /dev/null +++ b/examples/sites/demos/pc/app/grid/dynamically-columns/column-switching-scroll-composition-api.vue @@ -0,0 +1,81 @@ + + + diff --git a/examples/sites/demos/pc/app/grid/dynamically-columns/column-switching-scroll.spec.js b/examples/sites/demos/pc/app/grid/dynamically-columns/column-switching-scroll.spec.js new file mode 100644 index 000000000..3a297ce99 --- /dev/null +++ b/examples/sites/demos/pc/app/grid/dynamically-columns/column-switching-scroll.spec.js @@ -0,0 +1,14 @@ +import { test, expect } from '@playwright/test' + +test('新增列滚动位置', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('grid-dynamically-columns#column-switching-scroll') + const demo = page.locator('#column-switching-scroll') + + await demo.locator('.tiny-grid__body-wrapper.body__wrapper').click() + await page.mouse.wheel(10000, 0) + + await expect(demo.getByText('地址2')).toBeVisible() + await demo.getByText('显示最后一列').click() + await expect(demo.getByText('地址2')).toBeVisible() +}) diff --git a/examples/sites/demos/pc/app/grid/dynamically-columns/column-switching-scroll.vue b/examples/sites/demos/pc/app/grid/dynamically-columns/column-switching-scroll.vue new file mode 100644 index 000000000..606700043 --- /dev/null +++ b/examples/sites/demos/pc/app/grid/dynamically-columns/column-switching-scroll.vue @@ -0,0 +1,89 @@ + + + diff --git a/examples/sites/demos/pc/app/grid/webdoc/grid-dynamically-columns.js b/examples/sites/demos/pc/app/grid/webdoc/grid-dynamically-columns.js index b566beda9..d7b25a130 100644 --- a/examples/sites/demos/pc/app/grid/webdoc/grid-dynamically-columns.js +++ b/examples/sites/demos/pc/app/grid/webdoc/grid-dynamically-columns.js @@ -14,6 +14,18 @@ export default { }, 'codeFiles': ['dynamically-columns/dynamically-columns.vue'] }, + { + 'demoId': 'column-switching-scroll', + 'name': { + 'zh-CN': '新增列滚动位置', + 'en-US': 'New columns scroll positon' + }, + 'desc': { + 'zh-CN': '根据日期范围选择框的日期范围动态的生成表格列。', + 'en-US': 'For details, see the following example.' + }, + 'codeFiles': ['dynamically-columns/column-switching-scroll.vue'] + }, { 'demoId': 'column-columns-dynamic', 'name': { 'zh-CN': '动态列数据', 'en-US': '' }, diff --git a/examples/sites/demos/pc/app/icon/iconGroups.js b/examples/sites/demos/pc/app/icon/iconGroups.js index 7f52fc36c..dbfb229b6 100644 --- a/examples/sites/demos/pc/app/icon/iconGroups.js +++ b/examples/sites/demos/pc/app/icon/iconGroups.js @@ -1,42 +1,249 @@ export const iconGroups = { - Arrow: [ - 'IconArrowDown', + Left: [ + 'IconAngleLeft', 'IconArrowLeft', - 'IconArrowRight', - 'IconArrowUp', - 'IconAscending', - 'IconChevronDown', 'IconChevronLeft', - 'IconChevronRight', - 'IconChevronUp', 'IconDefault', - 'IconDeltaDownO', - 'IconDeltaDown', 'IconDeltaLeftO', - 'IconDeltaLeft', - 'IconDeltaRightO', - 'IconDeltaRight', - 'IconDeltaUpO', - 'IconDeltaUp', 'IconDoubleLeft', - 'IconDoubleRight', - 'IconDownO', - 'IconDown', - 'IconDownWard', - 'IconEnd', + 'IconLeft', 'IconLeftO', 'IconLeftWard', 'IconLeftWardArrow', - 'IconLeft', - 'IconPopup', - 'IconRightO', + 'IconDeltaLeft', + 'IconPagerFirst', + 'IconPagerPrev', + 'IconRichTextAlignLeft', + 'IconSplitLeft', + 'IconUndo' + ], + Right: [ + 'IconArrowRight', + 'IconAngleRight', + 'IconChevronRight', + 'IconDeltaRight', + 'IconDeltaRightO', + 'IconDoubleRight', + 'IconEnd', + 'IconPagerLast', + 'IconPagerNext', + 'IconRedo', 'IconRight', + 'IconRightO', + 'IconRichTextRedo', + 'IconRichTextAlignRight', 'IconRightward', - 'IconTriangleDown', - 'IconUpO', + 'IconSplitRight', + 'IconStart', + 'IconTransform' + ], + TextAlign: [ + 'IconAlignCenter', + 'IconAlignLeft', + 'IconAlignJustify', + 'IconAlignRight', + 'IconAlignStretch', + 'IconStreamSolid', + 'IconRichTextAddColumnAfter', + 'IconRichTextAddColumnBefore', + 'IconRichTextAddRowAfter', + 'IconRichTextAddRowBefore', + 'IconRichTextAlignCenter', + 'IconRichTextDeleteColumn', + 'IconRichTextDeleteRow', + 'IconRichTextLineHeight', + 'IconRichTextListOrdered', + 'IconRichTextListUnordered', + 'IconRichTextMergeCells', + 'IconRichTextMergeCellsVertical', + 'IconRichTextSplitCellsHorizontal', + 'IconRichTextSplitCellsVertical', + 'IconRichTextTable', + 'IconRichTextTaskList', + 'IconSplit' + ], + Upward: [ + 'IconArrowUp', + 'IconChevronUp', + 'IconDeltaUp', + 'IconDeltaUpO', + 'IconFreeze', 'IconUp', + 'IconUpO', 'IconUpWard' ], + Downward: [ + 'IconArrowBottom', + 'IconArrowDown', + 'IconChevronDown', + 'IconDeltaDown', + 'IconDeltaDownO', + 'IconDown', + 'IconDownO', + 'IconDownWard', + 'IconTriangleDown' + ], + Back: ['IconEditorUndo', 'IconGoBack', 'IconImport', 'IconRichTextUndo'], + Cycle: [ + 'IconConmentRefresh', + 'IconDownload', + 'IconGenerating', + 'IconGroupTransfer', + 'IconReplace', + 'IconRefres', + 'IconRefresh', + 'IconRepeat', + 'IconUpload' + ], + Sort: [ + 'IconAscending', + 'IconDescending', + 'IconSort', + 'IconSortDefault', + 'IconSortO', + 'IconSortTriangle', + 'IconSortTriangleAscending', + 'IconSortTriangleDescending' + ], + Filter: ['IconBefilter', 'IconClearFilter', 'IconDefinedFiltration', 'IconFilter', 'IconFiltered', 'IconUnfilter'], + Reduce: [ + 'IconExpand', + 'IconMinus', + 'IconMinusCircle', + 'IconMinusSquare', + 'IconNodeOpen', + 'IconPanelMini', + 'IconStop', + 'IconZoomOut' + ], + Add: [ + 'IconAdd', + 'IconAddCircle', + 'IconNew', + 'IconNode', + 'IconPlus', + 'IconPlusSquare', + 'IconPlusCircle', + 'IconPutAway', + 'IconView', + 'IconZoomIn' + ], + Check: [ + 'IconCheck', + 'IconHalfchecked', + 'IconHalfselect', + 'IconMobileCheckbox', + 'IconMobileCheckboxHalf', + 'IconPreChecked' + ], + Success: [ + 'IconCheckedLinear', + 'IconCheckedSur', + 'IconDone', + 'IconFinish', + 'IconMobileCheckboxSelected', + 'IconSubScript', + 'IconSuccess', + 'IconSuccessful', + 'IconYes' + ], + Fail: [ + 'IconClose', + 'IconCloseCircle', + 'IconCloseSquare', + 'IconDelete', + 'IconError', + 'IconOperationfaild', + 'IconOperationfaildL', + 'IconStepsError' + ], + Warn: [ + 'IconCueL', + 'IconCueLO', + 'IconExceptionO', + 'IconExclamation', + 'IconWarn', + 'IconWarning', + 'IconWarningO', + 'IconWarningTriangle' + ], + Question: ['IconHelpCircle', 'IconHelpQuery', 'IconUnknow', 'IconUnknown'], + Prompt: [ + 'IconInfo', + 'IconInfoCircle', + 'IconInfoSolid', + 'IconHelp', + 'IconHelpSolid', + 'IconPrompt', + 'IconPromptExclamation' + ], + Stretchable: [ + 'IconFullscreenLeft', + 'IconMinscreenLeft', + 'IconMinscreenRight', + 'IconStretch', + 'IconStretchCrosswise', + 'IconStretchUpright' + ], + More: ['IconEllipsis', 'IconMore', 'IconPopup'], + Dot: [ + 'IconDotIpv4', + 'IconLeave', + 'IconOffLine', + 'IconOnLine', + 'IconBusy', + 'IconDoneMini', + 'IconOnGoing', + 'IconOnGoingMini', + 'IconMobileRadio', + 'IconExceptionMiniO', + 'IconMobileRadioSelected', + 'IconOperation', + 'IconRadio', + 'IconRadioselected' + ], + Location: ['IconLocation', 'IconLocationNumber', 'IconMarkOn'], + Letter: [ + 'IconEditorBold', + 'IconEditorDeleteline', + 'IconEditorItalic', + 'IconEditorSub', + 'IconEditorSubtitle', + 'IconEditorSuper', + 'IconEditorTitle', + 'IconEditorUnderline', + 'IconFontColor', + 'IconFontSize', + 'IconFontStyle', + 'IconFontWeight', + 'IconRichTextBold', + 'IconRichTextFontSize', + 'IconRichTextFormatClear', + 'IconRichTextH1', + 'IconRichTextH2', + 'IconRichTextH3', + 'IconRichTextH4', + 'IconRichTextH5', + 'IconRichTextH6', + 'IconRichTextHeading', + 'IconRichTextItalic', + 'IconRichTextStrikeThrough', + 'IconRichTextSubscript', + 'IconRichTextSuperscript', + 'IconRichTextUnderline', + 'IconTextDecoration', + 'IconUnderline' + ], + Mall: [ + 'IconPurchasePlannedOrder', + 'IconShipped', + 'IconShoppingCard', + 'IconSoldOut', + 'IconSurchargeSettled', + 'IconSurchargeSettled', + 'IconWaitForDeliveryO', + 'IconWaitingToPick' + ], Brands: ['IconAngularjs', 'IconEspaceAuto', 'IconEspace', 'IconNodejs', 'IconReactjs', 'IconVuejs'], Charts: ['IconAreaChart', 'IconDotChart', 'IconLineChart', 'IconPieChart', 'IconStatistics'], Editor: [ @@ -44,11 +251,8 @@ export const iconGroups = { 'IconEditorAlignLeft', 'IconEditorAlignRight', 'IconEditorBackground', - 'IconEditorBold', 'IconEditorCode', - 'IconEditorDeleteline', 'IconEditorEraser', - 'IconEditorItalic', 'IconEditorLeftBorder', 'IconEditorList', 'IconEditorListDot', @@ -58,51 +262,64 @@ export const iconGroups = { 'IconEditorQuote', 'IconEditorRedo', 'IconEditorRightBorder', - 'IconEditorSub', - 'IconEditorSubtitle', - 'IconEditorSuper', 'IconEditorTable', 'IconEditorTextcolor', - 'IconEditorTitle', - 'IconEditorUnderline', - 'IconEditorUndo', + 'IconExport', 'IconEditorVideo', - 'IconOperationfaildL', + 'IconFilletExternalLink', 'IconOuterLink', - 'IconTextDecoration', - 'IconUnderline', 'IconWriting' ], IT: [ 'IconAdministrator', 'IconDataSource', 'IconDesktopView', - 'IconEmailAdd', - 'IconEmailCircle', - 'IconExcel', 'IconException', - 'IconExclamation', 'IconLanguage', - 'IconMailContent', - 'IconMail', - 'IconMarkOn', 'IconMobileView', 'IconMobile', 'IconPrintPreview', - 'IconReplies', - 'IconSent', 'IconShare', 'IconShareArrow', - 'IconShoppingCard', 'IconTabletView', 'IconUnlock', - 'IconUnsent', 'IconUser', 'IconVersiontree', 'IconWebPlus', 'IconJs' ], + Clock: ['IconClockWork', 'IconProcessing', 'IconTime'], + Email: ['IconEmailAdd', 'IconEmailCircle', 'IconMailContent', 'IconMail', 'IconReplies', 'IconSent', 'IconUnsent'], + Folder: ['IconFileCloudupload', 'IconFolder', 'IconFolderClosed', 'IconFolderOpened'], + File: [ + 'IconCloudUpload', + 'IconDocument', + 'IconExcel', + 'IconExcelType', + 'IconFileExcel', + 'IconFile', + 'IconFilesCircle', + 'IconFiles', + 'IconFiletext', + 'IconFileType', + 'IconFileupload', + 'IconFinishO', + 'IconHistoryRecord', + 'IconOtherType', + 'IconPdfType', + 'IconPptType', + 'IconTextType', + 'IconText', + 'IconTextAlign', + 'IconTextTab', + 'IconVideoType', + 'IconWordType', + 'IconXml', + 'IconZipType' + ], + Image: ['IconAddPicture', 'IconImageAdd', 'IconPicture', 'IconPictureType', 'IconRichTextImage'], Media: [ + 'IconAudio', 'IconCourse', 'IconCustom', 'IconCustomerService', @@ -110,161 +327,89 @@ export const iconGroups = { 'IconDialog2', 'IconInformation', 'IconMessageCircle', - 'IconPagerFirst', - 'IconPagerLast', - 'IconPagerNext', - 'IconPagerPrev', + 'IconMic', 'IconPauseCircle', 'IconPause', - 'IconPicture', 'IconStartCircle', - 'IconStart', - 'IconTime' + 'IconStartO', + 'IconTurnOn' ], - Objects: [ + Object: [ 'IconBoat', 'IconCalculator', 'IconCalendar', - 'IconClockWork', 'IconCloudDownload', - 'IconCloudUpload', 'IconCoin', 'IconTaskCooperation', 'IconTelephoneCircle', 'IconTelephone' ], - Symbols: [ - 'IconBusy', - 'IconCheck', - 'IconCheckedLinear', - 'IconCheckedSur', - 'IconCloseCircle', - 'IconCloseSquare', + Symbol: [ 'IconCode', 'IconCommission', - 'IconCueL', 'IconCrop', - 'IconDotIpv4', - 'IconEllipsis', - 'IconError', 'IconEyeclose', 'IconEyeopen', 'IconFrownO', 'IconFrown', 'IconGroup', 'IconHeartempty', - 'IconHelpCircle', - 'IconHelpQuery', - 'IconHelpSolid', - 'IconHelp', 'IconHelpful', - 'IconLeave', 'IconLoading', 'IconLock', 'IconMale', 'IconMeh', - 'IconMore', - 'IconPlus', - 'IconNodeOpen', - 'IconNode', 'IconNone', - 'IconOffLine', - 'IconOnLine', 'IconPanelMax', - 'IconPanelMini', 'IconPanelNormal', - 'IconRadio', - 'IconRadioselected', 'IconSmileO', 'IconSmile', 'IconStarActive', 'IconStarDisable', - 'IconStarO', - 'IconStop', - 'IconSuccess', - 'IconSuccessful', - 'IconInfoSolid', - 'IconInfoCircle', - 'IconInfo', - 'IconOperationfaild', - 'IconUnknow', - 'IconUnknown', - 'IconWarning', - 'IconWarningTriangle', - 'IconClose', - 'IconYes' + 'IconStarO' ], - Tools: [ - 'IconAdd', - 'IconAddPicture', + Tool: [ + 'IconConfig', + 'IconSetting', 'IconAlignBaseline', - 'IconAlignCenter', 'IconAlignFlexCenter', 'IconAlignFlexEnd', 'IconAlignFlexStart', - 'IconAlignJustify', - 'IconAlignLeft', - 'IconAlignRight', - 'IconAlignStretch', 'IconApp', 'IconApplication', 'IconAssociation', 'IconAttachment', 'IconBarChart', - 'IconBefilter', 'IconBoxSolid', 'IconCheckOut', 'IconCheckedTrue', - 'IconClearFilter', - 'IconConmentRefresh', 'IconCopySolid', 'IconCopy', - 'IconDefinedFiltration', 'IconDel', + 'IconDeleteL', 'IconDeleted', 'IconDerive', 'IconDeletePage', - 'IconDescending', 'IconColReverse', 'IconDirectionCol', 'IconDirectionRow', 'IconRowReverse', 'IconDownloadCloud', 'IconDownloadLink', - 'IconDownload', 'IconDraft', 'IconEdit', + 'IconEditor', 'IconEditorTab', - 'IconExport', 'IconExpressSearch', - 'IconFileCloudupload', - 'IconFileExcel', - 'IconFile', - 'IconFilesCircle', - 'IconFiles', - 'IconFiletext', - 'IconFileupload', - 'IconFiltered', 'IconFlag', - 'IconFolderClosed', - 'IconFolderOpened', - 'IconFontColor', 'IconFontFamily', - 'IconFontSize', - 'IconFontStyle', - 'IconFontWeight', 'IconFreezeLeft', 'IconFreezeRight', 'IconFullscreen', - 'IconFullscreenLeft', 'IconGrade', - 'IconGroupTransfer', - 'IconHalfchecked', - 'IconHalfselect', 'IconHideLeft', 'IconHideRight', 'IconHideTopleft', - 'IconImport', 'IconJusitfyCenter', 'IconJusitfyFlexEnd', 'IconJusitfySpaceAround', @@ -274,24 +419,13 @@ export const iconGroups = { 'IconLineHeight', 'IconLineThrought', 'IconLink', - 'IconMinscreenLeft', 'IconMinscreen', - 'IconMinusCircle', - 'IconMinusSquare', - 'IconMinus', - 'IconNew', 'IconNoPremission', 'IconPagelink', - 'IconPlusCircle', - 'IconPlusSquare', - 'IconPreChecked', 'IconPushpin', - 'IconRedo', - 'IconRefres', 'IconRenew', - 'IconRepeat', - 'IconReplace', 'IconRightFrozen', + 'IconRichTextNodeDelete', 'IconSandwichCollapse', 'IconSandwichExpand', 'IconSave', @@ -299,21 +433,8 @@ export const iconGroups = { 'IconSearch', 'IconSelect', 'IconSeparate', - 'IconSetting', - 'IconSortDefault', - 'IconSort', - 'IconStreamSolid', - 'IconTextAlign', - 'IconTextTab', - 'IconText', 'IconTotal', 'IconUndelete', - 'IconUndo', - 'IconUnfilter', - 'IconUnfreeze', - 'IconUpload', - 'IconView', - 'IconZoomIn', - 'IconZoomOut' + 'IconUnfreeze' ] } diff --git a/examples/sites/demos/pc/app/input/basic-usage.spec.ts b/examples/sites/demos/pc/app/input/basic-usage.spec.ts index 9834b3796..1f843459d 100644 --- a/examples/sites/demos/pc/app/input/basic-usage.spec.ts +++ b/examples/sites/demos/pc/app/input/basic-usage.spec.ts @@ -3,7 +3,7 @@ import { test, expect } from '@playwright/test' test('[Input]basic-usage: placeholder, focus-style, v-model', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('input#basic-usage') - const input = await page.locator('.demo-input > .tiny-input > .tiny-input-display-only > input') + const input = page.locator('.demo-input > .tiny-input > .tiny-input-display-only > input') await expect(input).toBeVisible() await expect(input).toHaveAttribute('placeholder', 'Please input') diff --git a/examples/sites/demos/pc/app/input/show-tooltip-composition-api.vue b/examples/sites/demos/pc/app/input/show-tooltip-composition-api.vue new file mode 100644 index 000000000..c5f57e8ff --- /dev/null +++ b/examples/sites/demos/pc/app/input/show-tooltip-composition-api.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/examples/sites/demos/pc/app/input/show-tooltip.spec.ts b/examples/sites/demos/pc/app/input/show-tooltip.spec.ts new file mode 100644 index 000000000..14a7438ab --- /dev/null +++ b/examples/sites/demos/pc/app/input/show-tooltip.spec.ts @@ -0,0 +1,10 @@ +import { test, expect } from '@playwright/test' + +test('只读态悬浮提示', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('input#show-tooltip') + + const demo = page.locator('#show-tooltip') + await demo.locator('.tiny-input .tiny-input-display-only__content').hover() + await expect(page.locator('.tiny-tooltip.tiny-tooltip__popper')).not.toBeVisible() +}) diff --git a/examples/sites/demos/pc/app/input/show-tooltip.vue b/examples/sites/demos/pc/app/input/show-tooltip.vue new file mode 100644 index 000000000..f89132f86 --- /dev/null +++ b/examples/sites/demos/pc/app/input/show-tooltip.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/examples/sites/demos/pc/app/input/webdoc/input.js b/examples/sites/demos/pc/app/input/webdoc/input.js index 5050d0127..f6faeca12 100644 --- a/examples/sites/demos/pc/app/input/webdoc/input.js +++ b/examples/sites/demos/pc/app/input/webdoc/input.js @@ -41,6 +41,19 @@ export default { }, codeFiles: ['show-password.vue'] }, + { + demoId: 'show-tooltip', + name: { + 'zh-CN': '只读态悬浮提示', + 'en-US': 'Show Tooltip' + }, + desc: { + 'zh-CN': '

通过 show-tooltip 配置当文本超长时,是否显示悬浮提示。

\n', + 'en-US': + '

Use show-tooltip to configure whether to display a floating tip when the text is too long.

\n' + }, + codeFiles: ['show-tooltip.vue'] + }, { demoId: 'size', name: { diff --git a/examples/sites/demos/pc/app/select/popup-style-position-composition-api.vue b/examples/sites/demos/pc/app/select/popup-style-position-composition-api.vue index 562a57393..0b4b8847a 100644 --- a/examples/sites/demos/pc/app/select/popup-style-position-composition-api.vue +++ b/examples/sites/demos/pc/app/select/popup-style-position-composition-api.vue @@ -12,8 +12,7 @@ const options = reactive([ { value: '选项1', label: '北京' }, { value: '选项2', label: '上海' }, { value: '选项3', label: '天津' }, - { value: '选项4', label: '重庆' }, - { value: '选项5', label: '深圳' } + { value: '选项4', label: '重庆' } ]) const value = ref('') diff --git a/examples/sites/demos/pc/app/select/popup-style-position.vue b/examples/sites/demos/pc/app/select/popup-style-position.vue index 886ad3f95..ada2fc539 100644 --- a/examples/sites/demos/pc/app/select/popup-style-position.vue +++ b/examples/sites/demos/pc/app/select/popup-style-position.vue @@ -18,8 +18,7 @@ export default { { value: '选项1', label: '北京' }, { value: '选项2', label: '上海' }, { value: '选项3', label: '天津' }, - { value: '选项4', label: '重庆' }, - { value: '选项5', label: '深圳' } + { value: '选项4', label: '重庆' } ], value: '' } diff --git a/examples/sites/demos/pc/app/slider/about-step-composition-api.vue b/examples/sites/demos/pc/app/slider/about-step-composition-api.vue index 2a3836f06..290b52347 100644 --- a/examples/sites/demos/pc/app/slider/about-step-composition-api.vue +++ b/examples/sites/demos/pc/app/slider/about-step-composition-api.vue @@ -8,3 +8,9 @@ import { Slider as TinySlider } from '@opentiny/vue' const value = ref(20) + + diff --git a/examples/sites/demos/pc/app/slider/about-step.vue b/examples/sites/demos/pc/app/slider/about-step.vue index 752af2a1f..869964318 100644 --- a/examples/sites/demos/pc/app/slider/about-step.vue +++ b/examples/sites/demos/pc/app/slider/about-step.vue @@ -16,3 +16,9 @@ export default { } } + + diff --git a/examples/sites/demos/pc/app/slider/basic-usage-composition-api.vue b/examples/sites/demos/pc/app/slider/basic-usage-composition-api.vue index 91ed87a95..bf292a6f7 100644 --- a/examples/sites/demos/pc/app/slider/basic-usage-composition-api.vue +++ b/examples/sites/demos/pc/app/slider/basic-usage-composition-api.vue @@ -15,3 +15,9 @@ function setValue() { value.value = 50 } + + diff --git a/examples/sites/demos/pc/app/slider/basic-usage.vue b/examples/sites/demos/pc/app/slider/basic-usage.vue index c96fc93b9..4444c4262 100644 --- a/examples/sites/demos/pc/app/slider/basic-usage.vue +++ b/examples/sites/demos/pc/app/slider/basic-usage.vue @@ -25,3 +25,9 @@ export default { } } + + diff --git a/examples/sites/demos/pc/app/slider/dynamic-disable-composition-api.vue b/examples/sites/demos/pc/app/slider/dynamic-disable-composition-api.vue index 022af5108..7e9e86f92 100644 --- a/examples/sites/demos/pc/app/slider/dynamic-disable-composition-api.vue +++ b/examples/sites/demos/pc/app/slider/dynamic-disable-composition-api.vue @@ -8,3 +8,9 @@ import { Slider as TinySlider } from '@opentiny/vue' const value = ref(40) + + diff --git a/examples/sites/demos/pc/app/slider/dynamic-disable.vue b/examples/sites/demos/pc/app/slider/dynamic-disable.vue index e862f29e8..fb59a3f18 100644 --- a/examples/sites/demos/pc/app/slider/dynamic-disable.vue +++ b/examples/sites/demos/pc/app/slider/dynamic-disable.vue @@ -16,3 +16,9 @@ export default { } } + + diff --git a/examples/sites/demos/pc/app/slider/format-tooltip-composition-api.vue b/examples/sites/demos/pc/app/slider/format-tooltip-composition-api.vue index ffe7bbfa8..ef3b194dd 100644 --- a/examples/sites/demos/pc/app/slider/format-tooltip-composition-api.vue +++ b/examples/sites/demos/pc/app/slider/format-tooltip-composition-api.vue @@ -12,3 +12,9 @@ function format(value) { return '当前值为:' + value } + + diff --git a/examples/sites/demos/pc/app/slider/format-tooltip.vue b/examples/sites/demos/pc/app/slider/format-tooltip.vue index cebda2f12..55c1ac07b 100644 --- a/examples/sites/demos/pc/app/slider/format-tooltip.vue +++ b/examples/sites/demos/pc/app/slider/format-tooltip.vue @@ -21,3 +21,9 @@ export default { } } + + diff --git a/examples/sites/demos/pc/app/slider/marks-composition-api.vue b/examples/sites/demos/pc/app/slider/marks-composition-api.vue index 45e0849fb..5442d31df 100644 --- a/examples/sites/demos/pc/app/slider/marks-composition-api.vue +++ b/examples/sites/demos/pc/app/slider/marks-composition-api.vue @@ -1,9 +1,5 @@ + + diff --git a/examples/sites/demos/pc/app/slider/marks.vue b/examples/sites/demos/pc/app/slider/marks.vue index ff6632dbf..0411ee2f7 100644 --- a/examples/sites/demos/pc/app/slider/marks.vue +++ b/examples/sites/demos/pc/app/slider/marks.vue @@ -1,9 +1,5 @@ + + diff --git a/examples/sites/demos/pc/app/slider/max-min-composition-api.vue b/examples/sites/demos/pc/app/slider/max-min-composition-api.vue index 08fa5a12a..bc690e7a8 100644 --- a/examples/sites/demos/pc/app/slider/max-min-composition-api.vue +++ b/examples/sites/demos/pc/app/slider/max-min-composition-api.vue @@ -8,3 +8,9 @@ import { Slider as TinySlider } from '@opentiny/vue' const value = ref(30) + + diff --git a/examples/sites/demos/pc/app/slider/max-min.vue b/examples/sites/demos/pc/app/slider/max-min.vue index 7a8794640..62224e20f 100644 --- a/examples/sites/demos/pc/app/slider/max-min.vue +++ b/examples/sites/demos/pc/app/slider/max-min.vue @@ -16,3 +16,9 @@ export default { } } + + diff --git a/examples/sites/demos/pc/app/slider/range-select-composition-api.vue b/examples/sites/demos/pc/app/slider/range-select-composition-api.vue index 0d6f30ce9..f5f363df3 100644 --- a/examples/sites/demos/pc/app/slider/range-select-composition-api.vue +++ b/examples/sites/demos/pc/app/slider/range-select-composition-api.vue @@ -8,3 +8,9 @@ import { Slider as TinySlider } from '@opentiny/vue' const value = ref([20, 40]) + + diff --git a/examples/sites/demos/pc/app/slider/range-select.vue b/examples/sites/demos/pc/app/slider/range-select.vue index 60f0d8ea8..1adb435da 100644 --- a/examples/sites/demos/pc/app/slider/range-select.vue +++ b/examples/sites/demos/pc/app/slider/range-select.vue @@ -16,3 +16,9 @@ export default { } } + + diff --git a/examples/sites/demos/pc/app/slider/shortcut-operation-composition-api.vue b/examples/sites/demos/pc/app/slider/shortcut-operation-composition-api.vue index f467ca89f..44884cf6c 100644 --- a/examples/sites/demos/pc/app/slider/shortcut-operation-composition-api.vue +++ b/examples/sites/demos/pc/app/slider/shortcut-operation-composition-api.vue @@ -8,3 +8,9 @@ import { Slider as TinySlider } from '@opentiny/vue' const value = ref(40) + + diff --git a/examples/sites/demos/pc/app/slider/shortcut-operation.vue b/examples/sites/demos/pc/app/slider/shortcut-operation.vue index 21d8dcad0..80ec67961 100644 --- a/examples/sites/demos/pc/app/slider/shortcut-operation.vue +++ b/examples/sites/demos/pc/app/slider/shortcut-operation.vue @@ -16,3 +16,9 @@ export default { } } + + diff --git a/examples/sites/demos/pc/app/slider/show-input-composition-api.vue b/examples/sites/demos/pc/app/slider/show-input-composition-api.vue index 02f72a3de..0426936bc 100644 --- a/examples/sites/demos/pc/app/slider/show-input-composition-api.vue +++ b/examples/sites/demos/pc/app/slider/show-input-composition-api.vue @@ -10,3 +10,9 @@ import { Slider as TinySlider } from '@opentiny/vue' const value = ref(40) const value2 = ref([40, 60]) + + diff --git a/examples/sites/demos/pc/app/slider/show-iput.spec.ts b/examples/sites/demos/pc/app/slider/show-input.spec.ts similarity index 100% rename from examples/sites/demos/pc/app/slider/show-iput.spec.ts rename to examples/sites/demos/pc/app/slider/show-input.spec.ts diff --git a/examples/sites/demos/pc/app/slider/show-input.vue b/examples/sites/demos/pc/app/slider/show-input.vue index 49f509aa7..c087d6f3f 100644 --- a/examples/sites/demos/pc/app/slider/show-input.vue +++ b/examples/sites/demos/pc/app/slider/show-input.vue @@ -18,3 +18,9 @@ export default { } } + + diff --git a/examples/sites/demos/pc/app/slider/show-tip-composition-api.vue b/examples/sites/demos/pc/app/slider/show-tip-composition-api.vue index 101184e18..0d71e28ec 100644 --- a/examples/sites/demos/pc/app/slider/show-tip-composition-api.vue +++ b/examples/sites/demos/pc/app/slider/show-tip-composition-api.vue @@ -12,3 +12,9 @@ function format(value) { return '当前值为:' + value } + + diff --git a/examples/sites/demos/pc/app/slider/show-tip.vue b/examples/sites/demos/pc/app/slider/show-tip.vue index 836778149..66873a80f 100644 --- a/examples/sites/demos/pc/app/slider/show-tip.vue +++ b/examples/sites/demos/pc/app/slider/show-tip.vue @@ -21,3 +21,9 @@ export default { } } + + diff --git a/examples/sites/demos/pc/app/slider/slider-event-composition-api.vue b/examples/sites/demos/pc/app/slider/slider-event-composition-api.vue index fc4e6ce10..33b879955 100644 --- a/examples/sites/demos/pc/app/slider/slider-event-composition-api.vue +++ b/examples/sites/demos/pc/app/slider/slider-event-composition-api.vue @@ -32,3 +32,9 @@ function stop(val) { }) } + + diff --git a/examples/sites/demos/pc/app/slider/slider-event.vue b/examples/sites/demos/pc/app/slider/slider-event.vue index b56f83225..270c0fccd 100644 --- a/examples/sites/demos/pc/app/slider/slider-event.vue +++ b/examples/sites/demos/pc/app/slider/slider-event.vue @@ -39,3 +39,9 @@ export default { } } + + diff --git a/examples/sites/demos/pc/app/slider/slider-slot-composition-api.vue b/examples/sites/demos/pc/app/slider/slider-slot-composition-api.vue index c2ee5234e..f2e26dbdf 100644 --- a/examples/sites/demos/pc/app/slider/slider-slot-composition-api.vue +++ b/examples/sites/demos/pc/app/slider/slider-slot-composition-api.vue @@ -12,3 +12,9 @@ import { Slider as TinySlider } from '@opentiny/vue' const value = ref(40) + + diff --git a/examples/sites/demos/pc/app/slider/slider-slot.vue b/examples/sites/demos/pc/app/slider/slider-slot.vue index f0934b619..fe37ccd69 100644 --- a/examples/sites/demos/pc/app/slider/slider-slot.vue +++ b/examples/sites/demos/pc/app/slider/slider-slot.vue @@ -20,3 +20,9 @@ export default { } } + + diff --git a/examples/sites/demos/pc/app/slider/vertical-mode-composition-api.vue b/examples/sites/demos/pc/app/slider/vertical-mode-composition-api.vue index 11bbba780..ff5ba6404 100644 --- a/examples/sites/demos/pc/app/slider/vertical-mode-composition-api.vue +++ b/examples/sites/demos/pc/app/slider/vertical-mode-composition-api.vue @@ -8,3 +8,9 @@ import { Slider as TinySlider } from '@opentiny/vue' const value = ref(30) + + diff --git a/examples/sites/demos/pc/app/slider/vertical-mode.vue b/examples/sites/demos/pc/app/slider/vertical-mode.vue index 06219b040..5dc72b3a4 100644 --- a/examples/sites/demos/pc/app/slider/vertical-mode.vue +++ b/examples/sites/demos/pc/app/slider/vertical-mode.vue @@ -16,3 +16,9 @@ export default { } } + + diff --git a/examples/sites/demos/pc/app/time-picker/default-value.spec.ts b/examples/sites/demos/pc/app/time-picker/default-value.spec.ts index 888141cb2..b833042ac 100644 --- a/examples/sites/demos/pc/app/time-picker/default-value.spec.ts +++ b/examples/sites/demos/pc/app/time-picker/default-value.spec.ts @@ -9,7 +9,7 @@ test('选择器打开时默认时间设置', async ({ page }) => { const minute = page.getByRole('listitem').filter({ hasText: '40' }).first() const second = page.getByRole('listitem').filter({ hasText: '00' }).nth(2) - await page.locator('#default-value input[type="text"]').click() + await page.locator('#default-value input[type="text"]').nth(0).click() await expect(hour).toHaveClass(/active/) await expect(minute).toHaveClass(/active/) await expect(second).toHaveClass(/active/) diff --git a/examples/sites/demos/pc/app/time-picker/picker-options.spec.ts b/examples/sites/demos/pc/app/time-picker/picker-options.spec.ts index 31fc33c4d..9a5f57cf9 100644 --- a/examples/sites/demos/pc/app/time-picker/picker-options.spec.ts +++ b/examples/sites/demos/pc/app/time-picker/picker-options.spec.ts @@ -5,6 +5,7 @@ test('固定时间范围', async ({ page }) => { await page.goto('time-picker#picker-options') const selectTime = page.getByRole('textbox', { name: '18:40:00' }) + const selectTime1 = page.getByRole('textbox', { name: '19:40:00' }) // 点击17点,点击确定,关闭选择框后,查看input 时间是否仍是18:40:00 await selectTime.click() await page.waitForTimeout(100) @@ -12,11 +13,11 @@ test('固定时间范围', async ({ page }) => { await page.getByRole('button', { name: '确定' }).click() await page.waitForTimeout(100) await expect(selectTime).toBeVisible() - // 点击21点,点击确定,关闭选择框后,查看input 时间是否仍是18:40:00 + // 点击19点,点击确定,关闭选择框后,查看input 时间是19:40:00 await selectTime.click() await page.waitForTimeout(100) - await page.getByRole('listitem').filter({ hasText: '21' }).first().click() + await page.getByRole('listitem').filter({ hasText: '19' }).first().click() await page.getByRole('button', { name: '确定' }).click() await page.waitForTimeout(100) - await expect(selectTime).toBeVisible() + await expect(selectTime1).toBeVisible() }) diff --git a/examples/sites/demos/pc/app/tree/filter-view-composition-api.vue b/examples/sites/demos/pc/app/tree/filter-view-composition-api.vue index 6951e0382..fe8cb9b38 100644 --- a/examples/sites/demos/pc/app/tree/filter-view-composition-api.vue +++ b/examples/sites/demos/pc/app/tree/filter-view-composition-api.vue @@ -14,6 +14,13 @@ 隐藏 +
+ 搜索后是否高亮关键字: + + 高亮 + 默认不变 + +
搜索值: @@ -23,6 +30,7 @@ ref="treeRef" :data="data" :view-type="viewType" + :highlight-query="highlightQuery === 'show'" :filter-node-method="filterNodeMethod" :show-auxi="showAuxi === 'show'" default-expand-all @@ -41,6 +49,7 @@ import { Tree as TinyTree, RadioGroup as TinyRadioGroup, Radio as TinyRadio, Inp const treeRef = ref() const viewType = ref('tree') +const highlightQuery = ref('hide') const showAuxi = ref('hide') const filterText = ref('') const data = ref([ diff --git a/examples/sites/demos/pc/app/tree/filter-view.spec.ts b/examples/sites/demos/pc/app/tree/filter-view.spec.ts index b30dac9ce..b8c2e94f9 100644 --- a/examples/sites/demos/pc/app/tree/filter-view.spec.ts +++ b/examples/sites/demos/pc/app/tree/filter-view.spec.ts @@ -7,15 +7,23 @@ test('测试过滤视图', async ({ page }) => { const preview = page.locator('.pc-demo-container') const tree = preview.locator('.tiny-tree').nth(0) const btnPlain = preview.getByText('平铺视图 plain') + const btnHighlight = preview.getByRole('radio', { name: '高亮' }) const checkboxs = tree.locator('.tiny-tree__plain-node .tiny-checkbox') + const highlightNodes = tree.locator('.tiny-tree__plain-node .tiny-hl-query-node') const input = preview.locator('.tiny-input input') await expect(tree.getByText('数据 1-1-1')).toHaveCount(1) + // 测试平铺视图 await btnPlain.click() await expect(checkboxs).toHaveCount(9) await page.waitForTimeout(20) + // 测试过滤 await input.fill('1-1') await expect(checkboxs).toHaveCount(3) + + // 测试高亮 + await btnHighlight.click() + await expect(highlightNodes).toHaveCount(2) }) diff --git a/examples/sites/demos/pc/app/tree/filter-view.vue b/examples/sites/demos/pc/app/tree/filter-view.vue index 70f0d62b2..2bfc65185 100644 --- a/examples/sites/demos/pc/app/tree/filter-view.vue +++ b/examples/sites/demos/pc/app/tree/filter-view.vue @@ -14,6 +14,13 @@ 隐藏
+
+ 搜索后是否高亮关键字: + + 高亮 + 默认不变 + +
搜索值: @@ -23,6 +30,7 @@ ref="treeRef" :data="data" :view-type="viewType" + :highlight-query="highlightQuery === 'show'" :filter-node-method="filterNodeMethod" :show-auxi="showAuxi === 'show'" default-expand-all @@ -49,6 +57,7 @@ export default { return { viewType: 'tree', showAuxi: 'hide', + highlightQuery: 'hide', filterText: '', data: [ { diff --git a/examples/sites/demos/pc/app/tree/webdoc/tree.js b/examples/sites/demos/pc/app/tree/webdoc/tree.js index 6b6b2f535..131948422 100644 --- a/examples/sites/demos/pc/app/tree/webdoc/tree.js +++ b/examples/sites/demos/pc/app/tree/webdoc/tree.js @@ -312,6 +312,7 @@ export default { 'zh-CN': ` 通过 filter-node-method 属性, 指定过滤节点时的函数,函数返回true时节点显示,否则节点隐藏。
通过 filter 组件方法,触发组件进行过滤。
+ 通过 highlightQuery 属性,是否在匹配的节点中,高亮搜索文字。
通过 view-type 属性,设置组件的视图模式,可选值为 tree plain ,默认为 tree
通过 show-auxi 属性,设置在平铺视图时,是否显示节点的辅助信息,默认为true
@@ -321,6 +322,7 @@ export default { `, 'en-US': `The filter-node-method property is used to specify the function for filtering nodes. The function returns true to display the nodes.
Run the filter component method to trigger the component to filter.
+ Use the highlightQuery attribute to determine whether to highlight the search text in the matched node.
Use the view-type property to set the component view mode. The optional values are tree and plain . The default value is tree .
The show-auxi property is used to set whether to display auxiliary node information in tiled view. The default is true.
diff --git a/examples/sites/demos/pc/menus.js b/examples/sites/demos/pc/menus.js index 31f44dbcf..c08f405aa 100644 --- a/examples/sites/demos/pc/menus.js +++ b/examples/sites/demos/pc/menus.js @@ -320,7 +320,10 @@ export const cmpMenus = [ 'label': '自定义指令', 'labelEn': 'Custom Instruction', 'key': 'directives-custom-instruction', - 'children': [{ 'nameCn': '超出隐藏', 'name': 'AutoTip', 'key': 'directives-auto-tip' }] + 'children': [ + { 'nameCn': '超出隐藏', 'name': 'AutoTip', 'key': 'directives-auto-tip' }, + { 'nameCn': '高亮搜索字', 'name': 'HighlightQuery', 'key': 'directives-highlight-query' } + ] } ] diff --git a/examples/sites/src/assets/images/Infinitely-icon.png b/examples/sites/src/assets/images/Infinitely-icon.png new file mode 100644 index 000000000..08c7ea479 Binary files /dev/null and b/examples/sites/src/assets/images/Infinitely-icon.png differ diff --git a/examples/sites/src/assets/images/Infinitely.png b/examples/sites/src/assets/images/Infinitely.png new file mode 100644 index 000000000..3d5aa2062 Binary files /dev/null and b/examples/sites/src/assets/images/Infinitely.png differ diff --git a/examples/sites/src/assets/images/glaciers-icon.png b/examples/sites/src/assets/images/glaciers-icon.png new file mode 100644 index 000000000..a9e551768 Binary files /dev/null and b/examples/sites/src/assets/images/glaciers-icon.png differ diff --git a/examples/sites/src/assets/images/glaciers.png b/examples/sites/src/assets/images/glaciers.png new file mode 100644 index 000000000..7b8b236be Binary files /dev/null and b/examples/sites/src/assets/images/glaciers.png differ diff --git a/examples/sites/src/assets/images/oceanic-icon.png b/examples/sites/src/assets/images/oceanic-icon.png new file mode 100644 index 000000000..12d7a3c3f Binary files /dev/null and b/examples/sites/src/assets/images/oceanic-icon.png differ diff --git a/examples/sites/src/assets/images/oceanic.png b/examples/sites/src/assets/images/oceanic.png new file mode 100644 index 000000000..9f68f94aa Binary files /dev/null and b/examples/sites/src/assets/images/oceanic.png differ diff --git a/examples/sites/src/assets/images/starry-sky-icon.png b/examples/sites/src/assets/images/starry-sky-icon.png new file mode 100644 index 000000000..3849298ac Binary files /dev/null and b/examples/sites/src/assets/images/starry-sky-icon.png differ diff --git a/examples/sites/src/assets/images/starry-sky.png b/examples/sites/src/assets/images/starry-sky.png new file mode 100644 index 000000000..04b49a01a Binary files /dev/null and b/examples/sites/src/assets/images/starry-sky.png differ diff --git a/examples/sites/src/i18n/en.json b/examples/sites/src/i18n/en.json index 8579b59d3..b4e15c681 100644 --- a/examples/sites/src/i18n/en.json +++ b/examples/sites/src/i18n/en.json @@ -1,5 +1,7 @@ { - "language": "EN", + "zh-cn": "Chinese", + "en-us": "English", + "localeType": "Language Selection", "dark": "Dark", "light": "Light", "searchPlaceholder": "Search", @@ -39,4 +41,4 @@ "demoModeMultiple": "Multiple", "contributor": "Contributors", "noData": "No Data" -} +} \ No newline at end of file diff --git a/examples/sites/src/i18n/zh.json b/examples/sites/src/i18n/zh.json index 852d3ab32..68ed387cc 100644 --- a/examples/sites/src/i18n/zh.json +++ b/examples/sites/src/i18n/zh.json @@ -1,5 +1,7 @@ { - "language": "中", + "zh-cn": "中文", + "en-us": "英文", + "localeType": "语言选择", "dark": "深色", "light": "浅色", "searchPlaceholder": "搜索", @@ -39,4 +41,4 @@ "demoModeMultiple": "多示例", "contributor": "贡献者", "noData": "暂无数据" -} +} \ No newline at end of file diff --git a/examples/sites/src/tools/appData.js b/examples/sites/src/tools/appData.js index 689a98848..7b2c68b6a 100644 --- a/examples/sites/src/tools/appData.js +++ b/examples/sites/src/tools/appData.js @@ -11,17 +11,14 @@ const appData = reactive({ bpState: useMediaQuery([640, 1024, 1280]).matches // 3点4区间, bp0,bp1,bp2,bp3 }) const isZhCn = computed(() => appData.lang === ZH_CN_LANG) -let appFn = { - toggleLang() { - let url = location.href - if (appData.lang === ZH_CN_LANG) { - url = location.href.replace(zhPath, enPath) - } else { - url = location.href.replace(enPath, zhPath) +const appFn = { + toggleLang(name) { + if (name !== appData.lang) { + let url = location.href + url = location.href.replace(LANG_PATH_MAP[appData.lang], LANG_PATH_MAP[name]) + appData.lang = name + location.replace(url) } - appData.lang = appData.lang === ZH_CN_LANG ? EN_US_LANG : ZH_CN_LANG - // router.push(url) - location.replace(url) }, toggleTheme() { appData.theme = appData.theme === 'light' ? 'dark' : 'light' diff --git a/examples/sites/src/tools/useApiMode.js b/examples/sites/src/tools/useApiMode.js index bed22f044..9f19cedd8 100644 --- a/examples/sites/src/tools/useApiMode.js +++ b/examples/sites/src/tools/useApiMode.js @@ -1,9 +1,11 @@ import { reactive } from 'vue' import { $local } from './storage' +import { appFn } from './appData' const _modeKey = 'tiny-vue-api-mode' const _demoModeKey = 'tiny-vue-demo-mode' const apiModeState = reactive({ + localeMode: location.href.includes('en-US') ? 'enUS' : 'zhCN', apiMode: $local[_modeKey] || 'Composition', // 示例风格: Options: 组合式; Composition: 选项式 demoMode: $local[_demoModeKey] || 'default' // 示例展示: default:多示例, single:单示例 }) @@ -12,6 +14,9 @@ const apiModeFn = { getDemoName: (name) => { return name.replace(/\.vue$/, `${apiModeState.apiMode === 'Options' ? '' : '-composition-api'}.vue`) }, + changeLocaleMode: (name) => { + appFn.toggleLang(name) + }, changeApiMode: (name) => { $local[_modeKey] = name }, diff --git a/examples/sites/src/tools/useStyleSettings.js b/examples/sites/src/tools/useStyleSettings.js index 92234f0f5..88f729ba1 100644 --- a/examples/sites/src/tools/useStyleSettings.js +++ b/examples/sites/src/tools/useStyleSettings.js @@ -1,6 +1,22 @@ /** 文档显示风格设置 */ const getStyleSettings = (i18nByKey) => { const styleSettings = [ + { + // 语言选择 + name: 'localeMode', + defaultValue: 'zhCN', + title: i18nByKey('localeType'), + options: [ + { + value: 'zhCN', + text: i18nByKey('zh-cn') + }, + { + value: 'enUS', + text: i18nByKey('en-us') + } + ] + }, { // 示例代码风格 name: 'apiMode', diff --git a/examples/sites/src/tools/useTheme.js b/examples/sites/src/tools/useTheme.js index 442d320d4..9e0907ecc 100644 --- a/examples/sites/src/tools/useTheme.js +++ b/examples/sites/src/tools/useTheme.js @@ -16,6 +16,17 @@ import { INFINITY_THEME, getKeyByValue } from '../const' +import glaciers from '@/assets/images/glaciers.png' +import glaciersIcon from '@/assets/images/glaciers-icon.png' + +import infinitely from '@/assets/images/Infinitely.png' +import infinitelyIcon from '@/assets/images/Infinitely-icon.png' + +import oceanic from '@/assets/images/oceanic.png' +import oceanicIcon from '@/assets/images/oceanic-icon.png' + +import starrySky from '@/assets/images/starry-sky.png' +import starrySkyIcon from '@/assets/images/starry-sky-icon.png' const themeMap = { [DEFAULT_THEME]: null, @@ -27,10 +38,34 @@ const themeMap = { const isEn = appData.lang === 'enUS' const themeData = [ - { value: [DEFAULT_THEME], label: isEn ? 'Default Theme' : '默认主题' }, - { value: [INFINITY_THEME], label: isEn ? 'Infinity Theme' : '无限主题' }, - { value: [AURORA_THEME], label: isEn ? 'Aurora Theme' : 'Aurora 主题' }, - { value: [SMB_THEME], label: isEn ? 'SMB Theme' : 'SMB 主题' } + { + value: [DEFAULT_THEME], + label: isEn ? 'Default Theme' : '冰川主题', + tips: isEn ? 'Accurate, Efficient, Distinct' : '精准、高效、清晰', + icon: glaciersIcon, + bgImage: glaciers + }, + { + value: [SMB_THEME], + label: isEn ? 'Star Theme' : '星空主题', + tips: isEn ? 'Leading, Innovative, Reliable' : '领先、创新、信赖', + icon: starrySkyIcon, + bgImage: starrySky + }, + { + value: [AURORA_THEME], + label: isEn ? 'Ocean Theme' : '海洋主题', + tips: isEn ? 'Simple, Agile, Delightful' : '简约、敏捷、愉悦', + icon: oceanicIcon, + bgImage: oceanic + }, + { + value: [INFINITY_THEME], + label: isEn ? 'Infinity Theme' : '无限主题', + tips: isEn ? 'Creative, Scientific, Efficient' : '创造、科学、高效', + icon: infinitelyIcon, + bgImage: infinitely + } ] const designConfigMap = { diff --git a/examples/sites/src/views/components/float-settings.vue b/examples/sites/src/views/components/float-settings.vue index b4703b158..1115c0d07 100644 --- a/examples/sites/src/views/components/float-settings.vue +++ b/examples/sites/src/views/components/float-settings.vue @@ -5,69 +5,70 @@ :style="settingsStyle" > - - -
- -
-
-