| | |
| | | <i class="iconfont icon-zhongduancanshu" title="收缩" @click="handleExpandClick(2)" v-show="state.isShowExpand"></i> |
| | | </div> |
| | | <div class="mt20 w100"> |
| | | <div class="w100 pb-[20px]" v-for="item in showSampleList" :key="item.sample_id"> |
| | | <div class="w100 pb-[20px]" v-for="item in finalSampleList" :key="item.sample_id"> |
| | | <div |
| | | class="cursor-pointer flex box-border p-[12px] w100 rounded bg-[#f5f7fd] transition-[background-color .2s]" |
| | | @click="changeExample(item)" |
| | |
| | | ], |
| | | activeName: 1, |
| | | |
| | | activeLabelName: 0, |
| | | activeInstructName: 0, |
| | | activeLabelName: 'knowledge_base', //默认选择第一个 |
| | | activeInstructName: 'office_assistant', //默认选择第一个 |
| | | isShowExpand: false, |
| | | useInstructDialog: false, |
| | | instructInfo: {}, |
| | |
| | | //标签点击事件(提问示例) |
| | | const handleLabelClick = (item) => { |
| | | state.activeLabelName = item.section_id; |
| | | const exampleShowLabelList = []; |
| | | exampleList.value.forEach((exampleItem) => { |
| | | if (exampleItem.section_a_id == item.section_id) { |
| | | exampleShowLabelList.push(exampleItem); |
| | | } |
| | | }); |
| | | showSampleList.value = exampleShowLabelList; |
| | | }; |
| | | //标签点击事件(指令模板) |
| | | const handleInstructClick = (item) => { |
| | |
| | | }); |
| | | const { query: querySample, queryData: showSampleList } = useSearch(exampleList, queryParams); |
| | | const debounceQuery = debounce(querySample); |
| | | const finalSampleList = computed(() => { |
| | | return showSampleList.value.filter((item) => item.section_a_id == state.activeLabelName); |
| | | }); |
| | | |
| | | watch( |
| | | () => queryParams.value.sample_title, |