cashier_app/pages/shopSetUp/editVal.vue

60 lines
1.1 KiB
Vue

<template>
<view class="page-wrapper">
<view class="content">
<up-textarea v-model="vdata.value" placeholder="请输入内容" maxlength="20" border="none" placeholderStyle="font-size: 28rpx" count></up-textarea>
</view>
<view class="save" @tap="save">保存</view>
</view>
</template>
<script setup>
import { reactive, ref } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
const vdata = reactive({
value: "",
name: ""
});
onLoad((options) => {
vdata.value = options.value;
vdata.name = options.name;
})
let save = (e) => {
// console.log(e)
uni.$emit('refreshPreviousPage', {name: vdata.name, value: vdata.value});
uni.navigateBack();
}
</script>
<style lang="scss" scoped>
.page-wrapper {
min-height: calc(100vh - 90rpx);
padding: 32rpx 28rpx;
box-sizing: border-box;
.content{
width: 100%;
background-color: #fff;
border-radius: 18rpx;
}
.save{
width: 100%;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #318AFE;
border-radius: 12rpx;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
margin-top: 48rpx;
}
}
</style>