feat: 新增选项操作功能并优化问卷设计页面
- 新增 OptionAction 组件用于选项操作 - 更新 BaseSelect 组件,集成 OptionAction 功能 - 优化 Paging 组件样式 - 调整 Design 页面布局和样式
This commit is contained in:
@@ -1,16 +1,65 @@
|
||||
<template>
|
||||
<div class="flex option-action">
|
||||
<van-icon name="close"></van-icon>
|
||||
<van-icon name="more-o"></van-icon>
|
||||
<div class="option-action">
|
||||
<template v-for="(item, index) in data" :key="item.id">
|
||||
<div class="flex align-center option-action-container">
|
||||
<slot name="item" :element="item" :index="index"></slot>
|
||||
<span v-if="active" class="flex">
|
||||
<van-icon name="close"></van-icon>
|
||||
<van-icon name="more-o" @click="openOptionActionModel"></van-icon>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<van-action-sheet v-model:show="show">
|
||||
<template #description>
|
||||
<div class="flex flex-start">操作选项</div>
|
||||
</template>
|
||||
<div class="">
|
||||
<van-cell title="固定置底"></van-cell>
|
||||
<van-cell title="固定置底"></van-cell>
|
||||
<van-cell title="固定置底"></van-cell>
|
||||
<van-cell title="固定置底"></van-cell>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</template>
|
||||
<script setup></script>
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
stem: ''
|
||||
};
|
||||
}
|
||||
},
|
||||
active: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
});
|
||||
// const emit = defineEmits(['update:data']);
|
||||
const show = ref(false);
|
||||
|
||||
/**
|
||||
* @name 打开model弹窗
|
||||
* @created_date 2025/3/4
|
||||
* @description
|
||||
**/
|
||||
const openOptionActionModel = () => {
|
||||
show.value = true;
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.option-action {
|
||||
font-size: 20px;
|
||||
|
||||
& .van-icon + .van-icon {
|
||||
margin-left: 5px;
|
||||
& .option-action-container {
|
||||
font-size: 20px;
|
||||
|
||||
& .van-icon + .van-icon {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user