This commit is contained in:
helloDy
2023-11-29 16:53:51 +08:00
parent 904350a4d8
commit fa5a303c08
13 changed files with 306 additions and 274 deletions

View File

@@ -142,6 +142,9 @@ function findMaxLabelWidth(rows) {
if (!opt.label) return 0;
if (opt.label.length > max) {
max = opt.label.length;
if (opt.label.includes('(')) {
max = max - 3
}
}
});
});
@@ -239,7 +242,7 @@ export default {
size: {
type: String,
default: '',
},
}
},
data() {
return {

View File

@@ -83,7 +83,7 @@ export default {
],
},
placeholder: '请输入内容',
readOnly: true,
// readOnly: false,
},
};
},
@@ -123,11 +123,13 @@ export default {
const editor = this.$refs.editor;
this.Quill = new Quill(editor, this.options);
// 取消自动聚焦 start
this.Quill?.enable(false);
this.$nextTick(() => {
this.Quill?.enable(true);
this.Quill?.blur();
if (!this.readOnly) {
this.Quill?.enable();
}
// if (!this.readOnly) {
// this.Quill?.enable();
// }
});
// 如果设置了上传地址则自定义图片上传事件
if (this.type === 'url') {
@@ -196,7 +198,7 @@ export default {
};
</script>
<style>
<style lang="scss" scoped>
.editor-wrapper {
position: relative;
cursor: not-allowed;