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
Show 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 {
...
@@ -184,14 +184,14 @@ export default {
},
},
},
},
methods
:
{
methods
:
{
selectCall
(
v1
,
v2
,
v3
)
{
selectCall
(
v1
,
v2
,
v3
,
v4
)
{
let
vm
=
this
let
vm
=
this
if
(
!
vm
.
multiple
)
{
if
(
!
vm
.
multiple
)
{
this
.
$emit
(
'input'
,
v2
[
vm
.
code
])
this
.
$emit
(
'input'
,
v2
[
vm
.
code
])
this
.
$emit
(
'onSelect'
,
v1
,
v2
,
v3
)
this
.
$emit
(
'onSelect'
,
v1
,
v2
,
v3
,
v4
)
}
else
{
}
else
{
this
.
$emit
(
'input'
,
v1
)
this
.
$emit
(
'input'
,
v1
)
this
.
$emit
(
'onSelect'
,
v1
,
v2
)
this
.
$emit
(
'onSelect'
,
v1
,
v2
,
v3
,
v4
)
}
}
vm
.
hasError
=
false
vm
.
hasError
=
false
},
},
...
@@ -208,11 +208,12 @@ export default {
...
@@ -208,11 +208,12 @@ export default {
let
vm
=
this
let
vm
=
this
if
(
!
vm
.
disabled
)
{
if
(
!
vm
.
disabled
)
{
let
list
=
[]
let
list
=
[]
vm
.
dataArray
.
forEach
((
dat
e
,
index
,
array
)
=>
{
vm
.
dataArray
.
forEach
((
dat
a
,
index
,
array
)
=>
{
list
.
push
({
list
.
push
({
value
:
date
[
vm
.
valueKey
],
...
data
,
name
:
date
[
vm
.
valueName
],
value
:
data
[
vm
.
valueKey
],
parent
:
date
.
parent
,
name
:
data
[
vm
.
valueName
],
parent
:
data
.
parent
,
})
})
})
})
VueSelect
.
show
({
VueSelect
.
show
({
...
...
packages/components/Select/index.vue
View file @
9ab03b29
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<input
v-model=
"value"
type=
"text"
hidden
>
<input
v-model=
"value"
type=
"text"
hidden
>
<i
v-if=
"showClean"
class=
"field-icon field-right-icon icon ion-close-circled"
@
click=
"cleanValue"
/>
<i
v-if=
"showClean"
class=
"field-icon field-right-icon icon ion-close-circled"
@
click=
"cleanValue"
/>
<!--
<slot
name=
"icon"
/>
-->
<!--
<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>
</div>
</div>
</div>
...
@@ -33,9 +33,10 @@
...
@@ -33,9 +33,10 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
isDef
}
from
'../../../packages/common/utils'
import
{
isDef
}
from
'../../../packages/common/utils'
import
VueSelect
from
'./index'
import
VueSelect
from
'./index'
import
axios
from
'axios'
import
axios
from
'axios'
export
default
{
export
default
{
name
:
'HSelect'
,
name
:
'HSelect'
,
inheritAttrs
:
false
,
inheritAttrs
:
false
,
...
@@ -264,14 +265,14 @@ export default {
...
@@ -264,14 +265,14 @@ export default {
})
})
},
},
selectCall
(
v1
,
v2
,
v3
)
{
selectCall
(
v1
,
v2
,
v3
,
v4
)
{
let
vm
=
this
let
vm
=
this
if
(
!
vm
.
multiple
)
{
if
(
!
vm
.
multiple
)
{
this
.
$emit
(
'input'
,
v2
[
vm
.
code
])
this
.
$emit
(
'input'
,
v2
[
vm
.
code
])
this
.
$emit
(
'onSelect'
,
v1
,
v2
,
v3
)
this
.
$emit
(
'onSelect'
,
v1
,
v2
,
v3
,
v4
)
}
else
{
}
else
{
this
.
$emit
(
'input'
,
v1
)
this
.
$emit
(
'input'
,
v1
)
this
.
$emit
(
'onSelect'
,
v1
,
v2
)
this
.
$emit
(
'onSelect'
,
v1
,
v2
,
v3
,
v4
)
}
}
vm
.
hasError
=
false
vm
.
hasError
=
false
},
},
...
@@ -290,12 +291,13 @@ export default {
...
@@ -290,12 +291,13 @@ export default {
if
(
!
vm
.
disabled
)
{
if
(
!
vm
.
disabled
)
{
let
array
=
(
vm
.
lookUpCode
||
vm
.
lovCode
)
?
vm
.
arrayList
:
vm
.
dataArray
let
array
=
(
vm
.
lookUpCode
||
vm
.
lovCode
)
?
vm
.
arrayList
:
vm
.
dataArray
let
list
=
[]
let
list
=
[]
array
.
forEach
((
data
,
index
,
array
)
=>
{
array
.
map
((
data
,
index
,
array
)
=>
{
list
.
push
(
Object
.
assign
({
list
.
push
({
...
data
,
value
:
data
[
vm
.
valueKey
],
value
:
data
[
vm
.
valueKey
],
name
:
data
[
vm
.
valueName
],
name
:
data
[
vm
.
valueName
],
parent
:
data
.
parent
,
parent
:
data
.
parent
,
}
,
data
)
)
})
})
})
VueSelect
.
show
({
VueSelect
.
show
({
list
:
list
,
list
:
list
,
...
@@ -329,11 +331,13 @@ export default {
...
@@ -329,11 +331,13 @@ export default {
<
style
lang=
"less"
>
<
style
lang=
"less"
>
@import "../../../packages/common/styles/hField";
@import "../../../packages/common/styles/hField";
.h-select{
.h-select {
background-color: #fff;
background-color: #fff;
position: relative;
position: relative;
.field-value{
.date-field-icon{
.field-value {
.date-field-icon {
height: 12.5px;
height: 12.5px;
}
}
}
}
...
...
packages/components/Select/select.vue
View file @
9ab03b29
...
@@ -142,6 +142,7 @@ export default {
...
@@ -142,6 +142,7 @@ export default {
},
},
contentHeight
:
'380px'
,
contentHeight
:
'380px'
,
multiple
:
false
,
multiple
:
false
,
multipleIndex
:
[],
popupTitle
:
''
,
popupTitle
:
''
,
cancelText
:
'取消'
,
cancelText
:
'取消'
,
confirmText
:
'确定'
,
confirmText
:
'确定'
,
...
@@ -201,9 +202,10 @@ export default {
...
@@ -201,9 +202,10 @@ export default {
let
code_name
=
vm
.
code
+
'_n'
// eslint-disable-line
let
code_name
=
vm
.
code
+
'_n'
// eslint-disable-line
vm
.
object
[
code
]
=
vm
.
value
vm
.
object
[
code
]
=
vm
.
value
vm
.
object
[
code_name
]
=
vm
.
name
// eslint-disable-line
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
{
}
else
{
vm
.
callBack
(
vm
.
value
,
vm
.
name
)
vm
.
callBack
(
vm
.
value
,
vm
.
name
,
vm
.
multipleIndex
,
vm
.
list
)
}
}
}
}
this
.
state
=
0
this
.
state
=
0
...
@@ -266,6 +268,7 @@ export default {
...
@@ -266,6 +268,7 @@ export default {
this
.
selectedIndex
[
index
]
=
!
this
.
selectedIndex
[
index
]
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
.
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
.
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