go directly to the code
<script>
import chat from "./../../store/modules/chat"
export default {
methods: {
logout () {
this.$Modal.confirm({
title: "",
loading: true,
onOk: () => {
let res = chat.logout()
console.log(res)
this.$Modal.remove()
this.$router.push("/login")
}
})
}
}
}
</script>
<template>
<div class="m-menu">
<Icon type="md-power" slot="prefix" class="exit" @click="logout"></Icon>
</div>
</template>
The function is normal, but there is an error
.[Vue warn]: $attrs is readonly.
[Vue warn]: $listeners is readonly
Environment
"axios": "^0.18.0",
"iview": "^3.2.2",
"vue": "^2.6.6",
"vue-electron": "^1.0.6",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"vuex-electron": "^1.0.0"