瀏覽代碼

fix command

baiyaaaaa 8 年之前
父節點
當前提交
c928314ac7
共有 3 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      examples/docs/en-US/dropdown.md
  2. 1 1
      examples/docs/zh-CN/dropdown.md
  3. 1 1
      packages/dropdown/src/dropdown-item.vue

+ 1 - 1
examples/docs/en-US/dropdown.md

@@ -221,6 +221,6 @@ Clicking each dropdown item fires an event whose parameter is assigned by each i
 ### Dropdown Menu Item Attributes
 | Attribute      | Description          | Type      | Accepted Values       | Default  |
 |-------------  |---------------- |---------------- |---------------------- |-------- |
-| command       | a command to be dispatched to Dropdown's `command` callback | string  |          —             |    —     |
+| command       | a command to be dispatched to Dropdown's `command` callback | string/number/object  |          —             |    —     |
 | disabled      | whether the item is disabled  | boolean  |          —             |    false     |
 | divided       | whether a divider is displayed  | boolean  |          —             |    false     |

+ 1 - 1
examples/docs/zh-CN/dropdown.md

@@ -221,6 +221,6 @@
 ### Dropdown Menu Item Attributes
 | 参数          | 说明            | 类型            | 可选值                 | 默认值   |
 |-------------  |---------------- |---------------- |---------------------- |-------- |
-| command       | 指令     | string          | — | — |
+| command       | 指令     | string/number/object          | — | — |
 | disabled      | 禁用     | boolean          | — | false |
 | divided       | 显示分割线     | boolean          | — | false |

+ 1 - 1
packages/dropdown/src/dropdown-item.vue

@@ -19,7 +19,7 @@
     mixins: [Emitter],
 
     props: {
-      command: null,
+      command: {},
       disabled: Boolean,
       divided: Boolean
     },