diff --git a/src/css/basic-elem.scss b/src/css/basic-elem.scss
index 2f65fe9..ff5546a 100644
--- a/src/css/basic-elem.scss
+++ b/src/css/basic-elem.scss
@@ -10,66 +10,58 @@
/*--------各种按钮---------*/
-.do-ui-button {display:inline-block;padding:0 5px;border:1px solid #ddd;text-align:center;font-size:12px;background:none;cursor:pointer;@include ts;
+.do-ui-button {display:inline-block;padding:2px 5px;border:1px solid #ddd;text-align:center;font-size:12px;background:none;cursor:pointer;@include ts;
- &.medium {min-width:100px;height:35px;padding:0 8px;line-height:35px;font-size:15px}
- &.large {min-width:150px;height:50px;padding:0 13px;line-height:50px;font-size:18px;}
- &.radius-3 {border-radius:3px;}
- &.radius-5 {border-radius:5px;}
+ &.medium {min-width:100px;height:35px;padding:0 8px;line-height:35px;font-size:15px}
+ &.large {min-width:150px;height:50px;padding:0 13px;line-height:50px;font-size:18px;}
+ &.radius-3 {border-radius:3px;
+ [class^="do-icon-"], [class*=" do-icon-"] {border-radius:3px}
+ }
+ &.radius-5 {border-radius:5px;
+ [class^="do-icon-"], [class*=" do-icon-"] {border-radius:3px}
+ }
+
+ &.teal {border:0;background:nth($ct, 1);color:#fff;}
+ &.teal:hover {background:nth($ct, 2);}
+ &.teal:active {background:nth($ct, 3);}
+ &.green {border:0;background:nth($cg, 1);color:#fff;}
+ &.green:hover {background:nth($cg, 2);}
+ &.green:active {background:nth($cg, 3);}
+ &.blue {border:0;background:nth($cb, 1);color:#fff;}
+ &.blue:hover {background:nth($cb, 2);}
+ &.blue:active {background:nth($cb, 3);}
+ &.purple {border:0;background:nth($cpp, 1);color:#fff;}
+ &.purple:hover {background:nth($cpp, 2);}
+ &.purple:active {background:nth($cpp, 3);}
+ &.red {border:0;background:nth($cr, 1);color:#fff;}
+ &.red:hover {background:nth($cr, 2);}
+ &.red:active {background:nth($cr, 3);}
+ &.orange {border:0;background:nth($co, 1);color:#fff;}
+ &.orange:hover {background:nth($co, 2);}
+ &.orange:active {background:nth($co, 3);}
+ &.plain {border:0;background:nth($cp, 1);color:nth($cgr, 1);}
+ &.plain:hover {background:nth($cp, 2);}
+ &.plain:active {background:nth($cp, 3);}
+ &.grey {border:0;background:nth($cgr, 1);color:#fff;}
+ &.grey:hover {background:nth($cgr, 2);}
+ &.grey:active {background:nth($cgr, 3);}
+
+ &.disabled {border-color:nth($cp, 1);color:nth($cp, 3);cursor:not-allowed;}
- &.teal {border:0;background:nth($ct, 1);color:#fff;}
- &.teal:hover {background:nth($ct, 2);}
- &.teal:active {background:nth($ct, 3);}
- &.green {border:0;background:nth($cg, 1);color:#fff;}
- &.green:hover {background:nth($cg, 2);}
- &.green:active {background:nth($cg, 3);}
- &.blue {border:0;background:nth($cb, 1);color:#fff;}
- &.blue:hover {background:nth($cb, 2);}
- &.blue:active {background:nth($cb, 3);}
- &.purple {border:0;background:nth($cpp, 1);color:#fff;}
- &.purple:hover {background:nth($cpp, 2);}
- &.purple:active {background:nth($cpp, 3);}
- &.red {border:0;background:nth($cr, 1);color:#fff;}
- &.red:hover {background:nth($cr, 2);}
- &.red:active {background:nth($cr, 3);}
- &.orange {border:0;background:nth($co, 1);color:#fff;}
- &.orange:hover {background:nth($co, 2);}
- &.orange:active {background:nth($co, 3);}
- &.plain {border:0;background:nth($cp, 1);color:nth($cgr, 1);}
- &.plain:hover {background:nth($cp, 2);}
- &.plain:active {background:nth($cp, 3);}
- &.grey {border:0;background:nth($cgr, 1);color:#fff;}
- &.grey:hover {background:nth($cgr, 2);}
- &.grey:active {background:nth($cgr, 3);}
-
- &.disabled {border-color:nth($cp, 1);color:nth($cp, 3);cursor:not-allowed;}
-
- /* 额外样式 */
- &.medium.with-style,
- &.large.with-style {position:relative;padding-right:43px;
-
- &::after {position:absolute;right:0;top:0;width:35px;;text-align:center;background:rgba(0,0,0,.2);font-family:"ui font" !important;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}
+
+
+ /* 额外样式 */
+ &.medium.with-icon,
+ &.large.with-icon {position:relative;padding-left:43px;
+ [class^="do-icon-"], [class*=" do-icon-"] {
+ position:absolute;left:0;top:0;width:35px;font-size:25px;background:rgba(0,0,0,.1);
}
- &.large.with-style {padding-right:58px;
- &::after {width:50px;}
+ }
+ &.large.with-icon {padding-left:58px;
+ [class^="do-icon-"], [class*=" do-icon-"] {
+ width:50px;font-size:35px;
}
-
- &.icon-del::after {content:"\e6f0"}
- &.icon-add::after {content:"\e64c"}
- &.icon-send::after {content:"\e64b"}
- &.icon-confirm::after {content:"\e60f"}
- &.icon-share::after {content:"\e631"}
- &.icon-bad::after {content:"\e8ee"}
- &.icon-good::after {content:"\e62d"}
- &.icon-download::after {content:"\e611"}
- &.icon-upload::after {content:"\e6f7"}
- &.icon-mac::after {content:"\e60a"}
- &.icon-ios::after {content:"\e609"}
- &.icon-windows::after {content:"\e601"}
- &.icon-linux::after {content:"\e602"}
- &.icon-android::after {content:"\e600"}
-
-
+ }
}
diff --git a/src/js/anot.shim.js b/src/js/anot.shim.js
index f39379b..be4ce76 100644
--- a/src/js/anot.shim.js
+++ b/src/js/anot.shim.js
@@ -3365,7 +3365,19 @@
delete elem[attr.value]
} else {
var camelizeName = camelize(name)
- ret[camelizeName] = parseData(attr.value)
+ if (camelizeName.indexOf('@') === 0) {
+ camelizeName = camelizeName.slice(1)
+ var vm = vmodels[0]
+ if (
+ vm &&
+ vm.hasOwnProperty(attr.value) &&
+ typeof vm[attr.value] === 'function'
+ ) {
+ ret[camelizeName] = vm[attr.value].bind(vm)
+ }
+ } else {
+ ret[camelizeName] = parseData(attr.value)
+ }
}
}
}
@@ -4015,6 +4027,10 @@
console.error('设置style样式, 请改用 :css指令')
continue
}
+ // 通过属性设置回调,必须以@符号开头
+ if (typeof obj[i] === 'function' && i.indexOf('@') !== 0) {
+ continue
+ }
if (i === 'href' || i === 'src') {
//处理IE67自动转义的问题
if (!root.hasAttribute) obj[i] = obj[i].replace(/&/g, '&')
@@ -4061,7 +4077,7 @@
if (typeof obj[i] === 'object') {
obj[i] = JSON.stringify(obj[i])
} else if (typeof obj[i] === 'function') {
- k = '__fn__' + camelize(k)
+ k = ronattr + camelize(k.slice(1))
elem[k] = obj[i].bind(vm)
obj[i] = k
}
diff --git a/src/js/marked/index.js b/src/js/marked/index.js
index f00ebbb..eb72476 100644
--- a/src/js/marked/index.js
+++ b/src/js/marked/index.js
@@ -830,7 +830,7 @@ Renderer.prototype.code = function(code, lang, escaped) {
output += '' + codes[idx - 1] + '\n
' //加\n为了避免空行时无法显示
}
- return '
' + output + '' + return '
' + output + '' } Renderer.prototype.blockquote = function(quote) { @@ -931,7 +931,7 @@ Renderer.prototype.em = function(text) { Renderer.prototype.codespan = function(txt) { txt = txt.replace(/&/g, '&') - return '
' + txt + '
'
+ return '' + txt + '
'
}
Renderer.prototype.br = function() {
diff --git a/src/js/marked/theme.scss b/src/js/marked/theme.scss
index b87a677..8468670 100644
--- a/src/js/marked/theme.scss
+++ b/src/js/marked/theme.scss
@@ -5,7 +5,7 @@
* @date 2017-09-29 00:05:45
* @version $Id$
*/
-@import "../../../css/var.scss";
+@import "var.scss";
.do-marked-theme {position:relative;
diff --git a/src/js/meditor/addon/attach.js b/src/js/meditor/addon/attach.js
index 123b7de..d9ffd80 100644
--- a/src/js/meditor/addon/attach.js
+++ b/src/js/meditor/addon/attach.js
@@ -75,7 +75,6 @@ const fixCont = function(vm, tool) {
}
return `