jsy-app/pages/popup/index-popup.nvue
2024-12-13 16:34:19 +08:00

85 lines
1.4 KiB
Plaintext

<template>
<view @click="close" class="mask">
<!-- <view @click.stop="onClick" class="content">
<text class="text">点击蒙层关闭</text>
</view> -->
<!-- 地块选择 -->
<custom-select-land ref="landRef" :data="ijs.companys" :defaultSelect="ijs.land" @getLand="getLand"
@select="landChange" />
</view>
</template>
<script>
export default {
data() {
return {
ijs: getApp().ijs, // 首页公共js
}
},
onShow() {
console.error(2);
// this.$nextTick(() => {
// this.$refs.landRef.open();
// })
},
methods: {
onClick(e) {
uni.showToast({
title: "点击蒙层关闭"
})
// #ifdef APP-NVUE
e.stopPropagation()
// #endif
},
close() {
uni.navigateBack()
},
// 获取地块信息
getLand(e) {
this.ijs.getLand(e.node).then(res => {
this.$refs.landRef.addLand(e, res.data);
});
},
landChange(e) {
console.error("landChange:", e);
this.close();
},
}
}
</script>
<style>
page {
background: transparent;
}
.mask {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.4);
}
.content {
width: 200px;
height: 200px;
background-color: #007AFF;
}
.text {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
line-height: 200px;
text-align: center;
color: #FFFFFF;
}
</style>