| | |
| | | </div> |
| | | </el-drawer> |
| | | </div> |
| | | <el-dialog v-model="state.useInstructDialog" :title="state.instructInfo?.template_title" width="500" :before-close="handleClose"> |
| | | <el-input v-model="state.inputInstruct" :rows="10" type="textarea"></el-input> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="handleClose">取消</el-button> |
| | | <el-button type="primary" @click="submitInstruct"> 确认 </el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | activeLabelName: 0, |
| | | activeInstructName: 0, |
| | | isShowExpand: false, |
| | | useInstructDialog: false, |
| | | instructInfo: {}, |
| | | inputInstruct: '', //可修改指令 |
| | | }); |
| | | const exampleList = ref([]); //模版列表 |
| | | const instructContentList = ref([]); //指令列表 |
| | |
| | | }; |
| | | //#region ====================== templateUseClick ====================== |
| | | const templateUseClick = (row) => { |
| | | emitter.emit('updateChatInput', row.template_value); |
| | | state.useInstructDialog = true; |
| | | state.instructInfo = row; |
| | | state.inputInstruct = row.template_value; |
| | | }; |
| | | const handleClose = () => { |
| | | state.useInstructDialog = false; |
| | | }; |
| | | const submitInstruct = () => { |
| | | emitter.emit('updateChatInput', state.inputInstruct); |
| | | handleClose(); |
| | | }; |
| | | //#endregion |
| | | //#region ====================== 搜索模板/指令 ====================== |