feat: 支持查看服务器密码

This commit is contained in:
2026-07-19 19:42:48 +08:00
parent 4b01ae9898
commit 2682c0a1d6
2 changed files with 3 additions and 2 deletions

View File

@@ -156,7 +156,7 @@ class MqttManager {
getServers() {
return Array.from(this.servers.values()).map((s) => ({
...s,
password: s.password ? '******' : '',
password: s.password || '',
}));
}

View File

@@ -57,7 +57,7 @@ watch(
protocol: props.editServer.protocol || 'mqtt',
clientId: props.editServer.clientId || '',
username: props.editServer.username || '',
password: '',
password: props.editServer.password || '',
keepAlive: props.editServer.keepAlive || 60,
cleanSession: props.editServer.cleanSession !== false,
connectTimeout: props.editServer.connectTimeout ?? 10000,
@@ -192,6 +192,7 @@ async function handleSave() {
<n-input
v-model:value="form.password"
type="password"
show-password-on="click"
placeholder="可选"
/>
</n-form-item-gi>