kitchendDevice/pageTwo/count/KcalEdit.vue

89 lines
1.4 KiB
Vue
Raw Normal View History

2023-09-08 15:17:21 +08:00
<template>
<view class="content">
<view class="title">
自定义卡路里量
<text class="desc">可选范围是1000~4000千卡修改时请谨慎</text>
</view>
<view class="input">
<input type="digit" placeholder="请输入" v-model="kcal" />
<text>千卡</text>
</view>
<view class="btn" @click="handlesub">确认修改</view>
</view>
</template>
<script>
export default {
data() {
return {
kcal: ""
}
},
methods: {
handlesub() {
let that = this
if (that.kcal == '' || Number(that.kcal) <= 0) {
that.$tools.msg("请输入卡路里")
return
}
}
}
}
</script>
<style scoped lang="scss">
.content {
padding: 0 15px;
flex-wrap: wrap;
background-color: #fff;
}
.title {
width: 100%;
font-size: 16px;
margin: 15px 0;
font-weight: bold;
text {
font-size: 14px;
color: #999;
font-weight: 500;
width: 100%;
display: inline-block;
margin-top: 10px;
}
}
.input {
display: flex;
margin: 20px;
height: 35px;
line-height: 35px;
border-bottom: 1px solid #dfdfdf;
width: calc(100% - 40px);
position: relative;
/deep/input {
width: 100%;
height: 35px;
font-size: 18px;
line-height: 35px;
text-align: center;
font-weight: bold;
position: absolute;
}
text {
position: absolute;
right: 0;
}
}
.btn {
margin-top: 40px;
width: calc(100% - 30px);
color: #fff;
}
</style>