uu
This commit is contained in:
parent
d06038cb4f
commit
adcbf6730a
90
components/buns-edit-sheet/buns-edit-sheet.vue
Normal file
90
components/buns-edit-sheet/buns-edit-sheet.vue
Normal file
@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<tpx-dialog :show="show" :title="title" @onClose="handleCloseModal()">
|
||||
<view :style="`position: relative;height: calc(${percentHeight}vh);`">
|
||||
<tpx-layout>
|
||||
<template v-slot:body>
|
||||
<slot v-if="show" :value="submitVals"></slot>
|
||||
</template>
|
||||
|
||||
<template v-slot:footer>
|
||||
<view class="blcok-white-noradius" style="margin-top: 0;margin-bottom: 0;">
|
||||
<u-button @click="handleSubmitValue()" type="primary" size="large" shape="circle"
|
||||
custom-style="height:80rpx;font-size: 30rpx;"
|
||||
>确认</u-button>
|
||||
</view>
|
||||
</template>
|
||||
</tpx-layout>
|
||||
</view>
|
||||
</tpx-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
components: { },
|
||||
watch: {
|
||||
show(v){
|
||||
if(v) {
|
||||
this.submitVals = JSON.parse(JSON.stringify(this.value))
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
title: {
|
||||
default () {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
percentHeight: {
|
||||
default () {
|
||||
return 60
|
||||
}
|
||||
},
|
||||
show: {
|
||||
default () {
|
||||
return false
|
||||
}
|
||||
},
|
||||
value: {
|
||||
default () {
|
||||
return {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
submitVals: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
onHide() {
|
||||
},
|
||||
unmounted() {
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleCloseModal() {
|
||||
this.$emit('update:show', false)
|
||||
},
|
||||
handleSubmitValue() {
|
||||
const val = this.submitVals
|
||||
this.$emit('onSure', val)
|
||||
this.$emit('update:value', val)
|
||||
this.handleCloseModal()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.shet-cont{
|
||||
padding: 10rpx 0 30rpx 0;
|
||||
}
|
||||
.jsfm-item{
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -23,49 +23,20 @@
|
||||
<view style="width: 70%;">
|
||||
<u-row justify="between">
|
||||
<u-col span="3.7">
|
||||
<u-input placeholder="长" v-model="submitInfo.chang"
|
||||
custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;"
|
||||
placeholder-style="color: #999; "
|
||||
>
|
||||
<template #suffix>
|
||||
<text class="font-26 clr-sub pl-10">cm</text>
|
||||
</template>
|
||||
</u-input>
|
||||
<tpx-input v-model:value="submitInfo.chang" :isWhite="true" placeholder="长" suffix="cm"></tpx-input>
|
||||
</u-col>
|
||||
<u-col span="3.7">
|
||||
<u-input placeholder="宽" v-model="submitInfo.kuan"
|
||||
custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;"
|
||||
placeholder-style="color: #999;"
|
||||
>
|
||||
<template #suffix>
|
||||
<text class="font-26 clr-sub pl-10">cm</text>
|
||||
</template>
|
||||
</u-input>
|
||||
<tpx-input v-model:value="submitInfo.kuan" :isWhite="true" placeholder="宽" suffix="cm"></tpx-input>
|
||||
</u-col>
|
||||
<u-col span="3.7">
|
||||
<u-input placeholder="高" v-model="submitInfo.gao"
|
||||
custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;"
|
||||
placeholder-style="color: #999; "
|
||||
>
|
||||
<template #suffix>
|
||||
<text class="font-26 clr-sub pl-10">cm</text>
|
||||
</template>
|
||||
</u-input>
|
||||
<tpx-input v-model:value="submitInfo.gao" :isWhite="true" placeholder="高" suffix="cm"></tpx-input>
|
||||
</u-col>
|
||||
</u-row>
|
||||
|
||||
<u-row customStyle="margin: 20rpx 0 0 0;">
|
||||
<u-input placeholder="" v-model="submitInfo.pingfang"
|
||||
custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;"
|
||||
placeholder-style="color: #999;"
|
||||
>
|
||||
<template #suffix>
|
||||
<text class="font-26 clr-sub pl-10">m³</text>
|
||||
</template>
|
||||
</u-input>
|
||||
<tpx-input v-model:value="submitInfo.pingfang" :isWhite="true" placeholder="" suffix="m³"></tpx-input>
|
||||
</u-row>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u-row>
|
||||
</view>
|
||||
</view>
|
||||
@ -92,7 +63,6 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
onHide() {
|
||||
|
||||
|
||||
@ -1,14 +1,40 @@
|
||||
<template>
|
||||
<u-input shape="circle" :placeholder="placeholder" :modelValue="value" :clearable="true"
|
||||
:custom-style="`border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;${customStyle};`"
|
||||
:placeholder-style="`color: #0E0708;${placeholderStyle};` " @change="handleChange"
|
||||
></u-input>
|
||||
<u-input shape="circle" :placeholder="placeholder" :modelValue="value" :clearable="clearable"
|
||||
:custom-style="inputStyle"
|
||||
:placeholder-style="`color: #999;${placeholderStyle};` " @change="handleChange"
|
||||
>
|
||||
<template v-if="suffix" #suffix>
|
||||
<text class="font-26 clr-sub pl-10">{{suffix}}</text>
|
||||
</template>
|
||||
|
||||
</u-input>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
computed: {
|
||||
inputStyle(){
|
||||
let sty1 = 'border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;'
|
||||
this.isWhite && (sty1 += 'background-color: #fff;border: 1rpx solid #dadbde;')
|
||||
return `${sty1};${this.customStyle};`
|
||||
}
|
||||
},
|
||||
props: {
|
||||
isWhite: {
|
||||
default () {
|
||||
return false
|
||||
}
|
||||
},
|
||||
suffix: {
|
||||
default () {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
clearable: {
|
||||
default () {
|
||||
return false
|
||||
}
|
||||
},
|
||||
value: {
|
||||
default () {
|
||||
return ''
|
||||
|
||||
Loading…
Reference in New Issue
Block a user