美化了样式

This commit is contained in:
2025-08-15 00:36:04 +08:00
parent 5fc1378051
commit 1b4d3e310b
63 changed files with 2735 additions and 2411 deletions

View File

@ -0,0 +1,49 @@
Component({
properties: {
show: {
type: Boolean,
value: false
},
nickname: {
type: String,
value: ''
}
},
data: {
inputVal: ''
},
methods: {
onInput(e) {
this.setData({
inputVal: e.detail.value
});
},
onCancel() {
this.triggerEvent('cancel');
},
onConfirm() {
const newName = this.data.inputVal.trim();
if (!newName) {
wx.showToast({
title: '昵称不能为空',
icon: 'none'
});
return;
}
if (newName.length > 20) {
wx.showToast({
title: '昵称最长不超过20个字符',
icon: 'none'
})
return ;
}
this.triggerEvent('confirm', { nickname: newName });
}
},
observers: {
nickname(val) {
this.setData({ inputVal: val });
}
}
});