Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
testMenu
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡芬
testMenu
Commits
62c7acc2
提交
62c7acc2
authored
4月 23, 2023
作者:
caicai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复鼠标右键位置获取
上级
474b268d
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
17 行增加
和
14 行删除
+17
-14
mainWindow.js
src/main/windows/mainWindow.js
+3
-3
index.vue
src/renderer/components/Appbox/index.vue
+12
-10
item.vue
src/renderer/components/Appbox/item.vue
+2
-1
没有找到文件。
src/main/windows/mainWindow.js
浏览文件 @
62c7acc2
...
@@ -141,8 +141,8 @@ class MainWindow {
...
@@ -141,8 +141,8 @@ class MainWindow {
/* 获取分类窗口 */
/* 获取分类窗口 */
getWinCateOf
(
id
)
{
getWinCateOf
(
id
)
{
let
winId
=
""
;
let
winId
=
""
;
console
.
log
(
'窗口组'
,
id
)
//
console.log('窗口组',id)
console
.
log
(
this
.
group
)
//
console.log(this.group)
let
keys
=
Object
.
keys
(
this
.
group
);
let
keys
=
Object
.
keys
(
this
.
group
);
let
targetIndex
=
keys
.
findIndex
(
v
=>
this
.
group
[
v
].
route
===
'/category/'
+
id
);
let
targetIndex
=
keys
.
findIndex
(
v
=>
this
.
group
[
v
].
route
===
'/category/'
+
id
);
if
(
targetIndex
!=
-
1
)
winId
=
keys
[
targetIndex
];
if
(
targetIndex
!=
-
1
)
winId
=
keys
[
targetIndex
];
...
@@ -194,7 +194,7 @@ class MainWindow {
...
@@ -194,7 +194,7 @@ class MainWindow {
typeof
callback
==
'function'
&&
callback
(
win
);
typeof
callback
==
'function'
&&
callback
(
win
);
console
.
log
(
'窗口id:'
+
win
.
id
)
//
console.log('窗口id:' + win.id)
this
.
group
[
win
.
id
]
=
{
this
.
group
[
win
.
id
]
=
{
route
:
args
.
route
,
route
:
args
.
route
,
isMultiWindow
:
args
.
isMultiWindow
,
isMultiWindow
:
args
.
isMultiWindow
,
...
...
src/renderer/components/Appbox/index.vue
浏览文件 @
62c7acc2
...
@@ -195,21 +195,23 @@ export default {
...
@@ -195,21 +195,23 @@ export default {
this
.
closeMenu
();
this
.
closeMenu
();
return
;
return
;
}
}
let
parentType
=
e
.
target
.
parentElement
&&
let
rightMenuElement
=
this
.
findParentEl
({
dataType
:
"right-menu"
,
element
:
e
.
target
});
e
.
target
.
parentElement
.
dataset
.
type
||
''
;
// let parentType = e.target.parentElement &&
if
(
// e.target.parentElement.dataset.type || '';
parentType
!==
'right-menu'
&&
// if (
e
.
target
.
dataset
.
type
!==
'right-menu'
// parentType !== 'right-menu' &&
)
{
// e.target.dataset.type !== 'right-menu'
return
;
// ) {
}
// return;
// }
if
(
rightMenuElement
==
null
)
return
;
let
itemWrapElement
=
this
.
findParentEl
({
className
:
"item_wrap"
,
element
:
e
.
target
});
let
itemWrapElement
=
this
.
findParentEl
({
className
:
"item_wrap"
,
element
:
e
.
target
});
// 需要显示右键菜单
// 需要显示右键菜单
this
.
menuPosition
.
left
=
(
itemWrapElement
&&
(
itemWrapElement
.
offsetLeft
+
20
))
||
(
e
.
layerX
-
16
);
this
.
menuPosition
.
left
=
(
itemWrapElement
&&
(
itemWrapElement
.
offsetLeft
+
20
))
||
(
e
.
layerX
-
16
);
this
.
menuPosition
.
top
=
e
.
layerY
;
this
.
menuPosition
.
top
=
e
.
layerY
;
this
.
menuPosition
.
id
=
parentType
===
'right-menu'
?
e
.
target
.
parentElement
.
dataset
.
id
:
e
.
targe
t
.
dataset
.
id
;
this
.
menuPosition
.
id
=
rightMenuElemen
t
.
dataset
.
id
;
this
.
menuPosition
.
current
=
parentType
===
'right-menu'
?
e
.
target
.
parentElement
.
dataset
.
index
:
e
.
targe
t
.
dataset
.
index
;
this
.
menuPosition
.
current
=
rightMenuElemen
t
.
dataset
.
index
;
this
.
showMenu
=
true
;
this
.
showMenu
=
true
;
},
},
listener
()
{
listener
()
{
...
...
src/renderer/components/Appbox/item.vue
浏览文件 @
62c7acc2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
v-if=
"src && (src.indexOf('data:image/svg') == 0 || src.indexOf('data:image/png') == 0)"
<div
v-if=
"src && (src.indexOf('data:image/svg') == 0 || src.indexOf('data:image/png') == 0)"
class=
"item_wrap"
@
click=
"tapApp"
data-type=
"right-menu"
:data-id=
"detail.id"
:data-index=
"index"
>
class=
"item_wrap"
@
click=
"tapApp"
data-type=
"right-menu"
:data-id=
"detail.id"
:data-index=
"index"
>
<!--
<img
:src=
"src"
alt=
""
class=
"item_img"
lazy
>
-->
<!--
<img
:src=
"src"
alt=
""
class=
"item_img"
lazy
>
-->
<el-image
:src=
"src"
alt=
""
class=
"item_img"
:lazy=
"index>18"
></el-image>
<el-image
:src=
"src"
alt=
""
class=
"item_img"
lazy
></el-image>
<span
class=
"item_name"
>
{{
name
}}
</span>
<span
class=
"item_name"
>
{{
name
}}
</span>
</div>
</div>
</
template
>
</
template
>
...
@@ -70,6 +70,7 @@ export default {
...
@@ -70,6 +70,7 @@ export default {
width: 42px;
width: 42px;
height: 42px;
height: 42px;
object-fit: contain;
object-fit: contain;
overflow: visible; //确保鼠标右键位置获取正确
}
}
.item_name {
.item_name {
margin-top: 6px;
margin-top: 6px;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论