Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Starter Web Vue
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
product
kim3-web-vue
Starter Web Vue
Commits
f069dc81
Commit
f069dc81
authored
Jul 09, 2021
by
水落(YangLei)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化表格样式
parent
a3bf1b58
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
34 deletions
+47
-34
src/components/table/more_item.vue
src/components/table/more_item.vue
+18
-2
src/components/table/table.vue
src/components/table/table.vue
+4
-16
src/pages/frame/layouts/PageLayout.vue
src/pages/frame/layouts/PageLayout.vue
+3
-3
src/pages/xunjian/task_managment/center/detail.vue
src/pages/xunjian/task_managment/center/detail.vue
+5
-5
src/pages/xunjian/task_managment/center/index.vue
src/pages/xunjian/task_managment/center/index.vue
+17
-8
No files found.
src/components/table/more_item.vue
View file @
f069dc81
<
template
>
<
template
>
<div>
<div
class=
"tw-flex tw-items-center tw-flex-1 tw-pr-3"
:class=
"$style.container"
>
<label>
{{
label
}}
</label>
<label
:class=
"$style.label"
>
{{
label
}}
</label>
<slot
/>
<slot
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -12,3 +12,19 @@ export default {
...
@@ -12,3 +12,19 @@ export default {
},
},
};
};
</
script
>
</
script
>
<
style
module
lang=
"less"
>
.container:last-child {
min-width: 250px;
}
.label {
color: rgba(0, 0, 0, 0.85);
width: 6em;
text-align: right;
margin-right: 1em;
&::after {
content: ':';
}
}
</
style
>
src/components/table/table.vue
View file @
f069dc81
<
template
>
<
template
>
<div>
<div
:style=
"`min-width: $
{width}px`" class="tw-overflow-x-auto"
>
<my-card
v-if=
"$scopedSlots.search"
class=
"tw-mb-2.5"
>
<my-card
v-if=
"$scopedSlots.search"
class=
"tw-mb-2.5"
>
<
a-form-model
:model=
"queryForm"
layout=
"inline
"
>
<
div
class=
"tw-flex
"
>
<slot
name=
"search"
:query=
"queryForm"
/>
<slot
name=
"search"
:query=
"queryForm"
/>
</
a-form-model
>
</
div
>
<div
class=
"tw-text-right tw-mt-2"
>
<div
class=
"tw-text-right tw-mt-2"
>
<a-space>
<a-space>
...
@@ -97,6 +97,7 @@ export default {
...
@@ -97,6 +97,7 @@ export default {
},
},
noPadding
:
Boolean
,
noPadding
:
Boolean
,
scroll
:
Object
,
scroll
:
Object
,
width
:
{
type
:
Number
,
default
:
900
},
},
},
data
()
{
data
()
{
...
@@ -228,20 +229,7 @@ export default {
...
@@ -228,20 +229,7 @@ export default {
padding: 15px 0 0 0;
padding: 15px 0 0 0;
> div {
> div {
display: flex;
align-items: center;
@apply tw-mb-3;
@apply tw-mb-3;
> label {
color: rgba(0, 0, 0, 0.85);
width: 6em;
text-align: right;
margin-right: 1em;
&::after {
content: ':';
}
}
}
}
}
}
</
style
>
</
style
>
src/pages/frame/layouts/PageLayout.vue
View file @
f069dc81
<
template
>
<
template
>
<div
class=
"page-layout"
>
<div
class=
"page-layout
tw-overflow-x-auto
"
>
<page-header
<page-header
ref=
"pageHeader"
ref=
"pageHeader"
:style=
"`margin-top: $
{multiPage ? 0 : -24}px`"
:style=
"`margin-top: $
{multiPage ? 0 : -24}px`"
...
@@ -79,11 +79,11 @@ export default {
...
@@ -79,11 +79,11 @@ export default {
...
mapMutations
(
'
settingModule
'
,
[
'
correctPageMinHeight
'
]),
...
mapMutations
(
'
settingModule
'
,
[
'
correctPageMinHeight
'
]),
getRouteBreadcrumb
()
{
getRouteBreadcrumb
()
{
const
path
=
this
.
$route
.
path
;
const
path
=
this
.
$route
.
path
;
const
currentMenu
=
this
.
menuList
.
find
(
m
=>
m
.
menuUrl
===
path
);
const
currentMenu
=
this
.
menuList
.
find
(
(
m
)
=>
m
.
menuUrl
===
path
);
let
parentMenuId
=
currentMenu
.
parentMenuId
;
let
parentMenuId
=
currentMenu
.
parentMenuId
;
const
breadcrumb
=
[
currentMenu
.
menuName
];
const
breadcrumb
=
[
currentMenu
.
menuName
];
while
(
parentMenuId
!==
0
)
{
while
(
parentMenuId
!==
0
)
{
const
parentMenu
=
this
.
menuList
.
find
(
m
=>
m
.
menuId
===
parentMenuId
);
const
parentMenu
=
this
.
menuList
.
find
(
(
m
)
=>
m
.
menuId
===
parentMenuId
);
breadcrumb
.
unshift
(
parentMenu
.
menuName
);
breadcrumb
.
unshift
(
parentMenu
.
menuName
);
parentMenuId
=
parentMenu
.
parentMenuId
;
parentMenuId
=
parentMenu
.
parentMenuId
;
}
}
...
...
src/pages/xunjian/task_managment/center/detail.vue
View file @
f069dc81
<
template
>
<
template
>
<Wraper
:hidden=
"hidden"
noFooter
>
<Wraper
:hidden=
"hidden"
noFooter
>
<Table
:url=
"tableUrl"
rowKey=
"taskId"
noPadding
:buttons=
"buttons"
:scroll=
"scroll"
>
<Table
:url=
"tableUrl"
rowKey=
"taskId"
noPadding
:buttons=
"buttons"
:scroll=
"scroll"
:width=
"600"
>
<template
#search
="
{ query }">
<template
#search
="
{ query }">
<
a-form-model-i
tem
label=
"开始时间"
>
<
MoreI
tem
label=
"开始时间"
>
<a-date-picker
<a-date-picker
class=
"tw-w-full"
class=
"tw-w-full"
show-time
show-time
v-model=
"query.startTime"
v-model=
"query.startTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
/>
</
a-form-model-i
tem>
</
MoreI
tem>
<
a-form-model-i
tem
label=
"结束时间"
>
<
MoreI
tem
label=
"结束时间"
>
<a-date-picker
<a-date-picker
class=
"tw-w-full"
class=
"tw-w-full"
show-time
show-time
v-model=
"query.endTime"
v-model=
"query.endTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
/>
</
a-form-model-i
tem>
</
MoreI
tem>
</
template
>
</
template
>
<
template
#moreSearch=
"{ query }"
>
<
template
#moreSearch=
"{ query }"
>
...
...
src/pages/xunjian/task_managment/center/index.vue
View file @
f069dc81
...
@@ -9,31 +9,31 @@
...
@@ -9,31 +9,31 @@
:drawerWidth=
"800"
:drawerWidth=
"800"
>
>
<template
#search
="
{ query }">
<template
#search
="
{ query }">
<
a-form-model-i
tem
label=
"开始时间"
>
<
MoreI
tem
label=
"开始时间"
>
<a-date-picker
<a-date-picker
class=
"tw-w-full"
class=
"tw-w-full"
show-time
show-time
v-model=
"query.startTime"
v-model=
"query.startTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
/>
</a-form-model-item>
</MoreItem>
<a-form-model-item
label=
"结束时间"
>
<MoreItem
label=
"结束时间"
>
<a-date-picker
<a-date-picker
class=
"tw-w-full"
class=
"tw-w-full"
show-time
show-time
v-model=
"query.endTime"
v-model=
"query.endTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
/>
</
a-form-model-i
tem>
</
MoreI
tem>
<
a-form-model-i
tem
label=
"地区"
>
<
MoreI
tem
label=
"地区"
>
<RequestSelect
<RequestSelect
style=
"width: 220px"
:request=
"getAreaListDataApi"
:request=
"getAreaListDataApi"
v-model=
"query.regionId"
v-model=
"query.regionId"
labelFiled=
"regionName"
labelFiled=
"regionName"
valueFiled=
"regionId"
valueFiled=
"regionId"
/>
/>
</
a-form-model-i
tem>
</
MoreI
tem>
</
template
>
</
template
>
<
template
#moreSearch=
"{ query }"
>
<
template
#moreSearch=
"{ query }"
>
...
@@ -157,7 +157,16 @@ import Detail from './detail.vue';
...
@@ -157,7 +157,16 @@ import Detail from './detail.vue';
import
MoreItem
from
'
@/components/table/more_item.vue
'
;
import
MoreItem
from
'
@/components/table/more_item.vue
'
;
export
default
{
export
default
{
components
:
{
Table
,
Form
,
RequestSelect
,
UrlSelect
,
SearchSelect
,
Progress
,
Detail
,
MoreItem
},
components
:
{
Table
,
Form
,
RequestSelect
,
UrlSelect
,
SearchSelect
,
Progress
,
Detail
,
MoreItem
,
},
data
()
{
data
()
{
return
{
return
{
getAreaListDataApi
,
getAreaListDataApi
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment