Skip to content

Commit

Permalink
actionsheet: Fix json parsing issue for cancel menu (Fix #1782)
Browse files Browse the repository at this point in the history
  • Loading branch information
airyland committed Aug 2, 2017
1 parent 766fd69 commit 1f5469c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/actionsheet/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ export default {
},
emitEvent (event, menu, item) {
if (event === 'on-click-menu' && !/.noop/.test(menu)) {
this.$emit(event, menu, typeof item === 'string' ? item : JSON.parse(JSON.stringify(item)))
let _item = item
if (typeof _item === 'object') {
_item = JSON.parse(JSON.stringify(_item))
}
this.$emit(event, menu, _item)
this.$emit(`${event}-${menu}`)
this.closeOnClickingMenu && (this.show = false)
}
Expand Down
5 changes: 5 additions & 0 deletions src/components/actionsheet/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ events:
en: triggers when clicking on mask
zh-CN: 点击遮罩时触发
changes:
next:
en:
- '[fix] Fix json parsing issue for cancel menu #1782'
zh-CN:
- '[fix] 修复取消菜单上的 json 解析错误 #1782'
v2.5.5:
en:
- '[feature] Add raw menu item for on-click-menu event #1772'
Expand Down

0 comments on commit 1f5469c

Please sign in to comment.