使用 JavaScript能使本网站更好的工作。
首页
探索
帮助
登录
Immanuel
/
skouter
关注
1
点赞
0
派生
0
代码
工单
0
合并请求
0
版本发布
0
百科
动态
浏览代码
Add logout function
master
Immanuel Onyeka
2 年前
父节点
9c7ac0a199
当前提交
2a66cacd6f
共有
2 个文件被更改
,包括
7 次插入
和
5 次删除
分列视图
Diff 选项
显示统计
下载 Patch 文件
下载 Diff 文件
+1
-0
components/app.vue
+6
-5
components/sign-out.vue
+ 1
- 0
components/app.vue
查看文件
@@ -153,6 +153,7 @@ function start() {
}).catch(error => {
console.log("An error occured %O", error)
this.loadingError = "Could not initialize app."
window.location.hash = 'login'
})
}
+ 6
- 5
components/sign-out.vue
查看文件
@@ -3,20 +3,21 @@
<section class="inputs centered">
<h4>Are you sure you want to log out?</h4>
<button>Logout</button>
<button
@click="logout"
>Logout</button>
</section>
</div>
</template>
<script>
function ready() {
function logout() {
document.cookie= "skouter="
window.location.reload()
}
export default {
methods: {
ready
logout
}
}
</script>
</script>
撰写
预览
|
|
|
|
|
|
x
0
0
0:0
正在加载...
取消
保存