Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
Overview
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
zhouqian
vue-gjjs
Commits
3e9bb4fa
Commit
3e9bb4fa
authored
Jan 13, 2022
by
liushikai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
输入下拉框组件
parent
dabaf144
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
111 additions
and
1 deletions
+111
-1
Input.vue
src/components/Input.vue
+5
-1
InputSelect.vue
src/components/InputSelect.vue
+103
-0
index.js
src/components/index.js
+3
-0
Docpre.vue
src/views/Business/Ditdck/Docpre.vue
+0
-0
No files found.
src/components/Input.vue
View file @
3e9bb4fa
<
template
>
<el-input
:id=
"id"
ref=
"form-item"
v-model=
"model"
v-bind=
"attrs"
v-on=
"$listeners"
v-bind:disabled=
"isDisable"
/>
<el-input
:id=
"id"
ref=
"form-item"
v-model=
"model"
v-bind=
"attrs"
v-on=
"$listeners"
v-bind:disabled=
"isDisable"
>
<template
v-slot:suffix
>
<slot
name=
"suffix"
></slot>
</
template
>
</el-input>
</template>
<
script
>
...
...
src/components/InputSelect.vue
0 → 100644
View file @
3e9bb4fa
<
template
>
<div>
<el-popover
placement=
"bottom"
:width=
"width"
trigger=
"click"
popper-class=
"popoverInputClass"
v-model=
"popoverShow"
>
<ul
class=
"el-select-dropdown__list"
>
<li
class=
"el-select-dropdown__item"
v-for=
"(item, idx) in liData"
:key=
"idx"
@
click=
"selectItem(item)"
>
<span>
{{
item
}}
</span>
</li>
</ul>
<c-input
v-model=
"model"
slot=
"reference"
>
<template
v-slot:suffix
>
<i
class=
"el-icon-arrow-down"
v-if=
"!popoverShow"
@
click=
"popoverShow = false"
></i>
<i
class=
"el-icon-arrow-up"
v-else
@
click=
"popoverShow = true"
></i>
</
template
>
</c-input>
</el-popover>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
popoverShow
:
false
,
width
:
null
,
};
},
props
:
{
value
:
{
type
:
[
String
,
Number
],
default
:
undefined
,
},
liData
:
{
type
:
Array
,
default
:
[],
},
},
computed
:
{
model
:
{
get
()
{
return
this
.
value
;
},
set
(
newVal
)
{
this
.
$emit
(
"input"
,
newVal
);
},
},
},
mounted
()
{
this
.
width
=
this
.
$el
.
clientWidth
;
},
methods
:
{
selectItem
(
val
)
{
this
.
popoverShow
=
false
;
this
.
model
=
val
;
},
},
};
</
script
>
<
style
>
.el-popper.popoverInputClass
{
margin
:
12px
0
5px
;
padding
:
0
;
}
</
style
>
<
style
scoped
>
.el-select-dropdown__list
{
list-style
:
none
;
padding
:
6px
0
;
margin
:
0
;
box-sizing
:
border-box
;
padding-inline-start
:
0
;
}
.el-select-dropdown__item
{
font-size
:
14px
;
padding
:
0
20px
;
position
:
relative
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
color
:
#606266
;
height
:
34px
;
line-height
:
34px
;
box-sizing
:
border-box
;
cursor
:
pointer
;
}
</
style
>
\ No newline at end of file
src/components/index.js
View file @
3e9bb4fa
...
...
@@ -46,6 +46,7 @@ import FunctionBtn from "./FunctionBtn"
import
BusinessButon
from
"./BusinessButton"
import
InfSearchGroup
from
"./InfSearchGroup"
import
InputSelect
from
"./InputSelect"
export
default
{
install
(
Vue
)
{
...
...
@@ -95,5 +96,6 @@ export default {
Vue
.
component
(
"c-bus-button"
,
BusinessButon
)
Vue
.
component
(
"c-infsearch-group"
,
InfSearchGroup
)
Vue
.
component
(
"c-codelabel"
,
CodeLabel
)
Vue
.
component
(
"c-inputselect"
,
InputSelect
)
}
}
\ No newline at end of file
src/views/Business/Ditdck/Docpre.vue
View file @
3e9bb4fa
This diff is collapsed.
Click to expand it.
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