targetListChecklist.vue 614 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <uni-list >
  3. <uni-list-item v-for="(item,index) in data" :key="index" :title="item.checklistTitle"
  4. :rightText="data.length>1?'请选择':''" :clickable="data.length>1" :showArrow="data.length>1"
  5. @click="getChecklist(item)"></uni-list-item>
  6. </uni-list>
  7. </template>
  8. <script>
  9. export default {
  10. name:"targetListChecklist",
  11. props:{
  12. value:{
  13. type:[String,Number]
  14. },
  15. data:{
  16. type:[Array,Object],
  17. default:()=>[]
  18. }
  19. },
  20. methods:{
  21. getChecklist(item){
  22. this.$emit("input", item.checklistId);
  23. this.$emit("change", item);
  24. }
  25. }
  26. }
  27. </script>
  28. <style>
  29. </style>