refactor: change url field to slug in post. (#72)

pull/75/head
Ryan Wang 2020-02-26 12:45:23 +08:00 committed by GitHub
parent 4619b1a5f9
commit 07e953a06d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 17 deletions

View File

@ -24,7 +24,7 @@
label="别名:"
help="* 一般为单个分类页面的标识,最好为英文"
>
<a-input v-model="categoryToCreate.slugName" />
<a-input v-model="categoryToCreate.slug" />
</a-form-item>
<a-form-item label="上级目录:">
<category-select-tree
@ -147,7 +147,7 @@
</template>
<a-list-item-meta>
<template slot="description">
{{ item.slugName }}
{{ item.slug }}
</template>
<span
slot="title"
@ -256,7 +256,7 @@ const columns = [
},
{
title: '别名',
dataIndex: 'slugName'
dataIndex: 'slug'
},
{
title: '描述',

View File

@ -24,7 +24,7 @@
label="别名"
help="* 一般为单个标签页面的标识,最好为英文"
>
<a-input v-model="tagToCreate.slugName" />
<a-input v-model="tagToCreate.slug" />
</a-form-item>
<a-form-item
label="封面图"

View File

@ -26,12 +26,12 @@
</a-form-item>
<a-form-item label="文章路径:">
<template slot="help">
<span v-if="options.post_permalink_type === 'DEFAULT'">{{ options.blog_url }}/{{ options.archives_prefix }}/{{ selectedPost.url?selectedPost.url:'${url}' }}{{ options.path_suffix }}</span>
<span v-else-if="options.post_permalink_type === 'DATE'">{{ options.blog_url }}{{ selectedPost.createTime?selectedPost.createTime:new Date() | moment_post_date }}{{ selectedPost.url?selectedPost.url:'${url}' }}{{ options.path_suffix }}</span>
<span v-else-if="options.post_permalink_type === 'DAY'">{{ options.blog_url }}{{ selectedPost.createTime?selectedPost.createTime:new Date() | moment_post_day }}{{ selectedPost.url?selectedPost.url:'${url}' }}{{ options.path_suffix }}</span>
<span v-if="options.post_permalink_type === 'DEFAULT'">{{ options.blog_url }}/{{ options.archives_prefix }}/{{ selectedPost.slug?selectedPost.slug:'${slug}' }}{{ options.path_suffix }}</span>
<span v-else-if="options.post_permalink_type === 'DATE'">{{ options.blog_url }}{{ selectedPost.createTime?selectedPost.createTime:new Date() | moment_post_date }}{{ selectedPost.slug?selectedPost.slug:'${slug}' }}{{ options.path_suffix }}</span>
<span v-else-if="options.post_permalink_type === 'DAY'">{{ options.blog_url }}{{ selectedPost.createTime?selectedPost.createTime:new Date() | moment_post_day }}{{ selectedPost.slug?selectedPost.slug:'${slug}' }}{{ options.path_suffix }}</span>
<span v-else-if="options.post_permalink_type === 'ID'">{{ options.blog_url }}/?p={{ selectedPost.id?selectedPost.id:'${id}' }}</span>
</template>
<a-input v-model="selectedPost.url" />
<a-input v-model="selectedPost.slug" />
</a-form-item>
<a-form-item label="访问密码:">
<a-input-password
@ -111,7 +111,7 @@
<a-form-item v-if="categoryFormVisible">
<a-input
placeholder="分类路径"
v-model="categoryToCreate.slugNames"
v-model="categoryToCreate.slug"
/>
</a-form-item>
<a-form-item>

View File

@ -26,9 +26,9 @@
</a-form-item>
<a-form-item
label="页面路径:"
:help="options.blog_url+'/'+options.sheet_prefix+'/'+ (selectedSheet.url ? selectedSheet.url : '{auto_generate}')"
:help="options.blog_url+'/'+options.sheet_prefix+'/'+ (selectedSheet.slug ? selectedSheet.slug : '{slug}')"
>
<a-input v-model="selectedSheet.url" />
<a-input v-model="selectedSheet.slug" />
</a-form-item>
<a-form-item label="发表时间:">
<a-date-picker

View File

@ -680,9 +680,9 @@
>
<a-form-item label="文章固定链接类型:">
<template slot="help">
<span v-if="options.post_permalink_type === 'DEFAULT'">{{ options.blog_url }}/{{ options.archives_prefix }}/${url}{{ options.path_suffix }}</span>
<span v-else-if="options.post_permalink_type === 'DATE'">{{ options.blog_url }}{{ new Date() | moment_post_date }}${url}{{ options.path_suffix }}</span>
<span v-else-if="options.post_permalink_type === 'DAY'">{{ options.blog_url }}{{ new Date() | moment_post_day }}${url}{{ options.path_suffix }}</span>
<span v-if="options.post_permalink_type === 'DEFAULT'">{{ options.blog_url }}/{{ options.archives_prefix }}/${slug}{{ options.path_suffix }}</span>
<span v-else-if="options.post_permalink_type === 'DATE'">{{ options.blog_url }}{{ new Date() | moment_post_date }}${slug}{{ options.path_suffix }}</span>
<span v-else-if="options.post_permalink_type === 'DAY'">{{ options.blog_url }}{{ new Date() | moment_post_day }}${slug}{{ options.path_suffix }}</span>
<span v-else-if="options.post_permalink_type === 'ID'">{{ options.blog_url }}/?p=${id}</span>
</template>
<a-select v-model="options.post_permalink_type">
@ -695,7 +695,7 @@
</a-form-item>
<a-form-item label="自定义页面前缀:">
<template slot="help">
<span>{{ options.blog_url }}/{{ options.sheet_prefix }}/${url}{{ options.path_suffix }}</span>
<span>{{ options.blog_url }}/{{ options.sheet_prefix }}/${slug}{{ options.path_suffix }}</span>
</template>
<a-input v-model="options.sheet_prefix" />
</a-form-item>
@ -725,13 +725,13 @@
</a-form-item>
<a-form-item label="分类前缀:">
<template slot="help">
<span>{{ options.blog_url }}/{{ options.categories_prefix }}/${slugName}{{ options.path_suffix }}</span>
<span>{{ options.blog_url }}/{{ options.categories_prefix }}/${slug}{{ options.path_suffix }}</span>
</template>
<a-input v-model="options.categories_prefix" />
</a-form-item>
<a-form-item label="标签前缀:">
<template slot="help">
<span>{{ options.blog_url }}/{{ options.tags_prefix }}/${slugName}{{ options.path_suffix }}</span>
<span>{{ options.blog_url }}/{{ options.tags_prefix }}/${slug}{{ options.path_suffix }}</span>
</template>
<a-input v-model="options.tags_prefix" />
</a-form-item>