Blame view

node_modules/mpvue-zanui/src/components/zan/tab.vue 1.11 KB
ce4c83ff   wxy   初始提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
  <template>
    <div class="zan-tab">
      <block v-if="scroll || false">
        <scroll-view
          class="zan-tab__bd zan-tab__bd--scroll"
          :class="{ 'zan-tab__bd--fixed' : fixed }"
          scroll-x="true"
          :style="'height' + mao +  height + 'px auto'"
        >
          <ZanTabList v-bind="{ list , selectedId, componentId }" @change="_change"/>
        </scroll-view>
      </block>
      <block wx:else>
        <div class="zan-tab__bd" :class="{ 'zan-tab__bd--fixed' : fixed }">
          <ZanTabList v-bind="{ list, selectedId, componentId }" @change="_change"/>
        </div>
      </block>
    </div>
  </template>
  
  
  <script>
    import ZanTabList from './tablist'
    const maohao = ':'
    export default {
      props: ['scroll', 'fixed', 'height', 'list', 'selectedId', 'componentId'],
      components: {
        ZanTabList
      },
      computed: {
        mao: function () {
          return maohao
        }
      },
      data () {
        return {
          list: [],
          selectedId: '',
          componentId: ''
        }
      },
      methods: {
        _change (data) {
          this.$emit('change', data)
        }
      }
    }
  </script>
  
  <style scoped>
  
  </style>