From 890900d67c5eecfda5e714d2b70f9164684ce50c Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Thu, 22 Jul 2021 19:49:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20d.ts=E3=80=81=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=AE=BD=E5=BA=A6=E4=B8=8E=E9=AB=98=E5=BA=A6=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/api/table.ts | 64 ++++++++++++++++-- examples/views/api/API.vue | 2 +- examples/views/table/base/Filter.vue | 60 +++++++++++++---- examples/views/table/other/SortableRow.vue | 1 - package.json | 4 +- packages/list/src/list.ts | 5 +- packages/modal/src/modal.ts | 6 +- packages/table/src/emits.ts | 4 ++ packages/tools/utils.ts | 4 -- styles/table.scss | 2 +- types/plugins/pro.d.ts | 75 ++++++++++++++++++++-- types/table.d.ts | 15 +++++ 12 files changed, 203 insertions(+), 39 deletions(-) diff --git a/examples/api/table.ts b/examples/api/table.ts index 6d1c31c35..9102555f9 100644 --- a/examples/api/table.ts +++ b/examples/api/table.ts @@ -1982,9 +1982,18 @@ const apis = [ }, { name: 'beforeFindMethod', - desc: '自定义单元格替换之前的方法,可以通过返回 false 阻止替换行为', + desc: '自定义单元格查找之前的方法,可以通过返回 false 阻止查找行为', version: 'pro', - type: '({ findValue }) => boolean', + type: '({ isAll, findValue }) => boolean', + enum: '', + defVal: '', + list: [] + }, + { + name: 'afterFindMethod', + desc: '自定义单元格查找之后的方法', + version: 'pro', + type: '({ isAll, findValue, result }) => void', enum: '', defVal: '', list: [] @@ -2011,7 +2020,16 @@ const apis = [ name: 'beforeReplaceMethod', desc: '自定义单元格替换之前的方法,可以通过返回 false 阻止替换行为', version: 'pro', - type: '({ findValue, replaceValue }) => boolean', + type: '({ isAll, findValue, replaceValue }) => boolean', + enum: '', + defVal: '', + list: [] + }, + { + name: 'afterReplaceMethod', + desc: '自定义单元格替换之后的方法', + version: 'pro', + type: '({ isAll, findValue, replaceValue, result }) => void', enum: '', defVal: '', list: [] @@ -3147,7 +3165,7 @@ const apis = [ }, { name: 'open-fnr', - desc: '只对 keyboard-config.isFNR 配置时有效,在查询与搜索弹框被打开时会触发该事件', + desc: '只对 keyboard-config.isFNR 配置时有效,在查找与替换弹框被打开时会触发该事件', version: 'pro', type: '', enum: '', @@ -3156,13 +3174,49 @@ const apis = [ }, { name: 'fnr-change', - desc: '只对 keyboard-config.isFNR 配置时有效,在查询与搜索弹框的 Tab 页被切换时会触发该事件', + desc: '只对 keyboard-config.isFNR 配置时有效,在查找与替换弹框的 Tab 页被切换时会触发该事件', version: 'pro', type: '', enum: '', defVal: '{ tab, $event}', list: [] }, + { + name: 'fnr-find', + desc: '只对 keyboard-config.isFNR 配置时有效,在点击查找时会触发该事件', + version: 'pro', + type: '', + enum: '', + defVal: '{ findValue, row, column, $event}', + list: [] + }, + { + name: 'fnr-find-all', + desc: '只对 keyboard-config.isFNR 配置时有效,在点击查找所有时会触发该事件', + version: 'pro', + type: '', + enum: '', + defVal: '{ findValue, result, $event}', + list: [] + }, + { + name: 'fnr-replace', + desc: '只对 keyboard-config.isFNR 配置时有效,在点击替换时会触发该事件', + version: 'pro', + type: '', + enum: '', + defVal: '{ findValue, replaceValue, row, column, $event}', + list: [] + }, + { + name: 'fnr-replace-all', + desc: '只对 keyboard-config.isFNR 配置时有效,在点击替换所有时会触发该事件', + version: 'pro', + type: '', + enum: '', + defVal: '{ findValue, replaceValue, result, $event}', + list: [] + }, { name: 'cell-area-copy', desc: '只对 keyboard-config.isClip 配置时有效,在单元格被复制时会触发该事件', diff --git a/examples/views/api/API.vue b/examples/views/api/API.vue index 0a0976d58..032ed23b9 100644 --- a/examples/views/api/API.vue +++ b/examples/views/api/API.vue @@ -260,7 +260,7 @@ export default defineComponent({ } else if (row.abandoned) { return '该参数属于评估阶段,谨慎使用,后续有可能会被废弃的风险' } else if (row.version === 'pro') { - return '该参数属于 PRO 扩展插件的功能,需获取授权,如有需要可联系邮件:xu_liangzhan@163.com' + return '该参数属于 PRO 扩展插件的功能' } } } diff --git a/examples/views/table/base/Filter.vue b/examples/views/table/base/Filter.vue index 64b37ee28..9e747cdda 100644 --- a/examples/views/table/base/Filter.vue +++ b/examples/views/table/base/Filter.vue @@ -13,9 +13,10 @@ - +