no message
This commit is contained in:
parent
12b41ad78f
commit
1793512cc6
@ -1,12 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="teditor-wrapper">
|
<div class="teditor-wrapper">
|
||||||
<div class="teditor-box" :class="[!inline&&spinShow?'teditor-loadstyle':'teditor-loadedstyle']">
|
<input ref="input" class="teditor-bginput"/>
|
||||||
<div v-if="inline" ref="myTextarea" :id="id">{{ content }}</div>
|
<div class="teditor-box" :class="[!inline && spinShow ? 'teditor-loadstyle' : 'teditor-loadedstyle']">
|
||||||
<textarea v-else ref="myTextarea" :id="id">{{ content }}</textarea>
|
<template v-if="inline">
|
||||||
<Spin fix v-if="!inline&&spinShow">
|
<div ref="myTextarea" :id="id" v-html="content"></div>
|
||||||
<Icon type="ios-loading" size=18 class="upload-control-spin-icon-load"></Icon>
|
<Icon v-if="spinShow" type="ios-loading" :size="18" class="icon-loading icon-inline"></Icon>
|
||||||
<div>{{$L('加载组件中...')}}</div>
|
</template>
|
||||||
</Spin>
|
<template v-else>
|
||||||
|
<textarea ref="myTextarea" :id="id">{{ content }}</textarea>
|
||||||
|
<Spin fix v-if="spinShow">
|
||||||
|
<Icon type="ios-loading" :size="18" class="icon-loading"></Icon>
|
||||||
|
<div>{{$L('加载组件中...')}}</div>
|
||||||
|
</Spin>
|
||||||
|
</template>
|
||||||
<ImgUpload
|
<ImgUpload
|
||||||
ref="myUpload"
|
ref="myUpload"
|
||||||
class="upload-control"
|
class="upload-control"
|
||||||
@ -32,7 +38,7 @@
|
|||||||
:before-upload="handleBeforeUpload"/>
|
:before-upload="handleBeforeUpload"/>
|
||||||
</div>
|
</div>
|
||||||
<Spin fix v-if="uploadIng > 0">
|
<Spin fix v-if="uploadIng > 0">
|
||||||
<Icon type="ios-loading" class="upload-control-spin-icon-load"></Icon>
|
<Icon type="ios-loading" class="icon-loading"></Icon>
|
||||||
<div>{{$L('正在上传文件...')}}</div>
|
<div>{{$L('正在上传文件...')}}</div>
|
||||||
</Spin>
|
</Spin>
|
||||||
<Modal v-model="transfer" class="teditor-transfer" @on-visible-change="transferChange" footer-hide fullscreen transfer>
|
<Modal v-model="transfer" class="teditor-transfer" @on-visible-change="transferChange" footer-hide fullscreen transfer>
|
||||||
@ -43,7 +49,7 @@
|
|||||||
<textarea :id="'T_' + id">{{ content }}</textarea>
|
<textarea :id="'T_' + id">{{ content }}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<Spin fix v-if="uploadIng > 0">
|
<Spin fix v-if="uploadIng > 0">
|
||||||
<Icon type="ios-loading" class="upload-control-spin-icon-load"></Icon>
|
<Icon type="ios-loading" class="icon-loading"></Icon>
|
||||||
<div>{{$L('正在上传文件...')}}</div>
|
<div>{{$L('正在上传文件...')}}</div>
|
||||||
</Spin>
|
</Spin>
|
||||||
</Modal>
|
</Modal>
|
||||||
@ -342,6 +348,11 @@
|
|||||||
} else {
|
} else {
|
||||||
this.editor.setMode('design');
|
this.editor.setMode('design');
|
||||||
}
|
}
|
||||||
|
if (this.inline) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.input.focus();
|
||||||
|
});
|
||||||
|
}
|
||||||
this.$emit('editorInit', this.editor);
|
this.$emit('editorInit', this.editor);
|
||||||
});
|
});
|
||||||
editor.on('KeyUp', (e) => {
|
editor.on('KeyUp', (e) => {
|
||||||
|
@ -390,7 +390,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Input ref="input" v-show="false"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -679,7 +678,6 @@ export default {
|
|||||||
if (id > 0) {
|
if (id > 0) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.loadEditor = true;
|
this.loadEditor = true;
|
||||||
this.$refs.input.focus()
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.timeOpen = false;
|
this.timeOpen = false;
|
||||||
|
19
resources/assets/sass/components/t-editor.scss
vendored
19
resources/assets/sass/components/t-editor.scss
vendored
@ -7,7 +7,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.teditor-bginput {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
opacity: 0;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
z-index: -999;
|
||||||
|
}
|
||||||
|
|
||||||
.teditor-box {
|
.teditor-box {
|
||||||
|
position: relative;
|
||||||
|
min-height: 22px;
|
||||||
|
|
||||||
|
.icon-inline {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user