select.vue 658 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view>
  3. <u-select v-model="show" :list="siteList" safe-area-inset-bottom @confirm="confirmSite" :confirm-color="'#3775F6'"></u-select>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. props:{
  9. defaultValue:Array,
  10. },
  11. data() {
  12. return {
  13. selectArr:[],
  14. show:false,
  15. siteList:[]
  16. };
  17. },
  18. mounted() {
  19. },
  20. watch:{
  21. show(newStatus){
  22. }
  23. },
  24. methods:{
  25. open(list){
  26. this.show = true
  27. this.$nextTick(() => {
  28. setTimeout(() => {
  29. this.siteList = this.defaultValue
  30. },3000)
  31. })
  32. },
  33. confirmSite(e){
  34. this.$emit('confirmSite' , e)
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="scss">
  40. </style>