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