refactor(api): 重命名 questionDetails 函数为 saveQuestions
- 将 questionDetails 函数重命名为 saveQuestions,以更好地反映其功能 - 保留了函数的原始逻辑,仅更改了名称
This commit is contained in:
@@ -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: '',
|
||||
// name: '编辑',
|
||||
// key: 'edit',
|
||||
// class: ''
|
||||
// },
|
||||
// {
|
||||
// icon: '',
|
||||
// name: '复制',
|
||||
// key: 'copy',
|
||||
// class: ''
|
||||
// },
|
||||
// {
|
||||
// icon: '',
|
||||
// name: '移动',
|
||||
// key: 'moveUp',
|
||||
// class: 'moverQues'
|
||||
// },
|
||||
// // {
|
||||
// // icon:'',
|
||||
// // name:'下移',
|
||||
// // key:'moveDown',
|
||||
// // class:''
|
||||
// // },
|
||||
// {
|
||||
// icon: '',
|
||||
// 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 {
|
||||
|
||||
Reference in New Issue
Block a user