Support color type for theme setting.

pull/40/head
ruibaby 2019-08-24 21:39:43 +08:00
parent 4669fb54e5
commit a4384f921b
5 changed files with 43 additions and 6 deletions

View File

@ -17,6 +17,7 @@
"marked": "^0.6.3", "marked": "^0.6.3",
"moment": "^2.24.0", "moment": "^2.24.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"verte": "^0.0.12",
"viser-vue": "^2.4.6", "viser-vue": "^2.4.6",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-clipboard2": "^0.3.0", "vue-clipboard2": "^0.3.0",

View File

@ -243,6 +243,20 @@
:value="option.value" :value="option.value"
>{{ option.label }}</a-select-option> >{{ option.label }}</a-select-option>
</a-select> </a-select>
<verte
picker="square"
model="hex"
v-model="themeSettings[item.name]"
:defaultValue="item.defaultValue"
v-else-if="item.type == 'COLOR'"
style="display: inline-block;height: 24px;"
></verte>
<a-input
v-model="themeSettings[item.name]"
:defaultValue="item.defaultValue"
:placeholder="item.placeholder"
v-else
/>
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-tab-pane> </a-tab-pane>
@ -391,11 +405,14 @@ import AttachmentDrawer from '../attachment/components/AttachmentDrawer'
import FooterToolBar from '@/components/FooterToolbar' import FooterToolBar from '@/components/FooterToolbar'
import { mixin, mixinDevice } from '@/utils/mixin.js' import { mixin, mixinDevice } from '@/utils/mixin.js'
import themeApi from '@/api/theme' import themeApi from '@/api/theme'
import Verte from 'verte'
import 'verte/dist/verte.css'
export default { export default {
components: { components: {
AttachmentDrawer, AttachmentDrawer,
FooterToolBar FooterToolBar,
Verte
}, },
mixins: [mixin, mixinDevice], mixins: [mixin, mixinDevice],
data() { data() {

View File

@ -52,7 +52,7 @@
showTime showTime
:defaultValue="pickerDefaultValue" :defaultValue="pickerDefaultValue"
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss"
placeholder="Select Publish Time" placeholder="选择文章发表时间"
@change="onChange" @change="onChange"
@ok="onOk" @ok="onOk"
/> />

View File

@ -146,7 +146,10 @@
:href="options.blog_url+'/archives/'+record.url" :href="options.blog_url+'/archives/'+record.url"
target="_blank" target="_blank"
> >
<a-tooltip placement="topLeft" :title="'点击预览 '+text">{{ text }}</a-tooltip> <a-tooltip
placement="topLeft"
:title="'点击预览【'+text+'】'"
>{{ text }}</a-tooltip>
</a> </a>
</span> </span>
<span <span
@ -182,7 +185,14 @@
<span <span
slot="createTime" slot="createTime"
slot-scope="createTime" slot-scope="createTime"
>{{ createTime | timeAgo }}</span> >
<a-tooltip placement="top">
<template slot="title">
{{ createTime | moment }}
</template>
{{ createTime | timeAgo }}
</a-tooltip>
</span>
<span <span
slot="action" slot="action"
@ -419,7 +429,7 @@ const columns = [
scopedSlots: { customRender: 'status' } scopedSlots: { customRender: 'status' }
}, },
{ {
title: '分类目录', title: '分类',
dataIndex: 'categories', dataIndex: 'categories',
scopedSlots: { customRender: 'categories' } scopedSlots: { customRender: 'categories' }
}, },

View File

@ -111,6 +111,7 @@
>{{ text }}</a-tooltip> >{{ text }}</a-tooltip>
</a> </a>
</span> </span>
<span <span
slot="status" slot="status"
slot-scope="statusProperty" slot-scope="statusProperty"
@ -118,10 +119,18 @@
<a-badge :status="statusProperty.status" /> <a-badge :status="statusProperty.status" />
{{ statusProperty.text }} {{ statusProperty.text }}
</span> </span>
<span <span
slot="createTime" slot="createTime"
slot-scope="createTime" slot-scope="createTime"
>{{ createTime | timeAgo }}</span> >
<a-tooltip placement="top">
<template slot="title">
{{ createTime | moment }}
</template>
{{ createTime | timeAgo }}
</a-tooltip>
</span>
<span <span
slot="action" slot="action"