docs(image):[image,transfer,tree] update image\transfer's docs (#1209)

* docs(image): update image\transfer's docs

* docs(tree): update tree's docs
This commit is contained in:
申君健 2023-12-25 19:02:20 +08:00 committed by GitHub
parent 8c1d8b2214
commit 180edfd9a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 222 additions and 120 deletions

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('基础用法', async ({ page }) => {
test('测试基础用法', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('image#basic-usage')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('事件', async ({ page }) => {
test('测试事件', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('image#events')
const errorSlot = page.locator('.tiny-image__error')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('懒加载', async ({ page }) => {
test('测试懒加载', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('image#lazy')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('对话框中预览图片', async ({ page }) => {
test('测试对话框中预览图片', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('image#preview-in-dialog')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('图片大图', async ({ page }) => {
test('测试图片预览大图', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('image#preview')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('插槽', async ({ page }) => {
test('测试插槽', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('image#slot')

View File

@ -4,4 +4,6 @@ title: Image 图片预览
# Image 图片预览
<div>图片容器,在保留原生 img 的特性下,支持懒加载,自定义占位、加载失败等功能。</div>
<div>
图片组件,支持懒加载以及自适应容器大小等,同时还支持点击全屏浏览图册的功能。
</div>

View File

@ -4,4 +4,6 @@ title: Image preview
# Image preview
<div>Image container, which supports lazy loading, customized placeholder, and loading failure while retaining the native IMG feature.</div>
<div>
Image components, support lazy loading and adaptive container size, etc., but also support the function of clicking full-screen browse album.
</div>

View File

@ -122,7 +122,7 @@ export default {
'type': 'string',
'defaultValue': '',
'desc': {
'zh-CN': '设置预览图片路径',
'zh-CN': '设置图片路径',
'en-US': 'Set the path of the preview image.'
},
'demoId': 'basic-usage'
@ -132,9 +132,8 @@ export default {
'type': `'fill' | 'contain' | 'cover' | 'none' | 'scale-down '`,
'defaultValue': '',
'desc': {
'zh-CN': '确定图片如何适应容器框,同原生 object-fit',
'en-US':
'Determine how the image adapts to the container frame, which is the same as the native object-fit. '
'zh-CN': '确定图片如何适应容器大小',
'en-US': 'Determine how the image adapts to the container frame '
},
'demoId': 'basic-usage'
},
@ -142,7 +141,7 @@ export default {
'name': 'lazy',
'type': 'boolean',
'defaultValue': 'false',
'desc': { 'zh-CN': '是否开启懒加载', 'en-US': 'Whether to enable lazy loading' },
'desc': { 'zh-CN': '是否懒加载', 'en-US': 'Whether to enable lazy loading' },
'demoId': 'lazy'
},
{
@ -150,10 +149,12 @@ export default {
'type': 'string | HTMLElement',
'defaultValue': '',
'desc': {
'zh-CN':
'开启懒加载后,监听 scroll 事件的容器,该属性的默认值为 最近一个 overflow 值为 auto 或 scroll 的父元素',
'en-US':
'After lazy loading is enabled, the container listens for the scroll event. The default value of this property is the parent element of the last overflow value being auto or scroll'
'zh-CN': `指定滚动容器。启用懒加载时,监听滚动容器的 scroll 事件来懒加载。
该属性用于设置图片的容器,当未设置容器时默认会取最近一个 overflow 值为 auto scroll 的父元素做为滚动容器
`,
'en-US': `Specifies the scroll container. When lazy loading is enabled, the scroll event of the image component container is monitored for lazy loading.
This property is used to set the image container. When the container is not set, the default will take the parent element of the last overflow value as auto or scroll as the scroll container
`
},
'demoId': ''
},
@ -161,7 +162,10 @@ export default {
'name': 'preview-src-list',
'type': 'string[]',
'defaultValue': '[]',
'desc': { 'zh-CN': '开启图片预览功能', 'en-US': 'Enable the image preview function.' },
'desc': {
'zh-CN': '指定预览大图时的图片列表',
'en-US': 'Specifies the list of images to use when previewing a large image'
},
'demoId': 'preview'
},
{
@ -169,8 +173,8 @@ export default {
'type': 'number',
'defaultValue': '2000',
'desc': {
'zh-CN': '设置图片预览外层元素的 z-index',
'en-US': 'Set the z-index of the image preview wrapper'
'zh-CN': '图片预览功能时,设置最外层元素的 z-index',
'en-US': 'For the image preview function, set the z-index of the outermost element'
},
'demoId': ''
}
@ -178,16 +182,22 @@ export default {
'events': [
{
'name': 'load',
'type': '',
'type': '(ev) => void',
'defaultValue': '',
'desc': { 'zh-CN': '图片加载成功触发', 'en-US': 'When the image loading success triggered.' },
'desc': {
'zh-CN': '图片加载成功的触发的事件,参数为原生的成功事件',
'en-US': 'When the image loading success triggered,the parameter is a native success event.'
},
'demoId': 'events'
},
{
'name': 'error',
'type': '',
'type': '(ev) => void',
'defaultValue': '',
'desc': { 'zh-CN': '图片加载失败触发', 'en-US': 'When the Image loading failure triggered' },
'desc': {
'zh-CN': '图片加载失败后触发的事件,参数为原生的失败事件',
'en-US': 'When the Image loading failure triggered,the parameter is a native failure event'
},
'demoId': 'events'
}
],
@ -196,14 +206,20 @@ export default {
'name': 'placeholder',
'type': '',
'defaultValue': '',
'desc': { 'zh-CN': '加载中的占位内容插槽', 'en-US': 'Placeholder Slot that is not loaded to the image' },
'desc': {
'zh-CN': '图片加载的占位内容插槽',
'en-US': 'Placeholder Slot that is not loaded to the image'
},
'demoId': 'slot'
},
{
'name': 'error',
'type': '',
'defaultValue': '',
'desc': { 'zh-CN': '加载失败的占位内容插槽', 'en-US': 'Error Slot that fails to be loaded' },
'desc': {
'zh-CN': '图片加载失败的占位内容插槽',
'en-US': 'Error Slot that fails to be loaded'
},
'demoId': 'slot'
}
]

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('基本用法', async ({ page }) => {
test('测试基本用法', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('transfer#basic-usage')
const preview = page.locator('.pc-demo-container')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('基本用法', async ({ page }) => {
test('测试穿梭拦截的功能', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('transfer#basic-usage')
const preview = page.locator('.pc-demo-container')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('自定义按钮测试', async ({ page }) => {
test('测试自定义按钮的文字', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('transfer#custom-btns')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('自定义过滤方法', async ({ page }) => {
test('测试自定义过滤方法', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('transfer#custom-filter')

View File

@ -1,7 +1,8 @@
import { test, expect } from '@playwright/test'
test('自定义列表底部', async ({ page }) => {
test('测试自定义列表底部', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('transfer#custom-footer')
await expect(page.getByRole('button', { name: '操作' })).toHaveCount(2)
})

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('判断是否可以选中自定义数据项', async ({ page }) => {
test('测试是否可以选中自定义数据项', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('transfer#custom-render')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('自定义列表标题', async ({ page }) => {
test('测试自定义列表标题', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('transfer#custom-titles')
const preview = page.locator('.pc-demo-container')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('判断面板是否有默认勾选项', async ({ page }) => {
test('测试面板的默认勾选项', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('transfer#default-checked')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('尝试拖拽', async ({ page }) => {
test('测试可拖拽功能', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('transfer#drop-config')
const preview = page.locator('.pc-demo-container')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('判断数据交换', async ({ page }) => {
test('测试嵌套表格', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('transfer#nested-table')
const preview = page.locator('.pc-demo-container')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('嵌套树', async ({ page }) => {
test('测试嵌套树', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('transfer#nested-tree')
const preview = page.locator('.pc-demo-container')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('判断交换左侧备选项后是否位于右侧面板首位', async ({ page }) => {
test('测试排序策略', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('transfer#target-order')
const preview = page.locator('.pc-demo-container')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('判断是否触发了不同事件', async ({ page }) => {
test('测试事件', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('transfer#transfer-events')
const preview = page.locator('.pc-demo-container')

View File

@ -4,4 +4,4 @@ title: Transfer 穿梭框
# Transfer 穿梭框
<div>穿梭框,实现2个表格数据的双向交换的组件。</div>
<div>穿梭框,实现左右表格数据的双向交换的组件。</div>

View File

@ -1,7 +1,7 @@
---
title: Transfer shuttle box
title: Transfer
---
# Transfer shuttle box
# Transfer
<div>Shuttle box, a component that realizes the two-way exchange of data between two tables.</div>
<div>Transfer realizes the two-way exchange of data between two tables.</div>

View File

@ -213,14 +213,20 @@ export default {
'name': 'filterable',
'type': 'boolean',
'defaultValue': 'false',
'desc': { 'zh-CN': '是否可搜索', 'en-US': 'Filterable or not' },
'desc': {
'zh-CN': '是否启用搜索的功能',
'en-US': 'Whether to enable the search function'
},
'demoId': 'custom-filter'
},
{
'name': 'filter-placeholder',
'type': 'string',
'defaultValue': '',
'desc': { 'zh-CN': '搜索框占位符', 'en-US': 'Search box placeholder' },
'desc': {
'zh-CN': '启用搜索时,搜索框占位符',
'en-US': "When Search, filter box's placeholder"
},
'demoId': 'custom-filter'
},
{
@ -229,8 +235,8 @@ export default {
'defaultValue': '',
'desc': {
'zh-CN': `
设置穿梭框的搜索过滤函数仅在默认列表和嵌套表时有效; <br>
嵌套树时请使用treeConfig进行搜索配置;<br>
设置穿梭框的搜索过滤函数仅在默认列表和嵌套表时有效<br>
嵌套树时请使用treeConfig进行搜索配置<br>
`,
'en-US': `
Set the search filter function for the transfer to work only for default lists and nested tables. <br>
@ -245,9 +251,9 @@ export default {
'defaultValue': '[]',
'desc': {
'zh-CN':
'自定义列表标题;不设置titles时左右列表的标题默认显示为 <code> 列表 1</code><code> 列表 2</code>',
'自定义列表标题;不设置titles时左右列表的标题默认显示为 <code> 列表 1</code><code> 列表 2</code>',
'en-US':
'Custom list titles When titles are not set, the titles of the left and right lists are displayed by default: <code> list 1</code><code> list 2</code>'
'Custom list titles When titles are not set, the titles of the left and right lists are displayed by default: <code> list 1</code>,<code> list 2</code>'
},
'demoId': 'custom-titles'
},
@ -255,7 +261,11 @@ export default {
'name': 'button-texts',
'type': 'string[]',
'defaultValue': '[]',
'desc': { 'zh-CN': '自定义按钮文案', 'en-US': 'Custom Button Text' },
'desc': {
'zh-CN': '通过传入一个2值的字符串数组自定义左右穿梭按钮的文案',
'en-US':
'Customize the copy of the left and right shuttle button by passing in an array of 2-valued strings'
},
'demoId': 'custom-btns'
},
{
@ -263,8 +273,8 @@ export default {
'type': '(h: Vue.h, item: any) => vnode',
'defaultValue': '',
'desc': {
'zh-CN': '自定义数据项渲染函数',
'en-US': 'Custom data item rendering function; Its type is declared as: (h, item) => vnode'
'zh-CN': '数据项的自定义渲染函数',
'en-US': 'Custom data item rendering function'
},
'demoId': 'custom-render'
},
@ -273,8 +283,11 @@ export default {
'type': 'object',
'defaultValue':
// eslint-disable-next-line no-template-curly-in-string
"{ <br>&nbsp; noChecked:'${checked}/${total}', <br>&nbsp; hasChecked: '${checked}/${total}' <br>}",
'desc': { 'zh-CN': '列表顶部勾选状态文案', 'en-US': 'Check the status copy at the top of the list' },
"{ <br>&nbsp;&nbsp; noChecked:'${checked}/${total}', <br>&nbsp;&nbsp; hasChecked: '${checked}/${total}' <br>}",
'desc': {
'zh-CN': '列表顶部勾选状态文案',
'en-US': 'Check the status copy at the top of the list'
},
'demoId': 'custom-titles'
},
{
@ -292,8 +305,8 @@ export default {
'type': 'string[]',
'defaultValue': '[]',
'desc': {
'zh-CN': '初始状态下左侧列表的已勾选项的 key 数组',
'en-US': 'Initially, the key array of the checked items in the left list'
'zh-CN': '默认左侧列表的已勾选项的 key 数组',
'en-US': 'The key array of the checked items in the left list'
},
'demoId': 'default-checked'
},
@ -302,8 +315,8 @@ export default {
'type': 'string[]',
'defaultValue': '[]',
'desc': {
'zh-CN': '初始状态下右侧列表的已勾选项的 key 数组',
'en-US': 'Initially, the key array of the checked items in the right list'
'zh-CN': '默认右侧列表的已勾选项的 key 数组',
'en-US': 'The key array of the checked items in the right list'
},
'demoId': 'default-checked'
},
@ -315,7 +328,7 @@ export default {
'zh-CN': ` 右侧列表元素的插入排序策略,该属性的可选值为 original / push / unshift; <br>
&nbsp; 若为 original则保持与数据源相同的顺序 <br>
&nbsp; 若为 push则新加入的元素排在最后 <br>
&nbsp; 若为 unshift则新加入的元素排在最前;`,
&nbsp; 若为 unshift则新加入的元素排在最前`,
'en-US': `The insertion sort strategy for the elements in the list on the right, with the optional values original/push/unshift;<br>
&nbsp; If original, it maintains the same order as the data source.<br>
&nbsp; If it is a push, the new element is listed last.<br>
@ -348,7 +361,10 @@ export default {
'name': 'show-all-btn',
'type': 'boolean',
'defaultValue': 'false',
'desc': { 'zh-CN': '是否展示全部移动按钮', 'en-US': 'Whether to show all move buttons' },
'desc': {
'zh-CN': '是否显示全部移动按钮',
'en-US': 'Whether to show all move buttons'
},
'demoId': 'custom-btns'
},
{
@ -357,8 +373,8 @@ export default {
'typeAnchorName': 'IDropConfig',
'defaultValue': '',
'desc': {
'zh-CN': '设置穿梭框列表项可拖拽',
'en-US': 'Make the transfer list item draggable'
'zh-CN': '设置穿梭框列表项可拖拽的参数参见sortablejs插件',
'en-US': 'To set drag-and-drop parameters for shuttle list items, see sortablejs plugin'
},
'demoId': 'drop-config'
},
@ -368,7 +384,7 @@ export default {
'typeAnchorName': 'grid#IColumnConfig',
'defaultValue': '',
'desc': {
'zh-CN': '在渲染类型为 table 时,设置穿梭框表格列配置',
'zh-CN': '在渲染类型为 table 时,设置穿梭框表格列配置',
'en-US': `When the render type is table, set the transfer's table column configuration`
},
'demoId': 'nested-table'
@ -378,7 +394,7 @@ export default {
'type': 'boolean',
'defaultValue': 'false',
'desc': {
'zh-CN': '在渲染类型为 table 时,设置是否显示分页',
'zh-CN': '在渲染类型为 table 时,设置表格是否显示分页',
'en-US': 'Sets whether pagination should be displayed when the render type is table.'
},
'demoId': 'nested-table'
@ -389,7 +405,7 @@ export default {
'typeAnchorName': 'IPagerOp',
'defaultValue': "{ mode: 'fixed',pageVO: {currentPage: 1,pageSize: 10}",
'desc': {
'zh-CN': '在渲染类型为 table 时,设置分页配置',
'zh-CN': '在渲染类型为 table 时,设置表格的分页配置',
'en-US': 'When the render type is table, set the paging configuration'
},
'demoId': 'nested-table'
@ -400,9 +416,9 @@ export default {
'defaultValue': '',
'desc': {
'zh-CN':
'设置左右区域的渲染类型,Table 和 Tree 对象需要从组件包中引入相应的组件变量。该属性值的plugin设置为Table时设置渲染为表格;该属性值的pluginplugin设置为Tree渲染为树',
'设置左右区域的渲染类型,Table 和 Tree 对象需要从组件包中引入相应的组件变量。<br>该属性值的plugin设置为Table时设置渲染为表格;该属性值的pluginplugin设置为Tree渲染为树',
'en-US':
'Sets the rendering type for the left and right regions. This property renders to a Table when plugin is set to table; The value of the pluginplugin set to Tree renders as a tree'
'Sets the rendering type for the left and right regions. <br>This property renders to a Table when plugin is set to table; The value of the pluginplugin set to Tree renders as a tree'
},
'demoId': 'nested-table'
},
@ -424,7 +440,7 @@ export default {
'type': '(value:string[], move:string, keyArray:string[])=>void',
'defaultValue': '',
'desc': {
'zh-CN': `右侧列表元素变化时触发;<br>
'zh-CN': `右侧列表元素变化时触发的事件;<br>
value: 穿梭框右侧数据值列表<br>
move: 数据移动方向是left或者right<br>
keyArray: 被移动的数据值列表`,
@ -441,7 +457,7 @@ export default {
'type': '(checked:string[], statusChanged:string[]) => void',
'defaultValue': '',
'desc': {
'zh-CN': `左侧列表元素被用户选中 / 取消选中时触发;<br>
'zh-CN': `左侧列表元素选择时触发的事件;<br>
checked: 穿梭框左侧被选中的数据值列表<br>
statusChanged: 穿梭框左侧选中状态发生变化的数据值列表`,
'en-US': `Triggered when an element in the left list is selected/unselected by the user. <br>
@ -455,7 +471,7 @@ export default {
'type': '(checked:string[], statusChanged:string[]) => void',
'defaultValue': '',
'desc': {
'zh-CN': `右侧列表元素被用户选中 / 取消选中时触发;<br>
'zh-CN': `右侧列表元素选择时触发的事件;<br>
checked: 穿梭框右侧被选中的数据值列表<br>
statusChanged: 穿梭框右侧选中状态发生变化的数据值列表`,
'en-US': `Triggered when an element in the list on the right is selected/unselected by the user <br>
@ -480,35 +496,50 @@ export default {
'name': 'left-footer',
'type': '',
'defaultValue': '',
'desc': { 'zh-CN': '左侧列表底部的内容插槽', 'en-US': 'Content at the bottom of the left list' },
'desc': {
'zh-CN': '左侧列表底部的内容插槽',
'en-US': 'Content at the bottom of the left list'
},
'demoId': 'custom-footer'
},
{
'name': 'right-footer',
'type': '',
'defaultValue': '',
'desc': { 'zh-CN': '右侧列表底部的内容插槽', 'en-US': 'Content at the bottom of the right list' },
'desc': {
'zh-CN': '右侧列表底部的内容插槽',
'en-US': 'Content at the bottom of the right list'
},
'demoId': 'custom-footer'
},
{
'name': 'button-panel',
'type': '',
'defaultValue': '',
'desc': { 'zh-CN': '穿梭按钮插槽', 'en-US': 'Customized transfer button' },
'desc': {
'zh-CN': '穿梭按钮插槽',
'en-US': 'Customized transfer button'
},
'demoId': ''
},
{
'name': 'left-panel',
'type': '',
'defaultValue': '',
'desc': { 'zh-CN': '左侧自定义内容插槽', 'en-US': 'Customized content on the left' },
'desc': {
'zh-CN': '左侧自定义内容插槽',
'en-US': 'Customized content on the left'
},
'demoId': ''
},
{
'name': 'right-panel',
'type': '',
'defaultValue': '',
'desc': { 'zh-CN': '右侧自定义内容插槽', 'en-US': 'Customized content on the right' },
'desc': {
'zh-CN': '右侧自定义内容插槽',
'en-US': 'Customized content on the right'
},
'demoId': ''
}
],
@ -517,7 +548,10 @@ export default {
'name': 'clearQuery',
'type': '(name: string) => void',
'defaultValue': '',
'desc': { 'zh-CN': '清空某个面板的搜索关键词', 'en-US': 'Clear the search keywords of a panel.' },
'desc': {
'zh-CN': '开启过滤功能时,清空左右面板的搜索关键词',
'en-US': 'When the filtering function is enabled, clear the search keywords on the left and right panels'
},
'demoId': 'custom-filter'
}
]
@ -529,7 +563,7 @@ export default {
type: 'interface',
code: `
interface IDropConfig {
plugin: object // 指定拖放排序的插件 一般是通过 import Sortable from 'sortablejs' 导入
plugin: object // 指定拖放排序的插件Sortable, 该变量通过 import Sortable from 'sortablejs' 导入
}
`
},
@ -544,8 +578,7 @@ interface IPagerOp {
currentPage: number
pageSize: number
pageSizes: number[]
// 分页组件布局默认值:'total, prev, pager, next, jumper, sizes'
layout: string
layout: string // 分页组件布局默认值:'total, prev, pager, next, jumper, sizes'
}
}
`

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('tree组件基本使用', async ({ page }) => {
test('测试基本使用', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#basic-usage')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('多选勾选 ', async ({ page }) => {
test('测试多选勾选 ', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#check-op')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('多选功能', async ({ page }) => {
test('测试多选功能', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#checkbox')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('右键菜单', async ({ page }) => {
test('测试右键菜单', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#contextmenu')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('右键菜单', async ({ page }) => {
test('测试拖拽节点', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#drag')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('编辑', async ({ page }) => {
test('测试编辑节点', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#edit')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('节点的展开', async ({ page }) => {
test('测试节点的展开', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#expand-control')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('过滤视图', async ({ page }) => {
test('测试过滤视图', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#filter-view')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('自定义图标', async ({ page }) => {
test('测试自定义图标', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#icons')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('懒加载', async ({ page }) => {
test('测试懒加载', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#lazy')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('节点选择与高亮', async ({ page }) => {
test('测试节点选择与高亮', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#node-hl')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('节点操作', async ({ page }) => {
test('测试节点增删', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#node-op')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('其它', async ({ page }) => {
test('增删其它功能', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#other')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('属性', async ({ page }) => {
test('测试自定义映射列', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#props')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('单选', async ({ page }) => {
test('测试单选', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#radio')

View File

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'
test('插槽', async ({ page }) => {
test('测试插槽', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tree#slot')

View File

@ -4,4 +4,4 @@ title: Tree 树形控件
# Tree 树形控件
<div>可进行展示有父子层级的数据,支持选择,异步加载等功能。</div>
<div>可进行展示有父子层级的数据,支持选择,懒加载,拖拽和编辑节点等功能。</div>

View File

@ -4,4 +4,4 @@ title: Tree control
# Tree control
<div>Data with parent and child levels can be displayed. Functions such as selection and asynchronous loading are supported.</div>
<div>Can display parent-child level data, support selection, lazy loading, drag and drop and edit nodes and other functions.</div>

View File

@ -490,7 +490,10 @@ export default {
'name': 'expand-icon-color',
'type': 'string',
'defaultValue': '',
'desc': { 'zh-CN': '指示展开的图标色', 'en-US': 'Indicates the expanded icon color' },
'desc': {
'zh-CN': '指示展开的图标色',
'en-US': 'Indicates the expanded icon color'
},
'demoId': 'icons'
},
{
@ -504,14 +507,20 @@ export default {
'name': 'shrink-icon-color',
'type': 'string',
'defaultValue': '',
'desc': { 'zh-CN': '指示收缩的图标色', 'en-US': 'Icon indicating shrink color' },
'desc': {
'zh-CN': '指示收缩的图标色',
'en-US': 'Icon indicating shrink color'
},
'demoId': 'icons'
},
{
'name': 'empty-text',
'type': 'string',
'defaultValue': '',
'desc': { 'zh-CN': '内容为空的时候展示的文本', 'en-US': 'Text displayed when the content is empty' },
'desc': {
'zh-CN': '内容为空的时候展示的文本',
'en-US': 'Text displayed when the content is empty'
},
'demoId': 'slot'
},
{
@ -538,14 +547,20 @@ export default {
'name': 'highlight-current',
'type': 'boolean',
'defaultValue': 'true',
'desc': { 'zh-CN': '是否高亮当前选中节点', 'en-US': 'Whether to highlight the selected node' },
'desc': {
'zh-CN': '是否高亮当前选中节点',
'en-US': 'Whether to highlight the selected node'
},
'demoId': 'node-hl'
},
{
'name': 'current-node-key',
'type': 'string',
'defaultValue': '',
'desc': { 'zh-CN': '当前选中节点', 'en-US': 'Currently selected node' },
'desc': {
'zh-CN': '当前选中节点',
'en-US': 'Currently selected node'
},
'demoId': 'node-hl'
},
{
@ -559,7 +574,10 @@ export default {
'name': 'default-expanded-keys',
'type': 'boolean',
'defaultValue': 'false',
'desc': { 'zh-CN': '默认展开节点的keys', 'en-US': 'The keys of the node are expanded by default' },
'desc': {
'zh-CN': '默认展开节点的keys',
'en-US': 'The keys of the node are expanded by default'
},
'demoId': 'expand-control'
},
{
@ -576,21 +594,30 @@ export default {
'name': 'default-expand-all',
'type': 'boolean',
'defaultValue': 'false',
'desc': { 'zh-CN': '是否默认展开所有节点', 'en-US': 'Whether to expand all nodes by default' },
'desc': {
'zh-CN': '是否默认展开所有节点',
'en-US': 'Whether to expand all nodes by default'
},
'demoId': 'expand-control'
},
{
'name': 'show-checkbox',
'type': 'boolean',
'defaultValue': 'false',
'desc': { 'zh-CN': '是否为多选模式', 'en-US': 'Whether to select multiple mode' },
'desc': {
'zh-CN': '是否为多选模式',
'en-US': 'Whether to select multiple mode'
},
'demoId': 'checkbox'
},
{
'name': 'check-strictly',
'type': 'boolean',
'defaultValue': 'false',
'desc': { 'zh-CN': '是否为父子严格模式', 'en-US': 'Whether it is in strict parent-child mode' },
'desc': {
'zh-CN': '是否为父子严格模式',
'en-US': 'Whether it is in strict parent-child mode'
},
'demoId': 'checkbox'
},
{
@ -607,14 +634,20 @@ export default {
'name': 'default-checked-keys',
'type': 'string[]',
'defaultValue': '',
'desc': { 'zh-CN': '默认勾选的节点的keys', 'en-US': 'keys of the node selected by default' },
'desc': {
'zh-CN': '默认勾选的节点的keys',
'en-US': 'keys of the node selected by default'
},
'demoId': 'checkbox'
},
{
'name': 'show-radio',
'type': 'boolean',
'defaultValue': 'false',
'desc': { 'zh-CN': '是否为单选模式', 'en-US': 'Whether to select an radio mode' },
'desc': {
'zh-CN': '是否为单选模式',
'en-US': 'Whether to select an radio mode'
},
'demoId': 'radio'
},
{
@ -694,7 +727,10 @@ export default {
'name': 'allow-drag',
'type': '(node)=>boolean',
'defaultValue': '',
'desc': { 'zh-CN': '判断节点能否被拖拽', 'en-US': 'Whether a node can be dragged.' },
'desc': {
'zh-CN': '判断节点能否被拖拽',
'en-US': 'Whether a node can be dragged.'
},
'demoId': 'drag'
},
{
@ -1104,7 +1140,10 @@ export default {
'name': 'insertBefore',
'type': '(newData:object, targetNodeOrTargetKey: object | string) => void',
'defaultValue': '',
'desc': { 'zh-CN': '在一个节点的前面增加一个节点', 'en-US': 'Add a node before a tree node.' },
'desc': {
'zh-CN': '在一个节点的前面增加一个节点',
'en-US': 'Add a node before a tree node.'
},
'demoId': 'node-op'
},
{
@ -1242,7 +1281,10 @@ export default {
'name': 'openEdit',
'type': '() => void',
'defaultValue': '',
'desc': { 'zh-CN': '组件进入编辑状态', 'en-US': 'The component enters the edit state' },
'desc': {
'zh-CN': '组件进入编辑状态',
'en-US': 'The component enters the edit state'
},
'demoId': 'edit'
},
@ -1250,7 +1292,10 @@ export default {
'name': 'closeEdit',
'type': '() => void',
'defaultValue': '',
'desc': { 'zh-CN': '组件退出编辑状态', 'en-US': 'The component exits the editing state' },
'desc': {
'zh-CN': '组件退出编辑状态',
'en-US': 'The component exits the editing state'
},
'demoId': 'edit'
},
{
@ -1294,7 +1339,10 @@ export default {
'name': 'closeMenu',
'type': '() => void',
'defaultValue': '',
'desc': { 'zh-CN': '关闭节点的自定义菜单', 'en-US': 'Close the custom menu of the node' },
'desc': {
'zh-CN': '关闭节点的自定义菜单',
'en-US': 'Close the custom menu of the node'
},
'demoId': 'contextmenu'
}
]