Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-system
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
dcxy-system
Commits
512434e0
Commit
512434e0
authored
Apr 28, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加切换搜索栏方法
parent
bd0f14b5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
0 deletions
+118
-0
App.vue
src/App.vue
+3
-0
Home.vue
src/containers/Home.vue
+78
-0
mixins.js
src/lib/mixins.js
+2
-0
searchBar.js
src/mixins/searchBar.js
+34
-0
index.js
src/router/index.js
+1
-0
No files found.
src/App.vue
View file @
512434e0
...
@@ -144,4 +144,7 @@ export default {
...
@@ -144,4 +144,7 @@ export default {
.loading-container
{
.loading-container
{
margin
:
50px
;
margin
:
50px
;
}
}
.left-box
{
transition
:
all
0
.48s
;
}
</
style
>
</
style
>
src/containers/Home.vue
0 → 100644
View file @
512434e0
<
template
>
<list-layout>
<template
slot=
"filterItem"
>
<search-item
label=
"赠送类型"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
<search-item
label=
"会员ID"
>
<el-input></el-input>
</search-item>
</
template
>
<
template
slot=
"filterBtn"
>
<el-button
@
click=
"showSearchBarHandle"
>
qiehuan
</el-button>
</
template
>
</list-layout>
</template>
<
script
>
import
searchMixin
from
'@/mixins/searchBar'
;
export
default
{
name
:
'Demo'
,
mixins
:
[
searchMixin
],
};
</
script
>
src/lib/mixins.js
View file @
512434e0
...
@@ -12,10 +12,12 @@ import BaseData from '../components/input/BaseDataSelect/mixin';
...
@@ -12,10 +12,12 @@ import BaseData from '../components/input/BaseDataSelect/mixin';
import
BeanType
from
'../components/input/BeanTypeSelect/mixin'
;
import
BeanType
from
'../components/input/BeanTypeSelect/mixin'
;
import
OperatorOptions
from
'../components/input/OperatorSelect/mixin'
;
import
OperatorOptions
from
'../components/input/OperatorSelect/mixin'
;
import
ServiceType
from
'../components/input/ServiceTypeSelect/mixin'
;
import
ServiceType
from
'../components/input/ServiceTypeSelect/mixin'
;
import
SearchBar
from
'../mixins/searchBar'
;
export
default
{
export
default
{
Dialog
,
Dialog
,
ListPage
,
ListPage
,
SearchBar
,
CampusListPage
,
CampusListPage
,
Operator
,
Operator
,
Admin
,
Admin
,
...
...
src/mixins/searchBar.js
0 → 100644
View file @
512434e0
export
default
{
data
()
{
return
{
showAllSearchBar
:
false
,
searchBarDom
:
null
,
height
:
0
,
};
},
mounted
()
{
let
searchBarDom
=
document
.
querySelector
(
'.left-box'
);
let
filterItemDom
=
document
.
querySelector
(
'.filter-item'
);
this
.
searchBarDom
=
searchBarDom
;
let
height
=
(
filterItemDom
.
clientHeight
+
parseInt
(
window
.
getComputedStyle
(
filterItemDom
)[
'margin-bottom'
]))
*
2
;
this
.
height
=
height
;
this
.
searchBarDom
.
style
=
`height:
${
height
}
px;overflow: hidden;max-height:
${
height
}
px`
;
},
methods
:
{
showSearchBarHandle
()
{
if
(
this
.
showAllSearchBar
)
{
this
.
showAllSearchBar
=
!
this
.
showAllSearchBar
;
this
.
searchBarDom
.
style
=
`height:
${
this
.
height
}
px;overflow: hidden;max-height:
${
this
.
height
}
px`
;
}
else
{
this
.
showAllSearchBar
=
!
this
.
showAllSearchBar
;
this
.
searchBarDom
.
style
=
'height: auto;overflow: hidden;max-height: 500px'
;
}
},
},
};
src/router/index.js
View file @
512434e0
...
@@ -15,6 +15,7 @@ const constantRouterMap = [
...
@@ -15,6 +15,7 @@ const constantRouterMap = [
path
:
'/'
,
path
:
'/'
,
name
:
'home'
,
name
:
'home'
,
meta
:
{
title
:
'首页'
,
icon
:
HomeIcon
},
meta
:
{
title
:
'首页'
,
icon
:
HomeIcon
},
// component: _import('Home'),
component
:
{
render
:
h
=>
<
router
-
view
/>
},
component
:
{
render
:
h
=>
<
router
-
view
/>
},
},
},
{
{
...
...
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