You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.1 KiB

<template>
<view class="user_info">
<view class="center">
<u-input
placeholder="请输入名称"
border="bottom"
clearable
v-model="value"
></u-input>
<button class="btn" @tap="submit"></button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
value: '',
}
},
onLoad(options) {
this.value = options.value
},
methods: {
submit() {
if (this.value) {
uni.showToast({
title: '修改成功',
icon: 'success',
})
setTimeout(() => {
uni.navigateBack()
}, 1500)
} else {
uni.showToast({
title: '请输入名称',
icon: 'none',
})
}
},
},
}
</script>
<style lang="scss" scoped>
.center {
padding: 40rpx 24rpx;
.btn {
height: 88rpx;
border-radius: 40rpx;
font-size: 28rpx;
text-align: center;
line-height: 88rpx;
border: 0;
margin-top: 140rpx;
background-color: #ec7c00;
color: white;
}
}
</style>