mirror of
https://github.com/vbenjs/gf-vben-admin.git
synced 2025-01-23 20:00:19 +08:00
fix(tree-select): replaceFields to fieldNames,close #1423
This commit is contained in:
parent
cfda62ef9c
commit
170a4bceb1
20
package.json
20
package.json
@ -36,10 +36,8 @@
|
|||||||
"@ant-design/colors": "^6.0.0",
|
"@ant-design/colors": "^6.0.0",
|
||||||
"@ant-design/icons-vue": "^6.0.1",
|
"@ant-design/icons-vue": "^6.0.1",
|
||||||
"@iconify/iconify": "^2.1.0",
|
"@iconify/iconify": "^2.1.0",
|
||||||
"@logicflow/core": "^0.7.10",
|
"@logicflow/core": "^0.7.11",
|
||||||
"@logicflow/extension": "^0.7.10",
|
"@logicflow/extension": "^0.7.11",
|
||||||
"@vue/runtime-core": "^3.2.23",
|
|
||||||
"@vue/shared": "^3.2.23",
|
|
||||||
"@vueuse/core": "^7.1.2",
|
"@vueuse/core": "^7.1.2",
|
||||||
"@vueuse/shared": "^7.1.2",
|
"@vueuse/shared": "^7.1.2",
|
||||||
"@zxcvbn-ts/core": "^1.0.0",
|
"@zxcvbn-ts/core": "^1.0.0",
|
||||||
@ -74,7 +72,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^15.0.0",
|
"@commitlint/cli": "^15.0.0",
|
||||||
"@commitlint/config-conventional": "^15.0.0",
|
"@commitlint/config-conventional": "^15.0.0",
|
||||||
"@iconify/json": "^2.0.3",
|
"@iconify/json": "^2.0.4",
|
||||||
"@purge-icons/generated": "^0.7.0",
|
"@purge-icons/generated": "^0.7.0",
|
||||||
"@types/codemirror": "^5.60.5",
|
"@types/codemirror": "^5.60.5",
|
||||||
"@types/crypto-js": "^4.0.2",
|
"@types/crypto-js": "^4.0.2",
|
||||||
@ -84,14 +82,14 @@
|
|||||||
"@types/jest": "^27.0.3",
|
"@types/jest": "^27.0.3",
|
||||||
"@types/lodash-es": "^4.17.5",
|
"@types/lodash-es": "^4.17.5",
|
||||||
"@types/mockjs": "^1.0.4",
|
"@types/mockjs": "^1.0.4",
|
||||||
"@types/node": "^16.11.10",
|
"@types/node": "^16.11.11",
|
||||||
"@types/nprogress": "^0.2.0",
|
"@types/nprogress": "^0.2.0",
|
||||||
"@types/qrcode": "^1.4.1",
|
"@types/qrcode": "^1.4.1",
|
||||||
"@types/qs": "^6.9.7",
|
"@types/qs": "^6.9.7",
|
||||||
"@types/showdown": "^1.9.4",
|
"@types/showdown": "^1.9.4",
|
||||||
"@types/sortablejs": "^1.10.7",
|
"@types/sortablejs": "^1.10.7",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
"@typescript-eslint/eslint-plugin": "^5.5.0",
|
||||||
"@typescript-eslint/parser": "^5.4.0",
|
"@typescript-eslint/parser": "^5.5.0",
|
||||||
"@vitejs/plugin-legacy": "^1.6.3",
|
"@vitejs/plugin-legacy": "^1.6.3",
|
||||||
"@vitejs/plugin-vue": "^1.10.1",
|
"@vitejs/plugin-vue": "^1.10.1",
|
||||||
"@vitejs/plugin-vue-jsx": "^1.3.0",
|
"@vitejs/plugin-vue-jsx": "^1.3.0",
|
||||||
@ -112,7 +110,7 @@
|
|||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
"husky": "^7.0.4",
|
"husky": "^7.0.4",
|
||||||
"inquirer": "^8.2.0",
|
"inquirer": "^8.2.0",
|
||||||
"jest": "^27.4.0",
|
"jest": "^27.4.2",
|
||||||
"less": "^4.1.2",
|
"less": "^4.1.2",
|
||||||
"lint-staged": "12.1.2",
|
"lint-staged": "12.1.2",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
@ -137,14 +135,14 @@
|
|||||||
"vite-plugin-imagemin": "^0.4.6",
|
"vite-plugin-imagemin": "^0.4.6",
|
||||||
"vite-plugin-mock": "^2.9.6",
|
"vite-plugin-mock": "^2.9.6",
|
||||||
"vite-plugin-purge-icons": "^0.7.0",
|
"vite-plugin-purge-icons": "^0.7.0",
|
||||||
"vite-plugin-pwa": "^0.11.8",
|
"vite-plugin-pwa": "^0.11.9",
|
||||||
"vite-plugin-style-import": "^1.4.0",
|
"vite-plugin-style-import": "^1.4.0",
|
||||||
"vite-plugin-svg-icons": "^1.0.5",
|
"vite-plugin-svg-icons": "^1.0.5",
|
||||||
"vite-plugin-theme": "^0.8.1",
|
"vite-plugin-theme": "^0.8.1",
|
||||||
"vite-plugin-vue-setup-extend": "^0.1.0",
|
"vite-plugin-vue-setup-extend": "^0.1.0",
|
||||||
"vite-plugin-windicss": "^1.5.3",
|
"vite-plugin-windicss": "^1.5.3",
|
||||||
"vue-eslint-parser": "^8.0.1",
|
"vue-eslint-parser": "^8.0.1",
|
||||||
"vue-tsc": "^0.29.7"
|
"vue-tsc": "^0.29.8"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"//": "Used to install imagemin dependencies, because imagemin may not be installed in China. If it is abroad, you can delete it",
|
"//": "Used to install imagemin dependencies, because imagemin may not be installed in China. If it is abroad, you can delete it",
|
||||||
|
3008
pnpm-lock.yaml
generated
3008
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -115,7 +115,7 @@ export const treeProps = buildProps({
|
|||||||
// 自定义数据过滤判断方法(注: 不是整个过滤方法,而是内置过滤的判断方法,用于增强原本仅能通过title进行过滤的方式)
|
// 自定义数据过滤判断方法(注: 不是整个过滤方法,而是内置过滤的判断方法,用于增强原本仅能通过title进行过滤的方式)
|
||||||
filterFn: {
|
filterFn: {
|
||||||
type: Function as PropType<
|
type: Function as PropType<
|
||||||
(searchValue: any, node: TreeItem, replaceFields: FieldNames) => boolean
|
(searchValue: any, node: TreeItem, fieldNames: FieldNames) => boolean
|
||||||
>,
|
>,
|
||||||
default: undefined,
|
default: undefined,
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import '/@/design/index.less';
|
|
||||||
import 'virtual:windi-base.css';
|
import 'virtual:windi-base.css';
|
||||||
import 'virtual:windi-components.css';
|
import 'virtual:windi-components.css';
|
||||||
|
import '/@/design/index.less';
|
||||||
import 'virtual:windi-utilities.css';
|
import 'virtual:windi-utilities.css';
|
||||||
// Register icon sprite
|
// Register icon sprite
|
||||||
import 'virtual:svg-icons-register';
|
import 'virtual:svg-icons-register';
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="bg-white m-4 mr-0 overflow-hidden">
|
<div class="m-4 mr-0 overflow-hidden bg-white">
|
||||||
<BasicTree
|
<BasicTree
|
||||||
title="部门列表"
|
title="部门列表"
|
||||||
toolbar
|
toolbar
|
||||||
search
|
search
|
||||||
:clickRowToExpand="false"
|
:clickRowToExpand="false"
|
||||||
:treeData="treeData"
|
:treeData="treeData"
|
||||||
:replaceFields="{ key: 'id', title: 'deptName' }"
|
:fieldNames="{ key: 'id', label: 'deptName' }"
|
||||||
@select="handleSelect"
|
@select="handleSelect"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -96,8 +96,8 @@ export const accountFormSchema: FormSchema[] = [
|
|||||||
label: '所属部门',
|
label: '所属部门',
|
||||||
component: 'TreeSelect',
|
component: 'TreeSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
replaceFields: {
|
fieldNames: {
|
||||||
title: 'deptName',
|
label: 'deptName',
|
||||||
key: 'id',
|
key: 'id',
|
||||||
value: 'id',
|
value: 'id',
|
||||||
},
|
},
|
||||||
|
@ -72,8 +72,8 @@ export const formSchema: FormSchema[] = [
|
|||||||
component: 'TreeSelect',
|
component: 'TreeSelect',
|
||||||
|
|
||||||
componentProps: {
|
componentProps: {
|
||||||
replaceFields: {
|
fieldNames: {
|
||||||
title: 'deptName',
|
label: 'deptName',
|
||||||
key: 'id',
|
key: 'id',
|
||||||
value: 'id',
|
value: 'id',
|
||||||
},
|
},
|
||||||
|
@ -104,8 +104,8 @@ export const formSchema: FormSchema[] = [
|
|||||||
label: '上级菜单',
|
label: '上级菜单',
|
||||||
component: 'TreeSelect',
|
component: 'TreeSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
replaceFields: {
|
fieldNames: {
|
||||||
title: 'menuName',
|
label: 'menuName',
|
||||||
key: 'id',
|
key: 'id',
|
||||||
value: 'id',
|
value: 'id',
|
||||||
},
|
},
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<BasicTree
|
<BasicTree
|
||||||
v-model:value="model[field]"
|
v-model:value="model[field]"
|
||||||
:treeData="treeData"
|
:treeData="treeData"
|
||||||
:replaceFields="{ title: 'menuName', key: 'id' }"
|
:fieldNames="{ label: 'menuName', key: 'id' }"
|
||||||
checkable
|
checkable
|
||||||
toolbar
|
toolbar
|
||||||
title="菜单分配"
|
title="菜单分配"
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
"@types/koa": "^2.13.4",
|
"@types/koa": "^2.13.4",
|
||||||
"@types/koa-bodyparser": "^5.0.2",
|
"@types/koa-bodyparser": "^5.0.2",
|
||||||
"@types/koa-router": "^7.4.4",
|
"@types/koa-router": "^7.4.4",
|
||||||
"@types/node": "^16.11.10",
|
"@types/node": "^16.11.11",
|
||||||
"nodemon": "^2.0.15",
|
"nodemon": "^2.0.15",
|
||||||
"pm2": "^5.1.2",
|
"pm2": "^5.1.2",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
|
@ -95,7 +95,6 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
// @iconify/iconify: The dependency is dynamically and virtually loaded by @purge-icons/generated, so it needs to be specified explicitly
|
// @iconify/iconify: The dependency is dynamically and virtually loaded by @purge-icons/generated, so it needs to be specified explicitly
|
||||||
include: [
|
include: [
|
||||||
'@vue/shared',
|
|
||||||
'@iconify/iconify',
|
'@iconify/iconify',
|
||||||
'ant-design-vue/es/locale/zh_CN',
|
'ant-design-vue/es/locale/zh_CN',
|
||||||
'ant-design-vue/es/locale/en_US',
|
'ant-design-vue/es/locale/en_US',
|
||||||
|
Loading…
Reference in New Issue
Block a user