Skip to content

Commit 72f056d

Browse files
committed
Upgrade to v2.0.2
1 parent 6bea1e9 commit 72f056d

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

dist/v-selectmenu.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/v-selectmenu.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "v-selectmenu",
33
"description": "SelectMenu for Vuejs, A simple, easier and highly customized menu solution",
4-
"version": "2.0.1",
4+
"version": "2.0.2",
55
"author": "TerryZ <[email protected]>",
66
"license": "MIT",
77
"main": "dist/v-selectmenu.js",

src/components/regular/Item.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ export default {
7070
methods: {
7171
click () {
7272
if (this.data && this.data.callback && typeof this.data.callback === 'function') {
73-
this.data.callback()
7473
this.close()
74+
this.data.callback()
7575
}
7676
}
7777
}

src/mixins/data.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
return {
66
// dropdown container display status
77
show: false,
8-
i18n: languages[this.language] || languages['cn'],
8+
i18n: languages[this.language] || languages.cn,
99
// menu data or current group menu data
1010
results: [],
1111
tabIndex: -1,
@@ -34,13 +34,13 @@ export default {
3434
* caption display rule
3535
*
3636
* close header bar
37-
* set title option to false
37+
* set "title" prop to false
3838
*
3939
* Regular menu
40-
* set some text for the title option
40+
* set some text for the "title" prop
4141
* Advanced menu
42-
* no item selected: the title option content
43-
* one item selected: that item content(the data field specified by showField option)
42+
* no item selected: the "title" prop content
43+
* one item selected: that item content(the data field specified by showField prop)
4444
* multiple items selected: display selected items length
4545
*/
4646
caption () {

src/mixins/util.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ export default {
1919
if (this.type === ADVANCED) this.highlight = -1
2020
},
2121
clear () {
22-
if (this.type === ADVANCED) {
23-
this.picked = []
24-
if (!this.multiple) this.close()
25-
}
22+
if (this.type !== ADVANCED) return
23+
this.picked = []
24+
if (!this.multiple) this.close()
2625
},
2726
close () {
2827
if (this.show && !this.embed) this.$refs.drop.visible()

src/styles/selectmenu.styl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,9 @@ ul.sm-results
245245
padding 7px 0 7px 10px
246246
position relative
247247
text-align left
248-
white-space nowrap
248+
white-space normal
249249
min-width 180px
250+
max-width 350px
250251
color #666
251252
cursor pointer
252253
font-family -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"

0 commit comments

Comments
 (0)