Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas
Commits
05200e13
提交
05200e13
authored
4月 27, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
v2
上级
a8a57867
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
32 行增加
和
74 行删除
+32
-74
Card.vue
src/modules/home/components/Card.vue
+6
-40
CardBoxCell.vue
src/modules/home/components/CardBoxCell.vue
+23
-24
Index.vue
src/modules/home/views/Index.vue
+0
-0
index.ts
src/modules/index.ts
+2
-3
types.ts
src/types.ts
+0
-6
vite.config.ts
vite.config.ts
+1
-1
没有找到文件。
src/modules/home/components/Card.vue
浏览文件 @
05200e13
...
@@ -6,18 +6,9 @@ defineProps({ data: { type: Object, default: () => ({}) } })
...
@@ -6,18 +6,9 @@ defineProps({ data: { type: Object, default: () => ({}) } })
</
script
>
</
script
>
<
template
>
<
template
>
<AppCard
:title=
"data.title"
:class=
"data.className"
>
<AppCard
:title=
"data.title"
>
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"box-left"
>
<CardBoxCell
v-for=
"(cell, index) in data.items"
:data=
"cell"
:key=
"index"
></CardBoxCell>
<div
class=
"box-row"
v-for=
"(row, index) in data.leftItems"
:key=
"index"
>
<CardBoxCell
v-for=
"(cell, index) in row"
:data=
"cell"
:key=
"index"
></CardBoxCell>
</div>
</div>
<div
class=
"box-right"
v-if=
"data.rightItems"
>
<div
class=
"box-row"
v-for=
"(row, index) in data.rightItems"
:key=
"index"
>
<CardBoxCell
v-for=
"(cell, index) in row"
:data=
"cell"
:key=
"index"
></CardBoxCell>
</div>
</div>
</div>
</div>
</AppCard>
</AppCard>
</
template
>
</
template
>
...
@@ -25,37 +16,12 @@ defineProps({ data: { type: Object, default: () => ({}) } })
...
@@ -25,37 +16,12 @@ defineProps({ data: { type: Object, default: () => ({}) } })
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.box
{
.box
{
display
:
flex
;
display
:
flex
;
}
padding
:
10px
0
;
.box-left
{
flex
:
1
;
.box-cell
:hover
{
background-color
:
#aa1941
;
}
}
.box-right
{
flex
:
1
;
margin-left
:
20px
;
padding-left
:
20px
;
border-left
:
1px
dashed
#c1c1c1
;
.box-cell
:hover
{
background-color
:
#136ca8
;
}
}
}
.box-row
{
.box-row
{
display
:
flex
;
display
:
flex
;
}
}
.box-row
+
.box-row
{
// .box-cell + .box-cell {
margin-top
:
20px
;
// margin-left: 20px;
}
// }
.box-cell
+
.box-cell
{
margin-left
:
20px
;
}
.is-blue
{
.app-card-hd__title
{
border-color
:
#136ca8
;
}
.box-cell
:hover
{
background-color
:
#136ca8
;
}
}
</
style
>
</
style
>
src/modules/home/components/CardBoxCell.vue
浏览文件 @
05200e13
...
@@ -6,33 +6,20 @@ function handleClick() {
...
@@ -6,33 +6,20 @@ function handleClick() {
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"box-cell"
v-if=
"data.href
"
>
<div
class=
"box-cell"
:class=
"data.className"
@
click=
"handleClick
"
>
<a
:href=
"data.href"
target=
"_blank"
>
<a
:href=
"data.href"
target=
"_blank"
>
<div
class=
"box-cell-icon"
>
<div
class=
"box-cell-icon"
>
<img
:src=
"data.icon"
class=
"icon-normal"
/>
<img
:src=
"data.icon"
class=
"icon-normal"
/>
<img
:src=
"data.hoverIcon"
class=
"icon-hover"
/>
<img
:src=
"data.hoverIcon"
class=
"icon-hover"
/>
</div>
</div>
<div
class=
"box-cell-name"
>
{{
data
.
title
}}
</div>
<div
class=
"box-cell-name"
v-html=
"data.title"
>
</div>
</a>
</a>
</div>
</div>
<div
class=
"box-cell"
@
click=
"handleClick"
v-else
>
<div
class=
"box-cell-icon"
>
<img
:src=
"data.icon"
class=
"icon-normal"
/>
<img
:src=
"data.hoverIcon"
class=
"icon-hover"
/>
</div>
<div
class=
"box-cell-name"
>
{{
data
.
title
}}
</div>
</div>
</
template
>
</
template
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.box-cell
{
.box-cell
{
flex
:
1
;
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
background-color
:
#f7f5f5
;
height
:
150px
;
border-radius
:
20px
;
border-radius
:
20px
;
color
:
#333
;
color
:
#333
;
cursor
:
pointer
;
cursor
:
pointer
;
...
@@ -40,33 +27,43 @@ function handleClick() {
...
@@ -40,33 +27,43 @@ function handleClick() {
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
color
:
inherit
;
color
:
inherit
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
}
}
&
:hover
{
&
:hover
{
color
:
#fff
;
.box-cell-icon
{
box-shadow
:
4px
3px
14px
rgba
(
0
,
0
,
0
,
0
.37
);
background-color
:
#aa1941
;
a
{
box-shadow
:
0px
3px
18px
rgba
(
0
,
0
,
0
,
0
.27
);
color
:
#fff
;
}
}
.icon-normal
{
.icon-normal
{
display
:
none
;
display
:
none
;
}
}
.icon-hover
{
.icon-hover
{
display
:
block
;
display
:
unset
;
}
}
&
.is-blue
{
&
:hover
{
.box-cell-icon
{
background-color
:
#005690
;
}
}
}
}
}
}
}
.box-cell-icon
{
.box-cell-icon
{
height
:
46px
;
width
:
80px
;
height
:
80px
;
background-color
:
#f7f5f5
;
text-align
:
center
;
line-height
:
80px
;
border-radius
:
50%
;
img
{
img
{
height
:
100%
;
height
:
34px
;
object-fit
:
contain
;
object-fit
:
contain
;
}
}
.icon-normal
{
.icon-normal
{
display
:
block
;
display
:
unset
;
}
}
.icon-hover
{
.icon-hover
{
display
:
none
;
display
:
none
;
...
@@ -77,5 +74,7 @@ function handleClick() {
...
@@ -77,5 +74,7 @@ function handleClick() {
font-size
:
16px
;
font-size
:
16px
;
font-weight
:
400
;
font-weight
:
400
;
line-height
:
28px
;
line-height
:
28px
;
text-align
:
center
;
white-space
:
nowrap
;
}
}
</
style
>
</
style
>
src/modules/home/views/Index.vue
浏览文件 @
05200e13
差异被折叠。
点击展开。
src/modules/index.ts
浏览文件 @
05200e13
import
type
{
Router
}
from
'vue-router'
import
type
{
Router
,
RouteRecordRaw
}
from
'vue-router'
import
type
{
AppModule
}
from
'@/types'
export
default
function
({
router
}:
{
router
:
Router
})
{
export
default
function
({
router
}:
{
router
:
Router
})
{
const
modules
:
Array
<
AppModule
>
=
Object
.
values
(
import
.
meta
.
globEager
(
'./**/index.ts'
))
const
modules
:
Array
<
{
routes
:
Array
<
RouteRecordRaw
>
}
>
=
Object
.
values
(
import
.
meta
.
globEager
(
'./**/index.ts'
))
modules
.
forEach
(({
routes
=
[]
})
=>
{
modules
.
forEach
(({
routes
=
[]
})
=>
{
// 注册路由
// 注册路由
routes
.
forEach
(
route
=>
{
routes
.
forEach
(
route
=>
{
...
...
src/types.ts
浏览文件 @
05200e13
import
type
{
RouteRecordRaw
}
from
'vue-router'
export
interface
UserState
{
export
interface
UserState
{
id
:
string
id
:
string
avatar
:
string
avatar
:
string
...
@@ -8,7 +6,3 @@ export interface UserState {
...
@@ -8,7 +6,3 @@ export interface UserState {
nickname
:
string
nickname
:
string
username
:
string
username
:
string
}
}
export
interface
AppModule
{
routes
:
Array
<
RouteRecordRaw
>
}
vite.config.ts
浏览文件 @
05200e13
...
@@ -9,7 +9,7 @@ import checker from 'vite-plugin-checker'
...
@@ -9,7 +9,7 @@ import checker from 'vite-plugin-checker'
export
default
defineConfig
(({
mode
})
=>
{
export
default
defineConfig
(({
mode
})
=>
{
return
{
return
{
base
:
mode
===
'prod'
?
'https://webapp-pub.ezijing.com/website/prod/sass/'
:
'/'
,
base
:
mode
===
'prod'
?
'https://webapp-pub.ezijing.com/website/prod/sass/'
:
'/'
,
plugins
:
[
checker
({
eslint
:
{
lintCommand
:
'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"'
}
}),
vue
()],
plugins
:
[
checker
({
vueTsc
:
true
,
eslint
:
{
lintCommand
:
'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"'
}
}),
vue
()],
server
:
{
server
:
{
open
:
true
,
open
:
true
,
host
:
'dev.ezijing.com'
,
host
:
'dev.ezijing.com'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论