增加layout页面组件

This commit is contained in:
aihe 2024-04-29 14:51:51 +08:00
parent 6e573512a7
commit b247fdf803
5 changed files with 251 additions and 214 deletions

View File

@ -167,6 +167,7 @@ const dateRangeList = [
]
const pageEventNames = {
globalClick: "globalClick", // 全局页面 click事件
chooseAddress: "chooseAddress", // 地址选择
}

View File

@ -0,0 +1,36 @@
<template>
<view @click="handleClick" style="height: 100%;">
<slot></slot>
</view>
</template>
<script>
import { pageEventNames } from "@/common/enum"
export default {
props: {
},
data() {
return {
}
},
created() {
},
onHide() {
},
unmounted() {},
methods: {
handleClick() {
uni.$emit(pageEventNames.globalClick)
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@ -33,6 +33,8 @@
import ContentItems from "./content-items"
import DefaultSelectInput from "./default-select-input"
import { transListKeyTitle } from "@/common/util"
import { pageEventNames } from "@/common/enum"
const modeEnum = {
sheet: 'sheet',
drop: 'drop'
@ -141,18 +143,15 @@
}
},
created() {
uni.$on('click', this.handleDocumentClick);
// document.addEventListener('click', this.handleDocumentClick)
uni.$on(pageEventNames.globalClick, this.handleDocumentClick);
},
unmounted() {
uni.$off('click', this.handleDocumentClick);
// document.removeEventListener('click', this.handleDocumentClick)
uni.$off(pageEventNames.globalClick, this.handleDocumentClick);
},
methods: {
handleDocumentClick(){
debugger
this.show = false
},
handleSelectSwitch() {

View File

@ -1,4 +1,5 @@
<template>
<tpx-page>
<tpx-layout>
<template v-slot:body>
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
@ -232,7 +233,7 @@
<bpe-goodsize-tmp :value="tempObject.value"></bpe-goodsize-tmp>
</view>
</buns-edit-sheet>
</tpx-page>
</template>
<script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB