Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-customer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 28caa21c
authored
May 23, 2022
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
封装select-tab
1 parent
d0f59570
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
111 additions
and
17 deletions
src/assets/css/sprite.scss
src/components/SelectBar.vue
src/views/solicit/customer.vue
src/assets/css/sprite.scss
View file @
28caa21
.sprite-icon
{
background-image
:
url(../images/sprite.png)
;
background-size
:
154px
116px
;}
.icon-active
{
width
:
20px
;
height
:
20px
;
background-position
:
0px
-96px
;}
.icon-append
{
width
:
32px
;
height
:
32px
;
background-position
:
-54px
0px
;}
.icon-appoint
{
width
:
32px
;
height
:
32px
;
background-position
:
0px
-54px
;}
.icon-arrow
{
width
:
7px
;
height
:
11px
;
background-position
:
-138px
-26px
;}
.icon-avatar
{
width
:
44px
;
height
:
44px
;
background-position
:
0px
0px
;}
.icon-customer-active
{
width
:
16px
;
height
:
16px
;
background-position
:
-138px
0px
;}
.icon-customer-add
{
width
:
28px
;
height
:
20px
;
background-position
:
-96px
-42px
;}
.icon-customer-copy
{
width
:
18px
;
height
:
20px
;
background-position
:
-90px
-96px
;}
.icon-customer-phone
{
width
:
20px
;
height
:
20px
;
background-position
:
-30px
-96px
;}
.icon-identifier
{
width
:
20px
;
height
:
20px
;
background-position
:
-60px
-96px
;}
.icon-open-arrow
{
width
:
8px
;
height
:
7px
;
background-position
:
-138px
-47px
;}
.icon-append
{
width
:
32px
;
height
:
32px
;
background-position
:
-54px
0px
;}
.icon-appoint
{
width
:
32px
;
height
:
32px
;
background-position
:
0px
-54px
;}
.icon-factory
{
width
:
32px
;
height
:
32px
;
background-position
:
-42px
-54px
;}
.icon-follow
{
width
:
32px
;
height
:
32px
;
background-position
:
-96px
0px
;}
\ No newline at end of file
.icon-follow
{
width
:
32px
;
height
:
32px
;
background-position
:
-96px
0px
;}
.icon-identifier
{
width
:
20px
;
height
:
20px
;
background-position
:
-60px
-96px
;}
.icon-open-arrow
{
width
:
8px
;
height
:
7px
;
background-position
:
-138px
-47px
;}
\ No newline at end of file
src/components/SelectBar.vue
0 → 100644
View file @
28caa21
<
template
>
<div
class=
"select-tab flex"
v-if=
"data.length > 0"
>
<template
v-for=
"(i, index) in data"
>
<div
@
click=
"click(index)"
:class=
"['item', tabIndex == index ? 'active' : '']"
:key=
"index"
>
{{
i
}}
</div>
</
template
>
</div>
</template>
<
script
type=
"text/ecmascript-6"
>
export
default
{
name
:
'SelectBar'
,
props
:
{
list
:
{
type
:
Array
,
default
:
()
=>
{
return
[]
}
},
index
:
{
type
:
Number
,
default
:
0
},
updata
:
null
},
data
()
{
return
{
tabIndex
:
this
.
index
,
data
:
this
.
list
}
},
watch
:
{
'index'
(
n
)
{
this
.
tabIndex
=
n
},
'updata'
(
n
)
{
this
.
data
=
this
.
list
this
.
tabIndex
=
this
.
index
}
},
mounted
()
{
},
methods
:
{
click
(
tabIndex
)
{
this
.
tabIndex
=
tabIndex
this
.
$emit
(
'change'
,
tabIndex
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.select-tab
{
margin
:
10px
16px
;
height
:
28px
;
background
:
#ebeff5
;
border-radius
:
6px
;
box-sizing
:
border-box
;
.item
{
font-size
:
14px
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
28px
;
flex
:
1
;
text-align
:
center
;
}
.active
{
height
:
24px
;
background
:
#ffffff
;
box-shadow
:
0px
1px
2px
0px
rgba
(
94
,
97
,
102
,
0.2
);
border-radius
:
4px
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0.04
);
color
:
#3975c6
;
line-height
:
24px
;
}
}
</
style
>
src/views/solicit/customer.vue
View file @
28caa21
<
template
>
<div
class=
"customer-container"
>
<div
class=
"customer-container-head"
>
<div
class=
"font-16 color54 line-24"
>
定保N-5
</div>
</div>
<div
class=
"customer-container"
>
<div
class=
"customer-container-head"
>
<div
class=
"font-16 color54 line-24 title"
>
定保N-5
</div>
<search
:keyword=
"keyWord"
placeholder=
"请输入关键字"
@
search=
"searchkeyWord"
></search>
<select-bar
:list=
"['全部','未跟进','未接听']"
:index=
"currentIndex"
@
change=
"changeCurrent"
></select-bar>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
keyWord
:
''
,
currentIndex
:
0
}
},
methods
:
{
searchkeyWord
(
e
)
{
this
.
keyWord
=
e
},
changeCurrent
(
index
){
console
.
log
(
index
)
}
}
}
</
script
>
<
style
lang=
'scss'
scoped
>
.customer-container
{
&-head{
height
:
142px
;
background
:
#fff
;
}
<
style
lang=
"scss"
scoped
>
.customer-container
{
&-head
{
height
:
142px
;
background
:
#fff
;
.title
{
padding
:
10px
16px
;
}
}
}
</
style
>
\ No newline at end of file
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment