Commit ce4b5716 authored by mhw's avatar mhw

提示词修改

parent 9cac7cc5
......@@ -21,11 +21,13 @@
</el-form-item>
<template v-if="form.scenarioType === 0 ">
<el-form-item label="模板框架:" class="templateFramework" v-if=" !isEdit">
<el-tooltip class="item" effect="dark" :content="item.name" placement="top" v-for="item in TemplateFrameworkDict.getList()" :label="item.id" :size="defaultFormItemSize" :key="item.id">
<el-radio v-model="form.templateFramework" @input="$refs.promptInput.init()" :label="item.id">{{ item.symbol }}</el-radio>
</el-tooltip>
</el-form-item>
<el-form-item label="Prompt:" prop="templateContent" key="templateContent1">
<promptInput ref="promptInput" v-model="form.templateContent" :templateFramework="form.templateFramework" :isEdit="isEdit" />
</el-form-item>
</template>
......@@ -58,7 +60,7 @@ export default {
interfaceAddress: '',
negativeTemplateContent: '',
negativeTemplateVariables: '',
parameterFormat: '',
parameterFormat: '{}',
scenarioType: 0,
templateContent: '',
templateFramework: 0,
......@@ -131,8 +133,7 @@ export default {
});
});
},
changeScenarioType () {
console.log(this.$refs.promptInput);
changeScenarioType (data) {
if (this.$refs.promptInput) {
this.$refs.promptInput.init()
}
......
<!--prompt输入 -->
<template>
<div >
<el-input v-if="[1,2,3].indexOf(templateFramework)===-1||isEdit" type="textarea" :rows="5" placeholder="请输入内容" :value="prompt" class="inputWidth" @input="changeInput"></el-input>
<el-input v-if="[1,2,3].indexOf(templateFramework)===-1||isEdit" type="textarea" :rows="5" placeholder="请输入内容" :value="prompt" class="inputWidth" @input="changeInput2"></el-input>
<el-card class="box-card" style="width:600px" v-else>
<div class="inputBox" v-for="(item,index) in myPrompts" :key="index">
......@@ -128,9 +128,13 @@ export default {
return item.label + ':' + item.value + '\n'
}
}).join('')
console.log(promptsString);
console.log(this.templateFramework);
this.$emit('input', [1, 2, 3].indexOf(this.templateFramework) === -1 ? this.prompt : promptsString)
},
changeInput2 (data) {
this.prompt = data
this.$emit('input', this.prompt)
},
add (item) {
if (item.tableData.length === 20) return
item.tableData.push({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment