Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
2f373551
Commit
2f373551
authored
Nov 25, 2016
by
kingwl
Committed by
杨奕
Nov 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Select: fix priority of label and value
parent
807c0607
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
packages/select/src/option.vue
packages/select/src/option.vue
+4
-0
packages/select/src/select.vue
packages/select/src/select.vue
+1
-1
No files found.
packages/select/src/option.vue
View file @
2f373551
...
@@ -50,6 +50,10 @@
...
@@ -50,6 +50,10 @@
return
this
.
label
||
((
typeof
this
.
value
===
'
string
'
||
typeof
this
.
value
===
'
number
'
)
?
this
.
value
:
''
);
return
this
.
label
||
((
typeof
this
.
value
===
'
string
'
||
typeof
this
.
value
===
'
number
'
)
?
this
.
value
:
''
);
},
},
currentValue
()
{
return
this
.
value
||
this
.
label
||
''
;
},
parent
()
{
parent
()
{
let
result
=
this
.
$parent
;
let
result
=
this
.
$parent
;
while
(
!
result
.
isSelect
)
{
while
(
!
result
.
isSelect
)
{
...
...
packages/select/src/select.vue
View file @
2f373551
...
@@ -421,7 +421,7 @@
...
@@ -421,7 +421,7 @@
}
else
{
}
else
{
let
optionIndex
=
-
1
;
let
optionIndex
=
-
1
;
this
.
selected
.
forEach
((
item
,
index
)
=>
{
this
.
selected
.
forEach
((
item
,
index
)
=>
{
if
(
item
===
option
||
item
.
current
Label
===
option
.
currentLabel
)
{
if
(
item
===
option
||
item
.
current
Value
===
option
.
currentValue
)
{
optionIndex
=
index
;
optionIndex
=
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