feat(Design): 优化问卷设计样式和功能
- 实现选项功能 - 添加内容可编辑组件拖拽排序功能 - 优化题目和选项的样式 - 添加右键拖拽功能
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user