This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

reset样式增加默认字体;修复drag插件的回调事件

old
宇天 2018-07-30 12:59:06 +08:00
parent 51b59a728b
commit 6488a2ea35
7 changed files with 16 additions and 15 deletions

View File

@ -40,7 +40,9 @@ a:focus,input,textarea,button:focus,input:focus,textarea:focus {outline:none;}
::-moz-focus-inner { ::-moz-focus-inner {
border:none;outline:none; border:none;outline:none;
} }
[anot],[\:if] {visibility:hidden;} body {font-family:"Avenir Next", Helvetica, Arial,"WenQuanYi Micro Hei","PingFang SC","Hiragino Sans GB","Segoe UI", "Microsoft Yahei", sans-serif;-webkit-font-smoothing: antialiased;text-size-adjust: 100%;-webkit-tap-highlight-color: transparent;}
code,pre,samp {font-family:Menlo,Monaco,Consolas,"Courier New",monospace;}
[anot],[\:repeat],[\:if] {visibility:hidden;}
.do-fn-cl { *zoom: 1; } .do-fn-cl { *zoom: 1; }
.do-fn-cl::after { content: "."; display: block; height: 0; clear: both; visibility: hidden; overflow:hidden;} .do-fn-cl::after { content: "."; display: block; height: 0; clear: both; visibility: hidden; overflow:hidden;}

View File

@ -143,7 +143,7 @@ Anot.directive('drag', {
//拖拽前回调 //拖拽前回调
if (_this.beforedrag) { if (_this.beforedrag) {
let result = _this.beforedrag.call( let result = _this.beforedrag.call(
_this.vmodels, _this.vmodels[0],
target, target,
ox + dx, ox + dx,
oy + dy oy + dy
@ -224,7 +224,7 @@ Anot.directive('drag', {
//拖拽过程的回调 //拖拽过程的回调
if (_this.dragging) { if (_this.dragging) {
_this.dragging.call(_this.vmodels, target, fox, foy) _this.dragging.call(_this.vmodels[0], target, fox, foy)
} }
}) })
let upfn = $doc.bind('mouseup', function(ev) { let upfn = $doc.bind('mouseup', function(ev) {
@ -234,7 +234,7 @@ Anot.directive('drag', {
target.style.transitionDuration = cssTransition target.style.transitionDuration = cssTransition
//结束回调 //结束回调
if (_this.dragged) { if (_this.dragged) {
_this.dragged.call(_this.vmodels, target, fox, foy) _this.dragged.call(_this.vmodels[0], target, fox, foy)
} }
}) })
}) })

View File

@ -55,12 +55,12 @@
} }
} }
table {width:100%; table {width:100%;
thead tr {height:45px;line-height:45px;background:#f7f7f7} thead tr {height:45px;line-height:45px;background:nth($cp, 1)}
thead th {padding:0 8px;border:0;} thead th {padding:0 8px;border:0;}
tbody tr {height:43px;line-height:42px;@include ts(all, .3s); tbody tr {height:43px;line-height:42px;@include ts(all, .3s);
&:hover {background:#ecf6fd} &:hover {background:#ecf6fd}
} }
tbody td {padding:0 8px;border-bottom:1px solid #e9e9e9} tbody td {padding:0 8px;border-bottom:1px solid nth($cp, 2)}
} }
hr {margin:30px 0;border-bottom:0;} hr {margin:30px 0;border-bottom:0;}

View File

@ -74,7 +74,7 @@ const fixCont = function(vm, tool) {
limit = (vm.props.uploadSizeLimit / (1024 * 1024)).toFixed(2) limit = (vm.props.uploadSizeLimit / (1024 * 1024)).toFixed(2)
} }
return ` return `
<dl class="do-meditor-attach do-meditor__font"> <dl class="do-meditor-attach">
<dt class="tab-box" :drag="do-layer" data-limit="window"> <dt class="tab-box" :drag="do-layer" data-limit="window">
<span class="item" :class="active:tab === 1" :click="switchTab(1)"> <span class="item" :class="active:tab === 1" :click="switchTab(1)">
${LANG[tool][0]} ${LANG[tool][0]}

View File

@ -49,7 +49,7 @@ const addon = {
left: offset.left - $doc.scrollLeft() left: offset.left - $doc.scrollLeft()
}, },
content: ` content: `
<ul class="do-meditor-h1 do-fn-noselect do-meditor__font"> <ul class="do-meditor-h1 do-fn-noselect">
<li :click="insert(1)" class="h1"><i class="do-meditor__icon icon-h1"></i></li> <li :click="insert(1)" class="h1"><i class="do-meditor__icon icon-h1"></i></li>
<li :click="insert(2)" class="h2"><i class="do-meditor__icon icon-h2"></i></li> <li :click="insert(2)" class="h2"><i class="do-meditor__icon icon-h2"></i></li>
<li :click="insert(3)" class="h3"><i class="do-meditor__icon icon-h3"></i></li> <li :click="insert(3)" class="h3"><i class="do-meditor__icon icon-h3"></i></li>
@ -140,7 +140,7 @@ const addon = {
left: offset.left - $doc.scrollLeft() left: offset.left - $doc.scrollLeft()
}, },
content: ` content: `
<div class="do-meditor-common do-meditor__font"> <div class="do-meditor-common">
<section> <section>
<input class="txt" :duplex="linkName" placeholder="链接文字"/> <input class="txt" :duplex="linkName" placeholder="链接文字"/>
</section> </section>
@ -360,7 +360,7 @@ const addon = {
left: offset.left - $doc.scrollLeft() left: offset.left - $doc.scrollLeft()
}, },
content: ` content: `
<div class="do-meditor-common do-meditor__font"> <div class="do-meditor-common">
<section> <section>
<input class="txt" :duplex="imgAlt" placeholder="图片描述"/> <input class="txt" :duplex="imgAlt" placeholder="图片描述"/>
</section> </section>
@ -438,7 +438,7 @@ const addon = {
this.close() this.close()
}, },
content: ` content: `
<div class="do-meditor-codeblock do-meditor__font"> <div class="do-meditor-codeblock">
<section class="do-fn-cl"> <section class="do-fn-cl">
<span class="label">语言类型</span> <span class="label">语言类型</span>
<select :duplex="lang"> <select :duplex="lang">
@ -485,7 +485,7 @@ const addon = {
offset: [offset.top + 37 - $doc.scrollTop()], offset: [offset.top + 37 - $doc.scrollTop()],
shift: { top: offset.top - $doc.scrollTop() }, shift: { top: offset.top - $doc.scrollTop() },
content: content:
'<div class="do-meditor-about do-meditor__font">' + '<div class="do-meditor-about">' +
'<pre>' + '<pre>' +
' __ __ _____ _ _ _\n' + ' __ __ _____ _ _ _\n' +
'| \\/ | ____|__| (_) |_ ___ _ __\n' + '| \\/ | ____|__| (_) |_ ___ _ __\n' +

View File

@ -270,7 +270,6 @@ class MEObject {
Anot.component('meditor', { Anot.component('meditor', {
__init__: function(props, state, next) { __init__: function(props, state, next) {
this.classList.add('do-meditor') this.classList.add('do-meditor')
this.classList.add('do-meditor__font')
this.setAttribute(':css', '{height: height}') this.setAttribute(':css', '{height: height}')
this.setAttribute( this.setAttribute(

View File

@ -12,7 +12,7 @@
.do-ui-blockcode {position: relative;margin: 15px 0;padding: 8px 0;line-height: 1.5;border-radius:3px;background: nth($cp, 1); .do-ui-blockcode {position: relative;margin: 15px 0;padding: 8px 0;line-height: 1.5;border-radius:3px;background: nth($cp, 1);
/*语法高亮*/ /*语法高亮*/
.lang {position: relative;display: block;padding: 0 8px;color: #383a42;word-wrap: break-word;white-space: pre-wrap;font-family: Courier; .lang {position: relative;display: block;padding: 0 8px;color: #383a42;word-wrap: break-word;white-space: pre-wrap;
.c-comment{color: #8e908c;font-style:italic;} .c-comment{color: #8e908c;font-style:italic;}
.c-smartyx {color: #607d8b;} .c-smartyx {color: #607d8b;}
@ -46,4 +46,4 @@
} }
} }
/*行内代码*/ /*行内代码*/
.do-ui-inlinecode {display:inline-block;margin:0 2px;padding:0 5px;line-height: 1.5;color:#d14;background: nth($cp, 1);border-radius:3px;font-family: "Courier New";} .do-ui-inlinecode {display:inline-block;margin:0 2px;padding:0 5px;line-height: 1.5;color:#d14;background: nth($cp, 1);border-radius:3px;}