Files
bodyWeight/components/replaceNetwork_2/replaceNetwork_2.js
T
2025-05-29 13:43:16 +08:00

56 lines
963 B
JavaScript

const app = getApp();
Component({
properties: {
ssid: {
type: String,
value: ""
}
},
data: {
type: true,
ssid: "",
password: ""
},
// 生命周期方法
lifetimes: {
attached() {
},
detached() {
}
},
// 组件的方法
methods: {
setWiFiName() {
this.setData({
ssid: this.properties.ssid,
type: true,
})
},
passwordInput(e) {
this.setData({
password: e.detail.value
})
},
inputTypeChange() {
this.setData({
type: !this.data.type
})
},
setWifiPWD() {
this.triggerEvent('wifiEvent', {
status: true,
data: this.data.password
});
}
}
});