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
>
<div>
<label>
{{
label
}}
</label>
<div
class=
"tw-flex tw-items-center tw-flex-1 tw-pr-3"
:class=
"$style.container"
>
<label
:class=
"$style.label"
>
{{
label
}}
</label>
<slot
/>
</div>
</
template
>
...
...
@@ -12,3 +12,19 @@ export default {
},
};
</
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
>
<div>
<div
:style=
"`min-width: $
{width}px`" class="tw-overflow-x-auto"
>
<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"
/>
</
a-form-model
>
</
div
>
<div
class=
"tw-text-right tw-mt-2"
>
<a-space>
...
...
@@ -97,6 +97,7 @@ export default {
},
noPadding
:
Boolean
,
scroll
:
Object
,
width
:
{
type
:
Number
,
default
:
900
},
},
data
()
{
...
...
@@ -228,20 +229,7 @@ export default {
padding: 15px 0 0 0;
> div {
display: flex;
align-items: center;
@apply tw-mb-3;
> label {
color: rgba(0, 0, 0, 0.85);
width: 6em;
text-align: right;
margin-right: 1em;
&::after {
content: ':';
}
}
}
}
</
style
>
src/pages/frame/layouts/PageLayout.vue
View file @
f069dc81
<
template
>
<div
class=
"page-layout"
>
<div
class=
"page-layout
tw-overflow-x-auto
"
>
<page-header
ref=
"pageHeader"
:style=
"`margin-top: $
{multiPage ? 0 : -24}px`"
...
...
@@ -79,11 +79,11 @@ export default {
...
mapMutations
(
'
settingModule
'
,
[
'
correctPageMinHeight
'
]),
getRouteBreadcrumb
()
{
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
;
const
breadcrumb
=
[
currentMenu
.
menuName
];
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
);
parentMenuId
=
parentMenu
.
parentMenuId
;
}
...
...
src/pages/xunjian/task_managment/center/detail.vue
View file @
f069dc81
<
template
>
<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 }">
<
a-form-model-i
tem
label=
"开始时间"
>
<
MoreI
tem
label=
"开始时间"
>
<a-date-picker
class=
"tw-w-full"
show-time
v-model=
"query.startTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
</
a-form-model-i
tem>
<
a-form-model-i
tem
label=
"结束时间"
>
</
MoreI
tem>
<
MoreI
tem
label=
"结束时间"
>
<a-date-picker
class=
"tw-w-full"
show-time
v-model=
"query.endTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
</
a-form-model-i
tem>
</
MoreI
tem>
</
template
>
<
template
#moreSearch=
"{ query }"
>
...
...
src/pages/xunjian/task_managment/center/index.vue
View file @
f069dc81
...
...
@@ -9,31 +9,31 @@
:drawerWidth=
"800"
>
<template
#search
="
{ query }">
<
a-form-model-i
tem
label=
"开始时间"
>
<
MoreI
tem
label=
"开始时间"
>
<a-date-picker
class=
"tw-w-full"
show-time
v-model=
"query.startTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
</a-form-model-item>
<a-form-model-item
label=
"结束时间"
>
</MoreItem>
<MoreItem
label=
"结束时间"
>
<a-date-picker
class=
"tw-w-full"
show-time
v-model=
"query.endTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
</
a-form-model-i
tem>
<
a-form-model-i
tem
label=
"地区"
>
</
MoreI
tem>
<
MoreI
tem
label=
"地区"
>
<RequestSelect
style=
"width: 220px"
:request=
"getAreaListDataApi"
v-model=
"query.regionId"
labelFiled=
"regionName"
valueFiled=
"regionId"
/>
</
a-form-model-i
tem>
</
MoreI
tem>
</
template
>
<
template
#moreSearch=
"{ query }"
>
...
...
@@ -157,7 +157,16 @@ import Detail from './detail.vue';
import
MoreItem
from
'
@/components/table/more_item.vue
'
;
export
default
{
components
:
{
Table
,
Form
,
RequestSelect
,
UrlSelect
,
SearchSelect
,
Progress
,
Detail
,
MoreItem
},
components
:
{
Table
,
Form
,
RequestSelect
,
UrlSelect
,
SearchSelect
,
Progress
,
Detail
,
MoreItem
,
},
data
()
{
return
{
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