Skip to content

BillionMail gives you open-source MailServer, NewsLetter, Email Marketing — fully self-hosted, dev-friendly, and free from monthly fees. Join the discord: https://discord.gg/asfXzBUhZr

fix: Fix several issues for template edit

albert25cd36f671f6
diff --git a/core/frontend/src/views/template/pages/AITemplate/controller/index.ts b/core/frontend/src/views/template/pages/AITemplate/controller/index.ts
index 6978f6d9..7007052f 100644
--- a/core/frontend/src/views/template/pages/AITemplate/controller/index.ts
+++ b/core/frontend/src/views/template/pages/AITemplate/controller/index.ts
@@ -334,6 +334,7 @@ export async function saveCodeChange(store: TemplateStore) {
{ chatId: chatId.value, content: previewCode.value },
instanceOptions
)
+ getHtmlTemplateContent(store)
} catch (error) {
console.warn(error)
}
diff --git a/core/frontend/src/views/template/pages/AITemplate/index.vue b/core/frontend/src/views/template/pages/AITemplate/index.vue
index 037fac53..2e7aeb67 100644
--- a/core/frontend/src/views/template/pages/AITemplate/index.vue
+++ b/core/frontend/src/views/template/pages/AITemplate/index.vue
@@ -120,7 +120,7 @@
<div v-if="previewStatus == 'view' && isChat" v-html="previewCode"></div>
<iframe v-else-if="previewStatus == 'view' && !isChat" :srcdoc="previewCode" frameborder="0" class="w-100%"
style="height: calc(100vh - 224px)"></iframe>
- <BtEditor v-else :value="previewCode" style="height: calc(100vh - 217px)"
+ <BtEditor v-else v-model:value="previewCode" style="height: calc(100vh - 217px)"
@save="saveCodeChange(store)">
</BtEditor>
</n-scrollbar>
@@ -147,7 +147,6 @@
import { useTemplateStore } from './store'
import { TemplateStore } from './dto'
import BtEditor from '@/components/base/bt-editor/index.vue'
-import { t } from '@wangeditor/core'
const globalStore = useGlobalStore()
const router = useRouter()
const store = useTemplateStore()