This commit is contained in:
duan
2024-09-10 16:51:56 +08:00
parent 842a5ce7ab
commit 6ebcb6e00d
36 changed files with 2485 additions and 3135 deletions

View File

@@ -1,22 +1,42 @@
<template>
<view>
123
<button class="button" type="primary" @click="toggle('bottom')"><text class="button-text">底部</text></button>
</view>
<!-- 弹窗 -->
<uni-popup ref="popup" background-color="#fff" @change="change">
<view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }"><text
class="text">popup 内容</text></view>
</uni-popup>
</template>
<script>
export default {
data() {
return {
}
},
setup() {
const toggle = (type) => {
console.log(refs, '调试1')
this.$refs.popup.open(type)
}
},
methods: {
toggle(type) {
this.$refs.popup.open(type)
}
}
}
</script>
<style>
</style>
<style scoped lang="scss">
.popup-content {
display: flex;
align-items: center;
justify-content: center;
padding: 15px;
height: 50px;
background-color: #fff;
}
</style>