优化layer样式;优化drag插件滚动条获取;优化编辑器弹层定位
parent
dfa5620d68
commit
0f772ee913
|
@ -97,8 +97,8 @@ define(['yua'], function(){
|
|||
dy = cst[5]
|
||||
|
||||
//滚动条的偏移
|
||||
bst = document.documentElement.scrollTop
|
||||
bsl = document.documentElement.scrollLeft
|
||||
bst = $doc.scrollTop()
|
||||
bsl = $doc.scrollLeft()
|
||||
|
||||
// 计算元素的offset值, 需要修正
|
||||
ox = offset.left - dx - bsl
|
||||
|
|
|
@ -28,7 +28,7 @@ define(['yua', 'lib/drag/main', 'css!./skin/def'], function(yua){
|
|||
shadeClose: false, //遮罩点击关闭弹窗
|
||||
radius: '0px', //弹窗圆角半径
|
||||
area: ['auto', 'auto'],
|
||||
title: '', //弹窗主标题(在工具栏上的)
|
||||
title: '提示', //弹窗主标题(在工具栏上的)
|
||||
menubar: true, //是否显示菜单栏
|
||||
content: '', // 弹窗的内容
|
||||
fixed: false, //是否固定不可拖拽
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -29,12 +29,12 @@
|
|||
|
||||
|
||||
/* 弹层标题栏 */
|
||||
.layer-title {width:100%;height:40px;padding:0 8px;line-height:40px;background:nth($cp, 2);font-size:14px;color:nth($cgr, 1);}
|
||||
.layer-title {width:100%;height:43px;padding:0 8px;line-height:43px;background:#f5f5f5;font-size:16px;color:nth($cgr, 1);}
|
||||
|
||||
.action-min,
|
||||
.action-close {position:absolute;display:block;top:10px;width:20px;height:20px;line-height:20px;border:0;text-align:center;cursor:pointer;color:nth($cgr, 2);
|
||||
.action-close {position:absolute;display:block;top:12px;width:20px;height:20px;line-height:20px;font-size:14px;text-align:center;cursor:pointer;color:nth($cgr, 2);
|
||||
|
||||
&:hover {border: 1px solid #ddd;line-height: 18px;color:nth($cg, 1);}
|
||||
&:hover {color:nth($cg, 1);}
|
||||
}
|
||||
.action-min {right:40px;
|
||||
&::before {content:"\e634"}
|
||||
|
@ -64,7 +64,7 @@
|
|||
/* 弹层按钮部分 */
|
||||
.layer-btns {width:100%;height:40px;padding:0 5px;line-height:30px;font-size:14px;color:#454545;text-align:right;
|
||||
|
||||
a {display:inline-block;width:auto;min-width:60px;height:30px;margin:0 5px;padding:0 10px;color:nth($cgr, 1);text-align:center;background:nth($cp, 1);
|
||||
a {display:inline-block;width:auto;min-width:60px;height:30px;margin:0 5px;padding:0 10px;color:nth($cgr, 1);text-align:center;background:nth($cp, 1);@include ts();
|
||||
|
||||
&:hover {background:nth($cp, 2)}
|
||||
&:active {background:nth($cp, 3)}
|
||||
|
|
|
@ -314,7 +314,7 @@ define([
|
|||
menubar: false,
|
||||
shade: false,
|
||||
fixed: true,
|
||||
offset: [offset.top + 37 - document.documentElement.scrollTop],
|
||||
offset: [offset.top + 37 - ME.doc.scrollTop()],
|
||||
tab: 2,
|
||||
attach: '',
|
||||
attachAlt: '',
|
||||
|
|
|
@ -42,7 +42,7 @@ define(['lib/layer/base'], function(){
|
|||
ME.insert(vm.$editor, wrap, true)
|
||||
layer.close(h1ID)
|
||||
},
|
||||
offset: [offset.top + 37 - document.documentElement.scrollTop, 'auto', 'auto', offset.left - document.documentElement.scrollLeft],
|
||||
offset: [offset.top + 37 - ME.doc.scrollTop(), 'auto', 'auto', offset.left - ME.doc.scrollLeft()],
|
||||
content: '<ul class="do-meditor-h1 do-fn-noselect meditor-font">'
|
||||
+ '<li :click="$insert(1)" class="h1">一级标题</li>'
|
||||
+ '<li :click="$insert(2)" class="h2">二级标题</li>'
|
||||
|
@ -121,7 +121,7 @@ define(['lib/layer/base'], function(){
|
|||
ME.insert(vm.$editor, val, false)
|
||||
layer.close(layid)
|
||||
},
|
||||
offset: [offset.top + 37 - document.documentElement.scrollTop, 'auto', 'auto', offset.left - document.documentElement.scrollLeft],
|
||||
offset: [offset.top + 37 - ME.doc.scrollTop(), 'auto', 'auto', offset.left - ME.doc.scrollLeft()],
|
||||
content: '<div class="do-meditor-common meditor-font">'
|
||||
+ '<section><span class="label">链接文字</span>'
|
||||
+ '<input class="input" :duplex="linkName" />'
|
||||
|
@ -151,7 +151,7 @@ define(['lib/layer/base'], function(){
|
|||
fixed: true,
|
||||
shadeClose: true,
|
||||
arr: getOrderArr(36),
|
||||
offset: [offset.top + 37 - document.documentElement.scrollTop, 'auto', 'auto', offset.left - document.documentElement.scrollLeft],
|
||||
offset: [offset.top + 37 - ME.doc.scrollTop(), 'auto', 'auto', offset.left - ME.doc.scrollLeft()],
|
||||
content: '<ul class="do-meditor-face">'
|
||||
+ '<li class="item" :repeat="arr" ><img :attr-src="ME.path + \'/addon/face/\' + el + \'.gif\'" :click="$insert(this.src)" /></li>'
|
||||
+ '</ul>',
|
||||
|
@ -168,7 +168,7 @@ define(['lib/layer/base'], function(){
|
|||
title: '0行 x 0列',
|
||||
fixed: true,
|
||||
shadeClose: true,
|
||||
offset: [offset.top + 37 - document.documentElement.scrollTop, 'auto', 'auto', offset.left - document.documentElement.scrollLeft],
|
||||
offset: [offset.top + 37 - ME.doc.scrollTop(), 'auto', 'auto', offset.left - ME.doc.scrollLeft()],
|
||||
matrix: objArr(10).map(function(){return objArr(10)}),
|
||||
content: '<ul class="do-meditor-table">'
|
||||
+ '<li :repeat="matrix"><span :repeat-o="el" :class="{active: o.v}" :data="{x: $index, y: $outer.$index}"></span></li>'
|
||||
|
@ -239,7 +239,7 @@ define(['lib/layer/base'], function(){
|
|||
ME.insert(vm.$editor, val, false)
|
||||
layer.close(layid)
|
||||
},
|
||||
offset: [offset.top + 37 - document.documentElement.scrollTop, 'auto', 'auto', offset.left - document.documentElement.scrollLeft],
|
||||
offset: [offset.top + 37 - ME.doc.scrollTop(), 'auto', 'auto', offset.left - ME.doc.scrollLeft()],
|
||||
content: '<div class="do-meditor-common meditor-font">'
|
||||
+ '<section><span class="label">图片描述</span>'
|
||||
+ '<input class="input" :duplex="imgAlt" />'
|
||||
|
@ -340,7 +340,7 @@ define(['lib/layer/base'], function(){
|
|||
layer.open({
|
||||
type: 7,
|
||||
title: '关于编辑器',
|
||||
offset: [offset.top + 37 - document.documentElement.scrollTop],
|
||||
offset: [offset.top + 37 - ME.doc.scrollTop()],
|
||||
content: '<div class="do-meditor-about meditor-font">'
|
||||
+ '<pre>'
|
||||
+ ' __ __ _____ _ _ _\n'
|
||||
|
|
|
@ -152,7 +152,8 @@ define([
|
|||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
},
|
||||
doc: yua(document)
|
||||
}
|
||||
//获取真实的引用路径,避免因为不同的目录结构导致加载失败的情况
|
||||
for(var i in yua.modules){
|
||||
|
|
Reference in New Issue