| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <template>
- <view>
- <u-popup v-model="popupState" mode="bottom" height='80%' border-radius="14" safe-area-inset-bottom>
- <view @tap.stop='handleSelect(item)' class="py2 px3 one-ellipsis border-bottom"
- v-for="(item,index) in list" :key='index'>
- {{item.label}}
- </view>
- </u-popup>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- popupState: false
- };
- },
- props: {
- list: {
- type: Array,
- default: () => []
- }
- },
- created() {
- console.log(this.list);
- },
- methods: {
- show() {
- this.popupState = true
- },
- hide() {
- this.popupState = false
- },
- handleSelect(item) {
- this.hide()
- this.$emit('select',item)
- }
- }
- }
- </script>
- <style>
- </style>
|