Compare commits

...

2 Commits

Author SHA1 Message Date
chansee97
f426bffbc7 fix: cancel lock node vision 2024-06-07 07:28:28 +08:00
chansee97
8ead40457b chore: remove arrayToTree 2024-06-07 07:22:39 +08:00
4 changed files with 1 additions and 36 deletions

1
.npmrc
View File

@ -2,4 +2,3 @@ registry=https://registry.npmmirror.com/
shamefully-hoist=true
strict-peer-dependencies=false
auto-install-peers=true
engine-strict = true

View File

@ -36,9 +36,6 @@
"naive-ui-admin",
"UnoCSS"
],
"engines": {
"node": ">= 20"
},
"scripts": {
"dev": "vite --mode dev --port 9980",
"dev:test": "vite --mode test",
@ -59,7 +56,6 @@
"colord": "^2.9.3",
"echarts": "^5.5.0",
"md-editor-v3": "^4.15.2",
"performant-array-to-tree": "^1.11.0",
"pinia": "^2.1.7",
"pinia-plugin-persist": "^1.0.0",
"quill": "^2.0.2",

View File

@ -1,33 +1,3 @@
// import { arrayToTree as _arrayToTree } from 'performant-array-to-tree'
// import { omit } from 'radash'
// export function arrayToTree(data: any) {
// const rowTree = _arrayToTree(data, {
// parentId: 'pid',
// dataField: null,
// })
// const transform = (node: any) => {
// if (node.children.length > 0) {
// return ({
// ...node,
// children: node.children.map(transform),
// })
// }
// return omit(node, ['children'])
// }
// return rowTree.map(transform)
// }
// interface ArrayItem extends Record<PropertyKey, any> {
// id: number
// pid: number | null
// }
// interface TreeItem extends ArrayItem {
// children?: TreeItem[]
// }
export function arrayToTree(arr: any[]) {
const res: any = []
const map = new Map()

View File

@ -28,7 +28,7 @@ export default defineConfig(({ mode }) => {
reportCompressedSize: false, // 启用/禁用 gzip 压缩大小报告
},
optimizeDeps: {
include: ['echarts', 'md-editor-v3'],
include: ['echarts', 'md-editor-v3', 'quill'],
},
}
})