Blame view

src/components/cascader/casitem.vue 1.08 KB
c463ab87   梁灏   add Cascader
1
  <template>
f7ffdac5   梁灏   Cascader support ...
2
3
      <li :class="classes">
          {{ data.label }}
207d6b07   梁灏   update Cascader I...
4
5
          <i v-if="showArrow" class="ivu-icon ivu-icon-ios-arrow-forward"></i>
          <i v-if="showLoading" class="ivu-icon ivu-icon-ios-sync ivu-load-loop"></i>
f7ffdac5   梁灏   Cascader support ...
6
      </li>
c463ab87   梁灏   add Cascader
7
8
9
  </template>
  <script>
      export default {
47a7f21d   梁灏   support Cascader
10
          name: 'Casitem',
c463ab87   梁灏   add Cascader
11
12
13
14
15
16
17
18
19
20
          props: {
              data: Object,
              prefixCls: String,
              tmpItem: Object
          },
          computed: {
              classes () {
                  return [
                      `${this.prefixCls}-menu-item`,
                      {
bd4e3b9b   梁灏   update Cascader
21
22
                          [`${this.prefixCls}-menu-item-active`]: this.tmpItem.value === this.data.value,
                          [`${this.prefixCls}-menu-item-disabled`]: this.data.disabled
c463ab87   梁灏   add Cascader
23
                      }
b0893113   jingsam   :art: add eslint
24
                  ];
f7ffdac5   梁灏   Cascader support ...
25
26
27
28
29
30
              },
              showArrow () {
                  return (this.data.children && this.data.children.length) || ('loading' in this.data && !this.data.loading);
              },
              showLoading () {
                  return 'loading' in this.data && this.data.loading;
c463ab87   梁灏   add Cascader
31
              }
c463ab87   梁灏   add Cascader
32
          }
b0893113   jingsam   :art: add eslint
33
34
      };
  </script>