Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
dy committed Apr 13, 2023
1 parent 1dd20e2 commit 61ac97b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions sprae.auto.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,6 @@
}
};
};
primary["with"] = (el, expr, rootState) => {
let evaluate = parseExpr(el, expr, ":with");
const localState = evaluate(rootState);
let state2 = state(localState, rootState);
sprae(el, state2);
};
var _each = Symbol(":each");
primary["each"] = (tpl, expr) => {
let each = parseForExpression(expr);
Expand All @@ -249,7 +243,7 @@
if (!list)
list = [];
else if (typeof list === "number")
list = Array.from({ length: list }, (_, i) => [i, i + 1]);
list = Array.from({ length: list }, (_, i) => [i + 1, i]);
else if (Array.isArray(list))
list = list.map((item, i) => [i + 1, item]);
else if (typeof list === "object")
Expand Down Expand Up @@ -279,6 +273,12 @@
}
};
};
primary["with"] = (el, expr, rootState) => {
let evaluate = parseExpr(el, expr, ":with");
const localState = evaluate(rootState);
let state2 = state(localState, rootState);
sprae(el, state2);
};
primary["ref"] = (el, expr, state2) => {
state2[expr] = el;
};
Expand Down
2 changes: 1 addition & 1 deletion sprae.auto.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 61ac97b

Please sign in to comment.