CzRger 1 月之前
父節點
當前提交
db22b9c145

src/api/modules/app/tips.ts → src/api/modules/app/make.ts


+ 5 - 5
src/views/manage/app/make/index.vue

@@ -118,7 +118,7 @@
                     class="h-full w-full"
                     style="resize: none; line-height: 1.4"
                     ref="ref_tips"
-                    v-model="state.form.prePrompt"
+                    v-model="state.form.tips"
                   ></textarea>
                 </div>
               </div>
@@ -598,7 +598,7 @@
     />
     <templateSelect
       v-model:show="state.templateSelect.show"
-      @insert="(val) => ((state.form.prePrompt = val), ref_tips.focus())"
+      @insert="(val) => ((state.form.tips = val), ref_tips.focus())"
     />
     <templateDetail
       v-model:show="state.templateDetail.show"
@@ -679,8 +679,8 @@ const state: any = reactive({
   ID: route.params.id,
   autoSaveTimestamp: '',
   form: {
-    prePrompt: '',
-    model: { name: '' },
+    tips: '',
+    model: { name: '', id: '' },
     components: [],
     knowledges: [
       {
@@ -974,7 +974,7 @@ const autoSave = debounce((v) => {
 const onAddTipsTemplate = () => {
   state.templateDetail.transfer = {
     mode: 'add',
-    content: state.form.prePrompt + '',
+    tips: state.form.tips + '',
   }
   state.templateDetail.show = true
 }

+ 2 - 2
src/views/manage/app/make/template-detail.vue

@@ -51,7 +51,7 @@ import { useAppStore, useDialogStore, useDictionaryStore } from '@/stores'
 import {
   promptTemplatesDetail,
   promptTemplatesSave,
-} from '@/api/modules/app/tips'
+} from '@/api/modules/app/make'
 
 const AppStore = useAppStore()
 const DictionaryStore = useDictionaryStore()
@@ -95,7 +95,7 @@ watch(
       if (props.transfer.mode !== 'add') {
         initData()
       } else {
-        state.form.content = props.transfer.content || ''
+        state.form.content = props.transfer.tips || ''
       }
       nextTick(() => {
         ref_form.value.reset()

+ 1 - 2
src/views/manage/app/make/template-select.vue

@@ -95,8 +95,7 @@ import { copy } from '@/utils/czr-util'
 import CzrDialog from '@/components/czr-ui/CzrDialog.vue'
 import { Search } from '@element-plus/icons-vue'
 import { debounce } from 'lodash'
-import { pluginDel } from '@/api/modules/model'
-import { promptTemplatesSearch } from '@/api/modules/app/tips'
+import { promptTemplatesSearch } from '@/api/modules/app/make'
 
 const AppStore = useAppStore()
 const DictionaryStore = useDictionaryStore()