tree.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <view>
  3. <view class="header">
  4. <search v-if="searchIf" ref="sea" @confirm="confirmSearch" />
  5. <view class="title">
  6. <scroll-view scroll-x style="width: 100%;white-space: nowrap;" :scroll-left="scrollLeft">
  7. <view v-for="(item,index) in tree_stack" class="inline-item" :key="index">
  8. <view class="inline-item" v-if="index==0" @click="backTree(item,-1)">
  9. <text :class="[(index==tree_stack.length-1&&!isre)?'none':'active']">{{orgText}}</text>
  10. </view>
  11. <view class="inline-item" @click="backTree(item,index)" v-if="index!=0">
  12. <i class="iconfont icon-z043 iconclass" />
  13. <text :class="index==tree_stack.length-1?'none inline-ite':'active'">
  14. {{item[props.label]}}
  15. </text>
  16. </view>
  17. </view>
  18. </scroll-view>
  19. </view>
  20. </view>
  21. <view>
  22. <view class="container-list">
  23. <view class="common cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.1s'}]" v-for="(item, index) in tree" :key="index">
  24. <label class="content" @click="handleClick(item,index)">
  25. <image :src="getImg(item)" class="imgs"></image>
  26. <view class="lable-text">{{item[props.label]}}</view>
  27. <view class="right" ><i v-if="item.children.length>0" class="iconfont icon-z043 iconclass" ></i></view>
  28. </label>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- <view class="btn box_sizing">
  33. <button class="sureBtn" type="primary" @click="backConfirm">确认</button>
  34. </view> -->
  35. </view>
  36. </template>
  37. <script src="./code.js" type="text/javascript"></script>
  38. <style lang="scss" scoped>
  39. @import './css/style.scss';
  40. @import url("./css/icon.css");
  41. .imgs{
  42. width: 40px;
  43. height: 40px;
  44. border-radius:5px 5px 5px 5px;
  45. margin-left: 1%;
  46. }
  47. </style>