增加layout页面组件
This commit is contained in:
parent
6e573512a7
commit
b247fdf803
@ -167,6 +167,7 @@ const dateRangeList = [
|
||||
]
|
||||
|
||||
const pageEventNames = {
|
||||
globalClick: "globalClick", // 全局页面 click事件
|
||||
chooseAddress: "chooseAddress", // 地址选择
|
||||
}
|
||||
|
||||
|
||||
36
components/tpx-page/tpx-page.vue
Normal file
36
components/tpx-page/tpx-page.vue
Normal 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>
|
||||
@ -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() {
|
||||
|
||||
@ -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>
|
||||
|
||||
BIN
static/images/mine/kjcha.png
Normal file
BIN
static/images/mine/kjcha.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
Loading…
Reference in New Issue
Block a user