Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
zuiqiangwanggong
vue-vben-admin
提交
dc4b0527
V
vue-vben-admin
项目概览
zuiqiangwanggong
/
vue-vben-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-vben-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
dc4b0527
编写于
11月 24, 2021
作者:
C
Carson
提交者:
GitHub
11月 24, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(dashboard): adjust the spacing of Card under the small screen (#1399)
Co-authored-by:
N
huguangju
<
huguangju@wowkai.cn
>
上级
b8411c93
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
46 addition
and
75 deletion
+46
-75
src/api/demo/table.ts
src/api/demo/table.ts
+1
-0
src/components/Page/src/PageWrapper.vue
src/components/Page/src/PageWrapper.vue
+6
-1
src/hooks/event/useWindowSizeFn.ts
src/hooks/event/useWindowSizeFn.ts
+1
-2
src/utils/cache/storageCache.ts
src/utils/cache/storageCache.ts
+6
-9
src/utils/factory/createAsyncComponent.tsx
src/utils/factory/createAsyncComponent.tsx
+1
-1
src/views/dashboard/analysis/components/GrowCard.vue
src/views/dashboard/analysis/components/GrowCard.vue
+3
-4
src/views/dashboard/analysis/components/SalesProductPie.vue
src/views/dashboard/analysis/components/SalesProductPie.vue
+1
-0
src/views/dashboard/analysis/components/VisitAnalysis.vue
src/views/dashboard/analysis/components/VisitAnalysis.vue
+4
-21
src/views/dashboard/analysis/components/VisitAnalysisBar.vue
src/views/dashboard/analysis/components/VisitAnalysisBar.vue
+4
-15
src/views/dashboard/analysis/components/VisitRadar.vue
src/views/dashboard/analysis/components/VisitRadar.vue
+1
-1
src/views/dashboard/analysis/components/VisitSource.vue
src/views/dashboard/analysis/components/VisitSource.vue
+1
-0
src/views/dashboard/workbench/components/ProjectCard.vue
src/views/dashboard/workbench/components/ProjectCard.vue
+11
-13
src/views/dashboard/workbench/components/QuickNav.vue
src/views/dashboard/workbench/components/QuickNav.vue
+6
-8
未找到文件。
src/api/demo/table.ts
浏览文件 @
dc4b0527
...
@@ -14,6 +14,7 @@ export const demoListApi = (params: DemoParams) =>
...
@@ -14,6 +14,7 @@ export const demoListApi = (params: DemoParams) =>
url
:
Api
.
DEMO_LIST
,
url
:
Api
.
DEMO_LIST
,
params
,
params
,
headers
:
{
headers
:
{
// @ts-ignore
ignoreCancelToken
:
true
,
ignoreCancelToken
:
true
,
},
},
});
});
src/components/Page/src/PageWrapper.vue
浏览文件 @
dc4b0527
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
:title=
"title"
:title=
"title"
v-bind=
"omit($attrs, 'class')"
v-bind=
"omit($attrs, 'class')"
ref=
"headerRef"
ref=
"headerRef"
v-if=
"
content || $slots.headerContent || title || getHeaderSlots.length
"
v-if=
"
getShowHeader
"
>
>
<template
#default
>
<template
#default
>
<template
v-if=
"content"
>
<template
v-if=
"content"
>
...
@@ -99,6 +99,10 @@
...
@@ -99,6 +99,10 @@
];
];
});
});
const
getShowHeader
=
computed
(
()
=>
props
.
content
||
slots
?.
headerContent
||
props
.
title
||
getHeaderSlots
.
value
.
length
,
);
const
getShowFooter
=
computed
(()
=>
slots
?.
leftFooter
||
slots
?.
rightFooter
);
const
getShowFooter
=
computed
(()
=>
slots
?.
leftFooter
||
slots
?.
rightFooter
);
const
getHeaderSlots
=
computed
(()
=>
{
const
getHeaderSlots
=
computed
(()
=>
{
...
@@ -150,6 +154,7 @@
...
@@ -150,6 +154,7 @@
getClass
,
getClass
,
getHeaderSlots
,
getHeaderSlots
,
prefixCls
,
prefixCls
,
getShowHeader
,
getShowFooter
,
getShowFooter
,
omit
,
omit
,
getContentClass
,
getContentClass
,
...
...
src/hooks/event/useWindowSizeFn.ts
浏览文件 @
dc4b0527
import
{
tryOnMounted
,
tryOnUnmounted
}
from
'
@vueuse/core
'
;
import
{
tryOnMounted
,
tryOnUnmounted
,
useDebounceFn
}
from
'
@vueuse/core
'
;
import
{
useDebounceFn
}
from
'
@vueuse/core
'
;
interface
WindowSizeOptions
{
interface
WindowSizeOptions
{
once
?:
boolean
;
once
?:
boolean
;
...
...
src/utils/cache/storageCache.ts
浏览文件 @
dc4b0527
import
{
cacheCipher
}
from
'
/@/settings/encryptionSetting
'
;
import
{
cacheCipher
}
from
'
/@/settings/encryptionSetting
'
;
import
type
{
EncryptionParams
}
from
'
/@/utils/cipher
'
;
import
type
{
EncryptionParams
}
from
'
/@/utils/cipher
'
;
import
{
AesEncryption
}
from
'
/@/utils/cipher
'
;
import
{
AesEncryption
}
from
'
/@/utils/cipher
'
;
import
{
isNullOrUnDef
}
from
'
/@/utils/is
'
;
import
{
isNullOrUnDef
}
from
'
/@/utils/is
'
;
export
interface
CreateStorageParams
extends
EncryptionParams
{
export
interface
CreateStorageParams
extends
EncryptionParams
{
...
@@ -27,8 +24,8 @@ export const createStorage = ({
...
@@ -27,8 +24,8 @@ export const createStorage = ({
const
encryption
=
new
AesEncryption
({
key
,
iv
});
const
encryption
=
new
AesEncryption
({
key
,
iv
});
/**
/**
*Cache class
*
Cache class
*Construction parameters can be passed into sessionStorage, localStorage,
*
Construction parameters can be passed into sessionStorage, localStorage,
* @class Cache
* @class Cache
* @example
* @example
*/
*/
...
@@ -53,11 +50,10 @@ export const createStorage = ({
...
@@ -53,11 +50,10 @@ export const createStorage = ({
}
}
/**
/**
*
* Set cache
* Set cache
* @param {string} key
* @param {string} key
* @param {*} value
* @param {*} value
* @expire Expiration time in seconds
* @
param {*}
expire Expiration time in seconds
* @memberof Cache
* @memberof Cache
*/
*/
set
(
key
:
string
,
value
:
any
,
expire
:
number
|
null
=
timeout
)
{
set
(
key
:
string
,
value
:
any
,
expire
:
number
|
null
=
timeout
)
{
...
@@ -73,8 +69,9 @@ export const createStorage = ({
...
@@ -73,8 +69,9 @@ export const createStorage = ({
}
}
/**
/**
*Read cache
*
Read cache
* @param {string} key
* @param {string} key
* @param {*} def
* @memberof Cache
* @memberof Cache
*/
*/
get
(
key
:
string
,
def
:
any
=
null
):
any
{
get
(
key
:
string
,
def
:
any
=
null
):
any
{
...
...
src/utils/factory/createAsyncComponent.tsx
浏览文件 @
dc4b0527
...
@@ -3,7 +3,7 @@ import {
...
@@ -3,7 +3,7 @@ import {
// FunctionalComponent, CSSProperties
// FunctionalComponent, CSSProperties
}
from
'
vue
'
;
}
from
'
vue
'
;
import
{
Spin
}
from
'
ant-design-vue
'
;
import
{
Spin
}
from
'
ant-design-vue
'
;
import
{
noop
}
from
'
/@/utils
/index
'
;
import
{
noop
}
from
'
/@/utils
'
;
// const Loading: FunctionalComponent<{ size: 'small' | 'default' | 'large' }> = (props) => {
// const Loading: FunctionalComponent<{ size: 'small' | 'default' | 'large' }> = (props) => {
// const style: CSSProperties = {
// const style: CSSProperties = {
...
...
src/views/dashboard/analysis/components/GrowCard.vue
浏览文件 @
dc4b0527
...
@@ -5,15 +5,14 @@
...
@@ -5,15 +5,14 @@
size=
"small"
size=
"small"
:loading=
"loading"
:loading=
"loading"
:title=
"item.title"
:title=
"item.title"
class=
"md:w-1/4 w-full !md:mt-0 !mt-4"
class=
"md:w-1/4 w-full !md:mt-0"
:class=
"[index + 1
<
4
&&
'!
md:mr-4
']"
:class=
"
{ '!md:mr-4': index + 1
<
4,
'!
mt-4
'
:
index
>
0 }"
:canExpan=
"false"
>
>
<template
#extra
>
<template
#extra
>
<Tag
:color=
"item.color"
>
{{
item
.
action
}}
</Tag>
<Tag
:color=
"item.color"
>
{{
item
.
action
}}
</Tag>
</
template
>
</
template
>
<div
class=
"py-4 px-4 flex justify-between"
>
<div
class=
"py-4 px-4 flex justify-between
items-center
"
>
<CountTo
prefix=
"$"
:startVal=
"1"
:endVal=
"item.value"
class=
"text-2xl"
/>
<CountTo
prefix=
"$"
:startVal=
"1"
:endVal=
"item.value"
class=
"text-2xl"
/>
<Icon
:icon=
"item.icon"
:size=
"40"
/>
<Icon
:icon=
"item.icon"
:size=
"40"
/>
</div>
</div>
...
...
src/views/dashboard/analysis/components/SalesProductPie.vue
浏览文件 @
dc4b0527
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
const
chartRef
=
ref
<
HTMLDivElement
|
null
>
(
null
);
const
chartRef
=
ref
<
HTMLDivElement
|
null
>
(
null
);
const
{
setOptions
}
=
useECharts
(
chartRef
as
Ref
<
HTMLDivElement
>
);
const
{
setOptions
}
=
useECharts
(
chartRef
as
Ref
<
HTMLDivElement
>
);
watch
(
watch
(
()
=>
props
.
loading
,
()
=>
props
.
loading
,
()
=>
{
()
=>
{
...
...
src/views/dashboard/analysis/components/VisitAnalysis.vue
浏览文件 @
dc4b0527
<
template
>
<
template
>
<div
ref=
"chartRef"
:style=
"
{ height, width }">
</div>
<div
ref=
"chartRef"
:style=
"
{ height, width }">
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
>
import
{
basicProps
}
from
'
./props
'
;
</
script
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
onMounted
,
ref
,
Ref
}
from
'
vue
'
;
import
{
onMounted
,
ref
,
Ref
}
from
'
vue
'
;
import
{
useECharts
}
from
'
/@/hooks/web/useECharts
'
;
import
{
useECharts
}
from
'
/@/hooks/web/useECharts
'
;
import
{
basicProps
}
from
'
./props
'
;
defineProps
({
defineProps
({
...
basicProps
,
...
basicProps
,
...
@@ -26,26 +28,7 @@
...
@@ -26,26 +28,7 @@
xAxis
:
{
xAxis
:
{
type
:
'
category
'
,
type
:
'
category
'
,
boundaryGap
:
false
,
boundaryGap
:
false
,
data
:
[
data
:
[...
new
Array
(
18
)].
map
((
_item
,
index
)
=>
`
${
index
+
6
}
:00`
),
'
6:00
'
,
'
7:00
'
,
'
8:00
'
,
'
9:00
'
,
'
10:00
'
,
'
11:00
'
,
'
12:00
'
,
'
13:00
'
,
'
14:00
'
,
'
15:00
'
,
'
16:00
'
,
'
17:00
'
,
'
18:00
'
,
'
19:00
'
,
'
20:00
'
,
'
21:00
'
,
'
22:00
'
,
'
23:00
'
,
],
splitLine
:
{
splitLine
:
{
show
:
true
,
show
:
true
,
lineStyle
:
{
lineStyle
:
{
...
...
src/views/dashboard/analysis/components/VisitAnalysisBar.vue
浏览文件 @
dc4b0527
<
template
>
<
template
>
<div
ref=
"chartRef"
:style=
"
{ height, width }">
</div>
<div
ref=
"chartRef"
:style=
"
{ height, width }">
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
>
import
{
basicProps
}
from
'
./props
'
;
</
script
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
onMounted
,
ref
,
Ref
}
from
'
vue
'
;
import
{
onMounted
,
ref
,
Ref
}
from
'
vue
'
;
import
{
useECharts
}
from
'
/@/hooks/web/useECharts
'
;
import
{
useECharts
}
from
'
/@/hooks/web/useECharts
'
;
import
{
basicProps
}
from
'
./props
'
;
defineProps
({
defineProps
({
...
basicProps
,
...
basicProps
,
...
@@ -26,20 +28,7 @@
...
@@ -26,20 +28,7 @@
grid
:
{
left
:
'
1%
'
,
right
:
'
1%
'
,
top
:
'
2 %
'
,
bottom
:
0
,
containLabel
:
true
},
grid
:
{
left
:
'
1%
'
,
right
:
'
1%
'
,
top
:
'
2 %
'
,
bottom
:
0
,
containLabel
:
true
},
xAxis
:
{
xAxis
:
{
type
:
'
category
'
,
type
:
'
category
'
,
data
:
[
data
:
[...
new
Array
(
12
)].
map
((
_item
,
index
)
=>
`
${
index
+
1
}
月`
),
'
1月
'
,
'
2月
'
,
'
3月
'
,
'
4月
'
,
'
5月
'
,
'
6月
'
,
'
7月
'
,
'
8月
'
,
'
9月
'
,
'
10月
'
,
'
11月
'
,
'
12月
'
,
],
},
},
yAxis
:
{
yAxis
:
{
type
:
'
value
'
,
type
:
'
value
'
,
...
...
src/views/dashboard/analysis/components/VisitRadar.vue
浏览文件 @
dc4b0527
...
@@ -19,9 +19,9 @@
...
@@ -19,9 +19,9 @@
default
:
'
300px
'
,
default
:
'
300px
'
,
},
},
});
});
const
chartRef
=
ref
<
HTMLDivElement
|
null
>
(
null
);
const
chartRef
=
ref
<
HTMLDivElement
|
null
>
(
null
);
const
{
setOptions
}
=
useECharts
(
chartRef
as
Ref
<
HTMLDivElement
>
);
const
{
setOptions
}
=
useECharts
(
chartRef
as
Ref
<
HTMLDivElement
>
);
watch
(
watch
(
()
=>
props
.
loading
,
()
=>
props
.
loading
,
()
=>
{
()
=>
{
...
...
src/views/dashboard/analysis/components/VisitSource.vue
浏览文件 @
dc4b0527
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
});
});
const
chartRef
=
ref
<
HTMLDivElement
|
null
>
(
null
);
const
chartRef
=
ref
<
HTMLDivElement
|
null
>
(
null
);
const
{
setOptions
}
=
useECharts
(
chartRef
as
Ref
<
HTMLDivElement
>
);
const
{
setOptions
}
=
useECharts
(
chartRef
as
Ref
<
HTMLDivElement
>
);
watch
(
watch
(
()
=>
props
.
loading
,
()
=>
props
.
loading
,
()
=>
{
()
=>
{
...
...
src/views/dashboard/workbench/components/ProjectCard.vue
浏览文件 @
dc4b0527
...
@@ -4,19 +4,17 @@
...
@@ -4,19 +4,17 @@
<a-button
type=
"link"
size=
"small"
>
更多
</a-button>
<a-button
type=
"link"
size=
"small"
>
更多
</a-button>
</
template
>
</
template
>
<
template
v-for=
"item in items"
:key=
"item"
>
<CardGrid
v-for=
"item in items"
:key=
"item"
class=
"!md:w-1/3 !w-full"
>
<CardGrid
class=
"!md:w-1/3 !w-full"
>
<span
class=
"flex"
>
<span
class=
"flex"
>
<Icon
:icon=
"item.icon"
:color=
"item.color"
size=
"30"
/>
<Icon
:icon=
"item.icon"
:color=
"item.color"
size=
"30"
/>
<span
class=
"text-lg ml-4"
>
{{ item.title }}
</span>
<span
class=
"text-lg ml-4"
>
{{
item
.
title
}}
</span>
</span>
</span>
<div
class=
"flex mt-2 h-10 text-secondary"
>
{{ item.desc }}
</div>
<div
class=
"flex mt-2 h-10 text-secondary"
>
{{
item
.
desc
}}
</div>
<div
class=
"flex justify-between text-secondary"
>
<div
class=
"flex justify-between text-secondary"
>
<span>
{{ item.group }}
</span>
<span>
{{
item
.
group
}}
</span>
<span>
{{ item.date }}
</span>
<span>
{{
item
.
date
}}
</span>
</div>
</div>
</CardGrid>
</CardGrid>
</
template
>
</Card>
</Card>
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
...
...
src/views/dashboard/workbench/components/QuickNav.vue
浏览文件 @
dc4b0527
<
template
>
<
template
>
<Card
title=
"快捷导航"
v-bind=
"$attrs"
>
<Card
title=
"快捷导航"
v-bind=
"$attrs"
>
<template
v-for=
"item in navItems"
:key=
"item"
>
<CardGrid
v-for=
"item in navItems"
:key=
"item"
>
<CardGrid>
<span
class=
"flex flex-col items-center"
>
<span
class=
"flex flex-col items-center"
>
<Icon
:icon=
"item.icon"
:color=
"item.color"
size=
"20"
/>
<Icon
:icon=
"item.icon"
:color=
"item.color"
size=
"20"
/>
<span
class=
"text-md mt-2"
>
{{
item
.
title
}}
</span>
<span
class=
"text-md mt-2"
>
{{
item
.
title
}}
</span>
</span>
</span>
</CardGrid>
</CardGrid>
</
template
>
</Card>
</Card>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录