File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
packages/demo/src/vue-editor/views/editor Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 11<template >
22 <div v-loading =" loading" :class =" {
3- [$style.box]: true,
43 [$style.previewBox]: isPreview
54 }"
65 >
201200 mounted () {
202201 // todo: 通过计算获取
203202 window .document .body .classList .add (' page-decorate-design' );
204- this .$refs .domScrollWrap .scrollLeft = 480 ;
203+ const scrollDom = this .$refs .domScrollWrap ;
204+ this .$refs .domScrollWrap .scrollLeft = (scrollDom .scrollWidth - scrollDom .clientWidth ) / 2 ;
205205 },
206206 destroyed () {
207207 window .document .body .classList .remove (' page-decorate-design' );
Original file line number Diff line number Diff line change 11<template >
22 <div v-loading =" loading" :class =" {
3- [$style.box]: true,
43 [$style.previewBox]: isPreview
54 }"
65 >
1716 v-else
1817 type =" primary"
1918 style =" position : fixed ;right : 20px ;top : 20px ;z-index : 5 ;"
20- @click =" (scale = 70) && ( isPreview = false) "
19+ @click =" isPreview = false"
2120 >
2221 结束预览
2322 </el-button >
309308
310309 // 用户操作数据
311310 handleDataChange () {
312- // todo: ie 会导致输入框丢失光标
313311 this .fixComponentFormPosition ();
314312 },
315313
You can’t perform that action at this time.
0 commit comments