feat(Design): 重构题前逻辑组件
- 新增 YLInput 组件 - 新增 questionSteeingList 工具文件 - 新增 BeforeRadio、BeforeCheckbox 和 BeforeCompletion 组件 - 重构 QuestionBefore 组件,支持不同题型的逻辑配置 - 优化 QuestionAction 和 ChooseQuestion组件,增加 questionsInfo 参数 - 调整 NPS 和 Design 组件,以适应新的逻辑配置方式
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
:questions="questionInfo.questions"
|
||||
:index="index"
|
||||
:chooseQuestionId="chooseQuestionId"
|
||||
:questionsInfo="questionInfo"
|
||||
@get-choose-question-id="getChooseQuestionId"
|
||||
@move="emitFun.move"
|
||||
@copy="emitFun.copy"
|
||||
@@ -239,10 +240,10 @@ const chooseQuestionIndex = ref(-1);
|
||||
const questionInfo = computed(() => store.questionsInfo.value);
|
||||
// 自动更新 题型
|
||||
watch(
|
||||
() => questionInfo.value.questions[chooseQuestionIndex.value],
|
||||
() => questionInfo.value.questions,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
// saveQueItem(questionInfo.value.logics, [newVal]);
|
||||
saveQueItem(questionInfo.value.logics, newVal); // 确保保存最新的数据
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
@@ -417,6 +418,8 @@ const emitFun = {
|
||||
saveQueItem(null, [item]);
|
||||
},
|
||||
logics: (item) => {
|
||||
// console.log(questionInfo.value.logics[);
|
||||
// return false;
|
||||
saveQueItem(questionInfo.value.logics, [item]);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user