feat(Design): 优化问卷设计样式和功能

- 实现选项功能

- 添加内容可编辑组件拖拽排序功能
- 优化题目和选项的样式
- 添加右键拖拽功能
This commit is contained in:
陈昱达
2025-03-15 18:09:27 +08:00
parent b11a721284
commit 8d8772021e
5 changed files with 171 additions and 60 deletions

View File

@@ -1,11 +1,16 @@
<template>
<p
ref="editor"
:contenteditable="active"
class="van-field"
:class="className"
v-html="modelValue"
></p>
<div class="flex contenteditable align-center space-between" :class="className">
<p
ref="editor"
:contenteditable="active"
class="van-field contenteditable-content"
v-html="modelValue"
></p>
<div class="right-icon ml10">
<slot name="right-icon"></slot>
</div>
</div>
<div v-if="showAction && active" ref="editorAction" class="editor-action">
<button v-for="item in actions" :key="item.name" @click="funEvent(item, $event)">
{{ item.label }}
@@ -138,6 +143,14 @@ onMounted(() => {
</script>
<style scoped lang="scss">
.contenteditable-content {
width: 100%;
}
.right-icon {
color: #c4c9d4;
}
.editor-action {
position: fixed;
bottom: 0;