Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
gzga-jzapi
apaas-ui
Commits
7f2da59d
Commit
7f2da59d
authored
May 06, 2020
by
徐一鸣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化表格筛选
parent
628db8a6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
17 deletions
+31
-17
src/components/side-nav-bar.vue
src/components/side-nav-bar.vue
+16
-2
src/components/table-um.vue
src/components/table-um.vue
+12
-5
src/pages/fwgl.vue
src/pages/fwgl.vue
+1
-8
src/pages/fwglList.vue
src/pages/fwglList.vue
+1
-1
src/router/index.js
src/router/index.js
+1
-1
No files found.
src/components/side-nav-bar.vue
View file @
7f2da59d
<
template
>
<div
class=
"side_nav_bar"
>
<h3
class=
"side_nav_bar_title"
>
<img
:src=
"require('../assets/imgs/tool_fuwu.png')"
width=
"20"
style=
"margin-right: 10px;"
/>
<h3
class=
"side_nav_bar_title"
@
click=
"titleAction"
>
<img
:src=
"require('../assets/imgs/tool_fuwu.png')"
width=
"20"
style=
"margin-right: 10px;"
/>
<span
v-text=
"title"
></span>
</h3>
<ul
class=
"side_nav_bar_list"
>
...
...
@@ -25,6 +29,10 @@ export default {
type
:
String
,
default
:
()
=>
"
我的服务
"
,
},
titlePath
:
{
type
:
String
,
default
:
()
=>
""
,
},
navList
:
{
type
:
Array
,
default
:
()
=>
[],
...
...
@@ -34,6 +42,11 @@ export default {
navAction
(
nav
)
{
this
.
$router
.
push
(
nav
.
path
);
},
titleAction
()
{
if
(
this
.
titlePath
)
{
this
.
$router
.
push
(
this
.
titlePath
);
}
},
},
};
</
script
>
...
...
@@ -51,6 +64,7 @@ export default {
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
cursor
:
pointer
;
}
.side_nav_bar_title
>
span
{
font-size
:
16px
;
...
...
src/components/table-um.vue
View file @
7f2da59d
...
...
@@ -51,7 +51,7 @@
<li
v-for=
"(v, i) in item.data"
:key=
"'f_l_d_' + index + '_' + i"
v-show=
"filterToggle[item.prop] || i
<
=
filterLength
"
v-show=
"filterToggle[item.prop] || i
<
filterLength
"
>
<a
:class=
"
{ current: isCurrentFilter(item.prop, v) }"
...
...
@@ -65,7 +65,7 @@
v-if=
"item.data.length > filterLength"
@
click=
"filterToggleAction(item.prop)"
>
<span>
{{
filterToggle
[
item
.
prop
]
?
"
收起
"
:
"
展开
"
}}
{{
item
.
data
.
length
+
"
-
"
+
filterLength
}}
</span>
<span>
{{
filterToggle
[
item
.
prop
]
?
"
收起
"
:
"
展开
"
}}
</span>
<i
:class=
"
filterToggle[item.prop]
...
...
@@ -403,6 +403,11 @@ export default {
mounted
()
{
this
.
getDataFromApiSync
();
this
.
initFilterData
();
window
.
addEventListener
(
"
resize
"
,
this
.
getFilterLength
);
},
destroyed
()
{
window
.
removeEventListener
(
"
resize
"
,
this
.
getFilterLength
);
},
watch
:
{
refreshInit
:
{
...
...
@@ -556,7 +561,9 @@ export default {
},
filterAction
()
{
this
.
showFliterList
=
!
this
.
showFliterList
;
this
.
getFilterLength
();
},
getFilterLength
()
{
if
(
this
.
showFliterList
)
{
this
.
$nextTick
(()
=>
{
let
width
=
...
...
@@ -566,8 +573,8 @@ export default {
20
-
// 距左侧标题的边距
110
;
// 折叠按钮的宽度
this
.
filterLength
=
Math
.
floor
(
width
/
110
)
-
1
;
console
.
log
(
"
每行最多可容纳
"
+
this
.
filterLength
+
"
个filter
"
);
this
.
filterLength
=
Math
.
floor
(
width
/
110
);
//
console.log("每行最多可容纳" + this.filterLength + "个filter");
});
}
},
...
...
src/pages/fwgl.vue
View file @
7f2da59d
<
template
>
<div
class=
"fwgl_container"
>
<side-nav-bar
:nav-list=
"navList"
></side-nav-bar>
<side-nav-bar
:nav-list=
"navList"
title-path=
"/fwgl"
></side-nav-bar>
<div
class=
"main_container"
>
<router-view
:key=
"'type_' + $route.params && $route.params.type"
...
...
@@ -20,8 +20,6 @@ export default {
navList
:
[],
userLevel
:
0
,
}),
computed
:
{},
methods
:
{},
mounted
()
{
this
.
navList
=
[
// 普通用户
...
...
@@ -81,11 +79,6 @@ export default {
this
.
$router
.
push
(
this
.
navList
[
0
].
path
);
},
/* updated() {
if (this.$route.params && this.$route.params.type === undefined) {
this.$router.push(this.navList[0].path);
}
}, */
};
</
script
>
...
...
src/pages/fwglList.vue
View file @
7f2da59d
...
...
@@ -82,7 +82,7 @@ export default {
},
methods
:
{
editItem
(
item
)
{
this
.
$router
.
push
(
"
/
serviceEdit
"
);
this
.
$router
.
push
(
"
/
fwgl/serviceedit/
"
+
item
.
id
);
},
soldOutItem
(
item
)
{
console
.
log
(
item
);
...
...
src/router/index.js
View file @
7f2da59d
...
...
@@ -59,7 +59,7 @@ export default new Router({
component
:
()
=>
import
(
"
@/pages/serviceDetail
"
),
},
{
path
:
"
/fwgl/serviceedit
"
,
path
:
"
/fwgl/serviceedit
/:id
"
,
name
:
"
serviceedit
"
,
component
:
()
=>
import
(
"
@/pages/serviceEdit
"
),
},
...
...
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