@bdsoft/element 1.1.8 → 1.1.11
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/dist/BdElement.js +23111 -0
- package/package.json +2 -1
- package/global/index.ts +0 -6
- package/global/register-properties.ts +0 -10
- package/index.html +0 -13
- package/package-form/core/components/formCreate.js +0 -274
- package/package-form/core/components/fragment.js +0 -12
- package/package-form/core/factory/context.js +0 -257
- package/package-form/core/factory/creator.js +0 -63
- package/package-form/core/factory/maker.js +0 -17
- package/package-form/core/factory/manager.js +0 -79
- package/package-form/core/factory/node.js +0 -85
- package/package-form/core/factory/parser.js +0 -28
- package/package-form/core/frame/api.js +0 -599
- package/package-form/core/frame/attrs.js +0 -12
- package/package-form/core/frame/dataDriver.js +0 -76
- package/package-form/core/frame/fetch.js +0 -119
- package/package-form/core/frame/formCreate.js +0 -274
- package/package-form/core/frame/index.js +0 -760
- package/package-form/core/frame/provider.js +0 -288
- package/package-form/core/frame/util.js +0 -274
- package/package-form/core/handler/context.js +0 -380
- package/package-form/core/handler/effect.js +0 -122
- package/package-form/core/handler/index.js +0 -111
- package/package-form/core/handler/inject.js +0 -145
- package/package-form/core/handler/input.js +0 -197
- package/package-form/core/handler/lifecycle.js +0 -43
- package/package-form/core/handler/loader.js +0 -373
- package/package-form/core/handler/page.js +0 -46
- package/package-form/core/handler/render.js +0 -29
- package/package-form/core/index.js +0 -12
- package/package-form/core/package.json +0 -15
- package/package-form/core/parser/html.js +0 -17
- package/package-form/core/render/cache.js +0 -47
- package/package-form/core/render/index.js +0 -31
- package/package-form/core/render/render.js +0 -393
- package/package-form/element-form/components/checkbox/package.json +0 -17
- package/package-form/element-form/components/checkbox/src/component.jsx +0 -110
- package/package-form/element-form/components/checkbox/src/index.js +0 -3
- package/package-form/element-form/components/frame/package.json +0 -17
- package/package-form/element-form/components/frame/src/IconCircleClose.vue +0 -14
- package/package-form/element-form/components/frame/src/IconDelete.vue +0 -12
- package/package-form/element-form/components/frame/src/IconDocument.vue +0 -12
- package/package-form/element-form/components/frame/src/IconFolderOpened.vue +0 -12
- package/package-form/element-form/components/frame/src/IconView.vue +0 -12
- package/package-form/element-form/components/frame/src/component.jsx +0 -349
- package/package-form/element-form/components/frame/src/index.js +0 -3
- package/package-form/element-form/components/frame/src/style.css +0 -66
- package/package-form/element-form/components/group/package.json +0 -17
- package/package-form/element-form/components/group/src/component.jsx +0 -314
- package/package-form/element-form/components/group/src/index.js +0 -3
- package/package-form/element-form/components/group/src/style.css +0 -125
- package/package-form/element-form/components/index.js +0 -22
- package/package-form/element-form/components/radio/package.json +0 -17
- package/package-form/element-form/components/radio/src/component.jsx +0 -101
- package/package-form/element-form/components/radio/src/index.js +0 -3
- package/package-form/element-form/components/select/package.json +0 -17
- package/package-form/element-form/components/select/src/component.jsx +0 -52
- package/package-form/element-form/components/select/src/index.js +0 -3
- package/package-form/element-form/components/subform/package.json +0 -14
- package/package-form/element-form/components/subform/src/component.jsx +0 -76
- package/package-form/element-form/components/subform/src/index.js +0 -3
- package/package-form/element-form/components/tree/package.json +0 -17
- package/package-form/element-form/components/tree/src/component.jsx +0 -62
- package/package-form/element-form/components/tree/src/index.js +0 -3
- package/package-form/element-form/components/upload/package.json +0 -17
- package/package-form/element-form/components/upload/src/IconUpload.vue +0 -12
- package/package-form/element-form/components/upload/src/component.jsx +0 -129
- package/package-form/element-form/components/upload/src/index.js +0 -3
- package/package-form/element-form/components/upload/src/style.css +0 -11
- package/package-form/element-form/index.js +0 -8
- package/package-form/element-form/package.json +0 -16
- package/package-form/element-form/src/components/icon/IconWarning.vue +0 -12
- package/package-form/element-form/src/components/index.js +0 -22
- package/package-form/element-form/src/core/alias.js +0 -34
- package/package-form/element-form/src/core/api.js +0 -208
- package/package-form/element-form/src/core/config.js +0 -62
- package/package-form/element-form/src/core/index.js +0 -60
- package/package-form/element-form/src/core/maker.js +0 -76
- package/package-form/element-form/src/core/manager.js +0 -315
- package/package-form/element-form/src/core/provider.js +0 -79
- package/package-form/element-form/src/parsers/datePicker.js +0 -31
- package/package-form/element-form/src/parsers/hidden.js +0 -12
- package/package-form/element-form/src/parsers/index.js +0 -17
- package/package-form/element-form/src/parsers/input.js +0 -21
- package/package-form/element-form/src/parsers/row.js +0 -10
- package/package-form/element-form/src/parsers/select.js +0 -15
- package/package-form/element-form/src/parsers/slider.js +0 -21
- package/package-form/element-form/src/parsers/timePicker.js +0 -17
- package/package-form/element-form/src/style/index.css +0 -52
- package/src/App.vue +0 -28
- package/src/assets/css/element.scss +0 -196
- package/src/assets/css/layout.scss +0 -215
- package/src/assets/css/tailwind.scss +0 -67
- package/src/assets/images/banner.gif +0 -0
- package/src/assets/images/banner.png +0 -0
- package/src/assets/images/bg1.svg +0 -22
- package/src/assets/images/bg2.png +0 -0
- package/src/assets/images/ff.png +0 -0
- package/src/assets/images/home-file1.png +0 -0
- package/src/assets/images/ky.png +0 -0
- package/src/assets/images/menu/add.png +0 -0
- package/src/assets/images/menu/del.png +0 -0
- package/src/assets/images/menu/down.png +0 -0
- package/src/assets/images/menu/dr.png +0 -0
- package/src/assets/images/menu/edit.png +0 -0
- package/src/assets/images/menu/kx.png +0 -0
- package/src/assets/images/menu/mb.png +0 -0
- package/src/assets/images/menu/pz.png +0 -0
- package/src/assets/images/menu/save.png +0 -0
- package/src/assets/images/menu/sj.png +0 -0
- package/src/assets/images/menu/sjk.png +0 -0
- package/src/assets/images/menu/up.png +0 -0
- package/src/assets/images/po-i.png +0 -0
- package/src/assets/images/po1-i1.png +0 -0
- package/src/assets/images/po1-i2.png +0 -0
- package/src/assets/images/po1-i3.png +0 -0
- package/src/assets/images/po1-i4.png +0 -0
- package/src/assets/images/po1-i5.png +0 -0
- package/src/assets/images/po1-i6.png +0 -0
- package/src/assets/images/po1-i7.png +0 -0
- package/src/assets/images/po1-i8.png +0 -0
- package/src/assets/images/po2-i1.png +0 -0
- package/src/assets/images/po2-i2.png +0 -0
- package/src/assets/images/po3-i1.png +0 -0
- package/src/assets/images/po4-i1.png +0 -0
- package/src/assets/images/po5-i1.png +0 -0
- package/src/assets/images/po6-i1.png +0 -0
- package/src/assets/images/po6-i2.png +0 -0
- package/src/assets/images/po7-i1.png +0 -0
- package/src/assets/images/tj1.png +0 -0
- package/src/assets/images/tj2.png +0 -0
- package/src/assets/images/tj3.png +0 -0
- package/src/components/3dcloudwords/index.js +0 -346
- package/src/components/3dcloudwords/index.vue +0 -99
- package/src/components/3dcloudwords/readme.md +0 -66
- package/src/components/badge/index.js +0 -167
- package/src/components/badge/index.scss +0 -166
- package/src/components/badge/index.vue +0 -98
- package/src/components/badge/readme.md +0 -18
- package/src/components/basic/Finish.vue +0 -107
- package/src/components/basic/button.vue +0 -19
- package/src/components/basic/readme.md +0 -7
- package/src/components/button/index.vue +0 -48
- package/src/components/button/readme.md +0 -62
- package/src/components/carousel/index.vue +0 -104
- package/src/components/carousel/readme.md +0 -12
- package/src/components/chartconfig/index.vue +0 -141
- package/src/components/chartconfig/readme.md +0 -25
- package/src/components/contextMenu/hookContxtMenu.js +0 -41
- package/src/components/contextMenu/index.vue +0 -245
- package/src/components/contextMenu/readme.md +0 -55
- package/src/components/contextMenu/useElementBounding.js +0 -40
- package/src/components/countup/countUp.js +0 -196
- package/src/components/countup/index.vue +0 -114
- package/src/components/countup/readme.md +0 -9
- package/src/components/empty/assets/build.png +0 -0
- package/src/components/empty/assets/emptybg.gif +0 -0
- package/src/components/empty/assets/emptybg.png +0 -0
- package/src/components/empty/assets/emptybg2.jpg +0 -0
- package/src/components/empty/assets/emptybg3.jpg +0 -0
- package/src/components/empty/assets/wuxiao.png +0 -0
- package/src/components/empty/assets/wuxiao.webp +0 -0
- package/src/components/empty/building.vue +0 -117
- package/src/components/empty/empty.vue +0 -120
- package/src/components/empty/index.js +0 -12
- package/src/components/empty/invalid.vue +0 -56
- package/src/components/error/Error.vue +0 -79
- package/src/components/error/readme.md +0 -20
- package/src/components/form/Form.vue +0 -84
- package/src/components/form/FormItem.vue +0 -143
- package/src/components/form/data.js +0 -52
- package/src/components/form/readme.md +0 -69
- package/src/components/layout/banner.vue +0 -412
- package/src/components/layout/bar.vue +0 -43
- package/src/components/layout/layout1.vue +0 -60
- package/src/components/layout/layout2.vue +0 -134
- package/src/components/layout/layout3.vue +0 -107
- package/src/components/layout/layout4.vue +0 -66
- package/src/components/layout/nav.vue +0 -333
- package/src/components/layout/readme.md +0 -61
- package/src/components/loading/index.vue +0 -122
- package/src/components/loading/readme.md +0 -6
- package/src/components/notice/NoticeList.vue +0 -198
- package/src/components/notice/NoticeListPaging.vue +0 -281
- package/src/components/notice/NoticeView.vue +0 -92
- package/src/components/notice/readme.md +0 -1
- package/src/components/pagination/index.vue +0 -100
- package/src/components/pagination/readme.md +0 -19
- package/src/components/pagination/scroll-to.js +0 -51
- package/src/components/progress/bar.vue +0 -72
- package/src/components/progress/progress.vue +0 -58
- package/src/components/screenfull/index.js +0 -3
- package/src/components/screenfull/index.vue +0 -65
- package/src/components/screenfull/package.json +0 -15
- package/src/components/screenfull/readme.md +0 -6
- package/src/components/statisticalCount/index.vue +0 -80
- package/src/components/statisticalCount/readme.md +0 -21
- package/src/components/username/index.vue +0 -79
- package/src/components/username/readme.md +0 -22
- package/src/components/username//346/225/210/346/236/234/345/233/276.png +0 -0
- package/src/index.js +0 -88
- package/src/utils/index.js +0 -32
- package/src/xm_components/HeadSearch/hook/hookSearch.js +0 -96
- package/src/xm_components/HeadSearch/index.vue +0 -206
- package/src/xm_components/HeadSearch/readme.md +0 -12
- package/src/xm_components/HeadSearch//346/220/234/347/264/242/345/210/227/350/241/250.png +0 -0
- package/src/xm_components/Milestone/index.vue +0 -213
- package/src/xm_components/Milestone/readme.md +0 -15
- package/src/xm_components/MultiStatisticalCard/image.png +0 -0
- package/src/xm_components/MultiStatisticalCard/index.vue +0 -114
- package/src/xm_components/MultiStatisticalCard/readme.md +0 -29
- package/src/xm_components/StatisticalCard/image.png +0 -0
- package/src/xm_components/StatisticalCard/index.vue +0 -196
- package/src/xm_components/StatisticalCard/readme.md +0 -41
- package/src/xm_components/readme.md +0 -1
- package/utils/coms/load.jsx +0 -10
- package/utils/func.js +0 -32
- package/utils/hookDialog.js +0 -38
- package/utils/hookPage.js +0 -49
- package/utils/index.js +0 -5
- package/utils/lib/console.js +0 -39
- package/utils/lib/debounce.js +0 -19
- package/utils/lib/deepextend.js +0 -51
- package/utils/lib/deepset.js +0 -14
- package/utils/lib/extend.js +0 -28
- package/utils/lib/index.js +0 -13
- package/utils/lib/json.js +0 -90
- package/utils/lib/mergeprops.js +0 -62
- package/utils/lib/mitt.js +0 -43
- package/utils/lib/modify.js +0 -8
- package/utils/lib/slot.js +0 -19
- package/utils/lib/toarray.js +0 -5
- package/utils/lib/tocase.js +0 -11
- package/utils/lib/todate.js +0 -10
- package/utils/lib/toline.js +0 -10
- package/utils/lib/tostring.js +0 -7
- package/utils/lib/type.js +0 -45
- package/utils/lib/unique.js +0 -6
- package/utils/message.js +0 -164
- package/utils/package.json +0 -16
- package/utils/type.js +0 -45
- package/vite.config.js +0 -51
|
@@ -1,760 +0,0 @@
|
|
|
1
|
-
import $FormCreate from '../components/formCreate';
|
|
2
|
-
import {computed, createApp, h, nextTick, reactive, ref, watch} from 'vue';
|
|
3
|
-
import makerFactory from '../factory/maker';
|
|
4
|
-
import Handle from '../handler';
|
|
5
|
-
import fetch from './fetch';
|
|
6
|
-
import {creatorFactory, mergeRule} from '..';
|
|
7
|
-
import BaseParser from '../factory/parser';
|
|
8
|
-
import {copyRule, copyRules, deepGet, invoke, mergeGlobal, parseFn, parseJson, setPrototypeOf, toJson} from './util';
|
|
9
|
-
import fragment from '../components/fragment';
|
|
10
|
-
import is, {hasProperty} from '@bdsoft-element/utils/lib/type';
|
|
11
|
-
import toCase from '@bdsoft-element/utils/lib/tocase';
|
|
12
|
-
import extend, {copy} from '@bdsoft-element/utils/lib/extend';
|
|
13
|
-
import {CreateNodeFactory} from '../factory/node';
|
|
14
|
-
import {createManager} from '../factory/manager';
|
|
15
|
-
import {arrayAttrs, keyAttrs, normalAttrs} from './attrs';
|
|
16
|
-
import {appendProto} from '../factory/creator';
|
|
17
|
-
import $provider from './provider';
|
|
18
|
-
import {deepCopy} from '@bdsoft-element/utils/lib/deepextend';
|
|
19
|
-
import Mitt from '@bdsoft-element/utils/lib/mitt';
|
|
20
|
-
import html from '../parser/html';
|
|
21
|
-
import uniqueId from '@bdsoft-element/utils/lib/unique';
|
|
22
|
-
import {cookieDriver, localStorageDriver, sessionStorageDriver} from './dataDriver';
|
|
23
|
-
import debounce from '@bdsoft-element/utils/lib/debounce';
|
|
24
|
-
import deepSet from '@bdsoft-element/utils/lib/deepset';
|
|
25
|
-
|
|
26
|
-
function parseProp(name, id) {
|
|
27
|
-
let prop;
|
|
28
|
-
if (arguments.length === 2) {
|
|
29
|
-
prop = arguments[1];
|
|
30
|
-
id = prop[name];
|
|
31
|
-
} else {
|
|
32
|
-
prop = arguments[2];
|
|
33
|
-
}
|
|
34
|
-
return {id, prop};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function nameProp() {
|
|
38
|
-
return parseProp('name', ...arguments);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function exportAttrs(attrs) {
|
|
42
|
-
const key = attrs.key || [];
|
|
43
|
-
const array = attrs.array || [];
|
|
44
|
-
const normal = attrs.normal || [];
|
|
45
|
-
keyAttrs.push(...key);
|
|
46
|
-
arrayAttrs.push(...array);
|
|
47
|
-
normalAttrs.push(...normal);
|
|
48
|
-
|
|
49
|
-
appendProto([...key, ...array, ...normal]);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
let id = 1;
|
|
53
|
-
const instance = {};
|
|
54
|
-
const defValueTag = Symbol('defValue');
|
|
55
|
-
|
|
56
|
-
//todo 表单嵌套
|
|
57
|
-
export default function FormCreateFactory(config) {
|
|
58
|
-
|
|
59
|
-
const components = {
|
|
60
|
-
[fragment.name]: fragment
|
|
61
|
-
};
|
|
62
|
-
const parsers = {};
|
|
63
|
-
const directives = {};
|
|
64
|
-
const modelFields = {};
|
|
65
|
-
const drivers = {};
|
|
66
|
-
const useApps = [];
|
|
67
|
-
const listener = [];
|
|
68
|
-
const extendApiFn = [
|
|
69
|
-
config.extendApi
|
|
70
|
-
];
|
|
71
|
-
const providers = {
|
|
72
|
-
...$provider
|
|
73
|
-
};
|
|
74
|
-
const maker = makerFactory();
|
|
75
|
-
let globalConfig = {global: {}};
|
|
76
|
-
const loadData = reactive({});
|
|
77
|
-
const CreateNode = CreateNodeFactory();
|
|
78
|
-
const formulas = {};
|
|
79
|
-
const isMobile = config.isMobile === true;
|
|
80
|
-
const prototype = {};
|
|
81
|
-
|
|
82
|
-
exportAttrs(config.attrs || {});
|
|
83
|
-
|
|
84
|
-
function getApi(name) {
|
|
85
|
-
const val = instance[name];
|
|
86
|
-
if (Array.isArray(val)) {
|
|
87
|
-
return val.map(v => {
|
|
88
|
-
return v.api();
|
|
89
|
-
});
|
|
90
|
-
} else if (val) {
|
|
91
|
-
return val.api();
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function useApp(fn) {
|
|
96
|
-
useApps.push(fn);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function directive() {
|
|
100
|
-
const data = nameProp(...arguments);
|
|
101
|
-
if (data.id && data.prop) directives[data.id] = data.prop;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function register() {
|
|
105
|
-
const data = nameProp(...arguments);
|
|
106
|
-
if (data.id && data.prop) providers[data.id] = is.Function(data.prop) ? data.prop : {
|
|
107
|
-
...data.prop,
|
|
108
|
-
name: data.id
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function componentAlias(alias) {
|
|
113
|
-
CreateNode.use(alias);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function parser() {
|
|
117
|
-
const data = nameProp(...arguments);
|
|
118
|
-
if (!data.id || !data.prop) return BaseParser;
|
|
119
|
-
const name = toCase(data.id);
|
|
120
|
-
const parser = data.prop;
|
|
121
|
-
const base = parser.merge === true ? parsers[name] : undefined;
|
|
122
|
-
parsers[name] = setPrototypeOf(parser, base || BaseParser);
|
|
123
|
-
maker[name] = creatorFactory(name);
|
|
124
|
-
parser.maker && extend(maker, parser.maker);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function component(id, component) {
|
|
128
|
-
let name;
|
|
129
|
-
if (is.String(id)) {
|
|
130
|
-
name = id;
|
|
131
|
-
if (component === undefined) {
|
|
132
|
-
return components[name];
|
|
133
|
-
}
|
|
134
|
-
} else {
|
|
135
|
-
name = id.displayName || id.name;
|
|
136
|
-
component = id;
|
|
137
|
-
}
|
|
138
|
-
if (!name || !component) return;
|
|
139
|
-
const nameAlias = toCase(name);
|
|
140
|
-
components[name] = component;
|
|
141
|
-
components[nameAlias] = component;
|
|
142
|
-
delete CreateNode.aliasMap[name];
|
|
143
|
-
delete CreateNode.aliasMap[nameAlias];
|
|
144
|
-
delete parsers[name];
|
|
145
|
-
delete parsers[nameAlias];
|
|
146
|
-
if (component.formCreateParser) parser(name, component.formCreateParser);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function $form() {
|
|
150
|
-
return $FormCreate(FormCreate, components, directives);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function createFormApp(rule, option) {
|
|
154
|
-
const Type = $form();
|
|
155
|
-
return createApp({
|
|
156
|
-
data() {
|
|
157
|
-
return reactive({
|
|
158
|
-
rule, option
|
|
159
|
-
});
|
|
160
|
-
},
|
|
161
|
-
render() {
|
|
162
|
-
return h(Type, {ref: 'fc', ...this.$data});
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
function $vnode() {
|
|
168
|
-
return fragment;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
//todo 检查回调函数作用域
|
|
172
|
-
function use(fn, opt) {
|
|
173
|
-
if (is.Function(fn.install)) fn.install(create, opt);
|
|
174
|
-
else if (is.Function(fn)) fn(create, opt);
|
|
175
|
-
return this;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
function create(rules, option) {
|
|
179
|
-
let app = createFormApp(rules, option || {});
|
|
180
|
-
useApps.forEach(v => {
|
|
181
|
-
invoke(() => v(create, app));
|
|
182
|
-
})
|
|
183
|
-
const div = document.createElement('div');
|
|
184
|
-
(option?.el || document.body).appendChild(div);
|
|
185
|
-
const vm = app.mount(div);
|
|
186
|
-
return vm.$refs.fc.fapi;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
setPrototypeOf(create, prototype);
|
|
190
|
-
|
|
191
|
-
function factory(inherit) {
|
|
192
|
-
let _config = {...config};
|
|
193
|
-
if (inherit) {
|
|
194
|
-
_config.inherit = {
|
|
195
|
-
components,
|
|
196
|
-
parsers,
|
|
197
|
-
directives,
|
|
198
|
-
modelFields,
|
|
199
|
-
providers,
|
|
200
|
-
useApps,
|
|
201
|
-
maker,
|
|
202
|
-
formulas,
|
|
203
|
-
loadData
|
|
204
|
-
}
|
|
205
|
-
} else {
|
|
206
|
-
delete _config.inherit;
|
|
207
|
-
}
|
|
208
|
-
return FormCreateFactory(_config);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
function setModelField(name, field) {
|
|
212
|
-
modelFields[name] = field;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
function setFormula(name, fn) {
|
|
216
|
-
formulas[name] = fn;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
function setDriver(name, driver) {
|
|
220
|
-
const parent = drivers[name] || {};
|
|
221
|
-
const parsers = parent.parsers || {};
|
|
222
|
-
if (driver.parsers) {
|
|
223
|
-
Object.keys(driver.parsers).forEach(k => {
|
|
224
|
-
parsers[k] = setPrototypeOf(driver.parsers[k], BaseParser);
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
driver.name = name;
|
|
228
|
-
drivers[name] = {...parent, ...driver, parsers};
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
function refreshData(id) {
|
|
232
|
-
if (id) {
|
|
233
|
-
Object.keys(instance).forEach(v => {
|
|
234
|
-
const apis = Array.isArray(instance[v]) ? instance[v] : [instance[v]];
|
|
235
|
-
apis.forEach(that => {
|
|
236
|
-
that.bus.$emit('$loadData.' + id);
|
|
237
|
-
})
|
|
238
|
-
})
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
function setData(id, data) {
|
|
243
|
-
deepSet(loadData, id, data);
|
|
244
|
-
refreshData(id);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
function setDataDriver(id, data) {
|
|
248
|
-
const callback = (...args) => {
|
|
249
|
-
return invoke(() => data(...args));
|
|
250
|
-
}
|
|
251
|
-
callback._driver = true;
|
|
252
|
-
setData(id, callback);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
function getData(id, def) {
|
|
256
|
-
const split = (id || '').split('.');
|
|
257
|
-
id = split.shift();
|
|
258
|
-
const field = split.join('.');
|
|
259
|
-
if(!hasProperty(loadData, id)){
|
|
260
|
-
loadData[id] = defValueTag;
|
|
261
|
-
}
|
|
262
|
-
if (loadData[id] !== defValueTag) {
|
|
263
|
-
let val = loadData[id];
|
|
264
|
-
if (val && val._driver) {
|
|
265
|
-
val = val(field);
|
|
266
|
-
} else if (split.length) {
|
|
267
|
-
val = deepGet(val, split);
|
|
268
|
-
}
|
|
269
|
-
return (val == null || val === '') ? def : val;
|
|
270
|
-
} else {
|
|
271
|
-
return def;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
function extendApi(fn) {
|
|
276
|
-
extendApiFn.push(fn);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
function removeData(id) {
|
|
280
|
-
delete loadData[id];
|
|
281
|
-
refreshData(id);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
function on(name, callback) {
|
|
285
|
-
listener.push({name, callback});
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
function FormCreate(vm) {
|
|
289
|
-
extend(this, {
|
|
290
|
-
id: id++,
|
|
291
|
-
create,
|
|
292
|
-
vm,
|
|
293
|
-
manager: createManager(config.manager),
|
|
294
|
-
parsers,
|
|
295
|
-
providers,
|
|
296
|
-
modelFields,
|
|
297
|
-
formulas,
|
|
298
|
-
isMobile,
|
|
299
|
-
rules: vm.props.rule,
|
|
300
|
-
name: vm.props.name || uniqueId(),
|
|
301
|
-
inFor: vm.props.inFor,
|
|
302
|
-
prop: {
|
|
303
|
-
components,
|
|
304
|
-
directives,
|
|
305
|
-
},
|
|
306
|
-
drivers,
|
|
307
|
-
renderDriver: null,
|
|
308
|
-
get: null,
|
|
309
|
-
refreshData,
|
|
310
|
-
loadData,
|
|
311
|
-
CreateNode,
|
|
312
|
-
bus: new Mitt(),
|
|
313
|
-
unwatch: [],
|
|
314
|
-
options: ref({}),
|
|
315
|
-
extendApiFn,
|
|
316
|
-
fetchCache: new WeakMap(),
|
|
317
|
-
tmpData: reactive({}),
|
|
318
|
-
})
|
|
319
|
-
listener.forEach(item => {
|
|
320
|
-
this.bus.$on(item.name, item.callback);
|
|
321
|
-
});
|
|
322
|
-
nextTick(() => {
|
|
323
|
-
watch(this.options, () => {
|
|
324
|
-
this.$handle.$manager.updateOptions(this.options.value);
|
|
325
|
-
this.api().refresh();
|
|
326
|
-
}, {deep: true})
|
|
327
|
-
});
|
|
328
|
-
extend(vm.appContext.components, components);
|
|
329
|
-
extend(vm.appContext.directives, directives);
|
|
330
|
-
this.$handle = new Handle(this)
|
|
331
|
-
if (this.name) {
|
|
332
|
-
if (this.inFor) {
|
|
333
|
-
if (!instance[this.name]) instance[this.name] = [];
|
|
334
|
-
instance[this.name].push(this);
|
|
335
|
-
} else {
|
|
336
|
-
instance[this.name] = this;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
FormCreate.isMobile = isMobile;
|
|
342
|
-
|
|
343
|
-
extend(FormCreate.prototype, {
|
|
344
|
-
init() {
|
|
345
|
-
if (this.isSub()) {
|
|
346
|
-
this.unwatch.push(watch(() => this.vm.setupState.parent.setupState.fc.options.value, () => {
|
|
347
|
-
this.initOptions();
|
|
348
|
-
this.$handle.api.refresh();
|
|
349
|
-
}, {deep: true}));
|
|
350
|
-
}
|
|
351
|
-
if (this.vm.props.driver) {
|
|
352
|
-
this.renderDriver = typeof this.vm.props.driver === 'object' ? this.vm.props.driver : this.drivers[this.vm.props.driver];
|
|
353
|
-
}
|
|
354
|
-
if (!this.renderDriver && this.vm.setupState.parent) {
|
|
355
|
-
this.renderDriver = this.vm.setupState.parent.setupState.fc.renderDriver;
|
|
356
|
-
}
|
|
357
|
-
if (!this.renderDriver) {
|
|
358
|
-
this.renderDriver = this.drivers.default;
|
|
359
|
-
}
|
|
360
|
-
this.initOptions();
|
|
361
|
-
this.$handle.init();
|
|
362
|
-
},
|
|
363
|
-
targetFormDriver(method, ...args) {
|
|
364
|
-
if (this.renderDriver && this.renderDriver[method]) {
|
|
365
|
-
return invoke(() => this.renderDriver[method](...args));
|
|
366
|
-
}
|
|
367
|
-
},
|
|
368
|
-
t(id, params, get) {
|
|
369
|
-
let value = get ? get('$t.' + id) : this.globalLanguageDriver(id);
|
|
370
|
-
if (value == null) {
|
|
371
|
-
value = '';
|
|
372
|
-
}
|
|
373
|
-
if (value && params) {
|
|
374
|
-
Object.keys(params).forEach(param => {
|
|
375
|
-
const regex = new RegExp(`{${param}}`, 'g');
|
|
376
|
-
value = value.replace(regex, params[param]);
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
return value;
|
|
380
|
-
},
|
|
381
|
-
globalDataDriver(id) {
|
|
382
|
-
let split = id.split('.');
|
|
383
|
-
const key = split.shift();
|
|
384
|
-
const option = this.options.value.globalData && this.options.value.globalData[key];
|
|
385
|
-
if (option) {
|
|
386
|
-
if (option.type === 'static') {
|
|
387
|
-
return deepGet(option.data, split);
|
|
388
|
-
} else {
|
|
389
|
-
let val;
|
|
390
|
-
const res = this.fetchCache.get(option);
|
|
391
|
-
if (res) {
|
|
392
|
-
if (res.status) {
|
|
393
|
-
val = deepGet(res.data, split);
|
|
394
|
-
}
|
|
395
|
-
if (!res.loading) {
|
|
396
|
-
return val;
|
|
397
|
-
}
|
|
398
|
-
res.loading = false;
|
|
399
|
-
this.fetchCache.set(option, res);
|
|
400
|
-
} else {
|
|
401
|
-
this.fetchCache.set(option, {status: false});
|
|
402
|
-
}
|
|
403
|
-
const reload = debounce(() => {
|
|
404
|
-
unwatch();
|
|
405
|
-
const res = this.fetchCache.get(option);
|
|
406
|
-
if ((this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(option) !== -1)) {
|
|
407
|
-
if (res) {
|
|
408
|
-
res.loading = true;
|
|
409
|
-
this.fetchCache.set(option, res);
|
|
410
|
-
}
|
|
411
|
-
this.bus.$emit('$loadData.$globalData.' + key);
|
|
412
|
-
} else {
|
|
413
|
-
this.fetchCache.delete(option);
|
|
414
|
-
}
|
|
415
|
-
}, option.wait || 600)
|
|
416
|
-
|
|
417
|
-
const _emit = (data) => {
|
|
418
|
-
this.fetchCache.set(option, {status: true, data});
|
|
419
|
-
this.bus.$emit('$loadData.$globalData.' + key);
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
const callback = (get, change) => {
|
|
423
|
-
if (change && option.watch === false) {
|
|
424
|
-
return unwatch();
|
|
425
|
-
}
|
|
426
|
-
if (change) {
|
|
427
|
-
reload();
|
|
428
|
-
return;
|
|
429
|
-
}
|
|
430
|
-
const options = this.$handle.loadFetchVar(copy(option), get);
|
|
431
|
-
this.$handle.api.fetch(options).then(res => {
|
|
432
|
-
_emit(res);
|
|
433
|
-
}).catch(e => {
|
|
434
|
-
_emit(null);
|
|
435
|
-
});
|
|
436
|
-
};
|
|
437
|
-
const unwatch = this.watchLoadData(callback);
|
|
438
|
-
this.unwatch.push(unwatch);
|
|
439
|
-
return val;
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
},
|
|
443
|
-
getLocale() {
|
|
444
|
-
let locale = this.vm.setupState.top.props.locale;
|
|
445
|
-
if (locale && typeof locale === 'object') {
|
|
446
|
-
return locale.name;
|
|
447
|
-
}
|
|
448
|
-
if (typeof locale === 'string') {
|
|
449
|
-
return locale;
|
|
450
|
-
}
|
|
451
|
-
return 'zh-cn';
|
|
452
|
-
},
|
|
453
|
-
globalLanguageDriver(id) {
|
|
454
|
-
let locale = this.vm.setupState.top.props.locale;
|
|
455
|
-
let value = undefined;
|
|
456
|
-
if (locale && typeof locale === 'object') {
|
|
457
|
-
value = deepGet(locale, id);
|
|
458
|
-
}
|
|
459
|
-
if (value == null) {
|
|
460
|
-
const language = this.options.value.language || {};
|
|
461
|
-
const locale = this.getLocale();
|
|
462
|
-
value = deepGet(language[locale], id);
|
|
463
|
-
}
|
|
464
|
-
return value;
|
|
465
|
-
},
|
|
466
|
-
globalVarDriver(id) {
|
|
467
|
-
let split = id.split('.');
|
|
468
|
-
const key = split.shift();
|
|
469
|
-
const option = this.options.value.globalVariable && this.options.value.globalVariable[key];
|
|
470
|
-
if (option) {
|
|
471
|
-
const handle = is.Function(option) ? option : parseFn(option.handle);
|
|
472
|
-
if (handle) {
|
|
473
|
-
return deepGet(invoke(() => handle(this.get || ((...args) => this.getLoadData(...args)), this.$handle.api)), split);
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
},
|
|
477
|
-
setData(id, data, isGlobal) {
|
|
478
|
-
if (!isGlobal) {
|
|
479
|
-
deepSet(this.vm.setupState.top.setupState.fc.tmpData, id, data);
|
|
480
|
-
this.bus.$emit('$loadData.' + id);
|
|
481
|
-
} else {
|
|
482
|
-
setData(id, data);
|
|
483
|
-
}
|
|
484
|
-
},
|
|
485
|
-
getLoadData(id, def) {
|
|
486
|
-
let val = null;
|
|
487
|
-
if (id != null) {
|
|
488
|
-
let split = id.split('.');
|
|
489
|
-
const key = split.shift();
|
|
490
|
-
if (key === '$topForm') {
|
|
491
|
-
val = this.$handle.api.top.formData();
|
|
492
|
-
} else if (key === '$form') {
|
|
493
|
-
val = this.$handle.api.formData();
|
|
494
|
-
} else if (key === '$options') {
|
|
495
|
-
val = this.options.value;
|
|
496
|
-
} else if (key === '$globalData') {
|
|
497
|
-
val = this.globalDataDriver(split.join('.'));
|
|
498
|
-
split = [];
|
|
499
|
-
} else if (key === '$var') {
|
|
500
|
-
val = this.globalVarDriver(split.join('.'));
|
|
501
|
-
split = [];
|
|
502
|
-
} else if (key === '$locale') {
|
|
503
|
-
val = this.getLocale();
|
|
504
|
-
split = [];
|
|
505
|
-
} else if (key === '$t') {
|
|
506
|
-
val = this.globalLanguageDriver(split.join('.'));
|
|
507
|
-
split = [];
|
|
508
|
-
} else {
|
|
509
|
-
const tmpData = this.vm.setupState.top.setupState.fc.tmpData;
|
|
510
|
-
if(!hasProperty(tmpData, key)){
|
|
511
|
-
tmpData[key] = defValueTag;
|
|
512
|
-
}
|
|
513
|
-
val = tmpData[key] !== defValueTag ? deepGet(tmpData, id) : getData(id);
|
|
514
|
-
split = [];
|
|
515
|
-
}
|
|
516
|
-
if (val && split.length) {
|
|
517
|
-
val = deepGet(val, split);
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
return (val == null || val === '') ? def : val;
|
|
521
|
-
},
|
|
522
|
-
watchLoadData(fn, wait) {
|
|
523
|
-
let unwatch = {};
|
|
524
|
-
|
|
525
|
-
const run = (flag) => {
|
|
526
|
-
if (!this.get) {
|
|
527
|
-
this.get = get;
|
|
528
|
-
}
|
|
529
|
-
invoke(() => {
|
|
530
|
-
fn(get, flag);
|
|
531
|
-
});
|
|
532
|
-
if (this.get === get) {
|
|
533
|
-
this.get = undefined;
|
|
534
|
-
}
|
|
535
|
-
};
|
|
536
|
-
|
|
537
|
-
const get = (id, def) => {
|
|
538
|
-
if (unwatch[id]) {
|
|
539
|
-
return unwatch[id].val;
|
|
540
|
-
}
|
|
541
|
-
const data = computed(() => {
|
|
542
|
-
return this.getLoadData(id, def);
|
|
543
|
-
})
|
|
544
|
-
const split = id.split('.');
|
|
545
|
-
const key = split.shift();
|
|
546
|
-
const key2 = split.shift() || '';
|
|
547
|
-
const callback = debounce(() => {
|
|
548
|
-
const temp = this.getLoadData(id, def);
|
|
549
|
-
if (!unwatch[id]) {
|
|
550
|
-
return;
|
|
551
|
-
} else if (JSON.stringify(temp) !== JSON.stringify(unwatch[id].val)) {
|
|
552
|
-
unwatch[id].val = temp;
|
|
553
|
-
run(true);
|
|
554
|
-
}
|
|
555
|
-
}, wait || 0);
|
|
556
|
-
const un = watch(data, (n) => {
|
|
557
|
-
callback();
|
|
558
|
-
});
|
|
559
|
-
this.bus.$on('$loadData.' + key, callback);
|
|
560
|
-
if (key2) {
|
|
561
|
-
this.bus.$on('$loadData.' + key + '.' + key2, callback);
|
|
562
|
-
}
|
|
563
|
-
unwatch[id] = {
|
|
564
|
-
fn: (() => {
|
|
565
|
-
this.bus.$off('$loadData.' + key, callback);
|
|
566
|
-
if (key2) {
|
|
567
|
-
this.bus.$off('$loadData.' + key + '.' + key2, callback);
|
|
568
|
-
}
|
|
569
|
-
un();
|
|
570
|
-
}),
|
|
571
|
-
val: data.value,
|
|
572
|
-
}
|
|
573
|
-
return data.value;
|
|
574
|
-
}
|
|
575
|
-
run(false);
|
|
576
|
-
const un = () => {
|
|
577
|
-
Object.keys(unwatch).forEach(k => unwatch[k].fn());
|
|
578
|
-
unwatch = {};
|
|
579
|
-
}
|
|
580
|
-
this.unwatch.push(un);
|
|
581
|
-
return un;
|
|
582
|
-
},
|
|
583
|
-
isSub() {
|
|
584
|
-
return this.vm.setupState.parent && this.vm.props.extendOption;
|
|
585
|
-
},
|
|
586
|
-
initOptions() {
|
|
587
|
-
this.options.value = {};
|
|
588
|
-
let options = {
|
|
589
|
-
formData: {},
|
|
590
|
-
submitBtn: {},
|
|
591
|
-
resetBtn: {},
|
|
592
|
-
globalEvent: {},
|
|
593
|
-
globalData: {}, ...deepCopy(globalConfig)
|
|
594
|
-
};
|
|
595
|
-
if (this.isSub()) {
|
|
596
|
-
options = this.mergeOptions(options, this.vm.setupState.parent.setupState.fc.options.value || {}, true);
|
|
597
|
-
}
|
|
598
|
-
options = this.mergeOptions(options, this.vm.props.option);
|
|
599
|
-
this.updateOptions(options);
|
|
600
|
-
},
|
|
601
|
-
mergeOptions(target, opt, parent) {
|
|
602
|
-
opt = {...opt || {}};
|
|
603
|
-
parent && ['page', 'onSubmit', 'onReset', 'onCreated', 'onChange', 'onMounted', 'mounted', 'onReload', 'reload', 'formData', 'el', 'globalClass', 'style'].forEach((n) => {
|
|
604
|
-
delete opt[n];
|
|
605
|
-
});
|
|
606
|
-
if (opt.global) {
|
|
607
|
-
target.global = mergeGlobal(target.global, opt.global);
|
|
608
|
-
delete opt.global;
|
|
609
|
-
}
|
|
610
|
-
this.$handle.$manager.mergeOptions([opt], target);
|
|
611
|
-
return target;
|
|
612
|
-
},
|
|
613
|
-
updateOptions(options) {
|
|
614
|
-
this.options.value = this.mergeOptions(this.options.value, options);
|
|
615
|
-
this.$handle.$manager.updateOptions(this.options.value);
|
|
616
|
-
this.bus.$emit('$loadData.$options');
|
|
617
|
-
},
|
|
618
|
-
api() {
|
|
619
|
-
return this.$handle.api;
|
|
620
|
-
},
|
|
621
|
-
render() {
|
|
622
|
-
return this.$handle.render();
|
|
623
|
-
},
|
|
624
|
-
mounted() {
|
|
625
|
-
this.$handle.mounted();
|
|
626
|
-
},
|
|
627
|
-
unmount() {
|
|
628
|
-
if (this.name) {
|
|
629
|
-
if (this.inFor) {
|
|
630
|
-
const idx = instance[this.name].indexOf(this);
|
|
631
|
-
instance[this.name].splice(idx, 1);
|
|
632
|
-
} else {
|
|
633
|
-
delete instance[this.name];
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
listener.forEach(item => {
|
|
637
|
-
this.bus.$off(item.name, item.callback);
|
|
638
|
-
});
|
|
639
|
-
this.tmpData = {};
|
|
640
|
-
this.unwatch.forEach(fn => fn());
|
|
641
|
-
this.unwatch = [];
|
|
642
|
-
this.$handle.reloadRule([]);
|
|
643
|
-
},
|
|
644
|
-
updated() {
|
|
645
|
-
this.$handle.bindNextTick(() => this.bus.$emit('next-tick', this.$handle.api));
|
|
646
|
-
}
|
|
647
|
-
})
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
function useAttr(formCreate) {
|
|
651
|
-
extend(formCreate, {
|
|
652
|
-
version: config.version,
|
|
653
|
-
ui: config.ui,
|
|
654
|
-
isMobile,
|
|
655
|
-
extendApi,
|
|
656
|
-
getData,
|
|
657
|
-
setDataDriver,
|
|
658
|
-
setData,
|
|
659
|
-
removeData,
|
|
660
|
-
refreshData,
|
|
661
|
-
maker,
|
|
662
|
-
component,
|
|
663
|
-
directive,
|
|
664
|
-
setModelField,
|
|
665
|
-
setFormula,
|
|
666
|
-
setDriver,
|
|
667
|
-
register,
|
|
668
|
-
$vnode,
|
|
669
|
-
parser,
|
|
670
|
-
use,
|
|
671
|
-
factory,
|
|
672
|
-
componentAlias,
|
|
673
|
-
copyRule,
|
|
674
|
-
copyRules,
|
|
675
|
-
mergeRule,
|
|
676
|
-
fetch,
|
|
677
|
-
$form,
|
|
678
|
-
parseFn,
|
|
679
|
-
parseJson,
|
|
680
|
-
toJson,
|
|
681
|
-
useApp,
|
|
682
|
-
getApi,
|
|
683
|
-
on,
|
|
684
|
-
});
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
function useStatic(formCreate) {
|
|
688
|
-
extend(formCreate, {
|
|
689
|
-
create,
|
|
690
|
-
install(app, options) {
|
|
691
|
-
globalConfig = {...globalConfig, ...(options || {})}
|
|
692
|
-
const key = '_installedFormCreate_' + config.ui;
|
|
693
|
-
if (app[key] === true) return;
|
|
694
|
-
app[key] = true;
|
|
695
|
-
|
|
696
|
-
const $formCreate = function (rules, opt = {}) {
|
|
697
|
-
return create(rules, opt, this);
|
|
698
|
-
};
|
|
699
|
-
|
|
700
|
-
useAttr($formCreate);
|
|
701
|
-
|
|
702
|
-
app.config.globalProperties.$formCreate = $formCreate;
|
|
703
|
-
const $component = $form();
|
|
704
|
-
app.component($component.name, $component);
|
|
705
|
-
useApps.forEach(v => {
|
|
706
|
-
invoke(() => v(formCreate, app));
|
|
707
|
-
})
|
|
708
|
-
}
|
|
709
|
-
})
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
useAttr(prototype);
|
|
713
|
-
useStatic(prototype);
|
|
714
|
-
|
|
715
|
-
setDataDriver('$cookie', cookieDriver);
|
|
716
|
-
setDataDriver('$localStorage', localStorageDriver);
|
|
717
|
-
setDataDriver('$sessionStorage', sessionStorageDriver);
|
|
718
|
-
|
|
719
|
-
CreateNode.use({fragment: 'fcFragment'});
|
|
720
|
-
|
|
721
|
-
config.install && create.use(config);
|
|
722
|
-
|
|
723
|
-
useApp((_, app) => {
|
|
724
|
-
app.mixin({
|
|
725
|
-
props: ['formCreateInject'],
|
|
726
|
-
})
|
|
727
|
-
})
|
|
728
|
-
|
|
729
|
-
parser(html);
|
|
730
|
-
|
|
731
|
-
if (config.inherit) {
|
|
732
|
-
const inherit = config.inherit;
|
|
733
|
-
inherit.components && extend(components, inherit.components);
|
|
734
|
-
inherit.parsers && extend(parsers, inherit.parsers);
|
|
735
|
-
inherit.directives && extend(directives, inherit.directives);
|
|
736
|
-
inherit.modelFields && extend(modelFields, inherit.modelFields);
|
|
737
|
-
inherit.providers && extend(providers, inherit.providers);
|
|
738
|
-
inherit.useApps && extend(useApps, inherit.useApps);
|
|
739
|
-
inherit.maker && extend(maker, inherit.maker);
|
|
740
|
-
inherit.loadData && extend(loadData, inherit.loadData);
|
|
741
|
-
inherit.formulas && extend(formulas, inherit.formulas);
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
const FcComponent = $form();
|
|
745
|
-
setPrototypeOf(FcComponent, prototype);
|
|
746
|
-
Object.defineProperties(FcComponent, {
|
|
747
|
-
fetch: {
|
|
748
|
-
get() {
|
|
749
|
-
return prototype.fetch;
|
|
750
|
-
},
|
|
751
|
-
set(val) {
|
|
752
|
-
prototype.fetch = val;
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
})
|
|
756
|
-
|
|
757
|
-
FcComponent.util = prototype;
|
|
758
|
-
|
|
759
|
-
return FcComponent;
|
|
760
|
-
}
|