mirror of https://github.com/halo-dev/halo
feat: support advanced options.
parent
b07127ec68
commit
72063b246e
|
@ -179,7 +179,7 @@
|
||||||
>保存</a-button>
|
>保存</a-button>
|
||||||
</template>
|
</template>
|
||||||
<a-form layout="vertical">
|
<a-form layout="vertical">
|
||||||
<a-form-item label="页面标题:">
|
<a-form-item label="页面标题:" help="* 需要主题进行适配">
|
||||||
<a-input v-model="options.journals_title" />
|
<a-input v-model="options.journals_title" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="每页显示条数:">
|
<a-form-item label="每页显示条数:">
|
||||||
|
|
|
@ -217,7 +217,7 @@
|
||||||
>保存</a-button>
|
>保存</a-button>
|
||||||
</template>
|
</template>
|
||||||
<a-form layout="vertical">
|
<a-form layout="vertical">
|
||||||
<a-form-item label="页面标题:">
|
<a-form-item label="页面标题:" help="* 需要主题进行适配">
|
||||||
<a-input v-model="options.links_title" />
|
<a-input v-model="options.links_title" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|
|
@ -138,7 +138,7 @@
|
||||||
>保存</a-button>
|
>保存</a-button>
|
||||||
</template>
|
</template>
|
||||||
<a-form layout="vertical">
|
<a-form layout="vertical">
|
||||||
<a-form-item label="页面标题:">
|
<a-form-item label="页面标题:" help="* 需要主题进行适配">
|
||||||
<a-input v-model="options.photos_title" />
|
<a-input v-model="options.photos_title" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="每页显示条数:">
|
<a-form-item label="每页显示条数:">
|
||||||
|
|
|
@ -3,7 +3,11 @@
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<div class="card-container">
|
<div class="card-container">
|
||||||
<a-tabs type="card">
|
<a-tabs
|
||||||
|
type="card"
|
||||||
|
class="general"
|
||||||
|
v-if="!advancedOptions"
|
||||||
|
>
|
||||||
<a-tab-pane key="general">
|
<a-tab-pane key="general">
|
||||||
<span slot="tab">
|
<span slot="tab">
|
||||||
<a-icon type="tool" />常规设置
|
<a-icon type="tool" />常规设置
|
||||||
|
@ -608,6 +612,64 @@
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
<a-tab-pane key="other">
|
||||||
|
<span slot="tab">
|
||||||
|
<a-icon type="align-left" />其他设置
|
||||||
|
</span>
|
||||||
|
<a-form
|
||||||
|
layout="vertical"
|
||||||
|
:wrapperCol="wrapperCol"
|
||||||
|
>
|
||||||
|
<a-form-item label="自定义全局 head:">
|
||||||
|
<a-input
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 5 }"
|
||||||
|
v-model="options.blog_custom_head"
|
||||||
|
placeholder="放置于每个页面的 <head></head> 标签中"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item label="自定义内容页 head:">
|
||||||
|
<a-input
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 5 }"
|
||||||
|
v-model="options.blog_custom_content_head"
|
||||||
|
placeholder="仅放置于内容页面的 <head></head> 标签中"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item label="统计代码:">
|
||||||
|
<a-input
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 5 }"
|
||||||
|
v-model="options.blog_statistics_code"
|
||||||
|
placeholder="第三方网站统计的代码,如:Google Analytics、百度统计、CNZZ 等"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
<!-- <a-form-item
|
||||||
|
label="黑名单 IP:"
|
||||||
|
|
||||||
|
>
|
||||||
|
<a-input
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 5 }"
|
||||||
|
v-model="options.blog_ip_blacklist"
|
||||||
|
placeholder="多个 IP 地址换行隔开"
|
||||||
|
/>
|
||||||
|
</a-form-item> -->
|
||||||
|
<a-form-item>
|
||||||
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
@click="handleSaveOptions"
|
||||||
|
>保存</a-button>
|
||||||
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
</a-tab-pane>
|
||||||
|
</a-tabs>
|
||||||
|
|
||||||
|
<a-tabs
|
||||||
|
type="card"
|
||||||
|
class="advanced"
|
||||||
|
v-else
|
||||||
|
>
|
||||||
<a-tab-pane key="permalink">
|
<a-tab-pane key="permalink">
|
||||||
<span slot="tab">
|
<span slot="tab">
|
||||||
<a-icon type="link" />固定链接
|
<a-icon type="link" />固定链接
|
||||||
|
@ -712,62 +774,26 @@
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="other">
|
|
||||||
<span slot="tab">
|
|
||||||
<a-icon type="align-left" />其他设置
|
|
||||||
</span>
|
|
||||||
<a-form
|
|
||||||
layout="vertical"
|
|
||||||
:wrapperCol="wrapperCol"
|
|
||||||
>
|
|
||||||
<a-form-item label="自定义全局 head:">
|
|
||||||
<a-input
|
|
||||||
type="textarea"
|
|
||||||
:autosize="{ minRows: 5 }"
|
|
||||||
v-model="options.blog_custom_head"
|
|
||||||
placeholder="放置于每个页面的 <head></head> 标签中"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item label="自定义内容页 head:">
|
|
||||||
<a-input
|
|
||||||
type="textarea"
|
|
||||||
:autosize="{ minRows: 5 }"
|
|
||||||
v-model="options.blog_custom_content_head"
|
|
||||||
placeholder="仅放置于内容页面的 <head></head> 标签中"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item label="统计代码:">
|
|
||||||
<a-input
|
|
||||||
type="textarea"
|
|
||||||
:autosize="{ minRows: 5 }"
|
|
||||||
v-model="options.blog_statistics_code"
|
|
||||||
placeholder="第三方网站统计的代码,如:Google Analytics、百度统计、CNZZ 等"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
<!-- <a-form-item
|
|
||||||
label="黑名单 IP:"
|
|
||||||
|
|
||||||
>
|
|
||||||
<a-input
|
|
||||||
type="textarea"
|
|
||||||
:autosize="{ minRows: 5 }"
|
|
||||||
v-model="options.blog_ip_blacklist"
|
|
||||||
placeholder="多个 IP 地址换行隔开"
|
|
||||||
/>
|
|
||||||
</a-form-item> -->
|
|
||||||
<a-form-item>
|
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
@click="handleSaveOptions"
|
|
||||||
>保存</a-button>
|
|
||||||
</a-form-item>
|
|
||||||
</a-form>
|
|
||||||
</a-tab-pane>
|
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
|
<div style="position: fixed;bottom: 30px;right: 30px;">
|
||||||
|
<a-tooltip placement="top">
|
||||||
|
<template slot="title">
|
||||||
|
<span>{{ advancedOptions?'基础选项':'高级选项' }}</span>
|
||||||
|
</template>
|
||||||
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
shape="circle"
|
||||||
|
icon="setting"
|
||||||
|
size="large"
|
||||||
|
@click="handleAdvancedOptions()"
|
||||||
|
></a-button>
|
||||||
|
</a-tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
<AttachmentSelectDrawer
|
<AttachmentSelectDrawer
|
||||||
v-model="logoDrawerVisible"
|
v-model="logoDrawerVisible"
|
||||||
@listenToSelect="handleSelectLogo"
|
@listenToSelect="handleSelectLogo"
|
||||||
|
@ -806,6 +832,7 @@ export default {
|
||||||
faviconDrawerVisible: false,
|
faviconDrawerVisible: false,
|
||||||
options: [],
|
options: [],
|
||||||
mailParam: {},
|
mailParam: {},
|
||||||
|
advancedOptions: false,
|
||||||
tencentCosRegions: [
|
tencentCosRegions: [
|
||||||
{
|
{
|
||||||
text: '北京一区',
|
text: '北京一区',
|
||||||
|
@ -1182,6 +1209,9 @@ export default {
|
||||||
handleSelectFavicon(data) {
|
handleSelectFavicon(data) {
|
||||||
this.options.blog_favicon = encodeURI(data.path)
|
this.options.blog_favicon = encodeURI(data.path)
|
||||||
this.faviconDrawerVisible = false
|
this.faviconDrawerVisible = false
|
||||||
|
},
|
||||||
|
handleAdvancedOptions() {
|
||||||
|
this.advancedOptions = !this.advancedOptions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue