<template>
|
|
<uv-popup ref="addPopup" :round="30">
|
|
|
|
<addLeaseForm ref="addLeaseForm"/>
|
|
|
|
<view class="btn" @click="submit">
|
|
<button class="a">添加</button>
|
|
</view>
|
|
</uv-popup>
|
|
</template>
|
|
|
|
<script>
|
|
import addLeaseForm from './addLeaseForm.vue'
|
|
export default {
|
|
components : {
|
|
addLeaseForm,
|
|
},
|
|
data() {
|
|
return {
|
|
}
|
|
},
|
|
methods: {
|
|
|
|
submit() {
|
|
|
|
this.$refs.addLeaseForm.submit(form => {
|
|
this.$api('tablecloth', form, res => {
|
|
this.fileList = []
|
|
if (res.code == 200) {
|
|
this.$emit('submit')
|
|
this.$refs.addPopup.close()
|
|
}
|
|
})
|
|
})
|
|
|
|
},
|
|
open() {
|
|
console.log(this.$refs);
|
|
this.$refs.addLeaseForm.closeForm()
|
|
this.$refs.addPopup.open('bottom')
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.btn {
|
|
display: flex;
|
|
justify-content: center;
|
|
width: 100%;
|
|
|
|
.a {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: 90%;
|
|
height: 100rpx;
|
|
color: #FFF;
|
|
background-color: $uni-color;
|
|
border: 1px solid red;
|
|
border-radius: 100rpx;
|
|
font-size: 30rpx;
|
|
}
|
|
}
|
|
</style>
|