修复 bug
This commit is contained in:
parent
76e807e25e
commit
9c249cd357
1 changed files with 9 additions and 2 deletions
11
src/App.vue
Executable file → Normal file
11
src/App.vue
Executable file → Normal file
|
@ -59,7 +59,13 @@
|
|||
</div>
|
||||
<b-form class="d-flex m-3" @submit.prevent="sendMessage">
|
||||
<b-form-input class="flex-fill mr-2" v-model="message"> </b-form-input>
|
||||
<b-button pill variant="success" type="submit">Button</b-button>
|
||||
<b-button
|
||||
:disabled="message.length == 0"
|
||||
pill
|
||||
variant="success"
|
||||
type="submit"
|
||||
>Send</b-button
|
||||
>
|
||||
</b-form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -89,7 +95,7 @@ export default class App extends Vue {
|
|||
if (chineseChar.test(firstChar)) {
|
||||
return firstChar;
|
||||
} else {
|
||||
return this.nickname.substring(0, 2);
|
||||
return nickname.substring(0, 2);
|
||||
}
|
||||
}
|
||||
public login(): void {
|
||||
|
@ -105,6 +111,7 @@ export default class App extends Vue {
|
|||
}
|
||||
public sendMessage(): void {
|
||||
ipcRenderer.send("message", this.message);
|
||||
this.message = "";
|
||||
}
|
||||
mounted(): void {
|
||||
ipcRenderer.on("message", (_, nickname, message) => {
|
||||
|
|
Loading…
Reference in a new issue