Skip to content

Commit

Permalink
feat: #1076 #1077 优化发布配置、平台导入、插件商店使用体验 - 优化文章绑定,历史元数据导入
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Mar 7, 2024
1 parent 5099c12 commit 7658a4c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/set/preference/PostBind.vue
Expand Up @@ -24,7 +24,7 @@
-->

<script setup lang="ts">
import { onMounted, reactive, ref, toRaw } from "vue"
import {onMounted, reactive, ref, toRaw, watch} from "vue"
import { ElMessage, FormRules } from "element-plus"
import { usePublishConfig } from "~/src/composables/usePublishConfig.ts"
import { DynamicConfig } from "~/src/platforms/dynamicConfig.ts"
Expand Down Expand Up @@ -59,6 +59,13 @@ const formData = reactive({
})
const alertTitle = ref(`将对文章「${formData.pageId}」进行修复`)
watch(
() => formData.pageId,
(newValue) => {
alertTitle.value = `将对文章「${newValue}」进行修复`
}
)
// methods
const submitForm = async (formEl: any) => {
if (StrUtil.isEmptyString(formData.pageId)) {
Expand Down Expand Up @@ -98,7 +105,7 @@ onMounted(async () => {
if (!StrUtil.isEmptyString(formData.pageId)) {
formData.siyuanPost = await kernelApi.getBlockByID(formData.pageId)
const title = Utils.emptyOrDefault(formData.siyuanPost?.content, formData.pageId)
alertTitle.value = `将对文章「${title}」(${formData.pageId}) 进行修复`
alertTitle.value = `将对文章「${title}」进行修复`
}
const publishCfg = await getPublishCfg()
Expand Down

0 comments on commit 7658a4c

Please sign in to comment.