mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 00:26:20 +08:00
Compare commits
1 Commits
main
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8dabaa37a5 |
@@ -82,7 +82,7 @@ defineExpose({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Teleport defer :to="appendTo">
|
||||
<Teleport :to="appendTo">
|
||||
<Transition name="fade">
|
||||
<DialogOverlay
|
||||
v-if="open && modal"
|
||||
|
@@ -73,7 +73,7 @@ function onAnimationEnd(event: AnimationEvent) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Teleport defer :to="appendTo">
|
||||
<Teleport :to="appendTo">
|
||||
<Transition name="fade">
|
||||
<SheetOverlay
|
||||
v-if="open && modal"
|
||||
|
@@ -103,15 +103,10 @@ function updateTreeValue() {
|
||||
treeValue.value = undefined;
|
||||
} else {
|
||||
if (Array.isArray(val)) {
|
||||
let filteredValues = val.filter((v) => {
|
||||
const filteredValues = val.filter((v) => {
|
||||
const item = getItemByValue(v);
|
||||
return item && !get(item, props.disabledField);
|
||||
});
|
||||
|
||||
if (!props.checkStrictly && props.autoCheckParent) {
|
||||
filteredValues = processParentSelection(filteredValues);
|
||||
}
|
||||
|
||||
treeValue.value = filteredValues.map((v) => getItemByValue(v));
|
||||
|
||||
if (filteredValues.length !== val.length) {
|
||||
@@ -128,35 +123,7 @@ function updateTreeValue() {
|
||||
}
|
||||
}
|
||||
}
|
||||
function processParentSelection(
|
||||
selectedValues: Array<number | string>,
|
||||
): Array<number | string> {
|
||||
if (props.checkStrictly) return selectedValues;
|
||||
|
||||
const result = [...selectedValues];
|
||||
|
||||
for (let i = result.length - 1; i >= 0; i--) {
|
||||
const currentValue = result[i];
|
||||
if (currentValue === undefined) continue;
|
||||
const currentItem = getItemByValue(currentValue);
|
||||
|
||||
if (!currentItem) continue;
|
||||
|
||||
const children = get(currentItem, props.childrenField);
|
||||
if (Array.isArray(children) && children.length > 0) {
|
||||
const hasSelectedChildren = children.some((child) => {
|
||||
const childValue = get(child, props.valueField);
|
||||
return result.includes(childValue);
|
||||
});
|
||||
|
||||
if (!hasSelectedChildren) {
|
||||
result.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
function updateModelValue(val: Arrayable<Recordable<any>>) {
|
||||
if (Array.isArray(val)) {
|
||||
const filteredVal = val.filter((v) => !get(v, props.disabledField));
|
||||
|
@@ -104,7 +104,7 @@ function selectColor() {
|
||||
|
||||
watch(
|
||||
() => [modelValue.value, props.isDark] as [BuiltinThemeType, boolean],
|
||||
([themeType, isDark], [_, isDarkPrev]) => {
|
||||
([themeType, isDark]) => {
|
||||
const theme = builtinThemePresets.value.find(
|
||||
(item) => item.type === themeType,
|
||||
);
|
||||
@@ -113,9 +113,7 @@ watch(
|
||||
? theme.darkPrimaryColor || theme.primaryColor
|
||||
: theme.primaryColor;
|
||||
|
||||
if (!(theme.type === 'custom' && isDark !== isDarkPrev)) {
|
||||
themeColorPrimary.value = primaryColor || theme.color;
|
||||
}
|
||||
themeColorPrimary.value = primaryColor || theme.color;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
34
pnpm-lock.yaml
generated
34
pnpm-lock.yaml
generated
@@ -412,8 +412,8 @@ catalogs:
|
||||
specifier: ^16.0.0
|
||||
version: 16.0.0
|
||||
stylelint-config-recommended-scss:
|
||||
specifier: ^14.1.0
|
||||
version: 14.1.0
|
||||
specifier: ^16.0.0
|
||||
version: 16.0.0
|
||||
stylelint-config-recommended-vue:
|
||||
specifier: ^1.6.1
|
||||
version: 1.6.1
|
||||
@@ -1025,7 +1025,7 @@ importers:
|
||||
version: 16.0.0(stylelint@16.21.0(typescript@5.8.3))
|
||||
stylelint-config-recommended-scss:
|
||||
specifier: 'catalog:'
|
||||
version: 14.1.0(postcss@8.5.6)(stylelint@16.21.0(typescript@5.8.3))
|
||||
version: 16.0.0(postcss@8.5.6)(stylelint@16.21.0(typescript@5.8.3))
|
||||
stylelint-config-recommended-vue:
|
||||
specifier: 'catalog:'
|
||||
version: 1.6.1(postcss-html@1.8.0)(stylelint@16.21.0(typescript@5.8.3))
|
||||
@@ -10568,12 +10568,12 @@ packages:
|
||||
peerDependencies:
|
||||
stylelint: '>=16'
|
||||
|
||||
stylelint-config-recommended-scss@14.1.0:
|
||||
resolution: {integrity: sha512-bhaMhh1u5dQqSsf6ri2GVWWQW5iUjBYgcHkh7SgDDn92ijoItC/cfO/W+fpXshgTQWhwFkP1rVcewcv4jaftRg==}
|
||||
engines: {node: '>=18.12.0'}
|
||||
stylelint-config-recommended-scss@16.0.0:
|
||||
resolution: {integrity: sha512-Vh09MlGgKUwgHwuTQXPI6CbwMgXEUpjv+6EpVhZtHkGUJY7yFIoJby3Wcjd12rvdp6xOMdMIKU48Qu6KwZK+mw==}
|
||||
engines: {node: '>=20'}
|
||||
peerDependencies:
|
||||
postcss: ^8.3.3
|
||||
stylelint: ^16.6.1
|
||||
stylelint: ^16.23.1
|
||||
peerDependenciesMeta:
|
||||
postcss:
|
||||
optional: true
|
||||
@@ -10585,18 +10585,18 @@ packages:
|
||||
postcss-html: ^1.0.0
|
||||
stylelint: '>=14.0.0'
|
||||
|
||||
stylelint-config-recommended@14.0.1:
|
||||
resolution: {integrity: sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==}
|
||||
engines: {node: '>=18.12.0'}
|
||||
peerDependencies:
|
||||
stylelint: ^16.1.0
|
||||
|
||||
stylelint-config-recommended@16.0.0:
|
||||
resolution: {integrity: sha512-4RSmPjQegF34wNcK1e1O3Uz91HN8P1aFdFzio90wNK9mjgAI19u5vsU868cVZboKzCaa5XbpvtTzAAGQAxpcXA==}
|
||||
engines: {node: '>=18.12.0'}
|
||||
peerDependencies:
|
||||
stylelint: ^16.16.0
|
||||
|
||||
stylelint-config-recommended@17.0.0:
|
||||
resolution: {integrity: sha512-WaMSdEiPfZTSFVoYmJbxorJfA610O0tlYuU2aEwY33UQhSPgFbClrVJYWvy3jGJx+XW37O+LyNLiZOEXhKhJmA==}
|
||||
engines: {node: '>=18.12.0'}
|
||||
peerDependencies:
|
||||
stylelint: ^16.23.0
|
||||
|
||||
stylelint-config-standard@38.0.0:
|
||||
resolution: {integrity: sha512-uj3JIX+dpFseqd/DJx8Gy3PcRAJhlEZ2IrlFOc4LUxBX/PNMEQ198x7LCOE2Q5oT9Vw8nyc4CIL78xSqPr6iag==}
|
||||
engines: {node: '>=18.12.0'}
|
||||
@@ -21349,11 +21349,11 @@ snapshots:
|
||||
stylelint: 16.21.0(typescript@5.8.3)
|
||||
stylelint-order: 6.0.4(stylelint@16.21.0(typescript@5.8.3))
|
||||
|
||||
stylelint-config-recommended-scss@14.1.0(postcss@8.5.6)(stylelint@16.21.0(typescript@5.8.3)):
|
||||
stylelint-config-recommended-scss@16.0.0(postcss@8.5.6)(stylelint@16.21.0(typescript@5.8.3)):
|
||||
dependencies:
|
||||
postcss-scss: 4.0.9(postcss@8.5.6)
|
||||
stylelint: 16.21.0(typescript@5.8.3)
|
||||
stylelint-config-recommended: 14.0.1(stylelint@16.21.0(typescript@5.8.3))
|
||||
stylelint-config-recommended: 17.0.0(stylelint@16.21.0(typescript@5.8.3))
|
||||
stylelint-scss: 6.12.1(stylelint@16.21.0(typescript@5.8.3))
|
||||
optionalDependencies:
|
||||
postcss: 8.5.6
|
||||
@@ -21366,11 +21366,11 @@ snapshots:
|
||||
stylelint-config-html: 1.1.0(postcss-html@1.8.0)(stylelint@16.21.0(typescript@5.8.3))
|
||||
stylelint-config-recommended: 16.0.0(stylelint@16.21.0(typescript@5.8.3))
|
||||
|
||||
stylelint-config-recommended@14.0.1(stylelint@16.21.0(typescript@5.8.3)):
|
||||
stylelint-config-recommended@16.0.0(stylelint@16.21.0(typescript@5.8.3)):
|
||||
dependencies:
|
||||
stylelint: 16.21.0(typescript@5.8.3)
|
||||
|
||||
stylelint-config-recommended@16.0.0(stylelint@16.21.0(typescript@5.8.3)):
|
||||
stylelint-config-recommended@17.0.0(stylelint@16.21.0(typescript@5.8.3)):
|
||||
dependencies:
|
||||
stylelint: 16.21.0(typescript@5.8.3)
|
||||
|
||||
|
@@ -154,7 +154,7 @@ catalog:
|
||||
stylelint: ^16.21.0
|
||||
stylelint-config-recess-order: ^6.1.0
|
||||
stylelint-config-recommended: ^16.0.0
|
||||
stylelint-config-recommended-scss: ^14.1.0
|
||||
stylelint-config-recommended-scss: ^16.0.0
|
||||
stylelint-config-recommended-vue: ^1.6.1
|
||||
stylelint-config-standard: ^38.0.0
|
||||
stylelint-order: ^7.0.0
|
||||
|
Reference in New Issue
Block a user