统一EditSites页面格式

This commit is contained in:
haiyangcui
2020-10-17 23:56:35 +02:00
parent 4e0fa4d980
commit 45de6650bf
5 changed files with 29 additions and 31 deletions

View File

@@ -9,7 +9,7 @@
<Star v-show="view === 'Star'" />
<History v-show="view === 'History'" />
<Setting v-show="view === 'Setting'" />
<EditSites v-if="editSites.show"/>
<EditSites v-show="view === 'EditSites'"/>
</div>
<transition name="slide">
<Detail v-if="detail.show"/>

View File

@@ -1,13 +1,13 @@
<template>
<div class="listpage" id="editSites">
<div class="listpage-content">
<div class="listpage-header">
<span class="btn" @click="addSite">添加</span>
<span class="btn" @click="exportSites">导出</span>
<span class="btn" @click="importSites">导入</span>
<span class="btn" @click="removeAllSites">清空</span>
<span class="btn" @click="resetSitesEvent">重置</span>
</div>
<div class="listpage-header">
<span class="btn" @click="addSite">添加</span>
<span class="btn" @click="exportSites">导出</span>
<span class="btn" @click="importSites">导入</span>
<span class="btn" @click="removeAllSites">清空</span>
<span class="btn" @click="resetSitesEvent">重置</span>
</div>
<div class="listpage-body" id="sites-table">
<el-table
:data="sites"
@@ -52,6 +52,7 @@
</el-dialog>
</div>
</div>
</div>
</template>
<script>

View File

@@ -1,10 +1,10 @@
<template>
<div class="listpage" id="history">
<div class="listpage-content">
<div class="listpage-header">
<span class="btn"></span>
<span class="btn" @click="clearAllHistory">清空</span>
</div>
<div class="listpage-header">
<span class="btn"></span>
<span class="btn" @click="clearAllHistory">清空</span>
</div>
<div class="listpage-body" id="history-table">
<el-table
:data="history"

View File

@@ -170,6 +170,14 @@ export default {
}
},
computed: {
view: {
get () {
return this.$store.getters.getView
},
set (val) {
this.SET_VIEW(val)
}
},
setting: {
get () {
return this.$store.getters.getSetting
@@ -177,18 +185,10 @@ export default {
set (val) {
this.SET_SETTING(val)
}
},
editSites: {
get () {
return this.$store.getters.getEditSites
},
set (val) {
this.SET_EDITSITES(val)
}
}
},
methods: {
...mapMutations(['SET_SETTING', 'SET_EDITSITES']),
...mapMutations(['SET_SETTING', 'SET_VIEW']),
linkOpen (e) {
shell.openExternal(e)
},
@@ -277,10 +277,7 @@ export default {
this.updateSettingEvent()
},
editSitesEvent () {
this.editSites = {
show: true,
sites: this.sitesList
}
this.view = 'EditSites'
},
changeTheme (e) {
this.d.theme = e

View File

@@ -1,12 +1,12 @@
<template>
<div class="listpage" id="star">
<div class="listpage-content">
<div class="listpage-header">
<span class="btn" @click="exportFavoritesEvent">导出</span>
<span class="btn" @click="importFavoritesEvent">导入</span>
<span class="btn" @click="clearFavoritesEvent">清空</span>
<span class="btn" @click="updateAllEvent">同步所有收藏</span>
</div>
<div class="listpage-header">
<span class="btn" @click="exportFavoritesEvent">导出</span>
<span class="btn" @click="importFavoritesEvent">导入</span>
<span class="btn" @click="clearFavoritesEvent">清空</span>
<span class="btn" @click="updateAllEvent">同步所有收藏</span>
</div>
<div class="listpage-body" id="list-table">
<el-table
:data="list"