-
close Loading
-
+
-
+
+
diff --git a/examples/sites/demos/mobile/app/loading/custom-class.vue b/examples/sites/demos/mobile/app/loading/custom-class.vue
new file mode 100644
index 000000000..f5ee4a6c8
--- /dev/null
+++ b/examples/sites/demos/mobile/app/loading/custom-class.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/mobile/app/loading/global-registry.vue b/examples/sites/demos/mobile/app/loading/global-registry.vue
new file mode 100644
index 000000000..d77db605e
--- /dev/null
+++ b/examples/sites/demos/mobile/app/loading/global-registry.vue
@@ -0,0 +1,61 @@
+
+
+
+ 指令方式加载全屏Loading
+
+
+ 静态方法加载全屏Loading
+
+
+
+
+
+
diff --git a/examples/sites/demos/mobile/app/loading/size.vue b/examples/sites/demos/mobile/app/loading/size.vue
new file mode 100644
index 000000000..9e5f285be
--- /dev/null
+++ b/examples/sites/demos/mobile/app/loading/size.vue
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/mobile/app/loading/spinner.vue b/examples/sites/demos/mobile/app/loading/spinner.vue
new file mode 100644
index 000000000..44f1737af
--- /dev/null
+++ b/examples/sites/demos/mobile/app/loading/spinner.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/mobile/app/loading/tip-text.vue b/examples/sites/demos/mobile/app/loading/tip-text.vue
new file mode 100644
index 000000000..57609b212
--- /dev/null
+++ b/examples/sites/demos/mobile/app/loading/tip-text.vue
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/mobile/app/loading/webdoc/loading.js b/examples/sites/demos/mobile/app/loading/webdoc/loading.js
index f4487e8b7..185ad7892 100644
--- a/examples/sites/demos/mobile/app/loading/webdoc/loading.js
+++ b/examples/sites/demos/mobile/app/loading/webdoc/loading.js
@@ -6,25 +6,171 @@ export default {
demoId: 'base',
name: {
'zh-CN': '基础用法',
- 'en-US': 'button type'
+ 'en-US': 'Basic usage'
},
desc: {
- 'zh-CN': '
基础用法
',
- 'en-US': '
button type
'
+ 'zh-CN': '
通过 service
方法显示 Loading ,再通过 close
方法关闭。
',
+ 'en-US':
+ '
Use the service
method to display Loading, then close it using the close
method.
'
},
codeFiles: ['base.vue']
},
{
- demoId: 'type',
+ demoId: 'spinner',
name: {
- 'zh-CN': '类型',
- 'en-US': 'button type'
+ 'zh-CN': '自定义加载图标',
+ 'en-US': 'Custom Icon'
},
desc: {
- 'zh-CN': '
类型
',
- 'en-US': '
button type
'
+ 'zh-CN': '
通过 spinner
属性自定义加载图标。
',
+ 'en-US': '
Customize loading icon using the spinner
attribute.
'
},
- codeFiles: ['type.vue']
+ codeFiles: ['spinner.vue']
+ },
+ {
+ demoId: 'tip-text',
+ name: {
+ 'zh-CN': '自定义加载提示',
+ 'en-US': 'Custom Tip'
+ },
+ desc: {
+ 'zh-CN': '
通过 text
自定义加载文字的提示文本。
',
+ 'en-US': '
Use text
to customize loading tip.
'
+ },
+ codeFiles: ['tip-text.vue']
+ },
+ {
+ demoId: 'background',
+ name: {
+ 'zh-CN': '自定义遮罩背景色',
+ 'en-US': 'CUstom Mask Background'
+ },
+ desc: {
+ 'zh-CN': '
通过 background
自定义遮罩层背景颜色。
',
+ 'en-US': '
Use background
property to customize background color of mask.
'
+ },
+ codeFiles: ['background.vue']
+ },
+ {
+ demoId: 'custom-class',
+ name: {
+ 'zh-CN': '自定义样式',
+ 'en-US': 'events'
+ },
+ desc: {
+ 'zh-CN': '
通过 custom-class
指定类名进行样式修改。
',
+ 'en-US': '
Specify the class name using custom-class
to modify the style.
'
+ },
+ codeFiles: ['custom-class.vue']
+ },
+ {
+ demoId: 'size',
+ name: {
+ 'zh-CN': '尺寸',
+ 'en-US': 'Size'
+ },
+ desc: {
+ 'zh-CN':
+ '
通过在 Loading.service
中设置 size
属性加载不同的大小尺寸,包括 large
| medium
| small
| mini
四种不同大小。不设置时为默认尺寸。
',
+ 'en-US':
+ '
By setting the size
attribute in the Loading.service, different size dimensions can be loaded, including large
, medium
, small
and mini
. If not set, the default size will be used.
'
+ },
+ codeFiles: ['size.vue']
+ },
+ {
+ demoId: 'global-registry.',
+ name: {
+ 'zh-CN': '全局加载',
+ 'en-US': 'Global Registry'
+ },
+ desc: {
+ 'zh-CN': `
通过 v-loading.lock.fullscreen
指令方式或者服务方式进行全局加载,如需使用指令方式全局加载需要如下操作:
+
在 Vue 2 版本环境中添加 Vue.use(Loading)
;
在Vue 3 版本环境中添加 app.use(Loading)
.
`,
+ 'en-US': `
Global loading can be achieved through the v-loading.lock.fullscreen
directive or service. To use the directive for global loading, follow these steps:
For Vue 2 environment, add Vue.use(Loading)
;
For Vue 3 environment, add app.use(Loading)
.
`
+ },
+ codeFiles: ['global-registry.vue']
+ }
+ ],
+ apis: [
+ {
+ name: 'Loading', // 组件名称展示使用
+ type: 'loading', // API 类型
+ properties: [
+ {
+ name: 'type',
+ type: 'string',
+ defaultValue: 'primary',
+ desc: {
+ 'zh-CN': '
通过type设置不同的加载样式
',
+ 'en-US': 'display different button'
+ },
+ demoId: 'type'
+ },
+ {
+ name: 'background',
+ type: 'string',
+ defaultValue: `'#0000004b'`,
+ desc: {
+ 'zh-CN': '遮罩层背景色',
+ 'en-US': 'mask background color'
+ },
+ demoId: 'background'
+ },
+ {
+ name: 'custom-class',
+ type: 'string',
+ defaultValue: '--',
+ desc: {
+ 'zh-CN': '自定义类名',
+ 'en-US': 'Custom class name'
+ },
+ demoId: 'custom-class'
+ },
+ {
+ name: 'spinner',
+ type: 'Component',
+ defaultValue: '--',
+ desc: {
+ 'zh-CN': '自定义加载图标',
+ 'en-US': 'display different button'
+ },
+ demoId: 'spinner'
+ },
+ {
+ name: 'target',
+ type: 'DOM',
+ defaultValue: 'document.body',
+ desc: {
+ 'zh-CN':
+ '需要覆盖的 DOM 节点。可传入一个 DOM 对象或字符串;若传入字符串,则会将其作为参数传入 document.querySelector 以获取到对应 DOM 节点',
+ 'en-US':
+ 'The DOM node to be targeted for coverage. It can be a DOM object or a string; if a string is passed, it will be used as a parameter for document.querySelector to obtain the corresponding DOM node'
+ },
+ demoId: 'base'
+ }
+ ],
+ method: [
+ {
+ name: 'close',
+ type: '() => void',
+ defaultValue: '',
+ desc: {
+ 'zh-CN': '关闭 Loading',
+ 'en-US': 'close loading'
+ },
+ demoId: 'base'
+ },
+ {
+ name: 'service',
+ type: '() => Component',
+ defaultValue: '',
+ desc: {
+ 'zh-CN': '创建一个 Loading 组件实例并展示',
+ 'en-US': 'Create a Loading component instance and display it'
+ },
+ demoId: 'base'
+ }
+ ]
}
]
}
diff --git a/examples/sites/demos/pc/app/alert/custom-close-composition-api.vue b/examples/sites/demos/pc/app/alert/custom-close-composition-api.vue
index 04214de2f..128809531 100644
--- a/examples/sites/demos/pc/app/alert/custom-close-composition-api.vue
+++ b/examples/sites/demos/pc/app/alert/custom-close-composition-api.vue
@@ -14,7 +14,7 @@
diff --git a/examples/sites/demos/pc/app/alert/custom-close.spec.ts b/examples/sites/demos/pc/app/alert/custom-close.spec.ts
index 4a804c880..27b7382ce 100644
--- a/examples/sites/demos/pc/app/alert/custom-close.spec.ts
+++ b/examples/sites/demos/pc/app/alert/custom-close.spec.ts
@@ -49,7 +49,7 @@ test('关闭按钮事件', async ({ page }) => {
// 点击关闭后警告消失,自定义事件modalBox提示出现
await close.click()
await expect(alertWarning).not.toBeVisible()
- await expect(page.locator('.tiny-modal__box').getByText('关闭了')).toBeVisible()
+ await expect(page.locator('.tiny-notify__content').getByText('触发关闭事件')).toBeVisible()
})
test('不可关闭警告', async ({ page }) => {
diff --git a/examples/sites/demos/pc/app/alert/custom-close.vue b/examples/sites/demos/pc/app/alert/custom-close.vue
index 05a816317..0151f789a 100644
--- a/examples/sites/demos/pc/app/alert/custom-close.vue
+++ b/examples/sites/demos/pc/app/alert/custom-close.vue
@@ -13,7 +13,7 @@
diff --git a/examples/sites/demos/pc/app/grid/edit/grid-equals.spec.js b/examples/sites/demos/pc/app/grid/edit/grid-equals.spec.js
new file mode 100644
index 000000000..9dd2842f4
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/edit/grid-equals.spec.js
@@ -0,0 +1,10 @@
+import { test, expect } from '@playwright/test'
+
+test('自定义比较方法', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('grid-edit#edit-grid-equals')
+ await page.getByText('800').click()
+ await page.getByRole('row', { name: '1 2014-04-30 00:56:00' }).getByRole('textbox').fill('800')
+ await page.getByRole('cell', { name: '人数' }).locator('div').first().click()
+ await expect(page.locator('.tiny-grid .col__dirty')).toHaveCount(0)
+})
diff --git a/examples/sites/demos/pc/app/grid/edit/grid-equals.vue b/examples/sites/demos/pc/app/grid/edit/grid-equals.vue
new file mode 100644
index 000000000..101c183be
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/edit/grid-equals.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/grid/edit/has-row-change.spec.js b/examples/sites/demos/pc/app/grid/edit/has-row-change.spec.js
index 81fc775a3..7c8484ee2 100644
--- a/examples/sites/demos/pc/app/grid/edit/has-row-change.spec.js
+++ b/examples/sites/demos/pc/app/grid/edit/has-row-change.spec.js
@@ -7,7 +7,7 @@ test('检查数据是否改变', async ({ page }) => {
await page.getByRole('row', { name: '1 保存' }).locator('input[type="text"]').fill('sdf')
await page.getByRole('row', { name: '1 保存' }).getByRole('button', { name: '保存' }).click()
await expect(page.getByText('保存成功!')).toBeVisible()
- await page.getByRole('button', { name: '确认' }).click()
+ await page.getByRole('button', { name: '确定' }).click()
await page
.getByRole('row', {
name: '2 WWWW科技YX公司 华南区 深圳福田区 公司技术和研发实力雄厚,是国家863项目的参与者,并被政府认定为“高新技术企业”。 保存'
@@ -15,5 +15,5 @@ test('检查数据是否改变', async ({ page }) => {
.getByRole('button', { name: '保存' })
.click()
await expect(page.getByText('当前数据未改变!')).toBeVisible()
- await page.getByRole('button', { name: '确认' }).click()
+ await page.getByRole('button', { name: '确定' }).click()
})
diff --git a/examples/sites/demos/pc/app/grid/event/get-row-method.spec.js b/examples/sites/demos/pc/app/grid/event/get-row-method.spec.js
index 63eee1f18..4db5d5e52 100644
--- a/examples/sites/demos/pc/app/grid/event/get-row-method.spec.js
+++ b/examples/sites/demos/pc/app/grid/event/get-row-method.spec.js
@@ -14,23 +14,23 @@ test('获取表格行方法', async ({ page }) => {
await expect(
page.getByText('当前行数据是:{"id":"1","name":"GFD科技YX公司","area":"华东区","address":"福州","introduction":"')
).toBeVisible()
- await page.getByRole('button', { name: '确认' }).click()
+ await page.getByRole('button', { name: '确定' }).click()
await page.getByRole('button', { name: '当前行号' }).click()
await expect(page.getByText('当前选中行号是:0')).toBeVisible()
- await page.getByRole('button', { name: '确认' }).click()
+ await page.getByRole('button', { name: '确定' }).click()
await page.getByRole('button', { name: 'Radio单选选中行' }).click()
await expect(
page.getByText('单选选中行数据是:{"id":"1","name":"GFD科技YX公司","area":"华东区","address":"福州","introduction"')
).toBeVisible()
- await page.getByRole('button', { name: '确认' }).click()
+ await page.getByRole('button', { name: '确定' }).click()
await page.getByRole('button', { name: 'rowId获取当前行' }).click()
await expect(
page.getByText('根据 rowId 获取的当前行:{"id":"1","name":"GFD科技YX公司","area":"华东区","address":"福州","introd')
).toBeVisible()
- await page.getByRole('button', { name: '确认' }).click()
+ await page.getByRole('button', { name: '确定' }).click()
await page.getByRole('button', { name: 'tr元素获取行信息' }).click()
await expect(
diff --git a/examples/sites/demos/pc/app/grid/fixed/left-fixed.vue b/examples/sites/demos/pc/app/grid/fixed/left-fixed.vue
index 251ee7aa8..d1654cfe2 100644
--- a/examples/sites/demos/pc/app/grid/fixed/left-fixed.vue
+++ b/examples/sites/demos/pc/app/grid/fixed/left-fixed.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/examples/sites/demos/pc/app/grid/large-data/column-anchor.vue b/examples/sites/demos/pc/app/grid/large-data/column-anchor.vue
new file mode 100644
index 000000000..6061d7bda
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/large-data/column-anchor.vue
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 0ef8cc614..8b1dd8b67 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
@@ -3,7 +3,7 @@ import { test, expect } from '@playwright/test'
test('滚动到指定位置', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('grid-large-data#large-data-scroll-to')
- await page.waitForTimeout(1000)
+ await page.waitForTimeout(3000)
await page.getByRole('button', { name: '滚动到500列' }).click()
await page.waitForTimeout(200)
await expect(page.getByText('col508')).toBeVisible()
diff --git a/examples/sites/demos/pc/app/grid/loading/grid-loading-tip.spec.js b/examples/sites/demos/pc/app/grid/loading/grid-loading-tip.spec.js
index a8c9cb793..0d1f1c8f2 100644
--- a/examples/sites/demos/pc/app/grid/loading/grid-loading-tip.spec.js
+++ b/examples/sites/demos/pc/app/grid/loading/grid-loading-tip.spec.js
@@ -4,5 +4,5 @@ test('开启加载中状态', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('grid-loading#loading-grid-loading-tip')
await page.getByRole('button', { name: '重试' }).click()
- await expect(page.locator('.tiny-grid-loading__wrap')).toBeVisible()
+ await expect(page.locator('.tiny-grid-loading')).toBeVisible()
})
diff --git a/examples/sites/demos/pc/app/grid/pager/show-save-msg-composition-api.vue b/examples/sites/demos/pc/app/grid/pager/show-save-msg-composition-api.vue
index c187f0a95..132dba0dc 100644
--- a/examples/sites/demos/pc/app/grid/pager/show-save-msg-composition-api.vue
+++ b/examples/sites/demos/pc/app/grid/pager/show-save-msg-composition-api.vue
@@ -122,6 +122,6 @@ function getData({ page }) {
}
function pageChange() {
- Modal.message('取消分页')
+ Modal.message({ message: '取消分页', status: 'info' })
}
diff --git a/examples/sites/demos/pc/app/grid/pager/show-save-msg.vue b/examples/sites/demos/pc/app/grid/pager/show-save-msg.vue
index d7f215fc9..63988b38e 100644
--- a/examples/sites/demos/pc/app/grid/pager/show-save-msg.vue
+++ b/examples/sites/demos/pc/app/grid/pager/show-save-msg.vue
@@ -129,7 +129,7 @@ export default {
})
},
pageChange() {
- Modal.message('取消分页')
+ Modal.message({ message: '取消分页', status: 'info' })
}
}
}
diff --git a/examples/sites/demos/pc/app/grid/renderer/inner-renderer-date-composition-api.vue b/examples/sites/demos/pc/app/grid/renderer/inner-renderer-date-composition-api.vue
new file mode 100644
index 000000000..2c7d3eb9d
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/renderer/inner-renderer-date-composition-api.vue
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/grid/renderer/inner-renderer-date.spec.js b/examples/sites/demos/pc/app/grid/renderer/inner-renderer-date.spec.js
new file mode 100644
index 000000000..a51a8f62f
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/renderer/inner-renderer-date.spec.js
@@ -0,0 +1,9 @@
+import { test, expect } from '@playwright/test'
+
+test('日期渲染器', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('grid-renderer#renderer-inner-renderer-date')
+ await expect(page.getByText('-07-02')).toBeVisible()
+ await expect(page.getByText('-02-15').first()).toBeVisible()
+ await expect(page.getByText('-02-15').nth(1)).toBeVisible()
+})
diff --git a/examples/sites/demos/pc/app/grid/renderer/inner-renderer-date.vue b/examples/sites/demos/pc/app/grid/renderer/inner-renderer-date.vue
new file mode 100644
index 000000000..7c777dea9
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/renderer/inner-renderer-date.vue
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/grid/size/grid-size-composition-api.vue b/examples/sites/demos/pc/app/grid/size/grid-size-composition-api.vue
index 7b41ac802..b35a2c80d 100644
--- a/examples/sites/demos/pc/app/grid/size/grid-size-composition-api.vue
+++ b/examples/sites/demos/pc/app/grid/size/grid-size-composition-api.vue
@@ -1,33 +1,40 @@
- medium
-
-
-
-
-
-
-
- small
-
-
-
-
-
-
-
- mini
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/examples/sites/demos/pc/app/grid/toolbar/grid-full-screen-teleport.spec.js b/examples/sites/demos/pc/app/grid/toolbar/grid-full-screen-teleport.spec.js
new file mode 100644
index 000000000..ec8c391d3
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/toolbar/grid-full-screen-teleport.spec.js
@@ -0,0 +1,10 @@
+import { test, expect } from '@playwright/test'
+
+test('推荐基于 Teleport 的全屏方案', async ({ page }) => {
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
+ await page.goto('grid-toolbar#toolbar-grid-full-screen-teleport')
+ await page.getByRole('button', { name: '进入全屏模式' }).click()
+ await expect(page.locator('body>.tiny-grid')).toBeVisible()
+ await page.getByRole('button', { name: '退出全屏模式' }).click()
+ await expect(page.locator('body>.tiny-grid')).toHaveCount(0)
+})
diff --git a/examples/sites/demos/pc/app/grid/toolbar/grid-full-screen-teleport.vue b/examples/sites/demos/pc/app/grid/toolbar/grid-full-screen-teleport.vue
new file mode 100644
index 000000000..9ea0b2f96
--- /dev/null
+++ b/examples/sites/demos/pc/app/grid/toolbar/grid-full-screen-teleport.vue
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/demos/pc/app/grid/tree-table/tree-grid-insert-delete-update.spec.js b/examples/sites/demos/pc/app/grid/tree-table/tree-grid-insert-delete-update.spec.js
index dd4fb8b8d..3bff9e92a 100644
--- a/examples/sites/demos/pc/app/grid/tree-table/tree-grid-insert-delete-update.spec.js
+++ b/examples/sites/demos/pc/app/grid/tree-table/tree-grid-insert-delete-update.spec.js
@@ -8,7 +8,7 @@ test.describe('树表增删改功能', () => {
await page.getByRole('row', { name: '1 新数据' }).getByRole('textbox').click()
await page.getByRole('row', { name: '1 新数据' }).getByRole('textbox').fill('zzcd')
await page.locator('.tiny-grid-toolbar').click()
- await page.getByRole('button', { name: '确认' }).click()
+ await page.getByRole('button', { name: '确定' }).click()
await expect(page.getByRole('cell', { name: 'zzcd' })).toBeVisible()
await page.getByRole('row', { name: '1 新数据' }).locator('path').nth(1).click()
await page.getByRole('button', { name: '移除选中' }).click()
diff --git a/examples/sites/demos/pc/app/grid/validation/before-submit-validation.spec.js b/examples/sites/demos/pc/app/grid/validation/before-submit-validation.spec.js
index 6b0f8c9b2..b0d80450b 100644
--- a/examples/sites/demos/pc/app/grid/validation/before-submit-validation.spec.js
+++ b/examples/sites/demos/pc/app/grid/validation/before-submit-validation.spec.js
@@ -13,7 +13,7 @@ test('提交前校验', async ({ page }) => {
await page.getByRole('button', { name: '提交数据' }).click()
await expect(page.getByText('校验不通过', { exact: true })).toBeVisible()
- await page.getByRole('button', { name: '确认' }).click()
+ await page.getByRole('button', { name: '确定' }).click()
await page.getByRole('button', { name: '保存 Promise' }).click()
await expect(page.getByText('校验不通过,触发了 catch', { exact: true })).toBeVisible()
})
diff --git a/examples/sites/demos/pc/app/grid/webdoc/grid-edit.js b/examples/sites/demos/pc/app/grid/webdoc/grid-edit.js
index 94135afc8..460849891 100644
--- a/examples/sites/demos/pc/app/grid/webdoc/grid-edit.js
+++ b/examples/sites/demos/pc/app/grid/webdoc/grid-edit.js
@@ -79,6 +79,17 @@ export default {
},
'codeFiles': ['edit/status-of-editing.vue']
},
+ {
+ 'demoId': 'edit-grid-equals',
+ 'name': { 'zh-CN': '自定义比较方法', 'en-US': 'Enable editing' },
+ 'desc': {
+ 'zh-CN':
+ '配置列属性 equals
可实现列值自定义比较。此方法接收字段原始值和当前值等作为参数,期望用户返回布尔结果。返回 false
表示已改变,true
表示未改变,其它值表示使用内部预置比较。表格也支持 equals
属性,用于定义所有字段的比较方法,使用参数 field
区分具体的字段,此方式的影响范围是整个表格,需要谨慎使用。
',
+ 'en-US':
+ 'Table attribute settingsedit-config
Enable the editing mode, Set showStatus
in the attribute object to enable or disable the cell update status (inverted triangle update flag in the upper left corner of the cell). The default value is true
.
\n'
+ },
+ 'codeFiles': ['edit/grid-equals.vue']
+ },
{
'demoId': 'edit-trigger-mode-for-editing',
'name': { 'zh-CN': '触发编辑方式', 'en-US': 'Click to trigger editing' },
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 3075fef3d..b168db5ae 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
@@ -30,55 +30,7 @@ export default {
'name': { 'zh-CN': '树表虚拟滚动', 'en-US': 'Virtual scrolling of the tree table' },
'desc': {
'zh-CN': `
- optimization
虚拟滚动具体配置如下:
-
-
-
- 名称
- 类型
- 描述
- 默认值
-
-
-
-
- optimization.scrollX.gt number
- 指定大于多少列时自动启动 X 虚拟滚动
- 100 optimization.scrollX.rSize
- number
- 每次渲染列数
-
-
-
- optimization.scrollX.vSize
- number
- 指定可视区域列数
-
-
-
- optimization.scrollX.adaptive boolean
- 自动适配最优的渲染方式(设置为 false 列数组只会在滚动完成后截取一次,便于大数据场景提升性能,但是会短暂白屏,渲染完成后即恢复)
- true
-
-
- optimization.scrollY.gt
- number
- 指定大于多少行时自动启动 Y 虚拟滚动
- 500
-
-
- optimization.scrollY.rSize
- number 每次渲染行数
-
-
-
- optimization.scrollY.adaptive
- boolean
- 自动适配最优的渲染方式(设置为 false 行数组只会在滚动完成后截取一次,便于大数据场景提升性能,但是会短暂白屏,渲染完成后即恢复)
- true
-
-
-
+ 通过 optimization
属性配置树表虚拟滚动执行方式,具体参考类型:IOptimizationConfig
。
`,
'en-US': ''
},
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 fb4adf9b5..05a0ed1de 100644
--- a/examples/sites/demos/pc/app/grid/webdoc/grid-renderer.js
+++ b/examples/sites/demos/pc/app/grid/webdoc/grid-renderer.js
@@ -44,6 +44,17 @@ export default {
},
'codeFiles': ['renderer/custom-renderer.vue']
},
+ {
+ 'demoId': 'renderer-inner-renderer-date',
+ 'name': { 'zh-CN': '日期渲染器', 'en-US': 'Custom Renderer' },
+ 'desc': {
+ 'zh-CN':
+ '在日期字段为字符串值时,需要给日期渲染器提供 valueFormat
配置才能正常解析日期字符串。
\n',
+ '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-date.vue']
+ },
{
'demoId': 'render-async-colunm-render',
'name': { 'zh-CN': '列异步数据渲染', 'en-US': 'Column Asynchronous Data Rendering' },
diff --git a/examples/sites/demos/pc/app/grid/webdoc/grid-toolbar.js b/examples/sites/demos/pc/app/grid/webdoc/grid-toolbar.js
index 7d57606ff..dcf1fbcdf 100644
--- a/examples/sites/demos/pc/app/grid/webdoc/grid-toolbar.js
+++ b/examples/sites/demos/pc/app/grid/webdoc/grid-toolbar.js
@@ -109,11 +109,20 @@ export default {
'demoId': 'toolbar-grid-full-screen-height',
'name': { 'zh-CN': '全屏时改变表格高度', 'en-US': 'Change the table height in full screen mode' },
'desc': {
- 'zh-CN': '通过表格属性height
在全屏是动态改变表格高度。
',
+ 'zh-CN': '通过表格属性 height
在全屏是动态改变表格高度。
',
'en-US': 'For details, see the following example.'
},
'codeFiles': ['toolbar/grid-full-screen-height.vue']
},
+ {
+ 'demoId': 'toolbar-grid-full-screen-teleport',
+ 'name': { 'zh-CN': '推荐基于 Teleport 的全屏方案', 'en-US': 'Change the table height in full screen mode' },
+ 'desc': {
+ 'zh-CN': '通过 teleport
实现表格全屏。
',
+ 'en-US': 'For details, see the following example.'
+ },
+ 'codeFiles': ['toolbar/grid-full-screen-teleport.vue']
+ },
{
'demoId': 'toolbar-custom-toolbar',
'name': { 'zh-CN': '工具栏自定义插槽', 'en-US': 'Toolbar Custom Slot' },
diff --git a/examples/sites/demos/pc/app/modal/prop-slots-composition-api.vue b/examples/sites/demos/pc/app/modal/prop-slots-composition-api.vue
index 88914ced1..d8c1eb2c2 100644
--- a/examples/sites/demos/pc/app/modal/prop-slots-composition-api.vue
+++ b/examples/sites/demos/pc/app/modal/prop-slots-composition-api.vue
@@ -22,14 +22,14 @@ function baseClick() {
{
on: {
click: (e) => {
- params.footerSlotParams.confirm(e)
+ params.confirm(e)
}
},
props: { type: 'primary' }
},
'点我确定'
),
- h(TinyButton, { on: { click: (e) => params.footerSlotParams.cancel(e) } }, '点我取消')
+ h(TinyButton, { on: { click: (e) => params.cancel(e) } }, '点我取消')
]
}
})
diff --git a/examples/sites/demos/pc/app/numeric/change-event-composition-api.vue b/examples/sites/demos/pc/app/numeric/change-event-composition-api.vue
index 109ad7810..754748680 100644
--- a/examples/sites/demos/pc/app/numeric/change-event-composition-api.vue
+++ b/examples/sites/demos/pc/app/numeric/change-event-composition-api.vue
@@ -1,10 +1,13 @@
-
+
+
+ 修改
+
diff --git a/examples/sites/demos/pc/app/numeric/change-event.vue b/examples/sites/demos/pc/app/numeric/change-event.vue
index 7e3bdcdbf..764840929 100644
--- a/examples/sites/demos/pc/app/numeric/change-event.vue
+++ b/examples/sites/demos/pc/app/numeric/change-event.vue
@@ -1,13 +1,17 @@
-
+
+
+ 修改
+