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
c44fa410
Commit
c44fa410
authored
Oct 10, 2016
by
SkyAo
Committed by
GitHub
Oct 10, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #302 from Leopoldthecoder/master
fix Select automatically expand issue
parents
3d6beb1d
ba264fab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
CHANGELOG.md
CHANGELOG.md
+1
-0
packages/select/src/option.vue
packages/select/src/option.vue
+1
-1
packages/select/src/select.vue
packages/select/src/select.vue
+7
-7
No files found.
CHANGELOG.md
View file @
c44fa410
...
...
@@ -14,6 +14,7 @@
-
新增 Input textarea 类型的 rows, autosize 属性
-
为 Tree 添加 getCheckedNodes 方法和 node-click、check-change 回调
-
新增 DatePicker 禁用日期功能 #253
-
修复 多选可搜索的 Select 下拉选项自动展开的问题
#### 非兼容性更新
...
...
packages/select/src/option.vue
View file @
c44fa410
...
...
@@ -114,7 +114,7 @@
this
.
index
=
this
.
parent
.
options
.
indexOf
(
this
);
if
(
this
.
currentSelected
===
true
)
{
this
.
dispatch
(
'
select
'
,
'
addOptionToValue
'
,
this
);
this
.
dispatch
(
'
select
'
,
'
addOptionToValue
'
,
[
this
,
true
]
);
}
this
.
$on
(
'
queryChange
'
,
this
.
queryChange
);
...
...
packages/select/src/select.vue
View file @
c44fa410
...
...
@@ -214,6 +214,11 @@
selected
(
val
)
{
if
(
this
.
multiple
)
{
if
(
this
.
selected
.
length
>
0
)
{
this
.
currentPlaceholder
=
''
;
}
else
{
this
.
currentPlaceholder
=
this
.
cachedPlaceHolder
;
}
if
(
this
.
selectedInit
)
{
this
.
selectedInit
=
false
;
return
;
...
...
@@ -223,11 +228,6 @@
this
.
$emit
(
'
input
'
,
result
);
this
.
$emit
(
'
change
'
,
result
);
if
(
this
.
selected
.
length
>
0
)
{
this
.
currentPlaceholder
=
''
;
}
else
{
this
.
currentPlaceholder
=
this
.
cachedPlaceHolder
;
}
this
.
$nextTick
(()
=>
{
this
.
resetInputHeight
();
});
...
...
@@ -340,10 +340,10 @@
}
},
addOptionToValue
(
option
)
{
addOptionToValue
(
option
,
init
)
{
if
(
this
.
multiple
)
{
if
(
this
.
selected
.
indexOf
(
option
)
===
-
1
&&
(
this
.
remote
?
this
.
value
.
indexOf
(
option
.
value
)
===
-
1
:
true
))
{
this
.
selectedInit
=
false
;
this
.
selectedInit
=
!!
init
;
this
.
selected
.
push
(
option
);
this
.
resetHoverIndex
();
}
...
...
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