Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-easy-ui
Project
Project
Details
Activity
Releases
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
easyUI
hls-easy-ui
Commits
9ab03b29
Commit
9ab03b29
authored
Aug 05, 2021
by
nature2104
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lov组件修改
parent
0eb9183b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
22 deletions
+30
-22
SelectField.vue
packages/components/Select/SelectField.vue
+8
-7
index.vue
packages/components/Select/index.vue
+17
-13
select.vue
packages/components/Select/select.vue
+5
-2
No files found.
packages/components/Select/SelectField.vue
View file @
9ab03b29
...
...
@@ -184,14 +184,14 @@ export default {
},
},
methods
:
{
selectCall
(
v1
,
v2
,
v3
)
{
selectCall
(
v1
,
v2
,
v3
,
v4
)
{
let
vm
=
this
if
(
!
vm
.
multiple
)
{
this
.
$emit
(
'input'
,
v2
[
vm
.
code
])
this
.
$emit
(
'onSelect'
,
v1
,
v2
,
v3
)
this
.
$emit
(
'onSelect'
,
v1
,
v2
,
v3
,
v4
)
}
else
{
this
.
$emit
(
'input'
,
v1
)
this
.
$emit
(
'onSelect'
,
v1
,
v2
)
this
.
$emit
(
'onSelect'
,
v1
,
v2
,
v3
,
v4
)
}
vm
.
hasError
=
false
},
...
...
@@ -208,11 +208,12 @@ export default {
let
vm
=
this
if
(
!
vm
.
disabled
)
{
let
list
=
[]
vm
.
dataArray
.
forEach
((
dat
e
,
index
,
array
)
=>
{
vm
.
dataArray
.
forEach
((
dat
a
,
index
,
array
)
=>
{
list
.
push
({
value
:
date
[
vm
.
valueKey
],
name
:
date
[
vm
.
valueName
],
parent
:
date
.
parent
,
...
data
,
value
:
data
[
vm
.
valueKey
],
name
:
data
[
vm
.
valueName
],
parent
:
data
.
parent
,
})
})
VueSelect
.
show
({
...
...
packages/components/Select/index.vue
View file @
9ab03b29
...
...
@@ -25,7 +25,7 @@
<input
v-model=
"value"
type=
"text"
hidden
>
<i
v-if=
"showClean"
class=
"field-icon field-right-icon icon ion-close-circled"
@
click=
"cleanValue"
/>
<!--
<slot
name=
"icon"
/>
-->
<img
v-if=
"!showClean"
:src=
"rightIcon"
class=
"field-right-icon date-field-icon"
>
<img
v-if=
"!showClean"
:src=
"rightIcon"
class=
"field-right-icon date-field-icon"
>
</div>
</div>
</div>
...
...
@@ -33,9 +33,10 @@
</
template
>
<
script
>
import
{
isDef
}
from
'../../../packages/common/utils'
import
{
isDef
}
from
'../../../packages/common/utils'
import
VueSelect
from
'./index'
import
axios
from
'axios'
export
default
{
name
:
'HSelect'
,
inheritAttrs
:
false
,
...
...
@@ -264,14 +265,14 @@ export default {
})
},
selectCall
(
v1
,
v2
,
v3
)
{
selectCall
(
v1
,
v2
,
v3
,
v4
)
{
let
vm
=
this
if
(
!
vm
.
multiple
)
{
this
.
$emit
(
'input'
,
v2
[
vm
.
code
])
this
.
$emit
(
'onSelect'
,
v1
,
v2
,
v3
)
this
.
$emit
(
'onSelect'
,
v1
,
v2
,
v3
,
v4
)
}
else
{
this
.
$emit
(
'input'
,
v1
)
this
.
$emit
(
'onSelect'
,
v1
,
v2
)
this
.
$emit
(
'onSelect'
,
v1
,
v2
,
v3
,
v4
)
}
vm
.
hasError
=
false
},
...
...
@@ -290,12 +291,13 @@ export default {
if
(
!
vm
.
disabled
)
{
let
array
=
(
vm
.
lookUpCode
||
vm
.
lovCode
)
?
vm
.
arrayList
:
vm
.
dataArray
let
list
=
[]
array
.
forEach
((
data
,
index
,
array
)
=>
{
list
.
push
(
Object
.
assign
({
array
.
map
((
data
,
index
,
array
)
=>
{
list
.
push
({
...
data
,
value
:
data
[
vm
.
valueKey
],
name
:
data
[
vm
.
valueName
],
parent
:
data
.
parent
,
}
,
data
)
)
})
})
VueSelect
.
show
({
list
:
list
,
...
...
@@ -313,8 +315,8 @@ export default {
if
(
required
&&
error
)
{
this
.
hasError
=
!
isDef
(
fieldInput
.
value
)
/* if (isString(error)) {
this.placehold = error
} */
this.placehold = error
} */
}
},
...
...
@@ -329,11 +331,13 @@ export default {
<
style
lang=
"less"
>
@import "../../../packages/common/styles/hField";
.h-select{
.h-select {
background-color: #fff;
position: relative;
.field-value{
.date-field-icon{
.field-value {
.date-field-icon {
height: 12.5px;
}
}
...
...
packages/components/Select/select.vue
View file @
9ab03b29
...
...
@@ -142,6 +142,7 @@ export default {
},
contentHeight
:
'380px'
,
multiple
:
false
,
multipleIndex
:
[],
popupTitle
:
''
,
cancelText
:
'取消'
,
confirmText
:
'确定'
,
...
...
@@ -201,9 +202,10 @@ export default {
let
code_name
=
vm
.
code
+
'_n'
// eslint-disable-line
vm
.
object
[
code
]
=
vm
.
value
vm
.
object
[
code_name
]
=
vm
.
name
// eslint-disable-line
vm
.
callBack
(
vm
.
index
,
vm
.
object
,
vm
.
childs
)
let
obj
=
Object
.
assign
(
vm
.
object
,
vm
.
list
[
vm
.
index
])
vm
.
callBack
(
vm
.
index
,
obj
,
vm
.
childs
,
vm
.
list
)
}
else
{
vm
.
callBack
(
vm
.
value
,
vm
.
name
)
vm
.
callBack
(
vm
.
value
,
vm
.
name
,
vm
.
multipleIndex
,
vm
.
list
)
}
}
this
.
state
=
0
...
...
@@ -266,6 +268,7 @@ export default {
this
.
selectedIndex
[
index
]
=
!
this
.
selectedIndex
[
index
]
this
.
value
.
includes
(
item
.
value
)
?
this
.
value
=
this
.
value
.
filter
(
n
=>
n
!==
item
.
value
)
:
this
.
value
.
push
(
item
.
value
)
this
.
name
.
includes
(
item
.
name
)
?
this
.
name
=
this
.
name
.
filter
(
n
=>
n
!==
item
.
name
)
:
this
.
name
.
push
(
item
.
name
)
this
.
multipleIndex
.
includes
(
index
)
?
this
.
multipleIndex
=
this
.
multipleIndex
.
filter
(
n
=>
n
!==
index
)
:
this
.
multipleIndex
.
push
(
index
)
},
},
}
...
...
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