Skip to content

Commit

Permalink
Upgrade to v2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
TerryZ committed Oct 5, 2019
1 parent 6bea1e9 commit 72f056d
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion dist/v-selectmenu.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/v-selectmenu.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "v-selectmenu",
"description": "SelectMenu for Vuejs, A simple, easier and highly customized menu solution",
"version": "2.0.1",
"version": "2.0.2",
"author": "TerryZ <terry5@foxmail.com>",
"license": "MIT",
"main": "dist/v-selectmenu.js",
Expand Down
2 changes: 1 addition & 1 deletion src/components/regular/Item.js
Expand Up @@ -70,8 +70,8 @@ export default {
methods: {
click () {
if (this.data && this.data.callback && typeof this.data.callback === 'function') {
this.data.callback()
this.close()
this.data.callback()
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/mixins/data.js
Expand Up @@ -5,7 +5,7 @@ export default {
return {
// dropdown container display status
show: false,
i18n: languages[this.language] || languages['cn'],
i18n: languages[this.language] || languages.cn,
// menu data or current group menu data
results: [],
tabIndex: -1,
Expand Down Expand Up @@ -34,13 +34,13 @@ export default {
* caption display rule
*
* close header bar
* set title option to false
* set "title" prop to false
*
* Regular menu
* set some text for the title option
* set some text for the "title" prop
* Advanced menu
* no item selected: the title option content
* one item selected: that item content(the data field specified by showField option)
* no item selected: the "title" prop content
* one item selected: that item content(the data field specified by showField prop)
* multiple items selected: display selected items length
*/
caption () {
Expand Down
7 changes: 3 additions & 4 deletions src/mixins/util.js
Expand Up @@ -19,10 +19,9 @@ export default {
if (this.type === ADVANCED) this.highlight = -1
},
clear () {
if (this.type === ADVANCED) {
this.picked = []
if (!this.multiple) this.close()
}
if (this.type !== ADVANCED) return
this.picked = []
if (!this.multiple) this.close()
},
close () {
if (this.show && !this.embed) this.$refs.drop.visible()
Expand Down
3 changes: 2 additions & 1 deletion src/styles/selectmenu.styl
Expand Up @@ -245,8 +245,9 @@ ul.sm-results
padding 7px 0 7px 10px
position relative
text-align left
white-space nowrap
white-space normal
min-width 180px
max-width 350px
color #666
cursor pointer
font-family -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"
Expand Down

0 comments on commit 72f056d

Please sign in to comment.