Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
zuiqiangwanggong
vue-vben-admin
提交
b0a0cbcd
V
vue-vben-admin
项目概览
zuiqiangwanggong
/
vue-vben-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-vben-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b0a0cbcd
编写于
12月 12, 2021
作者:
V
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: Fix context menu not working
上级
f6e27aee
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
629 addition
and
632 deletion
+629
-632
package.json
package.json
+28
-28
pnpm-lock.yaml
pnpm-lock.yaml
+560
-565
src/components/ContextMenu/src/ContextMenu.vue
src/components/ContextMenu/src/ContextMenu.vue
+9
-9
src/components/Tree/src/Tree.vue
src/components/Tree/src/Tree.vue
+2
-2
src/components/Tree/style/index.less
src/components/Tree/style/index.less
+3
-0
src/views/demo/tree/data.ts
src/views/demo/tree/data.ts
+21
-24
src/views/demo/tree/index.vue
src/views/demo/tree/index.vue
+3
-1
tests/server/package.json
tests/server/package.json
+3
-3
未找到文件。
package.json
浏览文件 @
b0a0cbcd
...
...
@@ -36,14 +36,14 @@
"
@ant-design/colors
"
:
"
^6.0.0
"
,
"
@ant-design/icons-vue
"
:
"
^6.0.1
"
,
"
@iconify/iconify
"
:
"
^2.1.0
"
,
"
@logicflow/core
"
:
"
^0.7.1
1
"
,
"
@logicflow/extension
"
:
"
^0.7.1
1
"
,
"
@vue/runtime-core
"
:
"
^3.2.2
3
"
,
"
@vue/shared
"
:
"
^3.2.2
3
"
,
"
@vueuse/core
"
:
"
^7.
1.2
"
,
"
@vueuse/shared
"
:
"
^7.
1.2
"
,
"
@logicflow/core
"
:
"
^0.7.1
4
"
,
"
@logicflow/extension
"
:
"
^0.7.1
4
"
,
"
@vue/runtime-core
"
:
"
^3.2.2
6
"
,
"
@vue/shared
"
:
"
^3.2.2
6
"
,
"
@vueuse/core
"
:
"
^7.
3.0
"
,
"
@vueuse/shared
"
:
"
^7.
3.0
"
,
"
@zxcvbn-ts/core
"
:
"
^1.0.0
"
,
"
ant-design-vue
"
:
"
3.0.0-alpha.1
3
"
,
"
ant-design-vue
"
:
"
3.0.0-alpha.1
5
"
,
"
axios
"
:
"
^0.24.0
"
,
"
codemirror
"
:
"
^5.64.0
"
,
"
cropperjs
"
:
"
^1.5.12
"
,
...
...
@@ -55,16 +55,16 @@
"
mockjs
"
:
"
^1.1.0
"
,
"
nprogress
"
:
"
^0.2.0
"
,
"
path-to-regexp
"
:
"
^6.2.0
"
,
"
pinia
"
:
"
2.0.
4
"
,
"
pinia
"
:
"
2.0.
6
"
,
"
print-js
"
:
"
^1.6.0
"
,
"
qrcode
"
:
"
^1.5.0
"
,
"
qs
"
:
"
^6.10.
1
"
,
"
qs
"
:
"
^6.10.
2
"
,
"
resize-observer-polyfill
"
:
"
^1.5.1
"
,
"
showdown
"
:
"
^1.9.1
"
,
"
sortablejs
"
:
"
^1.14.0
"
,
"
tinymce
"
:
"
^5.10.2
"
,
"
vditor
"
:
"
^3.8.
7
"
,
"
vue
"
:
"
^3.2.2
3
"
,
"
vditor
"
:
"
^3.8.
8
"
,
"
vue
"
:
"
^3.2.2
6
"
,
"
vue-i18n
"
:
"
^9.1.9
"
,
"
vue-json-pretty
"
:
"
^2.0.6
"
,
"
vue-router
"
:
"
^4.0.12
"
,
...
...
@@ -74,7 +74,7 @@
"devDependencies"
:
{
"
@commitlint/cli
"
:
"
^15.0.0
"
,
"
@commitlint/config-conventional
"
:
"
^15.0.0
"
,
"
@iconify/json
"
:
"
^2.0.
4
"
,
"
@iconify/json
"
:
"
^2.0.
9
"
,
"
@purge-icons/generated
"
:
"
^0.7.0
"
,
"
@types/codemirror
"
:
"
^5.60.5
"
,
"
@types/crypto-js
"
:
"
^4.0.2
"
,
...
...
@@ -84,42 +84,42 @@
"
@types/jest
"
:
"
^27.0.3
"
,
"
@types/lodash-es
"
:
"
^4.17.5
"
,
"
@types/mockjs
"
:
"
^1.0.4
"
,
"
@types/node
"
:
"
^16.11.1
1
"
,
"
@types/node
"
:
"
^16.11.1
2
"
,
"
@types/nprogress
"
:
"
^0.2.0
"
,
"
@types/qrcode
"
:
"
^1.4.1
"
,
"
@types/qs
"
:
"
^6.9.7
"
,
"
@types/showdown
"
:
"
^1.9.4
"
,
"
@types/sortablejs
"
:
"
^1.10.7
"
,
"
@typescript-eslint/eslint-plugin
"
:
"
^5.
5
.0
"
,
"
@typescript-eslint/parser
"
:
"
^5.
5
.0
"
,
"
@vitejs/plugin-legacy
"
:
"
^1.6.
3
"
,
"
@vitejs/plugin-vue
"
:
"
^
1.10.1
"
,
"
@vitejs/plugin-vue-jsx
"
:
"
^1.3.
0
"
,
"
@vue/compiler-sfc
"
:
"
3.2.2
3
"
,
"
@typescript-eslint/eslint-plugin
"
:
"
^5.
6
.0
"
,
"
@typescript-eslint/parser
"
:
"
^5.
6
.0
"
,
"
@vitejs/plugin-legacy
"
:
"
^1.6.
4
"
,
"
@vitejs/plugin-vue
"
:
"
^
2.0.0
"
,
"
@vitejs/plugin-vue-jsx
"
:
"
^1.3.
1
"
,
"
@vue/compiler-sfc
"
:
"
3.2.2
6
"
,
"
@vue/test-utils
"
:
"
^2.0.0-rc.17
"
,
"
autoprefixer
"
:
"
^10.4.0
"
,
"
commitizen
"
:
"
^4.2.4
"
,
"
conventional-changelog-cli
"
:
"
^2.1.1
"
,
"
cross-env
"
:
"
^7.0.3
"
,
"
dotenv
"
:
"
^10.0.0
"
,
"
eslint
"
:
"
^8.
3.0
"
,
"
eslint
"
:
"
^8.
4.1
"
,
"
eslint-config-prettier
"
:
"
^8.3.0
"
,
"
eslint-define-config
"
:
"
^1.2.0
"
,
"
eslint-plugin-jest
"
:
"
^25.3.0
"
,
"
eslint-plugin-prettier
"
:
"
^4.0.0
"
,
"
eslint-plugin-vue
"
:
"
^8.
1.1
"
,
"
eslint-plugin-vue
"
:
"
^8.
2.0
"
,
"
esno
"
:
"
^0.12.1
"
,
"
fs-extra
"
:
"
^10.0.0
"
,
"
husky
"
:
"
^7.0.4
"
,
"
inquirer
"
:
"
^8.2.0
"
,
"
jest
"
:
"
^27.4.
2
"
,
"
jest
"
:
"
^27.4.
4
"
,
"
less
"
:
"
^4.1.2
"
,
"
lint-staged
"
:
"
12.1.2
"
,
"
npm-run-all
"
:
"
^4.1.5
"
,
"
postcss
"
:
"
^8.4.4
"
,
"
postcss-html
"
:
"
^1.3.0
"
,
"
postcss-less
"
:
"
^5.0.0
"
,
"
prettier
"
:
"
^2.5.
0
"
,
"
prettier
"
:
"
^2.5.
1
"
,
"
rimraf
"
:
"
^3.0.2
"
,
"
rollup-plugin-visualizer
"
:
"
^5.5.2
"
,
"
stylelint
"
:
"
^14.1.0
"
,
...
...
@@ -128,21 +128,21 @@
"
stylelint-config-recommended
"
:
"
^6.0.0
"
,
"
stylelint-config-standard
"
:
"
^24.0.0
"
,
"
stylelint-order
"
:
"
^5.0.0
"
,
"
ts-jest
"
:
"
^27.
0.7
"
,
"
ts-jest
"
:
"
^27.
1.1
"
,
"
ts-node
"
:
"
^10.4.0
"
,
"
typescript
"
:
"
^4.5.
2
"
,
"
vite
"
:
"
^2.7.
0-beta.9
"
,
"
typescript
"
:
"
^4.5.
3
"
,
"
vite
"
:
"
^2.7.
1
"
,
"
vite-plugin-compression
"
:
"
^0.3.6
"
,
"
vite-plugin-html
"
:
"
^2.1.1
"
,
"
vite-plugin-imagemin
"
:
"
^0.4.6
"
,
"
vite-plugin-mock
"
:
"
^2.9.6
"
,
"
vite-plugin-purge-icons
"
:
"
^0.7.0
"
,
"
vite-plugin-pwa
"
:
"
^0.11.
9
"
,
"
vite-plugin-pwa
"
:
"
^0.11.
11
"
,
"
vite-plugin-style-import
"
:
"
^1.4.0
"
,
"
vite-plugin-svg-icons
"
:
"
^1.0.5
"
,
"
vite-plugin-theme
"
:
"
^0.8.1
"
,
"
vite-plugin-vue-setup-extend
"
:
"
^0.1.0
"
,
"
vite-plugin-windicss
"
:
"
^1.5.
3
"
,
"
vite-plugin-windicss
"
:
"
^1.5.
4
"
,
"
vue-eslint-parser
"
:
"
^8.0.1
"
,
"
vue-tsc
"
:
"
^0.29.8
"
},
...
...
pnpm-lock.yaml
浏览文件 @
b0a0cbcd
此差异已折叠。
点击以展开。
src/components/ContextMenu/src/ContextMenu.vue
浏览文件 @
b0a0cbcd
...
...
@@ -60,6 +60,7 @@
const
top
=
body
.
clientHeight
<
y
+
menuHeight
?
y
-
menuHeight
:
y
;
return
{
...
styles
,
position
:
'
absolute
'
,
width
:
`
${
width
}
px`
,
left
:
`
${
left
+
1
}
px`
,
top
:
`
${
top
+
1
}
px`
,
...
...
@@ -124,15 +125,11 @@
}
const
{
items
}
=
props
;
return
(
<
Menu
inlineIndent
=
{
12
}
mode
=
"
vertical
"
class
=
{
prefixCls
}
ref
=
{
wrapRef
}
style
=
{
unref
(
getStyle
)}
>
{
renderMenuItem
(
items
)}
<
/Menu
>
<
div
class
=
{
prefixCls
}
>
<
Menu
inlineIndent
=
{
12
}
mode
=
"
vertical
"
ref
=
{
wrapRef
}
style
=
{
unref
(
getStyle
)}
>
{
renderMenuItem
(
items
)}
<
/Menu
>
<
/div
>
);
};
},
...
...
@@ -185,6 +182,9 @@
background-clip: padding-box;
user-select: none;
&__item {
margin: 0 !important;
}
.item-style();
.ant-divider {
...
...
src/components/Tree/src/Tree.vue
浏览文件 @
b0a0cbcd
...
...
@@ -386,8 +386,8 @@
class
=
{
`
${
bem
(
'
title
'
)}
pl-2`
}
onClick
=
{
handleClickNode
.
bind
(
null
,
item
[
keyField
],
item
[
childrenField
])}
>
{
item
.
slots
?.
title
?
(
getSlot
(
slots
,
item
.
slots
?.
title
,
item
)
{
slots
?.
title
?
(
getSlot
(
slots
,
'
title
'
,
item
)
)
:
(
<>
{
icon
&&
<
TreeIcon
icon
=
{
icon
}
/>
}
...
...
src/components/Tree/style/index.less
浏览文件 @
b0a0cbcd
...
...
@@ -10,6 +10,9 @@
position: absolute;
left: 0;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
...
...
src/views/demo/tree/data.ts
浏览文件 @
b0a0cbcd
...
...
@@ -38,21 +38,21 @@ export const treeData2: any[] = [
{
name
:
'
parent
'
,
id
:
'
0-0
'
,
slots
:
{
title
:
'
title
'
},
children
:
[
{
name
:
'
leaf
'
,
id
:
'
0-0-0
'
,
slots
:
{
title
:
'
title
'
}
},
{
name
:
'
leaf
'
,
id
:
'
0-0-0
'
},
{
name
:
'
leaf
'
,
id
:
'
0-0-1
'
,
slots
:
{
title
:
'
title
'
},
children
:
[
{
name
:
'
leaf
'
,
slots
:
{
title
:
'
title
'
},
id
:
'
0-0-0-0
'
,
children
:
[{
name
:
'
leaf
'
,
id
:
'
0-0-0-0-1
'
,
slots
:
{
title
:
'
title
'
}
}],
children
:
[{
name
:
'
leaf
'
,
id
:
'
0-0-0-0-1
'
}],
},
{
name
:
'
leaf
'
,
slots
:
{
title
:
'
title
'
},
id
:
'
0-0-0-1
'
},
{
name
:
'
leaf
'
,
id
:
'
0-0-0-1
'
},
],
},
],
...
...
@@ -60,19 +60,19 @@ export const treeData2: any[] = [
{
name
:
'
parent 2
'
,
id
:
'
1-1
'
,
slots
:
{
title
:
'
title
'
},
children
:
[
{
name
:
'
leaf
'
,
slots
:
{
title
:
'
title
'
},
id
:
'
1-1-0
'
},
{
name
:
'
leaf
'
,
slots
:
{
title
:
'
title
'
},
id
:
'
1-1-1
'
},
{
name
:
'
leaf
'
,
id
:
'
1-1-0
'
},
{
name
:
'
leaf
'
,
id
:
'
1-1-1
'
},
],
},
{
name
:
'
parent 3
'
,
id
:
'
2-2
'
,
slots
:
{
title
:
'
title
'
},
children
:
[
{
name
:
'
leaf
'
,
slots
:
{
title
:
'
title
'
},
id
:
'
2-2-0
'
},
{
name
:
'
leaf
'
,
slots
:
{
title
:
'
title
'
},
id
:
'
2-2-1
'
},
{
name
:
'
leaf
'
,
id
:
'
2-2-0
'
},
{
name
:
'
leaf
'
,
id
:
'
2-2-1
'
},
],
},
];
...
...
@@ -81,21 +81,18 @@ export const treeData3: any[] = [
{
name
:
'
parent
'
,
key
:
'
0-0
'
,
slots
:
{
title
:
'
title
'
},
children
:
[
{
name
:
'
leaf
'
,
key
:
'
0-0-0
'
,
slots
:
{
title
:
'
title
'
}
},
{
name
:
'
leaf
'
,
key
:
'
0-0-0
'
},
{
name
:
'
leaf
'
,
key
:
'
0-0-1
'
,
slots
:
{
title
:
'
title
'
},
children
:
[
{
name
:
'
leaf
'
,
slots
:
{
title
:
'
title
'
},
key
:
'
0-0-0-0
'
,
children
:
[{
name
:
'
leaf
'
,
key
:
'
0-0-0-0-1
'
,
slots
:
{
title
:
'
title
'
}
}],
children
:
[{
name
:
'
leaf
'
,
key
:
'
0-0-0-0-1
'
}],
},
{
name
:
'
leaf
'
,
slots
:
{
title
:
'
title
'
},
key
:
'
0-0-0-1
'
},
{
name
:
'
leaf
'
,
key
:
'
0-0-0-1
'
},
],
},
],
...
...
@@ -103,19 +100,19 @@ export const treeData3: any[] = [
{
name
:
'
parent 2
'
,
key
:
'
1-1
'
,
slots
:
{
title
:
'
title
'
},
children
:
[
{
name
:
'
leaf
'
,
slots
:
{
title
:
'
title
'
},
key
:
'
1-1-0
'
},
{
name
:
'
leaf
'
,
slots
:
{
title
:
'
title
'
},
key
:
'
1-1-1
'
},
{
name
:
'
leaf
'
,
key
:
'
1-1-0
'
},
{
name
:
'
leaf
'
,
key
:
'
1-1-1
'
},
],
},
{
name
:
'
parent 3
'
,
key
:
'
2-2
'
,
slots
:
{
title
:
'
title
'
},
children
:
[
{
name
:
'
leaf
'
,
slots
:
{
title
:
'
title
'
},
key
:
'
2-2-0
'
},
{
name
:
'
leaf
'
,
slots
:
{
title
:
'
title
'
},
key
:
'
2-2-1
'
},
{
name
:
'
leaf
'
,
key
:
'
2-2-0
'
},
{
name
:
'
leaf
'
,
key
:
'
2-2-1
'
},
],
},
];
src/views/demo/tree/index.vue
浏览文件 @
b0a0cbcd
...
...
@@ -2,7 +2,9 @@
<PageWrapper
title=
"Tree基础示例"
>
<Row
:gutter=
"[16, 16]"
>
<Col
:span=
"8"
>
<BasicTree
title=
"基础示例,默认展开第一层"
:treeData=
"treeData"
defaultExpandLevel=
"1"
/>
<BasicTree
title=
"基础示例,默认展开第一层"
:treeData=
"treeData"
defaultExpandLevel=
"1"
>
<template
#title
>
123123
</
template
>
</BasicTree>
</Col>
<Col
:span=
"8"
>
<BasicTree
...
...
tests/server/package.json
浏览文件 @
b0a0cbcd
...
...
@@ -24,13 +24,13 @@
"@types/koa"
:
"^2.13.4"
,
"@types/koa-bodyparser"
:
"^5.0.2"
,
"@types/koa-router"
:
"^7.4.4"
,
"@types/node"
:
"^16.11.1
1
"
,
"@types/node"
:
"^16.11.1
2
"
,
"nodemon"
:
"^2.0.15"
,
"pm2"
:
"^5.1.2"
,
"rimraf"
:
"^3.0.2"
,
"ts-node"
:
"^10.4.0"
,
"tsconfig-paths"
:
"^3.12.0"
,
"tsup"
:
"^5.1
0.0
"
,
"typescript"
:
"^4.5.
2
"
"tsup"
:
"^5.1
1.1
"
,
"typescript"
:
"^4.5.
3
"
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录