test.vue 455 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <view class="">
  3. <button @click="cityShow=!cityShow">打开</button>
  4. <city-select v-model="cityShow" @city-change="cityChange"></city-select>
  5. </view>
  6. </template>
  7. <script>
  8. import citySelect from './u-city-select.vue';
  9. export default {
  10. components: {
  11. citySelect
  12. },
  13. data() {
  14. return {
  15. cityShow:false
  16. };
  17. },
  18. onLoad() {
  19. },
  20. methods:{
  21. cityChange(e){
  22. console.log(e);
  23. }
  24. }
  25. };
  26. </script>
  27. <style lang="scss" scoped>
  28. </style>