|
@@ -21,6 +21,10 @@
|
|
|
class="ql-editor"
|
|
|
ref="quillEditor"></quillEditor>
|
|
|
</el-form-item>
|
|
|
+ <div class="order-btn">
|
|
|
+ <a v-if="index!==0" class="order-up" @click="reOrder(1)">上升</a>
|
|
|
+ <a v-if="index!==total-1" class="order-down" @click="reOrder(0)">下降</a>
|
|
|
+ </div>
|
|
|
<el-form-item label-width="130px">
|
|
|
<el-button @click="addEmit">添加段落</el-button>
|
|
|
<el-button @click="delEmit" type="info">删除本段落</el-button>
|
|
@@ -37,7 +41,7 @@
|
|
|
import {container, ImageExtend, QuillWatch} from 'quill-image-extend-module';
|
|
|
Quill.register('modules/ImageExtend', ImageExtend);
|
|
|
export default{
|
|
|
- props:['data','index','isEdit'],
|
|
|
+ props:['data','index','isEdit','total'],
|
|
|
name:'MedicineInfoParagraph',
|
|
|
components:{
|
|
|
quillEditor
|
|
@@ -102,6 +106,9 @@
|
|
|
this.positions = JSON.parse(pos)&&JSON.parse(pos).positionTypeEnum;
|
|
|
},
|
|
|
methods:{
|
|
|
+ reOrder(i){
|
|
|
+ this.$emit("reOrder",i,this.index);
|
|
|
+ },
|
|
|
addEmit(){
|
|
|
this.$emit("add");
|
|
|
},
|
|
@@ -129,6 +136,27 @@
|
|
|
.is-error .el-form-item__error{
|
|
|
top:auto;
|
|
|
}
|
|
|
+ .sub-form{
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .order-btn{
|
|
|
+ position:absolute;
|
|
|
+ top:40px;
|
|
|
+ right:50px;
|
|
|
+ a{
|
|
|
+ display: block;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ border: 1px solid #22ccc8;
|
|
|
+ color: #22ccc8;
|
|
|
+ padding: 5px 10px;
|
|
|
+ border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+ .order-up{
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
/**富文本编辑器样式修改***/
|
|
|
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
|
|
|
.ql-snow .ql-picker.ql-size .ql-picker-item::before,
|