-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
64 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Migration to UIFactory v1.0 | ||
|
||
To migrate your component from UIFactory v0.x, make these changes in your component (where applicable): | ||
|
||
1. Replace `<template component="...">` with `<template $name="...">` | ||
2. Replace `<template @render:js="...">` with `<template $render:js="...">` | ||
3. Replace `this` with `this.$contents` | ||
4. Replace `$target` with `this` | ||
5. Replace `this.data` with `this.$data` | ||
6. Rewrite any `<style scoped>` styles without the scoped attribute -- by prefixing all selectors with `component-name` | ||
7. Rewrite properties specified as `<script type="application/json">` as attributes. | ||
For example: | ||
```html | ||
<template component="..."> | ||
<script type="application/json"> | ||
{ "properties": [ { "name": "list", "type": "array", "value": [] } ] } | ||
</script> | ||
</template> | ||
``` | ||
should be written as: | ||
```html | ||
<template $name="..." list:array="[]"> | ||
</template> | ||
``` | ||
8. Rewrite the `properties` in `uifactory.register({properties})` as a dict, not list. | ||
For example: | ||
```js | ||
uifactory.register({ | ||
properties: [ | ||
{ "name": "list", "type": "array", "value": [] } | ||
] | ||
}) | ||
``` | ||
should be written as: | ||
```js | ||
uifactory.register({ | ||
properties: { | ||
"list": { "type": "array", "value": [] } | ||
} | ||
}) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters