Comparing version 2.0.50 to 2.0.51
@@ -1763,2 +1763,24 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/* | ||
## objToStyle | ||
```html | ||
<span mc-style="{height: 100, width: 200} | objToStyle"></span> | ||
``` | ||
*/ | ||
exports['objToStyle'] = function(value) { | ||
var autoPx, css, key, val; | ||
autoPx = ['width', 'height', 'left', 'top', 'right', 'bottom']; | ||
css = []; | ||
for (key in value) { | ||
val = value[key]; | ||
if (indexOf.call(autoPx, key) >= 0 && util.isNumber(val)) { | ||
val = val + 'px'; | ||
} | ||
css.push(key + ": " + val); | ||
} | ||
return css.join(';'); | ||
}; | ||
/* | ||
## 添加过滤函数 | ||
@@ -1925,3 +1947,9 @@ | ||
exports['focus'] = function(el, value) { | ||
if (value && true || false) { | ||
return el.focus(); | ||
} | ||
}; | ||
/* | ||
@@ -1928,0 +1956,0 @@ ## mc-* |
{ | ||
"name": "mcoreapp", | ||
"version": "2.0.50", | ||
"version": "2.0.51", | ||
"description": "simple MVVM", | ||
@@ -5,0 +5,0 @@ "main": "dist/mcoreApp.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2532244
48713