@makano/rew 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
package/lib/rew/const/opt.js
CHANGED
@@ -185,7 +185,7 @@ function compileRewStuff(content, options) {
|
|
185
185
|
|
186
186
|
const cpl = (module.exports.compile = function (file, options = {}) {
|
187
187
|
let c = compile(compileRewStuff(file.content, options), { ...options, filename: file.path, bare: false, inlineMap: false });
|
188
|
-
if(options.jsx) {
|
188
|
+
if(execOptions.jsx || options.jsx) {
|
189
189
|
c = babel.transformSync(c, {
|
190
190
|
presets: [[babelReact, { pragma: execOptions.jsxPragma }]],
|
191
191
|
plugins: []
|
@@ -96,17 +96,20 @@ module.exports.uiClasses = (context, options, send, recieve, hook, rmHook) => {
|
|
96
96
|
}
|
97
97
|
|
98
98
|
data(key, value){
|
99
|
+
if(!value) return this.options.data[key];
|
99
100
|
this.options.data[key] = value;
|
100
101
|
return this.update();
|
101
102
|
}
|
102
103
|
|
103
|
-
attr(attr){
|
104
|
-
this.options.attr = attr;
|
104
|
+
attr(attr, reset = false){
|
105
|
+
if(reset) this.options.attr = attr;
|
106
|
+
else this.options.attr = { ...this.options.attr, ...attr };
|
105
107
|
return this.update();
|
106
108
|
}
|
107
109
|
|
108
|
-
style(style){
|
109
|
-
this.options.style = style;
|
110
|
+
style(style, reset = false){
|
111
|
+
if(reset) this.options.style = style;
|
112
|
+
else this.options.style = { ...this.options.style, ...style };
|
110
113
|
return this.update();
|
111
114
|
}
|
112
115
|
|