@syncfusion/ej2-vue-base 19.3.43 → 19.3.47

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.
@@ -1,406 +0,0 @@
1
- /**
2
- * Vue Component Base
3
- */
4
-
5
- import { isNullOrUndefined, extend, getValue } from '@syncfusion/ej2-base';
6
-
7
- import * as Vue3 from 'vue-class-component';
8
- import * as Vue2 from 'vue';
9
- import Vue from 'vue';
10
-
11
- export const aVue = _interopRequireWildcard(Vue2);
12
- export function _interopRequireWildcard(obj: any) {
13
- if (obj && obj.__esModule) {
14
- return obj;
15
- } else {
16
- let newObj: any = {};
17
- if (obj != null) {
18
- for (let key in obj) {
19
- if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
20
- }
21
- }
22
- newObj.default = obj;
23
- return newObj;
24
- }
25
- }
26
-
27
- export const allVue: any = aVue;
28
- export const gh: any = allVue.h;
29
- export const isExecute: any = gh ? false : true;
30
-
31
- let vueImport: any;
32
-
33
- if (!isExecute || parseInt(allVue.version) < 3) {
34
- vueImport = (Vue3 as any).Vue;
35
- } else {
36
- vueImport = Vue;
37
- }
38
-
39
- export class ComponentBase extends vueImport {
40
-
41
- // tslint:disable:no-any
42
- protected ej2Instances: any;
43
- protected tagMapper: any;
44
- protected tagNameMapper: any;
45
- protected hasInjectedModules: boolean = false;
46
- protected hasChildDirective: boolean = false;
47
- protected childDirObjects: string = '';
48
- protected propKeys: any;
49
-
50
- constructor() {
51
- super(arguments);
52
- }
53
-
54
- public created(): void {
55
- if (!this.propKeys) {
56
- return
57
- }
58
- for (let prop of this.propKeys) {
59
- this.ej2Instances.addEventListener(prop, (args: object) => {
60
- this.$emit(prop, args);
61
- });
62
- }
63
- let injectables: any = getValue('$root.$options.provide', this);
64
- if (this.hasInjectedModules && !isExecute && injectables) {
65
- let prevModule: Object[] = injectables[this.ej2Instances.getModuleName()] || [];
66
- let curModule: Object[] = this.ej2Instances.getInjectedModules() || [];
67
- for (let mod of curModule) {
68
- if (prevModule.indexOf(mod) === -1) {
69
- prevModule.push(mod);
70
- }
71
- }
72
- this.ej2Instances.injectedModules = prevModule;
73
- }
74
- }
75
-
76
- public mounted(): void {
77
- this.ej2Instances.isVue = true;
78
- this.ej2Instances.isVue3 = this.isVue3;
79
- this.ej2Instances.vueInstance = this;
80
- if (this.isVue3) {
81
- this.ej2Instances.ej2Instances = this.ej2Instances;
82
- this.ej2Instances.referModels = this.models;
83
- }
84
- this.ej2Instances.appendTo(this.$el);
85
- }
86
- public getInjectedServices(): Object[] {
87
- let ret = [];
88
- let provide: any = getValue('$vnode.context.$options.provide', this);
89
- if (provide) {
90
- // tslint:disable:no-any
91
- let injectables: any = provide;
92
- if (typeof provide === 'function') {
93
- // tslint:disable:no-any
94
- injectables = (this.$vnode.context.$options.provide as any)();
95
- }
96
- ret = injectables[this.ej2Instances.getModuleName()] || [];
97
- }
98
- return ret;
99
- }
100
- public updated(): void {
101
- if (this.hasChildDirective) {
102
- let childKey: Object = {};
103
- this.fetchChildPropValues(childKey);
104
- let curChildDir: string = JSON.stringify(childKey);
105
- if (this.childDirObjects !== curChildDir) {
106
- this.childDirObjects = curChildDir;
107
- this.assignValueToWrapper(childKey, false);
108
- }
109
- }
110
- }
111
-
112
- public beforeDestroy(): void {
113
- let tempBeforeDestroyThis: any = this;
114
- tempBeforeDestroyThis.ej2Instances.destroy();
115
- (tempBeforeDestroyThis.$el as any).style.visibility = 'hidden';
116
- tempBeforeDestroyThis = null;
117
- }
118
-
119
- public bindProperties(): void {
120
- let options: Object = {};
121
- for (let prop of this.propKeys) {
122
- if ((!isNullOrUndefined(this[prop]) && !this.isVue3) || (this[0] && !isNullOrUndefined(this[0][0]) && !isNullOrUndefined(this[0][0][prop]))) {
123
- options[prop] = !this.isVue3 ? this[prop] : this[0][0][prop];
124
- }
125
- }
126
- if (this.hasChildDirective) {
127
- this.fetchChildPropValues(options);
128
- }
129
- if (this.hasInjectedModules) {
130
-
131
- let prevModule: Object[] = this.getInjectedServices() || [];
132
- let curModule: Object[] = this.ej2Instances.getInjectedModules() || [];
133
- for (let mod of curModule) {
134
- if (prevModule.indexOf(mod) === -1) {
135
- prevModule.push(mod);
136
- }
137
- }
138
- this.ej2Instances.injectedModules = prevModule;
139
- }
140
- this.assignValueToWrapper(options);
141
- }
142
-
143
- public assignValueToWrapper(option: Object, silent?: boolean): void {
144
- this.ej2Instances.setProperties(extend({}, {}, option, true), isNullOrUndefined(silent as any) ? true : silent);
145
- }
146
-
147
- public fetchChildPropValues(childOption: Object): void {
148
- let dirProps: Object = {};
149
- if(!this.isVue3) {
150
- dirProps = this.getDirectiveValues( this.$slots.default, this.tagMapper || {}, this.tagNameMapper || {});
151
- } else {
152
- if (this[0] && this[0][1].slots.default) {
153
- let propRef: any = this[0][1].slots.default();
154
- for (let i: number = 0; i < propRef.length; i++) {
155
- if (propRef[i].type.methods) {
156
- let key: string = propRef[i].type.methods.getTag().replace("e-", "");
157
- let ref: any = this.resolveArrayDirectives(propRef[i].children,key);
158
- let splitKeys: any = key.split('-');
159
- let controlName: string = this.ej2Instances.getModuleName().toLowerCase();
160
- let keyRef: string = (splitKeys.length > 1 && controlName.indexOf(splitKeys[0])>-1) ? splitKeys[1]: splitKeys[0];
161
- keyRef = keyRef.replace(controlName,'');
162
- if (controlName == "splitter" && keyRef == "panes") {
163
- keyRef = "paneSettings"
164
- } else if (controlName == "bulletchart" && keyRef == "range") {
165
- keyRef = "ranges";
166
- }
167
- dirProps[keyRef] = ref[key];
168
- }
169
-
170
- }
171
- } else {
172
- return;
173
- }
174
- }
175
- if (!this.childDirObjects) {
176
- this.childDirObjects = JSON.stringify(dirProps);
177
- }
178
- for (let dirProp of Object.keys(dirProps)) {
179
- childOption[dirProp] = dirProps[dirProp];
180
- }
181
- }
182
-
183
- public resolveArrayDirectives(slots: any, tagName: any) {
184
- let slot: any = [];
185
- let innerDirValues: any;
186
- slot = slots.default ? slots.default() : slots;
187
- let items: any = {};
188
- items[tagName] = [];
189
- for (const childSlot of slot) {
190
- let tempObj: any = {};
191
- let tagRef: any = childSlot.type.methods ? childSlot.type.methods.getTag() : tagName;
192
- if (childSlot.children) {
193
- let key: string;
194
- innerDirValues = this.resolveComplexDirs(childSlot.children, this.tagMapper["e-" + tagName], tagRef);
195
- if (innerDirValues.length) {
196
- tempObj = innerDirValues;
197
- } else {
198
- for(var i=0;i< Object.keys(innerDirValues).length;i++){
199
- key = Object.keys(innerDirValues)[i];
200
- tempObj[key] = innerDirValues[key];
201
- };
202
- }
203
- }
204
- if (childSlot.props) {
205
- Object.keys(childSlot.props).forEach((key) => {
206
- tempObj[key] = childSlot.props[key];
207
- });
208
- }
209
- if ((/[s]\b/).test(tagRef) && innerDirValues) {
210
- if (!(/[s]\b/).test(tagName) || innerDirValues.length) {
211
- items[tagName] = tempObj;
212
- } else {
213
- items[tagName].push(tempObj);
214
- }
215
- } else {
216
- items[tagName].push(tempObj);
217
- }
218
- }
219
- return items;
220
- }
221
-
222
- public resolveComplexDirs(slots: any, tagObject: any, tagName: string) {
223
- let slot: any = [];
224
- let innerDirValues: any;
225
- slot = slots.default ? slots.default() : slots;
226
- let items: any = {};
227
- for (const childSlot of slot) {
228
- let tagRef: any;
229
- let tag: any;
230
- if (tagObject[tagName]) {
231
- tagRef= Object.keys(tagObject[tagName]);
232
- tag= tagRef.find(
233
- (key: any) =>
234
- tagObject[tagName][key] ===
235
- childSlot.type.methods.getTag().replace(/[s]\b/, "")
236
- );
237
- tag = tag
238
- ? tag.replace("e-", "")
239
- : childSlot.type.methods.getTag().replace("e-", "");
240
- if (this.ej2Instances.getModuleName().toLowerCase() == "diagram" && tag.indexOf('annotations') !=-1) {
241
- tag = 'annotations';
242
- }
243
- }
244
- if (childSlot.children) {
245
- innerDirValues = this.resolveComplexInnerDirs(childSlot.children, tagObject[tagName], childSlot.type.methods.getTag());
246
- if (!items[tag]) {
247
- items[tag] = [];
248
- }
249
- if (innerDirValues.length >1) {
250
- items[tag] = innerDirValues;
251
- } else {
252
- items[tag].push(innerDirValues);
253
- }
254
- }
255
- if (slot.length > 1) {
256
- items = Object.keys(items).length == 0 && !items.length ? [] : items;
257
- if (childSlot.props) { items.push(childSlot.props); }
258
- }
259
- else {
260
- items = childSlot.props ? (<any>Object).assign(items, childSlot.props) : items;
261
- }
262
- }
263
- return items;
264
- }
265
-
266
- public resolveComplexInnerDirs(slots: any, tagObject: any, tagName: string) {
267
- let slot: any = [];
268
- let innerDirValues: any;
269
- slot = slots.default ? slots.default() : slots;
270
- let items: any = slot.length > 1 ? [] : {};
271
- for (const childSlot of slot) {
272
- let tag: string = childSlot.type.methods.getTag().replace("e-", "");
273
- if (childSlot.children) {
274
- innerDirValues = this.resolveMultilevelComplexInnerDirs(childSlot.children, tagObject[tagName], childSlot.type.methods.getTag());
275
- if ((/[s]\b/).test(tag) || slot.length > 1) {
276
- if ((/[s]\b/).test(tag)) {
277
- items[tag] = !items[tag] ? [] : items[tag];
278
- if (innerDirValues.length) {
279
- items[tag] = innerDirValues;
280
- } else {items[tag].push(innerDirValues);}
281
- } else if (innerDirValues) {
282
- items.push(innerDirValues)
283
- }
284
- } else {
285
- items = innerDirValues ? innerDirValues : items;
286
- }
287
- }
288
-
289
- if (slot.length > 1 && childSlot.props) {
290
- if (items.length >= 0) {
291
- items.push(childSlot.props);
292
- } else {
293
- items = childSlot.props ? (<any>Object).assign(items, childSlot.props) : items;
294
- }
295
- } else {
296
- items = childSlot.props ? (<any>Object).assign(items, childSlot.props) : items;
297
- }
298
- }
299
- return items;
300
- }
301
-
302
- public resolveMultilevelComplexInnerDirs(slots: any, tagObject: any, tagName: string) {
303
- let slot: any = [];
304
- let innerDirValues: any;
305
- slot = slots.default ? slots.default() : slots;
306
- let items: any = slot.length > 1 ? [] : {};
307
- for (const childSlot of slot) {
308
- let tag: string = childSlot.type.methods.getTag().replace("e-", "");
309
- if (childSlot.children) {
310
- innerDirValues = this.resolveComplexInnerDirs(childSlot.children, tagObject[tagName], childSlot.type.methods.getTag());
311
- }
312
- if((/[s]\b/).test(tag)) {
313
- items[tag] = !items[tag] ? [] : items[tag];
314
- if(innerDirValues.length) {
315
- items[tag] = innerDirValues;
316
- } else { items[tag].push(innerDirValues); }
317
- if (childSlot.props) {items[tag].push(childSlot.props);}
318
- } else {
319
- items = innerDirValues;
320
- items = childSlot.props ? (<any>Object).assign(items, childSlot.props) : items;
321
- }
322
- }
323
- return items;
324
- }
325
-
326
- public getDirectiveValues(tagDirectives: any, tagMapper: { [key: string]: Object }, tagNameMapper: Object): Object {
327
- let keyTags: string[] = Object.keys(tagMapper);
328
- let dir: Object = {};
329
- if (tagDirectives) {
330
- for (let tagDirective of tagDirectives) {
331
- if (tagDirective.componentOptions && tagDirective.componentOptions.children && tagDirective.componentOptions.tag) {
332
- let dirTag: string = tagDirective.componentOptions.tag;
333
- if (keyTags.indexOf(dirTag) !== -1) {
334
- let tagName: string = tagNameMapper[dirTag] ? tagNameMapper[dirTag] : dirTag;
335
- dir[tagName.replace('e-', '')] = [];
336
- for (let tagDirChild of tagDirective.componentOptions.children) {
337
- let retObj: Object = this.getVNodeValue(tagDirChild, tagMapper[dirTag], tagNameMapper);
338
- if (Object.keys(retObj).length !== 0) {
339
- dir[tagName.replace('e-', '')].push(retObj);
340
- }
341
- }
342
- }
343
- }
344
- }
345
- }
346
- return dir;
347
- }
348
-
349
- public getMultiLevelDirValue(tagDirectories: any, tagKey: string | Object, tagNameMapper: Object): Object {
350
- let mulObj: Object = {};
351
- for (let tagDir of tagDirectories) {
352
- if (tagDir.componentOptions) {
353
- let key: string = tagDir.componentOptions.tag;
354
- let tagName: string = tagNameMapper[key] ? tagNameMapper[key] : key;
355
- mulObj[tagName.replace('e-', '')] = [];
356
- if (tagDir.componentOptions && tagDir.componentOptions.children) {
357
- for (let tagDirChild of tagDir.componentOptions.children) {
358
- let mulLevObj: Object = this.getVNodeValue(tagDirChild, tagKey[key], tagNameMapper);
359
- if (Object.keys(mulLevObj).length !== 0) {
360
- mulObj[tagName.replace('e-', '')].push(mulLevObj);
361
- }
362
- }
363
- }
364
- }
365
- }
366
- return mulObj;
367
- }
368
-
369
- public getVNodeValue(tagDirective: any, tagKey: string | Object, tagNameMapper: Object): Object {
370
- let ret: Object = {};
371
- if (tagDirective.componentOptions) {
372
- let dirTag: string = tagDirective.componentOptions.tag;
373
- if (typeof tagKey === 'string' && dirTag === tagKey && tagDirective.data) {
374
- ret = tagDirective.data.attrs ? this.getCamelCaseProps(tagDirective.data.attrs) : this.getCamelCaseProps(tagDirective.data);
375
- } else if (typeof tagKey === 'object') {
376
- if (tagDirective.componentOptions.children && (Object.keys(tagKey).indexOf(dirTag) !== -1)) {
377
- ret = this.getMultiLevelDirValue(tagDirective.componentOptions.children, tagKey[dirTag], tagNameMapper);
378
- }
379
- if (tagDirective.data && tagDirective.data.attrs) {
380
- ret = extend(ret, this.getCamelCaseProps(tagDirective.data.attrs));
381
- }
382
- }
383
- }
384
- return ret;
385
- }
386
-
387
- /**
388
- * convert kebab case directive props to camel case
389
- */
390
- public getCamelCaseProps(props: Object): Object {
391
- let retProps: Object = {};
392
- for (let prop of Object.keys(props)) {
393
- retProps[prop.replace(/-[a-z]/g, (e) => {return e[1].toUpperCase()})] = props[prop];
394
- }
395
- return retProps;
396
- }
397
-
398
- public dataBind() {
399
- this.ej2Instances.dataBind();
400
- }
401
-
402
- public setProperties(arg: Object, muteOnChange?: boolean): void {
403
- return this.ej2Instances.setProperties(arg, muteOnChange);
404
- }
405
- }
406
-
@@ -1,148 +0,0 @@
1
- /**
2
- * Vue Component Base
3
- */
4
- import Vue from 'vue';
5
- // import { Base, Component as EJ2Component, isNullOrUndefined } from '@syncfusion/ej2-base';
6
- import { ComponentBase } from './component-base';
7
- export let $internalHooks = [
8
- 'data',
9
- 'beforeCreate',
10
- 'created',
11
- 'beforeMount',
12
- 'mounted',
13
- 'beforeDestroy',
14
- 'destroyed',
15
- 'beforeUpdate',
16
- 'updated',
17
- 'activated',
18
- 'deactivated',
19
- 'render',
20
- 'errorCaptured' // 2.5
21
- ];
22
-
23
- export function getProps(
24
- options: any = {}
25
- ): any {
26
- if (options.props) {
27
- for (let prop of options.props) {
28
- (options.newprops || (options.newprops = {}))[prop] = {
29
-
30
- };
31
- (options.watch || (options.watch = {}))[prop] = function (newVal: Object) { // watch it
32
- this.ej2Instances[prop] = newVal;
33
- if (this.dataBind && (options.name !== 'DateRangePickerComponent')) {
34
- this.dataBind();
35
- }
36
- };
37
- }
38
- }
39
- return [options.newprops, options.watch];
40
- }
41
-
42
- export function EJComponentDecorator(options: any, isExecute?: any): any {
43
- if(!isExecute) {
44
- return;
45
- }
46
- return function (Component: any) {
47
- return EJcomponentFactory(Component, options);
48
- }
49
- }
50
-
51
- export function EJcomponentFactory(
52
- Component: any,
53
- options: any = {}
54
- ): any {
55
- options.name = options.name || (Component as any)._componentTag || (Component as any).name
56
- // prototype props.
57
- const proto = Component.prototype
58
- if (options.props) {
59
- for (let prop of options.props) {
60
- (options.props || (options.props = {}))[prop] = {
61
-
62
- };
63
- (options.watch || (options.watch = {}))[prop] = function (newVal: Object) { // watch it
64
- this.ej2Instances[prop] = newVal;
65
- if (this.dataBind && (options.name !== 'DateRangePickerComponent')) {
66
- this.dataBind();
67
- }
68
- };
69
- }
70
- }
71
- Object.getOwnPropertyNames(proto).forEach(function (key) {
72
- // hooks
73
- if (key === 'constructor') {
74
- return;
75
- }
76
- if ($internalHooks.indexOf(key) > -1) {
77
- options[key] = proto[key]
78
- return
79
- }
80
- const descriptor = Object.getOwnPropertyDescriptor(proto, key)!
81
- if (typeof descriptor.value === 'function') {
82
- // methods
83
- (options.methods || (options.methods = {}))[key] = descriptor.value
84
- } else if (descriptor.get || descriptor.set) {
85
- // computed properties
86
- (options.computed || (options.computed = {}))[key] = {
87
- get: descriptor.get,
88
- set: descriptor.set
89
- }
90
- }
91
- });
92
- Object.getOwnPropertyNames(ComponentBase.prototype).forEach(function (key) {
93
- if ($internalHooks.indexOf(key) > -1) {
94
- options[key] = proto[key]
95
- return
96
- }
97
- });
98
- (options.mixins || (options.mixins = [])).push({
99
- data(this: Vue) {
100
- return collectDataFromConstructor(this, Component)
101
- }
102
- })
103
- // decorate options
104
- const decorators = (Component as any).__decorators__
105
- if (decorators) {
106
- decorators.forEach(Function(options))
107
- delete (Component as any).__decorators__
108
- }
109
-
110
- // find super
111
- const superProto = Object.getPrototypeOf(Component.prototype)
112
- const Super = superProto instanceof Vue
113
- ? superProto.constructor as any
114
- : Vue
115
- const Extended = Super.extend(options)
116
-
117
- return Extended
118
- }
119
-
120
- function collectDataFromConstructor(vm: any, Component: any) {
121
- Component.prototype._init = function () {
122
- var _this = this;
123
- var keys = Object.getOwnPropertyNames(vm);
124
- if (vm.$options.props) {
125
- for (var key in vm.$options.props) {
126
- if (!vm.hasOwnProperty(key)) {
127
- keys.push(key);
128
- }
129
- }
130
- }
131
- keys.forEach(function (key) {
132
- if (key.charAt(0) !== '_') {
133
- Object.defineProperty(_this, key, {
134
- get: function () { return vm[key]; },
135
- set: function (value) { return vm[key] = value; }
136
- });
137
- }
138
- });
139
- };
140
- var data = new Component();
141
- var plainData = {};
142
- Object.keys(data).forEach(function (key) {
143
- if (data[key] !== undefined) {
144
- plainData[key] = data[key];
145
- }
146
- });
147
- return plainData;
148
- }
@@ -1,108 +0,0 @@
1
- import Vue from "vue";
2
- import {
3
- setTemplateEngine,
4
- getTemplateEngine,
5
- getUniqueID,
6
- createElement,
7
- detach,
8
- extend,
9
- getValue,
10
- } from "@syncfusion/ej2-base";
11
-
12
- import { aVue, allVue, gh } from "./component-base";
13
-
14
- // tslint:disable:no-any
15
- let stringCompiler: (
16
- template: string,
17
- helper?: object
18
- ) => (data: Object | JSON) => string = getTemplateEngine();
19
-
20
- export function compile(
21
- templateElement: any,
22
- helper?: Object
23
- ): (data: Object | JSON, component?: any, propName?: any) => Object {
24
- let that = this;
25
- if (typeof templateElement === "string") {
26
- return stringCompiler(templateElement, helper);
27
- } else {
28
- return (data: any, context: any,propName: any): any => {
29
- let pid: string = getUniqueID("templateParentDiv");
30
- let id: string = getUniqueID("templateDiv");
31
- let ele: HTMLElement = createElement("div", {
32
- id: pid,
33
- innerHTML: '<div id="' + id + '"></div>',
34
- });
35
- document.body.appendChild(ele);
36
-
37
- let tempObj: any = templateElement.call(that, {});
38
- let returnEle: any;
39
- if (context) {
40
- if (gh) {
41
- let object: any = tempObj;
42
- let propsData: any = getValue("template.propsData", tempObj);
43
- let dataObj: any = {
44
- data: { data: extend(tempObj.data || {}, data) },
45
- parent: context.vueInstance,
46
- };
47
- if (!object.template) {
48
- object.template = object[Object.keys(object)[0]];
49
- }
50
- let templateCompRef: any;
51
- if(object.template.extends) {
52
- templateCompRef = object.template.extends._context.components.template;
53
- } else {
54
- templateCompRef = object.template._context.components[templateElement.name];
55
- }
56
- let tempRef: any;
57
- if (propsData) {
58
- tempRef = (<any>Object).assign(templateCompRef.data(), propsData);
59
- } else {
60
- tempRef = (<any>Object).assign(templateCompRef.data(), dataObj.data)
61
- }
62
- templateCompRef.data = function () { return tempRef; };
63
- allVue
64
- .createApp(templateCompRef)
65
- .mount("#" + id);
66
- returnEle = ele.childNodes;
67
- detach(ele);
68
- } else {
69
- let templateFunction = tempObj.template;
70
- let propsData: any = getValue("template.propsData", tempObj);
71
- let dataObj: any = {
72
- data: { data: extend(tempObj.data || {}, data) },
73
- parent: context.vueInstance,
74
- };
75
- if (propsData) {
76
- templateFunction = tempObj.template.extends;
77
- dataObj.propsData = propsData;
78
- }
79
- if (typeof templateFunction !== "function") {
80
- templateFunction = Vue.extend(templateFunction);
81
- }
82
- let templateVue: any = new templateFunction(dataObj);
83
- // let templateVue = new Vue(tempObj.template);
84
- // templateVue.$data.data = extend(tempObj.data, data);
85
- templateVue.$mount("#" + id);
86
- returnEle = ele.childNodes;
87
- if (context.vueInstance) {
88
- let templateInstance: any = context.vueInstance.templateCollection;
89
- if (!templateInstance) {
90
- context.vueInstance.templateCollection = {};
91
- templateInstance = context.vueInstance.templateCollection;
92
- }
93
- if (propName) {
94
- if (!templateInstance[propName]) {
95
- templateInstance[propName] = [];
96
- }
97
- templateInstance[propName].push(returnEle[0]);
98
- }
99
- }
100
- detach(ele);
101
- }
102
- }
103
- return returnEle || [];
104
- };
105
- }
106
- }
107
-
108
- setTemplateEngine({ compile: compile as any });