simple-boot-front 1.0.71 → 1.0.72
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 +11 -60
- package/package.json +2 -2
package/README.MD
CHANGED
@@ -169,9 +169,9 @@ npm install simple-boot-front
|
|
169
169
|
console.log('poo->', testService)
|
170
170
|
}
|
171
171
|
}
|
172
|
-
|
173
172
|
```
|
174
|
-
|
173
|
+
|
174
|
+
* @After, @Before (AOP)
|
175
175
|
```typescript
|
176
176
|
fire($event: MouseEvent, view: View<Element>) {
|
177
177
|
console.log('fire method')
|
@@ -200,9 +200,10 @@ npm install simple-boot-front
|
|
200
200
|
```typescript
|
201
201
|
click() {
|
202
202
|
intentManager.publish(new Intent('layout://info/data?a=wow&aa=zzz', Math.floor(RandomUtils.random(0, 100))));
|
203
|
-
//
|
204
|
-
//
|
205
|
-
//
|
203
|
+
// const data = new CustomEvent('intent', {detail: {uri: 'index://showStore', data: {id: ${it.ID}}}}); window.dispatchEvent(data);
|
204
|
+
//intentManager(new Intent('layout://info/datas', Math.floor(RandomUtils.random(0, 100))));
|
205
|
+
//intentManager(new Intent('layout://', Math.floor(RandomUtils.random(0, 100)))); // default callback method -> subscribe(i: Intent)
|
206
|
+
//intentManager(new Intent('://info/datas', Math.floor(RandomUtils.random(0, 100))));
|
206
207
|
}
|
207
208
|
```
|
208
209
|
|
@@ -228,73 +229,23 @@ export class AppInfo {
|
|
228
229
|
## Reserved key word
|
229
230
|
* html
|
230
231
|
- attribute
|
231
|
-
- **[router-outlet]**: child module space
|
232
|
-
- **module-event-click**: click event
|
233
|
-
- value: method name, parameter($event, View)
|
234
|
-
```html
|
235
|
-
<button dr-event-click="changeData">change</button>
|
236
|
-
```
|
237
|
-
- **module-event-change**: change event
|
238
|
-
- value: method name, parameter($event, View)
|
239
|
-
```html
|
240
|
-
<input dr-event-change="changeData">
|
241
|
-
```
|
242
|
-
- **module-event-keyup**: keyup event
|
243
|
-
- value: method name, parameter($event, View)
|
244
|
-
```html
|
245
|
-
<input dr-event-keyup="changeData">
|
246
|
-
```
|
247
|
-
- **module-event-keydown**: keydown event
|
248
|
-
- value: method name, parameter($event, View)
|
249
|
-
```html
|
250
|
-
<input dr-event-keydown="changeData">
|
251
|
-
```
|
252
|
-
- **module-event-input**: input event
|
253
|
-
- value: method name, parameter($event, View)
|
254
|
-
```html
|
255
|
-
<input dr-event-input="changeData">
|
256
|
-
```
|
257
|
-
- **module-value-link**: link event (value change <-> input)
|
258
|
-
- value: variable name
|
259
|
-
```html
|
260
|
-
<input dr-value-link="value">
|
261
|
-
```
|
262
|
-
- **module-value**: value injection
|
263
|
-
- value: variable name
|
264
|
-
```html
|
265
|
-
<input dr-value="value">
|
266
|
-
```
|
267
|
-
- **module-change-attr**: change value setAttribute
|
268
|
-
- value: script
|
269
|
-
```html
|
270
|
-
<img src="https://cdn.imweb.me/thumbnail/20190912/460132b4e4fce.jpg" module-change-attr="return {height: this.size, width: this.size}">
|
271
|
-
```
|
272
|
-
- **module-change-style**: change value set Style
|
273
|
-
- value: script
|
274
|
-
```html
|
275
|
-
<div module-change-style="return {fontSize: `${this.size}px`, color: this.randomColor()}">hello</div>
|
276
|
-
```
|
277
232
|
- **router-active-class**: url === href attribute => class add
|
278
233
|
- value: add and remove class name
|
279
234
|
```html
|
280
|
-
<a router-link="ajax" router-active-class="
|
235
|
+
<a router-link="ajax" router-active-class="active">Ajax</a>
|
281
236
|
```
|
282
237
|
- **router-link**:
|
283
238
|
- value: router link
|
284
239
|
```html
|
285
240
|
<a router-link="ajax">Ajax</a>
|
286
241
|
```
|
287
|
-
-
|
242
|
+
- intent
|
288
243
|
```typescript
|
289
|
-
|
244
|
+
showStore(i: Intent) {
|
290
245
|
this.datas = i.data + '->' + i.params.aa
|
291
246
|
}
|
292
|
-
|
293
|
-
|
294
|
-
}
|
295
|
-
```
|
296
|
-
|
297
|
-
|
247
|
+
call -> const data = new CustomEvent('intent', {detail: {uri: 'index://showStore', data: {id: ${it.ID}}}}); window.dispatchEvent(data);
|
248
|
+
```
|
298
249
|
## License
|
299
250
|
* MIT
|
300
251
|
* visualkhh@gmail.com
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "simple-boot-front",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.72",
|
4
4
|
"main": "SimpleApplication.js",
|
5
5
|
"license": "MIT",
|
6
6
|
"description": "front end SPA frameworks",
|
@@ -73,7 +73,7 @@
|
|
73
73
|
"typescript": "^4.3.5"
|
74
74
|
},
|
75
75
|
"dependencies": {
|
76
|
-
"dom-render": "^1.0.
|
76
|
+
"dom-render": "^1.0.33",
|
77
77
|
"reflect-metadata": "^0.1.13",
|
78
78
|
"simple-boot-core": "^1.0.20"
|
79
79
|
}
|