refactor(api): 重命名 questionDetails 函数为 saveQuestions

- 将 questionDetails 函数重命名为 saveQuestions,以更好地反映其功能
- 保留了函数的原始逻辑,仅更改了名称
This commit is contained in:
陈昱达
2025-03-12 12:09:32 +08:00
parent 4f047b8b59
commit 5dd48c6a94
11 changed files with 2137 additions and 156 deletions

View File

@@ -17,20 +17,13 @@
v-model:data="element"
:questions="questions"
:questionIndex="index"
@move="emit('move', $event)"
@copy="emit('copy', $event)"
@delete="emit('delete', $event)"
@setting="emit('setting', $event)"
@logics="emit('logics', $event)"
></question-action>
</template>
<!-- <div-->
<!-- v-for="item in questionAction"-->
<!-- :key="item.key"-->
<!-- class=""-->
<!-- :class="item.class ? item.class : ''"-->
<!-- @click="itemAction(item)"-->
<!-- >-->
<!-- <i class="icon iconfont choose-question-active-container-icon" v-html="item.icon"></i>-->
<!-- <div class="choose-question-active-container-name">-->
<!-- {{ item.name }}-->
<!-- </div>-->
<!-- </div>-->
</van-cell>
</div>
</div>
@@ -59,70 +52,14 @@ const props = defineProps({
}
});
const element = ref(props.element);
// 选中题目后出现的操作
// const questionAction = ref([
// {
// icon: '&#xe630;',
// name: '编辑',
// key: 'edit',
// class: ''
// },
// {
// icon: '&#xe632;',
// name: '复制',
// key: 'copy',
// class: ''
// },
// {
// icon: '&#xe6a0;',
// name: '移动',
// key: 'moveUp',
// class: 'moverQues'
// },
// // {
// // icon:'',
// // name:'下移',
// // key:'moveDown',
// // class:''
// // },
// {
// icon: '&#xe63f;',
// name: '删除',
// key: 'delete',
// class: ''
// }
// ]);
const emit = defineEmits(['getChooseQuestionId']);
const emit = defineEmits(['getChooseQuestionId', 'move', 'copy']);
// 选中题目
const chooseItem = () => {
// 使用从 defineProps 接收的 element 对象
emit('getChooseQuestionId', props.element);
};
// const itemAction = (item) => {
// switch (item.key) {
// case 'edit':
// // vue router跳转到/edit
//
// router.push({
// path: '/design/edit',
// query: {
// id: props.element.id
// }
// });
// break;
// case 'copy':
// break;
// case 'moveUp':
// break;
// case 'moveDown':
// break;
// case 'delete':
// break;
// }
// };
</script>
<style scoped lang="scss">
.choose-question-container {