|
|
@@ -249,12 +249,24 @@ export default Vue.extend({
|
|
|
toolbar: false,
|
|
|
menubar: false,
|
|
|
height: '100%',
|
|
|
- width: '100%'
|
|
|
+ width: '100%',
|
|
|
+ setup: editor => {
|
|
|
+ editor.on('drop', event => {
|
|
|
+ event.preventDefault()
|
|
|
+ const html = event.dataTransfer.getData('text/html')
|
|
|
+ editor.insertContent(html)
|
|
|
+ })
|
|
|
+ }
|
|
|
}).then(editor => {
|
|
|
this.invitation_data.tempIndex = index
|
|
|
this.parseCode(this.invitation_data.data[index].content)
|
|
|
})
|
|
|
},
|
|
|
+ dragStart(event, text) {
|
|
|
+ console.log(text)
|
|
|
+ const html = `<span>${text}</span>`
|
|
|
+ event.dataTransfer.setData('text/html', html)
|
|
|
+ },
|
|
|
parseCode(code) {
|
|
|
const tempDiv = document.createElement('div')
|
|
|
tempDiv.innerHTML = code
|
|
|
@@ -440,7 +452,7 @@ export default Vue.extend({
|
|
|
<div class="dialog-body">
|
|
|
<div class="title">模板列表</div>
|
|
|
<div class="title">邮件编辑器</div>
|
|
|
- <div class="title">观众信息</div>
|
|
|
+ <div class="title">观众信息(按住复制按钮可拖拽)</div>
|
|
|
<div class="temp-list">
|
|
|
<div
|
|
|
v-for="(temp,index) in invitation_data.data"
|
|
|
@@ -465,7 +477,7 @@ export default Vue.extend({
|
|
|
<div class="title">{{ getLabelName(key) }}</div>
|
|
|
<div>{{ item || '暂无数据' }}</div>
|
|
|
<el-button-group class="button-list">
|
|
|
- <el-button type="primary" size="mini" icon="el-icon-document-copy" @click="copy(item)">复制</el-button>
|
|
|
+ <el-button draggable="true" @dragstart.native="dragStart($event,item)" type="primary" size="mini" icon="el-icon-document-copy" @click="copy(item)"></el-button>
|
|
|
</el-button-group>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -574,7 +586,7 @@ export default Vue.extend({
|
|
|
overflow: hidden;
|
|
|
height: 68vh;
|
|
|
display: grid;
|
|
|
- grid-template-columns: 240px 1fr 360px;
|
|
|
+ grid-template-columns: 240px 1fr 240px;
|
|
|
grid-template-rows: auto 1fr;
|
|
|
grid-gap: 4px 12px;
|
|
|
.view{
|