Refine and clean files and variables (#10)
This commit is contained in:
1 parent
0e6018e9b2
commit
6e980c7c34
45 files changed
+98
-522
No files matched your search
@@ -86,7 +86,7 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
onLogout() {
|
||||
this.$store.dispatch('common/resetToken');
|
||||
this.$store.dispatch('resetToken');
|
||||
this.$router.push({ name: ROUTE_AUTH_LOGIN });
|
||||
},
|
||||
onConsole() {
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :model-value="visible" width="400px" @close="$emit('close')">
|
||||
<h2 class="title">{{ $t('common.nav.setting') }}</h2>
|
||||
<el-form label-width="120px">
|
||||
<el-form-item :label="$t('setting.field.stream')">
|
||||
<el-switch v-model="stream" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('setting.field.endpoint')">
|
||||
<el-select v-model="endpoint">
|
||||
<el-option v-for="(item, itemIndex) in endpoints" :key="itemIndex" :value="item" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElDialog, ElForm, ElFormItem, ElOption, ElSelect, ElSwitch } from 'element-plus';
|
||||
import { ENDPOINT, ENDPOINT2 } from '@/constants/endpoint';
|
||||
export default defineComponent({
|
||||
name: 'SettingPanel',
|
||||
components: {
|
||||
ElDialog,
|
||||
ElForm,
|
||||
ElFormItem,
|
||||
ElOption,
|
||||
ElSelect,
|
||||
ElSwitch
|
||||
},
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
emits: ['close'],
|
||||
data() {
|
||||
return {
|
||||
endpoints: [ENDPOINT, ENDPOINT2]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
stream: {
|
||||
get() {
|
||||
return this.$store.getters['common/setting'].stream;
|
||||
},
|
||||
set(value: boolean) {
|
||||
this.$store.dispatch('common/setSetting', {
|
||||
stream: value
|
||||
});
|
||||
}
|
||||
},
|
||||
endpoint: {
|
||||
get() {
|
||||
return this.$store.getters['common/setting'].endpoint;
|
||||
},
|
||||
set(value: string) {
|
||||
this.$store.dispatch('common/setSetting', {
|
||||
endpoint: value
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.title {
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="side-panel">
|
||||
<div>
|
||||
<img src="@/assets/images/logo2.svg" class="logo" @click="onHome" />
|
||||
<img src="@/assets/images/logo.svg" class="logo" @click="onHome" />
|
||||
</div>
|
||||
<div class="links">
|
||||
<a
|
||||
@@ -109,7 +109,6 @@ $padding-left: 10px;
|
||||
padding-left: $padding-left;
|
||||
width: $width;
|
||||
padding-top: 50px;
|
||||
// border-right: 1px solid var(--el-border-color);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user