mirror of https://github.com/halo-dev/halo-admin
feat: theme visual settings page add back button (#514)
Signed-off-by: Ryan Wang <i@ryanc.cc>pull/517/head
parent
88de2115b3
commit
29073465ed
|
@ -1,11 +1,17 @@
|
|||
<template>
|
||||
<a-row :gutter="0">
|
||||
<a-col :md="6" :sm="24" class="h-screen" style="border-right: 1px solid #f2f2f2">
|
||||
<a-col :md="5" :sm="24" class="h-screen" style="border-right: 1px solid #f2f2f2">
|
||||
<a-spin :spinning="theme.loading" class="h-full">
|
||||
<ThemeSettingForm :theme="theme.data" :wrapperCol="{ span: 24 }" @saved="onSettingsSaved" />
|
||||
<ThemeSettingForm :theme="theme.data" :wrapperCol="{ span: 24 }" @saved="onSettingsSaved">
|
||||
<template #descriptions-item>
|
||||
<a-descriptions-item>
|
||||
<a-button @click="handleRouteToThemeSetting()">返回</a-button>
|
||||
</a-descriptions-item>
|
||||
</template>
|
||||
</ThemeSettingForm>
|
||||
</a-spin>
|
||||
</a-col>
|
||||
<a-col :md="18" :sm="24" class="h-screen">
|
||||
<a-col :md="19" :sm="24" class="h-screen">
|
||||
<iframe
|
||||
id="themeViewIframe"
|
||||
:src="options.blog_url"
|
||||
|
@ -57,6 +63,9 @@ export default {
|
|||
this.theme.loading = false
|
||||
}
|
||||
},
|
||||
handleRouteToThemeSetting() {
|
||||
this.$router.push({ name: 'ThemeSetting', query: { themeId: this.theme.id } })
|
||||
},
|
||||
onSettingsSaved() {
|
||||
document.getElementById('themeViewIframe').contentWindow.location.reload()
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
<a-descriptions-item label="存储位置">
|
||||
{{ theme.themePath }}
|
||||
</a-descriptions-item>
|
||||
<slot name="descriptions-item" />
|
||||
</a-descriptions>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane v-for="(group, index) in form.configurations" :key="index + 1" :tab="group.label">
|
||||
|
|
Loading…
Reference in New Issue