Blame view

src/components/cascader/casitem.vue 718 Bytes
c463ab87   梁灏   add Cascader
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  <template>
      <li :class="classes">{{ data.label }}<i v-if="data.children && data.children.length" class="ivu-icon ivu-icon-ios-arrow-right"></i></li>
  </template>
  <script>
      export default {
          props: {
              data: Object,
              prefixCls: String,
              tmpItem: Object
          },
          computed: {
              classes () {
                  return [
                      `${this.prefixCls}-menu-item`,
                      {
bd4e3b9b   梁灏   update Cascader
16
17
                          [`${this.prefixCls}-menu-item-active`]: this.tmpItem.value === this.data.value,
                          [`${this.prefixCls}-menu-item-disabled`]: this.data.disabled
c463ab87   梁灏   add Cascader
18
19
20
                      }
                  ]
              }
c463ab87   梁灏   add Cascader
21
22
23
          }
      }
  </script>