Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-learn
Commits
01d76ad6
提交
01d76ad6
authored
9月 26, 2023
作者:
lhh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
ceef84ce
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
57 行增加
和
18 行删除
+57
-18
menus.ts
src/assets/menus.ts
+13
-5
Aside.vue
src/components/layout/Aside.vue
+10
-2
Index.vue
src/components/layout/Index.vue
+1
-1
CourseListItem.vue
src/modules/course/components/CourseListItem.vue
+12
-6
CourseViewChapter.vue
src/modules/course/components/CourseViewChapter.vue
+15
-0
CourseIndex.vue
src/modules/course/views/CourseIndex.vue
+4
-4
CourseView.vue
src/modules/course/views/CourseView.vue
+0
-0
types.ts
src/types.ts
+2
-0
没有找到文件。
src/assets/menus.ts
浏览文件 @
01d76ad6
import
type
{
IMenuItem
}
from
'@/types'
import
{
Collection
,
ChatDotSquare
,
FolderAdd
,
Setting
}
from
'@element-plus/icons-vue'
import
{
Management
,
Comment
,
FolderAdd
,
Setting
}
from
'@element-plus/icons-vue'
export
const
menus
:
IMenuItem
[]
=
[
{
name
:
'学习'
,
path
:
'/course'
,
icon
:
Collection
icon
:
Management
,
iconImg
:
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/learn-cou.png'
,
iconActiveImg
:
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/learn-cou-a.png'
},
{
name
:
'论坛'
,
path
:
'/bbs'
,
icon
:
ChatDotSquare
icon
:
Comment
,
iconImg
:
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/learn-forum.png'
,
iconActiveImg
:
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/learn-forum-a.png'
},
{
name
:
'收藏'
,
path
:
'/favorites'
,
icon
:
FolderAdd
icon
:
FolderAdd
,
iconImg
:
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/learn-collect.png'
,
iconActiveImg
:
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/learn-collect-a.png'
},
{
name
:
'设置'
,
path
:
'/settings'
,
icon
:
Setting
icon
:
Setting
,
iconImg
:
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/learn-set.png'
,
iconActiveImg
:
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/learn-set-a.png'
}
]
src/components/layout/Aside.vue
浏览文件 @
01d76ad6
...
...
@@ -57,7 +57,13 @@ function handleClick(path: string) {
</el-menu-item>
</el-sub-menu>
<el-menu-item
:index=
"item.path"
@
click=
"handleClick(item.path)"
v-else
>
<el-icon><component
:is=
"item.icon"
></component></el-icon>
{{ item.name }}
<el-icon>
<img
:src=
"item.iconImg"
v-if=
"item.path.slice(1, item.path.length) !== route.path.slice(1, route.path.length).split('/')[0]"
/>
<img
:src=
"item.iconActiveImg"
v-else
/>
</el-icon
>
{{ item.name }}
</el-menu-item>
</template>
</el-menu>
...
...
@@ -102,7 +108,9 @@ function handleClick(path: string) {
margin
:
50px
auto
;
border-radius
:
14px
;
&
.is-active
{
background
:
var
(
--
el-menu-active-bg-color
);
// background: var(--el-menu-active-bg-color);
background-color
:
#ab0a3d
;
color
:
#fff
;
}
.el-icon
{
margin-bottom
:
7px
;
...
...
src/components/layout/Index.vue
浏览文件 @
01d76ad6
...
...
@@ -27,7 +27,7 @@ withDefaults(defineProps<{ sidebar?: boolean; hasTitle?: boolean }>(), {
display
:
flex
;
flex-direction
:
column
;
min-height
:
100vh
;
background-color
:
#
f8f8f8
;
background-color
:
#
eee
;
}
.app-layout-container
{
flex
:
1
;
...
...
src/modules/course/components/CourseListItem.vue
浏览文件 @
01d76ad6
...
...
@@ -85,18 +85,19 @@ function handleTop(data: CourseListItemType) {
.course-item
{
position
:
relative
;
padding
:
12px
;
margin
:
20
px
0
;
border
:
1px
solid
#e6e6e6
;
margin
:
14
px
0
;
//
border: 1px solid #e6e6e6;
border-radius
:
6px
;
background-color
:
#fafafa
;
&
.is-top
{
--el-border-color-lighter
:
#fff
;
background
:
#eaeaea
;
//
--el-border-color-lighter: #fff;
//
background: #eaeaea;
}
&
:hover
,
&
.is-active
{
--el-border-color-lighter
:
#fff
;
box-shadow
:
0px
3px
1
0px
rgba
(
0
,
0
,
0
,
0
.12
);
background
:
#
eaeaea
;
box-shadow
:
0px
3px
1
2px
1px
rgba
(
0
,
0
,
0
,
0
.1216
);
background
:
#
fff
;
}
}
.course-item__top
{
...
...
@@ -204,4 +205,9 @@ function handleTop(data: CourseListItemType) {
border-bottom-left-radius
:
0
;
}
}
::v-deep
{
.el-progress-bar__outer
{
background-color
:
#efefef
;
}
}
</
style
>
src/modules/course/components/CourseViewChapter.vue
浏览文件 @
01d76ad6
...
...
@@ -115,6 +115,21 @@ function targetUrl(resource: CourseResourceType, section: CourseSectionType, cha
return
`/preview?course_id=
${
courseId
}
&semester_id=
${
semesterId
}
&resource_id=
${
resource
.
resource_id
}
&resource_type=
${
resource
.
resource_type
}
&url=
${
resource
.
info
?.
url
}
`
}
}
// 父级点击开始学习按钮
const study = function () {
if (chapterList.length) {
if (chapterList[0]?.sections?.length) {
if (chapterList[0].sections[0]?.resources?.length) {
window.open(targetUrl(chapterList[0].sections[0].resources[0], chapterList[0].sections[0], chapterList[0]))
}
}
}
}
defineExpose({
study
})
</
script
>
<
template
>
<el-collapse
class=
"course-chapters"
v-model=
"chapterIds"
v-if=
"chapterList.length"
>
...
...
src/modules/course/views/CourseIndex.vue
浏览文件 @
01d76ad6
...
...
@@ -59,16 +59,16 @@ log.upload({
.course
{
display
:
flex
;
height
:
100%
;
background-color
:
#fff
;
//
background-color: #fff;
border-radius
:
6px
;
}
// 左侧
.course-left
{
padding
:
18px
;
width
:
3
54
px
;
//
padding: 18px;
width
:
3
13
px
;
flex
:
0
0
354px
;
overflow-y
:
auto
;
border-right
:
1px
solid
#e6e6e6
;
//
border-right: 1px solid #e6e6e6;
box-sizing
:
border-box
;
}
// 右侧
...
...
src/modules/course/views/CourseView.vue
浏览文件 @
01d76ad6
差异被折叠。
点击展开。
src/types.ts
浏览文件 @
01d76ad6
...
...
@@ -7,6 +7,8 @@ export interface IMenuItem {
path
:
string
icon
?:
Component
children
?:
IMenuItem
[]
iconImg
?:
string
iconActiveImg
?:
string
}
// 用户类型
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论