@alexgyver/component 1.0.11 → 1.0.13
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/component.js +9 -0
- package/package.json +1 -1
package/component.js
CHANGED
|
@@ -135,4 +135,13 @@ export class Component {
|
|
|
135
135
|
}
|
|
136
136
|
return $el;
|
|
137
137
|
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Создать массив компонентов из массива объектов конфигурации
|
|
141
|
+
* @param {array} arr массив объектов конфигурации
|
|
142
|
+
* @returns {array} of Elements
|
|
143
|
+
*/
|
|
144
|
+
static makeArray(arr) {
|
|
145
|
+
return arr.map(x => Component.make(x.tag, x));
|
|
146
|
+
}
|
|
138
147
|
}
|