feat(Design): 重构题前逻辑组件
- 新增 YLInput 组件 - 新增 questionSteeingList 工具文件 - 新增 BeforeRadio、BeforeCheckbox 和 BeforeCompletion 组件 - 重构 QuestionBefore 组件,支持不同题型的逻辑配置 - 优化 QuestionAction 和 ChooseQuestion组件,增加 questionsInfo 参数 - 调整 NPS 和 Design 组件,以适应新的逻辑配置方式
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
<template #right-icon>
|
||||
<question-action
|
||||
v-model:data="element"
|
||||
:questionsInfo="questionsInfo"
|
||||
:questions="questions"
|
||||
:questionIndex="index"
|
||||
@move="emit('move', $event)"
|
||||
@@ -58,6 +59,12 @@ const props = defineProps({
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
questionsInfo: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
// 后续扩展
|
||||
}
|
||||
},
|
||||
chooseQuestionId: {
|
||||
type: String,
|
||||
default: '0'
|
||||
@@ -82,11 +89,10 @@ const getQuestionType = (type) => {
|
||||
const element = ref(props.element);
|
||||
|
||||
// 选中题目后出现的操作
|
||||
const emit = defineEmits(['getChooseQuestionId', 'move', 'copy']);
|
||||
const emit = defineEmits(['getChooseQuestionId', 'move', 'copy', 'setting', 'logics']);
|
||||
|
||||
// 选中题目
|
||||
const chooseItem = () => {
|
||||
// 使用从 defineProps 接收的 element 对象
|
||||
emit('getChooseQuestionId', props.element, props.index);
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user