parent
ab32fb611e
commit
e8b9969f48
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "anot",
|
"name": "anot",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Anot - 迷你mvvm框架",
|
"description": "Anot - 迷你mvvm框架",
|
||||||
"main": "dist/anot.js",
|
"main": "dist/anot.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//类名定义, :class="xx:yy" :class="{xx: yy}" :class="xx" :class="{{xx}}"
|
//类名定义, :class="xx:yy" :class="{xx: yy}" :class="xx" :class="{{xx}}"
|
||||||
Anot.directive('class', {
|
Anot.directive('class', {
|
||||||
init: function(binding) {
|
init: function(binding) {
|
||||||
|
binding.expr = binding.expr.replace(/\n/g, ' ').replace(/\s{2,}/g, ' ')
|
||||||
var expr = []
|
var expr = []
|
||||||
if (!/^\{.*\}$/.test(binding.expr)) {
|
if (!/^\{.*\}$/.test(binding.expr)) {
|
||||||
expr = binding.expr.split(':')
|
expr = binding.expr.split(':')
|
||||||
|
|
Reference in New Issue