targetj 1.0.166 → 1.0.167
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/README.md +12 -0
- package/build/BaseModel.js +6 -2
- package/build/TargetUtil.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -166,6 +166,18 @@ App({
|
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
168
|
```
|
|
169
|
+
Or in HTML:
|
|
170
|
+
|
|
171
|
+
```html
|
|
172
|
+
<div tg-users="TargetJS.fetch(this, ['https://targetjs.io/api/randomUser?id=user0', 'https://targetjs.io/api/randomUser?id=user1']);">
|
|
173
|
+
<div
|
|
174
|
+
tg-background="mediumpurple"
|
|
175
|
+
tg-width="[{ list: [100, 250, 100] }, 50, 10]"
|
|
176
|
+
tg-height$="return this.prevTargetValue / 2;"
|
|
177
|
+
tg-html="return this.getParentValueAtMyIndex('users')?.name;">
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
```
|
|
169
181
|
|
|
170
182
|
## Comparison with Other UI Frameworks
|
|
171
183
|
|
package/build/BaseModel.js
CHANGED
|
@@ -277,8 +277,12 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
277
277
|
} else if (domExists && !_TUtil.TUtil.isDefined(this.targets['reuseDomDefinition'])) {
|
|
278
278
|
this.targets['reuseDomDefinition'] = true;
|
|
279
279
|
this.targets['excludeXYCalc'] = true;
|
|
280
|
-
this.targets['
|
|
281
|
-
|
|
280
|
+
if (!this.targets['x']) {
|
|
281
|
+
this.targets['excludeX'] = true;
|
|
282
|
+
}
|
|
283
|
+
if (!this.targets['y']) {
|
|
284
|
+
this.targets['excludeY'] = true;
|
|
285
|
+
}
|
|
282
286
|
this.targets['position'] = 'relative';
|
|
283
287
|
}
|
|
284
288
|
Object.keys(this.targets).forEach(function (key) {
|
package/build/TargetUtil.js
CHANGED
|
@@ -255,7 +255,7 @@ var TargetUtil = exports.TargetUtil = /*#__PURE__*/function () {
|
|
|
255
255
|
}, {
|
|
256
256
|
key: "isFetchTarget",
|
|
257
257
|
value: function isFetchTarget(key, value) {
|
|
258
|
-
return key === 'fetch' && typeof value === 'string';
|
|
258
|
+
return key === 'fetch' && (typeof value === 'string' || Array.isArray(value));
|
|
259
259
|
}
|
|
260
260
|
}, {
|
|
261
261
|
key: "isObjectTarget",
|
package/package.json
CHANGED