From 78559592e992d641e96c4050ce2b43d7dfec179a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Wed, 10 Aug 2022 22:15:56 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(component):=20=E6=96=B0=E5=A2=9E=20tr?= =?UTF-8?q?ansfer=20=E7=BB=84=E4=BB=B6=E9=80=89=E9=A1=B9=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/src/component/input/index.vue | 6 +- .../src/component/transfer/index.vue | 16 ++-- .../src/document/zh-CN/components/table.md | 79 ++++++++++--------- .../src/document/zh-CN/components/transfer.md | 2 +- 4 files changed, 55 insertions(+), 48 deletions(-) diff --git a/package/component/src/component/input/index.vue b/package/component/src/component/input/index.vue index 506fb654..553ba6de 100644 --- a/package/component/src/component/input/index.vue +++ b/package/component/src/component/input/index.vue @@ -114,12 +114,12 @@ const onBlur = (event: Event) => { const onCompositionstart = () => { composing.value = true; -} +}; const onCompositionend = (event: Event) => { composing.value = false; - onInput(event) -} + onInput(event); +}; const classes = computed(() => { return { "layui-disabled": props.disabled }; diff --git a/package/component/src/component/transfer/index.vue b/package/component/src/component/transfer/index.vue index d39e7fa4..f781fd74 100644 --- a/package/component/src/component/transfer/index.vue +++ b/package/component/src/component/transfer/index.vue @@ -46,10 +46,12 @@ const allRightChecked = ref(false); const hasLeftChecked = ref(false); const hasRightChecked = ref(false); -const allLeftChange = (checked: any) => { - if (checked) { +const allLeftChange = (isChecked: boolean) => { + if (isChecked) { const ids = leftDataSource.value.map((item: any) => { - return item[props.id]; + if(!item.disabled) { + return item[props.id]; + } }); leftSelectedKeys.value = ids; } else { @@ -80,7 +82,9 @@ watch( const allRightChange = (checked: any) => { if (checked) { const ids = rightDataSource.value.map((item: any) => { - return item[props.id]; + if(!item.disabled) { + return item[props.id]; + } }); rightSelectedKeys.value = ids; } else { @@ -214,6 +218,7 @@ const boxStyle = computed(() => { @@ -263,8 +268,9 @@ const boxStyle = computed(() => {