Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
testMenu
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡芬
testMenu
Commits
0a81fbe8
提交
0a81fbe8
authored
4月 12, 2023
作者:
caicai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
我的应用
上级
c098b4f5
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
168 行增加
和
7 行删除
+168
-7
box.vue
src/renderer/components/DragBox/box.vue
+30
-0
index.vue
src/renderer/components/DragBox/index.vue
+54
-2
item.vue
src/renderer/components/DragBox/item.vue
+60
-4
index.vue
src/renderer/views/manage/index.vue
+24
-1
没有找到文件。
src/renderer/components/DragBox/box.vue
0 → 100644
浏览文件 @
0a81fbe8
<
template
>
<div
class=
"box"
>
<slot/>
</div>
</
template
>
<
script
>
export
default
{
}
</
script
>
<
style
lang=
"less"
scoped
>
.box {
float: left;
width: 460px;
display: flex;
flex-wrap: wrap;
margin-top: 24px;
padding: 30px 15px 18px;
background: linear-gradient(180deg, #FFFFFF 0%, rgba(255,255,255,0.5) 100%);
box-shadow: 0px 4px 4px 0px rgba(10,78,141,0.1);
border-radius: 20px 20px 20px 20px;
&:nth-child(2n+1) {
margin-left: 30px;
width: 346px;
}
}
</
style
>
\ No newline at end of file
src/renderer/components/DragBox/index.vue
浏览文件 @
0a81fbe8
...
@@ -3,6 +3,14 @@
...
@@ -3,6 +3,14 @@
<div
class=
"dragbox_head"
>
<div
class=
"dragbox_head"
>
<img
@
click=
"addCate"
src=
"~@/assets/addCategory.png"
alt=
""
class=
"dragbox_head_img"
><span
@
click=
"addCate"
class=
"dragbox_head_txt"
>
添加分类
</span>
<img
@
click=
"addCate"
src=
"~@/assets/addCategory.png"
alt=
""
class=
"dragbox_head_img"
><span
@
click=
"addCate"
class=
"dragbox_head_txt"
>
添加分类
</span>
</div>
</div>
<cateBox
v-for=
"(cItem, cIndex) in cateList"
:key=
"cIndex"
>
<div
class=
"dragbox_cate"
>
<div
class=
"dragbox_cate_name"
>
{{
cItem
.
name
}}
</div>
<div
class=
"dragbox_cate_list"
>
<cateItem
v-for=
"(sItem, sIndex) in cItem.list"
:key=
"sIndex"
:detail=
"sItem"
:src=
"sItem.icon"
:name=
"sItem.name"
></cateItem>
</div>
</div>
</cateBox>
<!--
<draggable
v-model=
"myArray"
group=
"people"
@
start=
"drag=true"
@
end=
"drag=false"
>
<!--
<draggable
v-model=
"myArray"
group=
"people"
@
start=
"drag=true"
@
end=
"drag=false"
>
<div
v-for=
"element in myArray"
:key=
"element.id"
>
{{
element
.
name
}}
</div>
<div
v-for=
"element in myArray"
:key=
"element.id"
>
{{
element
.
name
}}
</div>
</draggable>
</draggable>
...
@@ -38,10 +46,41 @@
...
@@ -38,10 +46,41 @@
</template>
</template>
<
script
>
<
script
>
import
draggable
from
'vuedraggable'
import
draggable
from
'vuedraggable'
;
import
cateBox
from
'./box.vue'
;
import
cateItem
from
'./item.vue'
;
export
default
{
export
default
{
props
:
{
cateList
:
{
type
:
Array
,
default
:
()
=>
{
return
[{
name
:
"备课资源"
,
// jiaowuguanli.png
list
:[]
},
{
name
:
"教学工具"
,
// beikeziyuan.png
list
:[]
},
{
name
:
"课后练习"
,
// jiaoxuegongju.png
list
:[]
},
{
name
:
"教务管理"
,
// kehoulianxi.png
list
:[]
}];
}
}
},
components
:
{
components
:
{
draggable
draggable
,
cateBox
,
cateItem
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -105,4 +144,16 @@ export default {
...
@@ -105,4 +144,16 @@ export default {
color: #333333;
color: #333333;
}
}
}
}
.dragbox_cate {
.dragbox_cate_name {
padding-left: 25px;
font-size: 18px;
font-weight: 500;
color: #333333;
}
.dragbox_cate_list {
display: flex;
flex-wrap: wrap;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/renderer/components/DragBox/item.vue
浏览文件 @
0a81fbe8
<
template
>
<
template
>
<div></div>
<div
class=
"item_wrap"
@
click=
"tapApp"
>
<img
:src=
"src"
alt=
""
class=
"item_img"
>
<span
class=
"item_name"
>
{{
name
}}
</span>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
name
:
{
type
:
String
,
default
:
""
},
src
:
{
type
:
String
,
default
:
""
},
detail
:{
type
:
Object
,
default
:
{}
}
},
computed
:
{
ipcRenderer
()
{
return
(
this
.
$electron
&&
this
.
$electron
.
ipcRenderer
)
||
{};
},
},
methods
:
{
tapApp
()
{
this
.
ipcRenderer
.
send
(
"openApp"
,
this
.
detail
);
},
}
}
}
</
script
>
</
script
>
<
style
>
<
style
lang=
"less"
scoped
>
.item_wrap {
cursor: pointer;
flex-shrink: 0;
margin-right: 5px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
padding-top: 10px;
box-sizing: border-box;
width: 110px;
height: 110px;
border-radius: 12px 12px 12px 12px;
&:hover {
background: rgba(57, 157, 249, 0.1);
}
}
.item_img {
padding: 4px;
width: 42px;
height: 42px;
object-fit: contain;
}
.item_name {
margin-top: 3px;
color: #333333;
font-size: 14px;
font-weight: 400;
text-align: center;
}
</
style
>
</
style
>
\ No newline at end of file
src/renderer/views/manage/index.vue
浏览文件 @
0a81fbe8
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<div>
<div>
<Appbox
v-if=
"current === 'all'"
:listObj=
"listObj"
:listAll=
"appList"
></Appbox>
<Appbox
v-if=
"current === 'all'"
:listObj=
"listObj"
:listAll=
"appList"
></Appbox>
<SchoolBox
v-if=
"current === 'school'"
></SchoolBox>
<SchoolBox
v-if=
"current === 'school'"
></SchoolBox>
<DragBox
v-if=
"current === 'mine'"
></DragBox>
<DragBox
v-if=
"current === 'mine'"
:cateList=
"cateList"
></DragBox>
</div>
</div>
</el-scrollbar>
</el-scrollbar>
</el-main>
</el-main>
...
@@ -75,6 +75,29 @@ export default {
...
@@ -75,6 +75,29 @@ export default {
ipcRenderer
()
{
ipcRenderer
()
{
return
(
this
.
$electron
&&
this
.
$electron
.
ipcRenderer
)
||
{};
return
(
this
.
$electron
&&
this
.
$electron
.
ipcRenderer
)
||
{};
},
},
cateList
()
{
return
[{
name
:
"备课资源"
,
list
:
this
.
appList
.
slice
(
0
,
4
)
},
{
name
:
"教学工具"
,
list
:
this
.
appList
.
slice
(
8
,
14
)
},
{
name
:
"课后练习"
,
list
:
this
.
appList
.
slice
(
14
,
24
)
},
{
name
:
"教务管理"
,
list
:
this
.
appList
.
slice
(
24
,
30
)
},
{
name
:
"自定义分类"
,
list
:
this
.
appList
.
slice
(
30
,
36
)
}
];
},
},
},
mounted
()
{
mounted
()
{
this
.
ipcOn
();
this
.
ipcOn
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论