Browse Source

修复预览自动化代码全选和复制的bug

main
piexlmax 3 years ago
parent
commit
6aa21d5fa7
  1. 3
      web/src/style/element_visiable.scss
  2. 8
      web/src/view/systemTools/autoCode/index.vue

3
web/src/style/element_visiable.scss

@ -177,8 +177,7 @@
top: 16px; top: 16px;
} }
.el-dialog__footer { .el-dialog__footer {
margin-top: -12px;
padding: 0 0 16px 0;
padding: 0 16px 16px 0;
.dialog-footer { .dialog-footer {
.el-button { .el-button {
padding-left: 24px; padding-left: 24px;

8
web/src/view/systemTools/autoCode/index.vue

@ -155,7 +155,7 @@
<el-button size="mini" type="primary" @click="copy">复制</el-button> <el-button size="mini" type="primary" @click="copy">复制</el-button>
</div> </div>
</template> </template>
<PreviewCodeDialog v-if="previewFlag" :preview-code="preViewCode" />
<PreviewCodeDialog v-if="previewFlag" ref="preview" :preview-code="preViewCode" />
<template #footer> <template #footer>
<div class="dialog-footer" style="padding-top:14px;padding-right:14px"> <div class="dialog-footer" style="padding-top:14px;padding-right:14px">
<el-button size="small" type="primary" @click="previewFlag = false"> </el-button> <el-button size="small" type="primary" @click="previewFlag = false"> </el-button>
@ -246,6 +246,12 @@ export default {
} }
}, },
methods: { methods: {
selectText() {
this.$refs.preview.selectText()
},
copy() {
this.$refs.preview.copy()
},
editAndAddField(item) { editAndAddField(item) {
this.dialogFlag = true this.dialogFlag = true
if (item) { if (item) {

Loading…
Cancel
Save