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
bee6c5bd
Commit
bee6c5bd
authored
Jan 13, 2017
by
baiyaaaaa
Committed by
GitHub
Jan 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2389 from Leopoldthecoder/select
Select: fix filterable error with number-typed value
parents
9898ac49
7f0525b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
packages/select/src/option.vue
packages/select/src/option.vue
+1
-1
packages/select/src/select.vue
packages/select/src/select.vue
+5
-1
No files found.
packages/select/src/option.vue
View file @
bee6c5bd
...
...
@@ -114,7 +114,7 @@
queryChange
(
query
)
{
// query 里如果有正则中的特殊字符,需要先将这些字符转义
let
parsedQuery
=
query
.
replace
(
/
(\^
|
\(
|
\)
|
\[
|
\]
|
\$
|
\*
|
\+
|
\.
|
\?
|
\\
|
\{
|
\}
|
\|)
/g
,
'
\\
$1
'
);
let
parsedQuery
=
String
(
query
)
.
replace
(
/
(\^
|
\(
|
\)
|
\[
|
\]
|
\$
|
\*
|
\+
|
\.
|
\?
|
\\
|
\{
|
\}
|
\|)
/g
,
'
\\
$1
'
);
this
.
visible
=
new
RegExp
(
parsedQuery
,
'
i
'
).
test
(
this
.
currentLabel
)
||
this
.
created
;
if
(
!
this
.
visible
)
{
this
.
parent
.
filteredOptionsCount
--
;
...
...
packages/select/src/select.vue
View file @
bee6c5bd
...
...
@@ -49,7 +49,7 @@
:disabled=
"disabled"
:readonly=
"!filterable || multiple"
:validate-event=
"false"
@
focus=
"
toggleMenu
"
@
focus=
"
handleFocus
"
@
click=
"handleIconClick"
@
mousedown.native=
"handleMouseDown"
@
keyup.native=
"debouncedOnInputChange"
...
...
@@ -403,6 +403,10 @@
});
},
handleFocus
()
{
this
.
visible
=
true
;
},
handleIconClick
(
event
)
{
if
(
this
.
iconClass
.
indexOf
(
'
circle-close
'
)
>
-
1
)
{
this
.
deleteSelected
(
event
);
...
...
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