mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
解决菜单选择问题
This commit is contained in:
parent
f9173dece4
commit
f9030a5636
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "front-next",
|
||||
"version": "5.7.5",
|
||||
"version": "5.7.6",
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
"build": "vite build",
|
||||
@ -11,7 +11,7 @@
|
||||
"dependencies": {
|
||||
"@codemirror/lang-javascript": "^6.0.1",
|
||||
"@codemirror/theme-one-dark": "^6.0.0",
|
||||
"@cool-vue/crud": "^5.3.1",
|
||||
"@cool-vue/crud": "^5.3.2",
|
||||
"@element-plus/icons-vue": "^2.0.6",
|
||||
"@vueuse/core": "^8.9.4",
|
||||
"axios": "^0.27.2",
|
||||
|
@ -23,7 +23,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script lang="ts" name="dept-check" setup>
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { deepTree } from "/@/cool/utils";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
@ -68,8 +68,8 @@ function filterNode(val: string, data: any) {
|
||||
}
|
||||
|
||||
// 值改变
|
||||
function onCheckChange(_: any, { checkedKeys }: any) {
|
||||
emit("update:modelValue", checkedKeys);
|
||||
function onCheckChange(_: any, { checkedKeys, halfCheckedKeys }: any) {
|
||||
emit("update:modelValue", [...checkedKeys, ...halfCheckedKeys]);
|
||||
}
|
||||
|
||||
// 过滤监听
|
||||
@ -81,7 +81,7 @@ watch(keyword, (val: string) => {
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val) => {
|
||||
checked.value = val || [];
|
||||
checked.value = (val || []).filter((e) => Tree.value.getNode(e)?.isLeaf);
|
||||
}
|
||||
);
|
||||
|
||||
|
12
yarn.lock
12
yarn.lock
@ -1052,14 +1052,14 @@
|
||||
style-mod "^4.0.0"
|
||||
w3c-keyname "^2.2.4"
|
||||
|
||||
"@cool-vue/crud@^5.3.1":
|
||||
version "5.3.1"
|
||||
resolved "https://registry.npmjs.org/@cool-vue/crud/-/crud-5.3.1.tgz#932fe9d382053a8259a5204b0d746d1e7fbb49b6"
|
||||
integrity sha512-GfmBP1xMumz5NKDLOZgVJqkhEhiHTZsXxTTn4gaTe+vq3VesGWhhbfT71WL2U9SSTroTSJOdIHBG+xE4Wo9lFg==
|
||||
"@cool-vue/crud@^5.3.2":
|
||||
version "5.3.2"
|
||||
resolved "https://registry.npmjs.org/@cool-vue/crud/-/crud-5.3.2.tgz#61b01eb012688a0539e5939958cd9fb2bf60513a"
|
||||
integrity sha512-tHmF6OGjGvoOCPTSzgFKv6x3UvFLDKq5NIneHx1jeoJwPE422lWHd/CeBr/tLq7pvFrRMsKWhlvD6moyfZDiQA==
|
||||
dependencies:
|
||||
array.prototype.flat "^1.2.4"
|
||||
core-js "^3.21.1"
|
||||
element-plus "^2.2.6"
|
||||
element-plus "^2.2.11"
|
||||
merge "^2.1.1"
|
||||
mitt "^3.0.0"
|
||||
vue "^3.2.31"
|
||||
@ -2446,7 +2446,7 @@ electron-to-chromium@^1.4.202:
|
||||
resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.206.tgz#580ff85b54d7ec0c05f20b1e37ea0becdd7b0ee4"
|
||||
integrity sha512-h+Fadt1gIaQ06JaIiyqPsBjJ08fV5Q7md+V8bUvQW/9OvXfL2LRICTz2EcnnCP7QzrFTS6/27MRV6Bl9Yn97zA==
|
||||
|
||||
element-plus@^2.2.11, element-plus@^2.2.6:
|
||||
element-plus@^2.2.11:
|
||||
version "2.2.11"
|
||||
resolved "https://registry.npmjs.org/element-plus/-/element-plus-2.2.11.tgz#c242bd5ff10aea02cfc70c0b8c54cbc9b732e7ba"
|
||||
integrity sha512-JjOvz5DLBc4Jp9OHKXNcK/Cys4NX5/vxpZ+gYmH2V+pLkwJnyIOrNZ3QxfdyG6yE4+NkpoA6koEgUB7T+0Z5vQ==
|
||||
|
Loading…
Reference in New Issue
Block a user