Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update common #3273

Merged
merged 2 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/_common
Submodule _common updated 51 files
+23 −0 docs/mobile/api/back-top.en-US.md
+1 −1 docs/mobile/api/back-top.md
+23 −0 docs/mobile/api/cell.en-US.md
+7 −11 docs/mobile/api/cell.md
+7 −0 docs/mobile/api/icon.en-US.md
+1 −1 docs/mobile/api/icon.md
+0 −0 docs/mobile/api/layout.en-US.md
+0 −0 docs/mobile/api/layout.md
+32 −0 docs/mobile/api/navbar.en-US.md
+16 −4 docs/mobile/api/navbar.md
+11 −0 docs/mobile/api/overlay.en-US.md
+23 −0 docs/mobile/api/popup.en-US.md
+8 −26 docs/mobile/api/popup.md
+32 −0 docs/mobile/api/skeleton.en-US.md
+13 −12 docs/mobile/api/skeleton.md
+24 −0 docs/mobile/api/sticky.en-US.md
+5 −2 docs/mobile/api/sticky.md
+32 −0 docs/mobile/api/tag.en-US.md
+12 −26 docs/mobile/api/tag.md
+17 −0 docs/mobile/api_v2/layout.en-US.md
+17 −0 docs/mobile/api_v2/layout.md
+8 −0 docs/mobile/overview.en-US.md
+8 −0 docs/mobile/overview.md
+27 −0 docs/web/api/empty.en-US.md
+27 −0 docs/web/api/empty.md
+18 −2 js/global-config/default-config.ts
+14 −2 js/global-config/locale/ar_KW.ts
+18 −2 js/global-config/locale/en_US.ts
+31 −7 js/global-config/locale/it_IT.ts
+19 −3 js/global-config/locale/ja_JP.ts
+19 −3 js/global-config/locale/ko_KR.ts
+32 −6 js/global-config/locale/ru_RU.ts
+18 −2 js/global-config/locale/zh_CN.ts
+18 −2 js/global-config/locale/zh_TW.ts
+14 −1 js/input-number/large-number.ts
+11 −4 js/table/tree-store.ts
+4 −1 js/tree-v1/tree-node.ts
+4 −4 style/mobile/components/_index.less
+8 −1 style/mobile/components/layout/_index.less
+0 −0 style/mobile/components/layout/_mixin.less
+5 −0 style/mobile/components/notice-bar/v2/_index.less
+4 −1 style/mobile/components/overlay/_index.less
+0 −1 style/mobile/components/overlay/_var.less
+51 −0 style/mobile/components/overlay/v2/_animate.less
+7 −2 style/mobile/components/overlay/v2/_index.less
+0 −1 style/mobile/components/overlay/v2/_var.less
+0 −8 style/mobile/components/row/v2/_index.less
+0 −1 style/web/components/dropdown/_index.less
+31 −0 style/web/components/empty/_index.less
+23 −0 style/web/components/empty/_var.less
+12 −0 test/unit/input-number/largeNumberToFixed.test.js
37 changes: 20 additions & 17 deletions src/cascader/core/effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,24 +140,27 @@ export function handleRemoveTagEffect(
} = cascaderContext;

if (disabled) return;
const newValue = cloneDeep(value) as [];
const res = newValue.splice(index, 1);
const node = treeStore.getNodes(res[0])[0];

setValue(newValue, 'uncheck', node.getModel());

const checked = node.setChecked(!node.isChecked());
// 处理不同数据类型
const resValue = valueType === 'single'
? checked
: checked.map((val) => treeStore
.getNode(val)
.getPath()
.map((item) => item.value));

setValue(resValue, 'uncheck', node.getModel());
if (isFunction(onRemove)) {
onRemove({ value: checked, node: node as any });
// index equal to undefined means to click clear button
if (index !== undefined) {
const newValue = cloneDeep(value) as [];
const res = newValue.splice(index, 1);
const node = treeStore.getNodes(res[0])[0];

const checked = node.setChecked(!node.isChecked());
// 处理不同数据类型
const resValue = valueType === 'single'
? checked
: checked.map((val) => treeStore
.getNode(val)
.getPath()
.map((item) => item.value));
setValue(resValue, 'uncheck', node.getModel());
if (isFunction(onRemove)) {
onRemove({ value: checked, node: node as any });
}
} else if (isFunction(onRemove)) {
onRemove({ value, node: undefined });
}
}

Expand Down
Loading