diff --git a/src/api/post.js b/src/api/post.js
index e6883b9d9..e7dcdcb13 100644
--- a/src/api/post.js
+++ b/src/api/post.js
@@ -145,6 +145,10 @@ postApi.permalinkType = {
ID: {
type: 'ID',
text: 'ID 型'
+ },
+ ID_SLUG: {
+ type: 'ID_SLUG',
+ text: 'ID 别名型'
}
}
export default postApi
diff --git a/src/views/post/components/PostSettingDrawer.vue b/src/views/post/components/PostSettingDrawer.vue
index 892da9eab..fbcfc7951 100644
--- a/src/views/post/components/PostSettingDrawer.vue
+++ b/src/views/post/components/PostSettingDrawer.vue
@@ -442,6 +442,8 @@ export default {
)}${this.selectedPost.slug ? this.selectedPost.slug : '{slug}'}${pathSuffix}`
case 'ID':
return `${blogUrl}/?p=${this.selectedPost.id ? this.selectedPost.id : '{id}'}`
+ case 'ID_SLUG':
+ return `${blogUrl}/${archivesPrefix}/${this.selectedPost.id ? this.selectedPost.id : '{id}'}${pathSuffix}`
default:
return ''
}
diff --git a/src/views/system/optiontabs/PermalinkTab.vue b/src/views/system/optiontabs/PermalinkTab.vue
index c78942f34..a618571aa 100644
--- a/src/views/system/optiontabs/PermalinkTab.vue
+++ b/src/views/system/optiontabs/PermalinkTab.vue
@@ -14,6 +14,7 @@
{{ options.blog_url }}{{ new Date() | moment_post_date }}{slug}{{ options.path_suffix }}
{{ options.blog_url }}{{ new Date() | moment_post_day }}{slug}{{ options.path_suffix }}
{{ options.blog_url }}/?p={id}
+ {{ options.blog_url }}/{{ options.archives_prefix }}/{id}{{ options.path_suffix }}
{
+ _this.$refs.permalinkOptionsForm.validate((valid) => {
if (valid) {
this.$emit('onSave')
}
})
- }
- }
+ },
+ },
}