vsn 0.1.65 → 0.1.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/demo.html +9 -2
- package/demo/vsn.js +2 -2
- package/dist/Scope.d.ts +1 -0
- package/dist/Scope.js +8 -4
- package/dist/Scope.js.map +1 -1
- package/dist/vsn.min.js +2 -0
- package/package.json +1 -1
- package/src/Scope.ts +8 -2
package/demo/demo.html
CHANGED
|
@@ -67,8 +67,15 @@
|
|
|
67
67
|
$color = "#ff00ff";
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
func deconstruct() {
|
|
71
|
+
$color = '#000000';
|
|
72
|
+
}
|
|
73
|
+
|
|
70
74
|
on click() {
|
|
71
|
-
|
|
75
|
+
log(@class);
|
|
76
|
+
@class -= 'test-class';
|
|
77
|
+
@class ~ 'huh';
|
|
78
|
+
log(@class);
|
|
72
79
|
}
|
|
73
80
|
}
|
|
74
81
|
</script>
|
|
@@ -99,7 +106,7 @@
|
|
|
99
106
|
|
|
100
107
|
<h2>On Click</h2>
|
|
101
108
|
<div vsn-name="toggle" vsn-set:show|boolean="false">
|
|
102
|
-
<button class="test-class" vsn-on:click="toggle.show = !toggle.show">Toggle</button>
|
|
109
|
+
<button class="test-class" vsn-on:click="toggle.show = !toggle.show" vsn-exec="on click() {@class -= 'test-class';log('uh', @class);}">Toggle</button>
|
|
103
110
|
<span vsn-bind="toggle.show"></span>
|
|
104
111
|
</div>
|
|
105
112
|
<a id="click-test" vsn-on:click="if(@text != @clicktext){@text=@clicktext}else{@text='Click Me'}" clicktext="Clicked!">Click Me</a>
|