@next2d/view-generator 1.2.0 → 1.3.1
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/index.js +15 -8
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -42,7 +42,7 @@ const createFile = function ()
|
|
|
42
42
|
|
|
43
43
|
for (let idx = 0; idx < keys.length; ++idx) {
|
|
44
44
|
|
|
45
|
-
const names = keys[idx].split(
|
|
45
|
+
const names = keys[idx].split("-");
|
|
46
46
|
|
|
47
47
|
if (names[0].charAt(0) === "@") {
|
|
48
48
|
continue;
|
|
@@ -104,25 +104,32 @@ export class ${name}View extends next2d.fw.View
|
|
|
104
104
|
* @extends {next2d.fw.ViewModel}
|
|
105
105
|
*/
|
|
106
106
|
export class ${name}ViewModel extends next2d.fw.ViewModel
|
|
107
|
-
{
|
|
107
|
+
{
|
|
108
108
|
/**
|
|
109
|
-
* @param
|
|
110
|
-
* @
|
|
109
|
+
* @param {next2d.fw.View} view
|
|
110
|
+
* @return {void}
|
|
111
|
+
* @method
|
|
111
112
|
* @public
|
|
112
113
|
*/
|
|
113
|
-
|
|
114
|
+
unbind (view)
|
|
114
115
|
{
|
|
115
|
-
|
|
116
|
+
console.log(view);
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
/**
|
|
119
120
|
* @param {next2d.fw.View} view
|
|
120
|
-
* @return {Promise
|
|
121
|
+
* @return {Promise}
|
|
122
|
+
* @method
|
|
121
123
|
* @public
|
|
122
124
|
*/
|
|
123
125
|
bind (view)
|
|
124
126
|
{
|
|
125
|
-
return this
|
|
127
|
+
return this
|
|
128
|
+
.factory(view)
|
|
129
|
+
.then((view) =>
|
|
130
|
+
{
|
|
131
|
+
console.log(view);
|
|
132
|
+
});
|
|
126
133
|
}
|
|
127
134
|
}`);
|
|
128
135
|
}
|