Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
testMenu
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡芬
testMenu
Commits
3d0208b3
提交
3d0208b3
authored
4月 19, 2023
作者:
caicai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1
上级
a0b1b312
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
40 行增加
和
11 行删除
+40
-11
cateWin.js
src/main/plugins/cateWin.js
+30
-0
category.js
src/main/plugins/category.js
+2
-2
mainWindow.js
src/main/windows/mainWindow.js
+0
-4
index.vue
src/renderer/components/DragBox/index.vue
+8
-5
没有找到文件。
src/main/plugins/cateWin.js
0 → 100644
浏览文件 @
3d0208b3
class
cateWin
{
constructor
(
mainWindow
)
{
this
.
mainWindow
=
mainWindow
;
this
.
store
=
this
.
mainWindow
.
store
;
//简约模式的窗口
this
.
webType
=
"simpleCate"
;
}
/* 窗口初始化跟随,mainwindow */
/* 新建分类窗口 */
createWin
()
{
this
.
mainWindow
.
createWindow
({
x
:
0
,
y
:
100
,
width
:
JiJianModeW
,
height
:
JiJianModeH
,
webType
:
this
.
webType
,
//简约模式的窗口
})
}
/* 获取简约模式-所有分类的窗口 */
getAllWindows
()
{
let
windowList
=
this
.
mainWindow
.
getAllWindows
();
if
(
!
windowList
||
windowList
.
length
==
0
)
return
[];
let
newWinList
=
windowList
.
filter
(
v
=>
v
.
webContents
.
webType
===
this
.
webType
);
return
newWinList
;
}
}
export
default
cateWin
;
\ No newline at end of file
src/main/plugins/category.js
浏览文件 @
3d0208b3
...
...
@@ -44,8 +44,8 @@ class category {
if
(
name
==
undefined
)
return
;
let
categoryList
=
this
.
store
.
get
(
process
.
env
.
VUE_APP_CATENAME
);
name
=
name
.
trim
();
let
hasIn
=
categoryList
.
findIndex
(
v
=>
v
.
name
==
name
);
if
(
hasIn
!=
-
1
)
return
;
//
let hasIn = categoryList.findIndex(v => v.name == name);
//
if(hasIn != -1) return;
let
category
=
{
name
,
...
...
src/main/windows/mainWindow.js
浏览文件 @
3d0208b3
...
...
@@ -171,10 +171,6 @@ class MainWindow {
if
(
args
.
x
!=
undefined
)
opt
.
x
=
args
.
x
;
if
(
args
.
y
!=
undefined
)
opt
.
y
=
args
.
y
;
if
(
args
.
backgroundColor
!=
undefined
)
opt
.
backgroundColor
=
args
.
backgroundColor
;
if
(
args
.
isMainWin
)
{
// opt.transparent = true;
// opt.backgroundColor = '#10000000'
}
console
.
log
(
opt
)
let
win
=
new
BrowserWindow
(
opt
)
...
...
src/renderer/components/DragBox/index.vue
浏览文件 @
3d0208b3
...
...
@@ -13,7 +13,7 @@
</div>
<img
@
click=
"delCate(cItem,cIndex)"
src=
"~@/assets/close.png"
alt=
""
class=
"dragbox_cate_del"
>
</div>
<el-input
v-else
v-model=
"editName"
placeholder=
""
minlength=
"1"
maxlength=
"6"
@
blur=
"closeEdit(cIndex)"
class=
"dragbox_cate_input"
></el-input>
<el-input
v-else
v-model=
"editName"
placeholder=
""
maxlength=
"6"
@
blur=
"closeEdit(cIndex)"
class=
"dragbox_cate_input"
></el-input>
<div
v-if=
"cItem.softList"
class=
"dragbox_cate_list"
>
<cateItem
v-for=
"(sItem, sIndex) in cItem.softList"
:key=
"sIndex"
:detail=
"sItem"
:src=
"sItem.icon"
:name=
"sItem.name"
></cateItem>
</div>
...
...
@@ -26,7 +26,7 @@
destroy-on-close
center
>
<div
style=
"padding-bottom:12px;fontsize:16px"
>
请输入分类名称
</div>
<el-input
v-model=
"cateName"
placeholder=
"请输入"
minlength=
"1"
maxlength=
"6"
></el-input>
<el-input
v-model=
"cateName"
placeholder=
"请输入"
maxlength=
"6"
></el-input>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelAdd"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sureAdd"
>
确 定
</el-button>
...
...
@@ -163,13 +163,13 @@ export default {
closeEdit
(
index
)
{
let
oldName
=
this
.
cateList
[
index
].
name
;
let
editName
=
this
.
editName
.
trim
();
if
(
editName
==
''
)
editName
=
"未命名"
;
if
(
editName
==
''
||
editName
.
length
<
1
||
editName
.
length
>
6
)
{
this
.
$message
.
warning
(
"分类名字1到6个字"
);
this
.
editName
=
""
;
this
.
editIndex
=
-
1
;
return
;
}
// if(editName == '') editName = "未命名";
if
(
oldName
!=
editName
)
{
this
.
$emit
(
"changeName"
,
{
index
,
name
:
editName
,
detail
:
this
.
cateList
[
index
]}
);
}
...
...
@@ -201,13 +201,16 @@ export default {
this
.
cateName
=
""
;
},
sureAdd
()
{
console
.
log
(
'sureAdd'
,
this
.
cateName
)
let
name
=
this
.
cateName
;
if
(
name
==
''
||
name
.
trim
()
==
''
||
name
.
length
<
1
||
name
.
length
>
6
)
{
if
(
name
==
''
||
name
.
trim
()
==
''
)
name
=
"未命名"
;
console
.
log
(
name
)
if
(
name
.
length
<
1
||
name
.
length
>
6
)
{
this
.
$message
.
warning
(
"分类名字1到6个字"
);
this
.
cateName
=
""
;
return
;
}
// if(name == '' || name.trim() == '') name = "未命名";
console
.
log
(
'addCategory'
,)
this
.
$emit
(
"addCategory"
,
name
);
this
.
cateName
=
""
;
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论