@yqg/simple 1.0.12 → 1.0.13-beta.2
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/chunks/constant-common-fields-719c888d.js +570 -0
- package/dist/chunks/constant-common-fields-719c888d.js.map +1 -0
- package/dist/chunks/constant-object-fc1e71db.js +42 -0
- package/dist/chunks/constant-object-fc1e71db.js.map +1 -0
- package/dist/chunks/index-0c928ac5.js.map +1 -0
- package/dist/chunks/index-44c0c823.js.map +1 -0
- package/dist/chunks/index-56a74daa.js.map +1 -0
- package/dist/chunks/index-93a4c691.js.map +1 -0
- package/dist/cjs/chunks/constant-common-fields-37e0f4a1.js +605 -0
- package/dist/cjs/chunks/constant-common-fields-37e0f4a1.js.map +1 -0
- package/dist/cjs/chunks/constant-object-c3fb7fa5.js +46 -0
- package/dist/cjs/chunks/constant-object-c3fb7fa5.js.map +1 -0
- package/dist/cjs/constant/common-fields.js +44 -0
- package/dist/cjs/constant/common-fields.js.map +1 -0
- package/dist/cjs/constant/def-type.js +32 -0
- package/dist/cjs/constant/def-type.js.map +1 -0
- package/dist/cjs/constant/fields.js +543 -0
- package/dist/cjs/constant/fields.js.map +1 -0
- package/dist/cjs/constant/index.js +57 -0
- package/dist/cjs/constant/index.js.map +1 -0
- package/dist/cjs/constant/table.js +42 -0
- package/dist/cjs/constant/table.js.map +1 -0
- package/dist/cjs/filter/count-to-time.js +18 -0
- package/dist/cjs/filter/count-to-time.js.map +1 -0
- package/dist/cjs/filter/date.js +18 -0
- package/dist/cjs/filter/date.js.map +1 -0
- package/dist/cjs/filter/index.js +35 -0
- package/dist/cjs/filter/index.js.map +1 -0
- package/dist/cjs/filter/mardown-to-html.js +19 -0
- package/dist/cjs/filter/mardown-to-html.js.map +1 -0
- package/dist/cjs/filter/number-with-commas.js +25 -0
- package/dist/cjs/filter/number-with-commas.js.map +1 -0
- package/dist/cjs/filter/percent.js +23 -0
- package/dist/cjs/filter/percent.js.map +1 -0
- package/dist/cjs/filter/phone-mask.js +19 -0
- package/dist/cjs/filter/phone-mask.js.map +1 -0
- package/dist/cjs/mixin/card-list.js +63 -0
- package/dist/cjs/mixin/card-list.js.map +1 -0
- package/dist/cjs/mixin/client-table.js +51 -0
- package/dist/cjs/mixin/client-table.js.map +1 -0
- package/dist/cjs/mixin/collect-slots.js +69 -0
- package/dist/cjs/mixin/collect-slots.js.map +1 -0
- package/dist/cjs/mixin/common-table.js +31 -0
- package/dist/cjs/mixin/common-table.js.map +1 -0
- package/dist/cjs/mixin/enum-type.js +172 -0
- package/dist/cjs/mixin/enum-type.js.map +1 -0
- package/dist/cjs/mixin/gen-text.js +171 -0
- package/dist/cjs/mixin/gen-text.js.map +1 -0
- package/dist/cjs/mixin/index.js +25 -0
- package/dist/cjs/mixin/index.js.map +1 -0
- package/dist/cjs/mixin/modal.js +24 -0
- package/dist/cjs/mixin/modal.js.map +1 -0
- package/dist/cjs/mixin/static-props.js +50 -0
- package/dist/cjs/mixin/static-props.js.map +1 -0
- package/dist/cjs/mixin/table.js +110 -0
- package/dist/cjs/mixin/table.js.map +1 -0
- package/dist/cjs/mixin/watermark.js +53 -0
- package/dist/cjs/mixin/watermark.js.map +1 -0
- package/dist/cjs/store/module/timezone.js +21 -0
- package/dist/cjs/store/module/timezone.js.map +1 -0
- package/dist/cjs/util/enum.js +18 -0
- package/dist/cjs/util/enum.js.map +1 -0
- package/dist/cjs/util/format-map.js +167 -0
- package/dist/cjs/util/format-map.js.map +1 -0
- package/dist/cjs/util/index.js +28 -0
- package/dist/cjs/util/index.js.map +1 -0
- package/dist/cjs/util/json.js +43 -0
- package/dist/cjs/util/json.js.map +1 -0
- package/dist/cjs/util/keyCodeMap.js +20 -0
- package/dist/cjs/util/keyCodeMap.js.map +1 -0
- package/dist/cjs/util/local-storage.js +19 -0
- package/dist/cjs/util/local-storage.js.map +1 -0
- package/dist/cjs/util/object.js +134 -0
- package/dist/cjs/util/object.js.map +1 -0
- package/dist/cjs/util/storage/index.js +47 -0
- package/dist/cjs/util/storage/index.js.map +1 -0
- package/dist/cjs/util/storage/swim-lane.js +16 -0
- package/dist/cjs/util/storage/swim-lane.js.map +1 -0
- package/dist/cjs/util/tool.js +15 -0
- package/dist/cjs/util/tool.js.map +1 -0
- package/dist/constant/common-fields.js +5 -0
- package/dist/constant/common-fields.js.map +1 -0
- package/dist/constant/def-type.d.ts +26 -27
- package/dist/constant/def-type.js +30 -0
- package/dist/constant/def-type.js.map +1 -0
- package/dist/constant/fields.d.ts +2 -2
- package/dist/constant/fields.js +506 -0
- package/dist/constant/fields.js.map +1 -0
- package/dist/constant/index.d.ts +4 -0
- package/dist/constant/index.js +12 -0
- package/dist/constant/index.js.map +1 -0
- package/dist/constant/table.js +38 -0
- package/dist/constant/table.js.map +1 -0
- package/dist/filter/count-to-time.js +16 -0
- package/dist/filter/count-to-time.js.map +1 -0
- package/dist/filter/date.js +16 -0
- package/dist/filter/date.js.map +1 -0
- package/dist/filter/index.js +33 -0
- package/dist/filter/index.js.map +1 -0
- package/dist/filter/mardown-to-html.js +17 -0
- package/dist/filter/mardown-to-html.js.map +1 -0
- package/dist/filter/number-with-commas.js +21 -0
- package/dist/filter/number-with-commas.js.map +1 -0
- package/dist/filter/percent.js +21 -0
- package/dist/filter/percent.js.map +1 -0
- package/dist/filter/phone-mask.js +17 -0
- package/dist/filter/phone-mask.js.map +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mixin/card-list.js +61 -0
- package/dist/mixin/card-list.js.map +1 -0
- package/dist/mixin/client-table.js +49 -0
- package/dist/mixin/client-table.js.map +1 -0
- package/dist/mixin/collect-slots.js +67 -0
- package/dist/mixin/collect-slots.js.map +1 -0
- package/dist/mixin/common-table.js +29 -0
- package/dist/mixin/common-table.js.map +1 -0
- package/dist/mixin/enum-type.js +170 -0
- package/dist/mixin/enum-type.js.map +1 -0
- package/dist/mixin/gen-text.js +169 -0
- package/dist/mixin/gen-text.js.map +1 -0
- package/dist/mixin/index.js +12 -0
- package/dist/mixin/index.js.map +1 -0
- package/dist/mixin/modal.js +22 -0
- package/dist/mixin/modal.js.map +1 -0
- package/dist/mixin/static-props.js +48 -0
- package/dist/mixin/static-props.js.map +1 -0
- package/dist/mixin/table.js +105 -0
- package/dist/mixin/table.js.map +1 -0
- package/dist/mixin/watermark.js +51 -0
- package/dist/mixin/watermark.js.map +1 -0
- package/dist/store/module/timezone.js +19 -0
- package/dist/store/module/timezone.js.map +1 -0
- package/dist/util/enum.js +15 -0
- package/dist/util/enum.js.map +1 -0
- package/dist/util/format-map.js +165 -0
- package/dist/util/format-map.js.map +1 -0
- package/dist/util/index.js +6 -0
- package/dist/util/index.js.map +1 -0
- package/dist/util/json.js +40 -0
- package/dist/util/json.js.map +1 -0
- package/dist/util/keyCodeMap.js +18 -0
- package/dist/util/keyCodeMap.js.map +1 -0
- package/dist/util/local-storage.js +15 -0
- package/dist/util/local-storage.js.map +1 -0
- package/dist/util/object.js +124 -0
- package/dist/util/object.js.map +1 -0
- package/dist/util/storage/index.js +45 -0
- package/dist/util/storage/index.js.map +1 -0
- package/dist/util/storage/swim-lane.js +14 -0
- package/dist/util/storage/swim-lane.js.map +1 -0
- package/dist/util/tool.js +13 -0
- package/dist/util/tool.js.map +1 -0
- package/package.json +1 -1
- package/src/constant/fields.ts +3 -3
- package/src/constant/index.ts +10 -0
- package/dist/index-0c928ac5.js.map +0 -1
- package/dist/index-44c0c823.js.map +0 -1
- package/dist/index-56a74daa.js.map +0 -1
- package/dist/index-93a4c691.js.map +0 -1
- package/src/constant/index.js +0 -10
- /package/dist/{index-0c928ac5.js → chunks/index-0c928ac5.js} +0 -0
- /package/dist/{index-44c0c823.js → chunks/index-44c0c823.js} +0 -0
- /package/dist/{index-56a74daa.js → chunks/index-56a74daa.js} +0 -0
- /package/dist/{index-93a4c691.js → chunks/index-93a4c691.js} +0 -0
- /package/src/constant/{def-type.js → def-type.ts} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var __assign = function() {
|
|
19
|
+
__assign = Object.assign || function __assign(t) {
|
|
20
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
21
|
+
s = arguments[i];
|
|
22
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
30
|
+
var e = new Error(message);
|
|
31
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/*
|
|
35
|
+
* @Author: ruiwang
|
|
36
|
+
* @Date 2023-03-02 16:17:53
|
|
37
|
+
* @Last Modified by: ruiwang
|
|
38
|
+
* @Last Modified time: 2023-03-02 18:45:08
|
|
39
|
+
*/
|
|
40
|
+
var collectSlots = {
|
|
41
|
+
methods: {
|
|
42
|
+
genSlots: function (_a) {
|
|
43
|
+
var _this = this;
|
|
44
|
+
var def = _a.def,
|
|
45
|
+
parentIndex = _a.parentIndex;
|
|
46
|
+
var scopedSlots = Object.keys(this.$scopedSlots).filter(function (slotKey) {
|
|
47
|
+
return slotKey.startsWith("".concat(def.field, "."));
|
|
48
|
+
}).reduce(function (acc, cur) {
|
|
49
|
+
var name = cur.replace("".concat(def.field, "."), '');
|
|
50
|
+
acc[name] = function (args) {
|
|
51
|
+
return _this.renderSlot(cur, __assign(__assign({}, args), {
|
|
52
|
+
parentIndex: parentIndex
|
|
53
|
+
}));
|
|
54
|
+
};
|
|
55
|
+
return acc;
|
|
56
|
+
}, {});
|
|
57
|
+
return scopedSlots;
|
|
58
|
+
},
|
|
59
|
+
renderSlot: function (name, props, fallback) {
|
|
60
|
+
var _a, _b;
|
|
61
|
+
return ((_b = (_a = this.$scopedSlots)[name]) === null || _b === void 0 ? void 0 : _b.call(_a, props)) || fallback;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export { collectSlots as default };
|
|
67
|
+
//# sourceMappingURL=collect-slots.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collect-slots.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/mixin/collect-slots.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/*\n * @Author: ruiwang\n * @Date 2023-03-02 16:17:53\n * @Last Modified by: ruiwang\n * @Last Modified time: 2023-03-02 18:45:08\n */\n\nexport default {\n methods: {\n genSlots({def, parentIndex}) {\n const scopedSlots = Object.keys(this.$scopedSlots)\n .filter(slotKey => slotKey.startsWith(`${def.field}.`))\n .reduce((acc, cur) => {\n const name = cur.replace(`${def.field}.`, '');\n acc[name] = args => {\n return this.renderSlot(cur, {...args, parentIndex});\n };\n\n return acc;\n }, {});\n\n return scopedSlots;\n },\n\n renderSlot(name: string, props: any, fallback: any) {\n return this.$scopedSlots[name]?.(props) || fallback;\n }\n }\n};\n"],"names":["methods","genSlots","_a","_this","def","parentIndex","scopedSlots","Object","keys","$scopedSlots","filter","slotKey","startsWith","concat","field","reduce","acc","cur","name","replace","args","renderSlot","__assign","props","fallback","_b","call"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAeA;AACO,IAAI,QAAQ,GAAG,WAAW;AACjC,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,QAAQ,CAAC,CAAC,EAAE;AACrD,QAAQ,KAAK,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AAC7D,YAAY,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAC7B,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACzF,SAAS;AACT,QAAQ,OAAO,CAAC,CAAC;AACjB,MAAK;AACL,IAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAC3C,EAAC;AA+RD;AACuB,OAAO,eAAe,KAAK,UAAU,GAAG,eAAe,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE;AACvH,IAAI,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC/B,IAAI,OAAO,CAAC,CAAC,IAAI,GAAG,iBAAiB,EAAE,CAAC,CAAC,KAAK,GAAG,KAAK,EAAE,CAAC,CAAC,UAAU,GAAG,UAAU,EAAE,CAAC,CAAC;AACrF;;AC3UA;;;;;AAKG;AAEH,mBAAe;AACXA,EAAAA,OAAO,EAAE;AACLC,IAA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AIC,QAAQ,CAAA;AACvD,KAAA;AACH,GAAA;CACJ;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import table from './table.js';
|
|
2
|
+
import 'underscore';
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* @Author: ruiwang
|
|
6
|
+
* @Date: 2020-07-08 14:17:29
|
|
7
|
+
* @Last Modified by: ruiwang
|
|
8
|
+
* @Last Modified time: 2020-09-09 18:14:54
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
var commonTable = {
|
|
12
|
+
...table,
|
|
13
|
+
data() {
|
|
14
|
+
return {
|
|
15
|
+
cond: null,
|
|
16
|
+
pagination: {
|
|
17
|
+
pageNo: 1,
|
|
18
|
+
pageSize: 50,
|
|
19
|
+
total: 0
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
mounted() {
|
|
24
|
+
this.$watch('$i18n.locale', this.onRefresh);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { commonTable as default };
|
|
29
|
+
//# sourceMappingURL=common-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-table.js","sources":["../../src/mixin/common-table.js"],"sourcesContent":["/*\n * @Author: ruiwang\n * @Date: 2020-07-08 14:17:29\n * @Last Modified by: ruiwang\n * @Last Modified time: 2020-09-09 18:14:54\n */\n\nimport table from './table.js';\n\nexport default {\n ...table,\n\n data() {\n return {\n cond: null,\n pagination: {\n pageNo: 1,\n pageSize: 50,\n total: 0\n }\n };\n },\n\n mounted() {\n this.$watch('$i18n.locale', this.onRefresh);\n }\n};\n"],"names":["table","data","cond","pagination","pageNo","pageSize","total","mounted","$watch","onRefresh"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;;AAIA,kBAAe;AACX,EAAA,GAAGA,KAAK;AAERC,EAAAA,IAAIA,GAAG;IACH,OAAO;AACHC,MAAAA,IAAI,EAAE,IAAI;AACVC,MAAAA,UAAU,EAAE;AACRC,QAAAA,MAAM,EAAE,CAAC;AACTC,QAAAA,QAAQ,EAAE,EAAE;AACZC,QAAAA,KAAK,EAAE,CAAA;AACX,OAAA;KACH,CAAA;GACJ;AAEDC,EAAAA,OAAOA,GAAG;IACN,IAAI,CAACC,MAAM,CAAC,cAAc,EAAE,IAAI,CAACC,SAAS,CAAC,CAAA;AAC/C,GAAA;AACJ,CAAC;;;;"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import Enum from '@yqg/enum';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* @Author: ruiwang
|
|
5
|
+
* @Date: 2020-09-07 17:29:02
|
|
6
|
+
* @Last Modified by: ruiwang
|
|
7
|
+
* @Last Modified time: 2024-11-04 16:21:03
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var enumType = {
|
|
11
|
+
inject: {
|
|
12
|
+
setCustomInitialValue: {
|
|
13
|
+
default: null
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
model: {
|
|
17
|
+
prop: 'value',
|
|
18
|
+
event: 'change'
|
|
19
|
+
},
|
|
20
|
+
props: {
|
|
21
|
+
def: {
|
|
22
|
+
type: Object,
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
enumType: {
|
|
26
|
+
type: [String, Object],
|
|
27
|
+
default: ''
|
|
28
|
+
},
|
|
29
|
+
optionDisabled: {
|
|
30
|
+
type: Function,
|
|
31
|
+
default: undefined
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
list: [],
|
|
37
|
+
wrappedEnumType: null
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
computed: {
|
|
41
|
+
options() {
|
|
42
|
+
const {
|
|
43
|
+
list,
|
|
44
|
+
optionDisabled,
|
|
45
|
+
def: {
|
|
46
|
+
props: {
|
|
47
|
+
optionLabelProp
|
|
48
|
+
} = {}
|
|
49
|
+
}
|
|
50
|
+
} = this;
|
|
51
|
+
return list.map(option => {
|
|
52
|
+
const {
|
|
53
|
+
text,
|
|
54
|
+
value,
|
|
55
|
+
pinyin,
|
|
56
|
+
shortPinyin,
|
|
57
|
+
disabled
|
|
58
|
+
} = option;
|
|
59
|
+
return {
|
|
60
|
+
...(optionLabelProp && {
|
|
61
|
+
[optionLabelProp]: option[optionLabelProp]
|
|
62
|
+
}),
|
|
63
|
+
label: text,
|
|
64
|
+
value: `${value}`,
|
|
65
|
+
pinyin,
|
|
66
|
+
shortPinyin,
|
|
67
|
+
disabled: typeof optionDisabled === 'function' ? optionDisabled?.(value, option) : disabled
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
watch: {
|
|
73
|
+
enumType() {
|
|
74
|
+
this.initData();
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
mounted() {
|
|
78
|
+
this.initData();
|
|
79
|
+
const {
|
|
80
|
+
enumType
|
|
81
|
+
} = this;
|
|
82
|
+
if (enumType?.query) {
|
|
83
|
+
enumType.onRefresh?.(this.initData);
|
|
84
|
+
if (this.$i18n) {
|
|
85
|
+
this.$watch('$i18n.locale', () => {
|
|
86
|
+
enumType.refresh?.();
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
beforeDestroy() {
|
|
92
|
+
const {
|
|
93
|
+
enumType
|
|
94
|
+
} = this;
|
|
95
|
+
if (enumType?.query) {
|
|
96
|
+
enumType.offRefresh?.(this.initData);
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
methods: {
|
|
100
|
+
genEnumTypeFromI18n() {
|
|
101
|
+
const {
|
|
102
|
+
def,
|
|
103
|
+
enumType: originEnumtype
|
|
104
|
+
} = this;
|
|
105
|
+
let enumType = originEnumtype;
|
|
106
|
+
if (this.$t(enumType).constructor === Array) {
|
|
107
|
+
enumType = Enum.fromArray(this.$t(enumType), def.enumOptions);
|
|
108
|
+
} else {
|
|
109
|
+
enumType = Enum.from(this.$t(enumType));
|
|
110
|
+
}
|
|
111
|
+
return enumType;
|
|
112
|
+
},
|
|
113
|
+
refreshClientEnum() {
|
|
114
|
+
const enumType = this.genEnumTypeFromI18n();
|
|
115
|
+
this.wrappedEnumType = enumType;
|
|
116
|
+
this.list = enumType.LIST;
|
|
117
|
+
},
|
|
118
|
+
async initData(searchValue) {
|
|
119
|
+
const {
|
|
120
|
+
def
|
|
121
|
+
} = this;
|
|
122
|
+
let {
|
|
123
|
+
enumType
|
|
124
|
+
} = this;
|
|
125
|
+
let forceUpdate = false;
|
|
126
|
+
if (!enumType) {
|
|
127
|
+
enumType = Enum.from({});
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
switch (true) {
|
|
131
|
+
case typeof enumType.populate === 'function':
|
|
132
|
+
if (enumType.query) {
|
|
133
|
+
await enumType.query(searchValue);
|
|
134
|
+
forceUpdate = true;
|
|
135
|
+
}
|
|
136
|
+
break;
|
|
137
|
+
case enumType.constructor === Object:
|
|
138
|
+
enumType = Enum.from(enumType);
|
|
139
|
+
break;
|
|
140
|
+
case typeof enumType === 'string':
|
|
141
|
+
enumType = this.genEnumTypeFromI18n();
|
|
142
|
+
if (this.$i18n) {
|
|
143
|
+
this.$watch('$i18n.locale', () => {
|
|
144
|
+
this.refreshClientEnum();
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
this.wrappedEnumType = enumType;
|
|
150
|
+
this.list = enumType.LIST;
|
|
151
|
+
if (!this.value && def.defaultFirstItem) {
|
|
152
|
+
let value;
|
|
153
|
+
if (typeof def.defaultFirstItem === 'function') {
|
|
154
|
+
value = def.defaultFirstItem(enumType);
|
|
155
|
+
} else if (enumType.LIST[0] !== undefined) {
|
|
156
|
+
[{
|
|
157
|
+
value
|
|
158
|
+
}] = enumType.LIST;
|
|
159
|
+
}
|
|
160
|
+
const initialValue = {
|
|
161
|
+
[def.field]: value
|
|
162
|
+
};
|
|
163
|
+
this.setCustomInitialValue?.(initialValue, forceUpdate);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export { enumType as default };
|
|
170
|
+
//# sourceMappingURL=enum-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enum-type.js","sources":["../../src/mixin/enum-type.js"],"sourcesContent":["/*\n * @Author: ruiwang\n * @Date: 2020-09-07 17:29:02\n * @Last Modified by: ruiwang\n * @Last Modified time: 2024-11-04 16:21:03\n */\n\nimport Enum from '@yqg/enum';\n\nexport default {\n inject: {\n setCustomInitialValue: {\n default: null,\n },\n },\n\n model: {\n prop: 'value',\n event: 'change',\n },\n\n props: {\n def: {\n type: Object,\n required: true,\n },\n\n enumType: {\n type: [String, Object],\n default: '',\n },\n\n optionDisabled: {\n type: Function,\n default: undefined,\n },\n },\n\n data() {\n return {\n list: [],\n wrappedEnumType: null,\n };\n },\n\n computed: {\n options() {\n const {\n list,\n optionDisabled,\n def: {props: {optionLabelProp} = {}},\n } = this;\n\n return list.map(option => {\n const {text, value, pinyin, shortPinyin, disabled} = option;\n\n return {\n ...(optionLabelProp && {\n [optionLabelProp]: option[optionLabelProp],\n }),\n label: text,\n value: `${value}`,\n pinyin,\n shortPinyin,\n disabled:\n typeof optionDisabled === 'function'\n ? optionDisabled?.(value, option)\n : disabled,\n };\n });\n },\n },\n\n watch: {\n enumType() {\n this.initData();\n },\n },\n\n mounted() {\n this.initData();\n const {enumType} = this;\n if (enumType?.query) {\n enumType.onRefresh?.(this.initData);\n\n if (this.$i18n) {\n this.$watch('$i18n.locale', () => {\n enumType.refresh?.();\n });\n }\n }\n },\n\n beforeDestroy() {\n const {enumType} = this;\n if (enumType?.query) {\n enumType.offRefresh?.(this.initData);\n }\n },\n\n methods: {\n genEnumTypeFromI18n() {\n const {def, enumType: originEnumtype} = this;\n let enumType = originEnumtype;\n if (this.$t(enumType).constructor === Array) {\n enumType = Enum.fromArray(\n this.$t(enumType),\n def.enumOptions\n );\n } else {\n enumType = Enum.from(this.$t(enumType));\n }\n\n return enumType;\n },\n\n refreshClientEnum() {\n const enumType = this.genEnumTypeFromI18n();\n this.wrappedEnumType = enumType;\n this.list = enumType.LIST;\n },\n\n async initData(searchValue) {\n const {def} = this;\n let {enumType} = this;\n let forceUpdate = false;\n if (!enumType) {\n enumType = Enum.from({});\n\n return;\n }\n\n switch (true) {\n case typeof enumType.populate === 'function':\n if (enumType.query) {\n await enumType.query(searchValue);\n forceUpdate = true;\n }\n\n break;\n case enumType.constructor === Object:\n enumType = Enum.from(enumType);\n break;\n case typeof enumType === 'string':\n enumType = this.genEnumTypeFromI18n();\n\n if (this.$i18n) {\n this.$watch('$i18n.locale', () => {\n this.refreshClientEnum();\n });\n }\n\n break;\n default:\n break;\n }\n\n this.wrappedEnumType = enumType;\n this.list = enumType.LIST;\n if (!this.value && def.defaultFirstItem) {\n let value;\n if (typeof def.defaultFirstItem === 'function') {\n value = def.defaultFirstItem(enumType);\n } else if (enumType.LIST[0] !== undefined) {\n [{value}] = enumType.LIST;\n }\n\n const initialValue = {[def.field]: value};\n this.setCustomInitialValue?.(initialValue, forceUpdate);\n }\n },\n },\n};\n"],"names":["inject","setCustomInitialValue","default","model","prop","event","props","def","type","Object","required","enumType","String","optionDisabled","Function","undefined","data","list","wrappedEnumType","computed","options","optionLabelProp","map","option","text","value","pinyin","shortPinyin","disabled","label","watch","initData","mounted","query","onRefresh","$i18n","$watch","refresh","beforeDestroy","offRefresh","methods","genEnumTypeFromI18n","originEnumtype","$t","constructor","Array","Enum","fromArray","enumOptions","from","refreshClientEnum","LIST","searchValue","forceUpdate","populate","defaultFirstItem","initialValue","field"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAIA,eAAe;AACXA,EAAAA,MAAM,EAAE;AACJC,IAAAA,qBAAqB,EAAE;AACnBC,MAAAA,OAAO,EAAE,IA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type
|
|
8
|
+
number: 'number',
|
|
9
|
+
color: 'color',
|
|
10
|
+
textarea: 'textarea',
|
|
11
|
+
date: 'date',
|
|
12
|
+
dateTime: 'dateTime',
|
|
13
|
+
dateRange: 'dateRange',
|
|
14
|
+
month: 'month',
|
|
15
|
+
switch: 'switch',
|
|
16
|
+
select: 'select',
|
|
17
|
+
virtualSelect: 'virtualSelect',
|
|
18
|
+
tree: 'tree',
|
|
19
|
+
checkbox: 'checkbox',
|
|
20
|
+
radio: 'radio',
|
|
21
|
+
file: 'file',
|
|
22
|
+
code: 'code',
|
|
23
|
+
sql: 'sql',
|
|
24
|
+
buttonGroup: 'buttonGroup',
|
|
25
|
+
markdown: 'markdown',
|
|
26
|
+
time: 'time',
|
|
27
|
+
rich: 'rich',
|
|
28
|
+
autoComplete: 'autoComplete',
|
|
29
|
+
group: 'group',
|
|
30
|
+
cascader: 'cascader'
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
* @Author: chengyuzhang
|
|
35
|
+
* @Date: 2021-04-07 15:27:57
|
|
36
|
+
* @Last Modified by: yuhaoyang
|
|
37
|
+
* @Last Modified time: 2023-05-23 12:06:16
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
const getText = ({
|
|
41
|
+
map,
|
|
42
|
+
enumType,
|
|
43
|
+
value,
|
|
44
|
+
seperator = '\n'
|
|
45
|
+
}) => {
|
|
46
|
+
if (value === null || value === undefined) return value;
|
|
47
|
+
if (value.constructor === Array) {
|
|
48
|
+
return value.map(val => enumType?.getText(val) || map?.[val] || val).join(seperator);
|
|
49
|
+
}
|
|
50
|
+
return enumType?.getText(value) || map?.[value] || value;
|
|
51
|
+
};
|
|
52
|
+
const getTreeNodeLabel = (value, tree, idKey = 'value', nameKey = 'name') => {
|
|
53
|
+
let str;
|
|
54
|
+
for (const node of tree) {
|
|
55
|
+
if (node[idKey] === value) {
|
|
56
|
+
str = node[nameKey];
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
if (node.children?.length) {
|
|
60
|
+
const tmp = getTreeNodeLabel(value, node.children, idKey, nameKey);
|
|
61
|
+
if (tmp) {
|
|
62
|
+
str = tmp;
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return str;
|
|
68
|
+
};
|
|
69
|
+
const getTreeText = ({
|
|
70
|
+
enumType,
|
|
71
|
+
value,
|
|
72
|
+
seperator = '\n',
|
|
73
|
+
idKey,
|
|
74
|
+
nameKey
|
|
75
|
+
}) => {
|
|
76
|
+
if (value === null || value === undefined) return value;
|
|
77
|
+
const tree = enumType.LIST;
|
|
78
|
+
if (value.constructor === Array) {
|
|
79
|
+
return value.map(val => getTreeNodeLabel(val, tree, idKey, nameKey)).join(seperator);
|
|
80
|
+
}
|
|
81
|
+
return getTreeNodeLabel(value, tree, idKey, nameKey) || value;
|
|
82
|
+
};
|
|
83
|
+
var genText = {
|
|
84
|
+
inject: {
|
|
85
|
+
timestamp: {
|
|
86
|
+
default: undefined
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
computed: {
|
|
90
|
+
...mapGetters(['timezone']),
|
|
91
|
+
isTimestamp() {
|
|
92
|
+
return this.def.timestamp ?? (this.$app?.timestamp ?? this.timestamp) !== false;
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
methods: {
|
|
96
|
+
genText({
|
|
97
|
+
fallback,
|
|
98
|
+
enumType,
|
|
99
|
+
mapKey,
|
|
100
|
+
value: text,
|
|
101
|
+
def: {
|
|
102
|
+
type,
|
|
103
|
+
seperator,
|
|
104
|
+
enumOptions,
|
|
105
|
+
timezone: defTz,
|
|
106
|
+
filter,
|
|
107
|
+
nameKey,
|
|
108
|
+
idKey,
|
|
109
|
+
filterParams
|
|
110
|
+
}
|
|
111
|
+
}) {
|
|
112
|
+
const {
|
|
113
|
+
timezone,
|
|
114
|
+
isTimestamp
|
|
115
|
+
} = this;
|
|
116
|
+
if (enumType) {
|
|
117
|
+
text = type === 'tree' ? getTreeText({
|
|
118
|
+
enumType,
|
|
119
|
+
value: text,
|
|
120
|
+
seperator,
|
|
121
|
+
nameKey,
|
|
122
|
+
idKey
|
|
123
|
+
}) : getText({
|
|
124
|
+
enumType,
|
|
125
|
+
value: text,
|
|
126
|
+
seperator
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
if (mapKey) {
|
|
130
|
+
let tMap = this.$t(mapKey);
|
|
131
|
+
if (tMap.constructor === Array) {
|
|
132
|
+
tMap = Enum.fromArray(mapKey, enumOptions).MAP;
|
|
133
|
+
}
|
|
134
|
+
text = getText({
|
|
135
|
+
map: tMap,
|
|
136
|
+
value: text,
|
|
137
|
+
seperator
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
if (isTimestamp) {
|
|
141
|
+
// date
|
|
142
|
+
if (type === DefType.date) {
|
|
143
|
+
filter = filter || 'date';
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// dateTime
|
|
147
|
+
if (type === DefType.dateTime) {
|
|
148
|
+
filter = 'dateTime';
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// time
|
|
152
|
+
if (type === DefType.time) {
|
|
153
|
+
filter = 'time';
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (filter) {
|
|
157
|
+
if (['time', 'dateTime', 'date'].includes(filter)) {
|
|
158
|
+
text = Vue.filter(filter)(text, defTz || timezone);
|
|
159
|
+
} else {
|
|
160
|
+
text = Vue.filter(filter)(text, filterParams);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return text || text === 0 || text === false ? text : fallback;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export { genText as default };
|
|
169
|
+
//# sourceMappingURL=gen-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gen-text.js","sources":["../../src/constant/def-type.ts","../../src/mixin/gen-text.js"],"sourcesContent":["export default {\n text: 'text', // default field type\n number: 'number',\n color: 'color',\n textarea: 'textarea',\n date: 'date',\n dateTime: 'dateTime',\n dateRange: 'dateRange',\n month: 'month',\n switch: 'switch',\n select: 'select',\n virtualSelect: 'virtualSelect',\n tree: 'tree',\n checkbox: 'checkbox',\n radio: 'radio',\n file: 'file',\n code: 'code',\n sql: 'sql',\n buttonGroup: 'buttonGroup',\n markdown: 'markdown',\n time: 'time',\n rich: 'rich',\n autoComplete: 'autoComplete',\n group: 'group',\n cascader: 'cascader'\n};\n","/*\n * @Author: chengyuzhang\n * @Date: 2021-04-07 15:27:57\n * @Last Modified by: yuhaoyang\n * @Last Modified time: 2023-05-23 12:06:16\n */\n\nimport Vue from 'vue';\nimport {mapGetters} from 'vuex';\n\nimport Enum from '@yqg/enum';\n\nimport DefType from '../constant/def-type.js';\n\nconst getText = ({map, enumType, value, seperator = '\\n'}) => {\n if (value === null || value === undefined) return value;\n\n if (value.constructor === Array) {\n return value.map(val => (enumType?.getText(val) || map?.[val] || val)).join(seperator);\n }\n\n return enumType?.getText(value) || map?.[value] || value;\n};\n\nconst getTreeNodeLabel = (value, tree, idKey = 'value', nameKey = 'name') => {\n let str;\n for (const node of tree) {\n if (node[idKey] === value) {\n str = node[nameKey];\n break;\n }\n\n if (node.children?.length) {\n const tmp = getTreeNodeLabel(value, node.children, idKey, nameKey);\n if (tmp) {\n str = tmp;\n break;\n }\n }\n }\n\n return str;\n};\n\nconst getTreeText = ({enumType, value, seperator = '\\n', idKey, nameKey}) => {\n if (value === null || value === undefined) return value;\n const tree = enumType.LIST;\n if (value.constructor === Array) {\n return value.map(val => getTreeNodeLabel(val, tree, idKey, nameKey)).join(seperator);\n }\n\n return getTreeNodeLabel(value, tree, idKey, nameKey) || value;\n};\n\nexport default {\n inject: {\n timestamp: {\n default: undefined\n }\n },\n\n computed: {\n ...mapGetters(['timezone']),\n\n isTimestamp() {\n return this.def.timestamp ?? ((this.$app?.timestamp ?? this.timestamp) !== false);\n }\n },\n\n methods: {\n genText({\n fallback, enumType, mapKey, value: text,\n def: {type, seperator, enumOptions, timezone: defTz, filter, nameKey, idKey, filterParams}\n }) {\n const {timezone, isTimestamp} = this;\n if (enumType) {\n text = type === 'tree'\n ? getTreeText({enumType, value: text, seperator, nameKey, idKey})\n : getText({enumType, value: text, seperator});\n }\n\n if (mapKey) {\n let tMap = this.$t(mapKey);\n if (tMap.constructor === Array) {\n tMap = Enum.fromArray(mapKey, enumOptions).MAP;\n }\n\n text = getText({map: tMap, value: text, seperator});\n }\n\n if (isTimestamp) {\n // date\n if (type === DefType.date) {\n filter = filter || 'date';\n }\n\n // dateTime\n if (type === DefType.dateTime) {\n filter = 'dateTime';\n }\n\n // time\n if (type === DefType.time) {\n filter = 'time';\n }\n }\n\n if (filter) {\n if (['time', 'dateTime', 'date'].includes(filter)) {\n text = Vue.filter(filter)(text, defTz || timezone);\n } else {\n text = Vue.filter(filter)(text, filterParams);\n }\n }\n\n return (text || text === 0 || text === false) ? text : fallback;\n }\n }\n};\n"],"names":["text","number","color","textarea","date","dateTime","dateRange","month","switch","select","virtualSelect","tree","checkbox","radio","file","code","sql","buttonGroup","markdown","time","rich","autoComplete","group","cascader","getText","map","enumType","value","seperator","undefined","constructor","Array","val","join","getTreeNodeLabel","idKey","nameKey","str","node","children","length","tmp","getTreeText","LIST","inject","timestamp","default","computed","mapGetters","isTimestamp","def","$app","methods","genText","fallback","mapKey","type","enumOptions","timezone","defTz","filter","filterParams","tMap","$t","Enum","fromArray","MAP","DefType","includes","Vue"],"mappings":";;;;AAAA,cAAe;AACXA,EAAAA,IAAI,EAAE,MAAM;AAAE;AACdC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,KAAK,EAAE,OAAO;AACdC,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KAAA;AACJ,GAAA;AACJ,CAAC;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as watermark } from './watermark.js';
|
|
2
|
+
export { default as modal } from './modal.js';
|
|
3
|
+
export { default as table, tableSelection } from './table.js';
|
|
4
|
+
export { default as commonTable } from './common-table.js';
|
|
5
|
+
export { default as clientTable } from './client-table.js';
|
|
6
|
+
export { default as enumType } from './enum-type.js';
|
|
7
|
+
export { default as cardList } from './card-list.js';
|
|
8
|
+
import 'vue';
|
|
9
|
+
import 'vuex';
|
|
10
|
+
import 'underscore';
|
|
11
|
+
import '@yqg/enum';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: xiaodongyu
|
|
3
|
+
* @Date 2019-12-13 17:27:37
|
|
4
|
+
* @Last Modified by: xiaodongyu
|
|
5
|
+
* @Last Modified time: 2019-12-13 17:28:28
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
var modal = {
|
|
9
|
+
props: {
|
|
10
|
+
close: {
|
|
11
|
+
type: Function,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
dismiss: {
|
|
15
|
+
type: Function,
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { modal as default };
|
|
22
|
+
//# sourceMappingURL=modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.js","sources":["../../src/mixin/modal.js"],"sourcesContent":["/*\n * @Author: xiaodongyu\n * @Date 2019-12-13 17:27:37\n * @Last Modified by: xiaodongyu\n * @Last Modified time: 2019-12-13 17:28:28\n */\n\nexport default {\n props: {\n close: {\n type: Function,\n required: true\n },\n\n dismiss: {\n type: Function,\n required: true\n }\n }\n};\n"],"names":["props","close","type","Function","required","dismiss"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAe;AACXA,EAAAA,KAAK,EAAE;AACHC,IAAAA,KAAK,EAAE;AACHC,MAAAA,IAAI,EAAEC,QAAQ;AACdC,MAAAA,QAAQ,EAAE,IAAA;KACb;AAEDC,IAAAA,OAAO,EAAE;AACLH,MAAAA,IAAI,EAAEC,QAAQ;AACdC,MAAAA,QAAQ,EAAE,IAAA;AACd,KAAA;AACJ,GAAA;AACJ,CAAC;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: xiaodongyu
|
|
3
|
+
* @Date 2019-12-07 14:00:32
|
|
4
|
+
* @Last Modified by: mengpeng
|
|
5
|
+
* @Last Modified time: 2022-11-10 15:39:31
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const evalProp = (value, values) => {
|
|
9
|
+
if (typeof value === 'function') {
|
|
10
|
+
return value(values);
|
|
11
|
+
}
|
|
12
|
+
return value;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* @Author: mengpeng
|
|
17
|
+
* @Date: 2022-11-10 10:42:00
|
|
18
|
+
* @Last Modified by: mengpeng
|
|
19
|
+
* @Last Modified time: 2022-11-10 11:07:34
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
var staticProps = {
|
|
23
|
+
props: {
|
|
24
|
+
dynamicProps: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
getCompProps(params) {
|
|
31
|
+
const {
|
|
32
|
+
def: {
|
|
33
|
+
staticProps
|
|
34
|
+
}
|
|
35
|
+
} = params;
|
|
36
|
+
const {
|
|
37
|
+
dynamicProps
|
|
38
|
+
} = this;
|
|
39
|
+
return {
|
|
40
|
+
...params,
|
|
41
|
+
...(dynamicProps ? evalProp(staticProps, params) : {})
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { staticProps as default };
|
|
48
|
+
//# sourceMappingURL=static-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-props.js","sources":["../../src/util/object.js","../../src/mixin/static-props.js"],"sourcesContent":["/*\n * @Author: xiaodongyu\n * @Date 2019-12-07 14:00:32\n * @Last Modified by: mengpeng \n * @Last Modified time: 2022-11-10 15:39:31 \n */\n\nexport const evalProp = (value, values) => {\n if (typeof value === 'function') {\n return value(values);\n }\n\n return value;\n};\n\nconst getKeys = (keyString = '') => keyString.split(/\\]?[[.]/);\n\nexport const pickValue = (obj, keyString) => {\n const keys = getKeys(keyString);\n let value = obj;\n try {\n keys.forEach(key => (value = value[key]));\n } catch (err) {\n value = undefined;\n }\n\n return value;\n};\n\nexport const setValue = (obj = {}, keyString, value) => {\n const keys = getKeys(keyString);\n const result = {...obj};\n let target = result;\n keys.forEach((key, idx) => {\n if (idx === keys.length - 1) {\n target[key] = value;\n } else {\n if (!target[key]) {\n const nextKey = keys[idx + 1];\n if (/^\\d+$/.test(nextKey) && new RegExp(`${key}]?[${nextKey}]`).test(keyString)) {\n target[key] = [];\n } else {\n target[key] = {};\n }\n }\n\n target = target[key];\n }\n });\n\n return result;\n};\n\nexport const spreadObjectKeys = origin => {\n if (!origin) return origin;\n\n return Object.entries(origin)\n .reduce((acc, [key, value]) => setValue(acc, key, value), {});\n};\n\nconst numberToStr = val => {\n if ((val || val === 0 || val === false) && (val.constructor === Number || val.constructor === Boolean)) {\n return val.toString();\n }\n\n return val;\n};\n\nexport const numbersToStr = val => {\n if (val && val.constructor === Array) {\n return val.map(numberToStr);\n }\n\n return numberToStr(val);\n};\n\nexport const isMobile = /mobile/i.test(navigator.userAgent);\n\nexport function spreadProps({class: className, style, ref, key, ...props} = {}) {\n return {\n key,\n class: className,\n style,\n ref,\n props\n };\n}\n\nexport function appendClass(className, appendix) {\n // 目前只支持append string\n if (typeof appendix !== 'string') return className;\n\n if (!className) return appendix;\n\n switch (className.constructor) {\n case String:\n return `${className} ${appendix}`;\n case Object:\n return {...className, [appendix]: true};\n case Array:\n return [...className, appendix];\n }\n\n return className;\n}\n\nconst isPlainObject = obj => {\n if (obj === null || Array.isArray(obj)) {\n return false;\n }\n\n return typeof obj === 'object';\n};\n\nconst customizer = (target, source) => {\n //对象需要考虑深层对象\n if (isPlainObject(target) && isPlainObject(target)) {\n return merge(target, source);\n }\n\n //其他格式一律返回新值\n return source;\n};\n\n//两两合并\nexport const merge = (target = {}, source = {}) => {\n const res = {};\n [...Object.keys(target), ...Object.keys(source)]\n .forEach(key => {\n const val = customizer(target[key], source[key]);\n\n res[key] = typeof val === 'undefined' ? target[key] : val;\n });\n\n return res;\n};\n","/*\n * @Author: mengpeng\n * @Date: 2022-11-10 10:42:00\n * @Last Modified by: mengpeng \n * @Last Modified time: 2022-11-10 11:07:34 \n */\n\nimport {evalProp} from '../util/object.js';\n\nexport default {\n props: {\n dynamicProps: {\n type: Boolean,\n default: false\n }\n },\n\n methods: {\n getCompProps(params) {\n const {def: {staticProps}} = params;\n const {dynamicProps} = this;\n\n return {\n ...params,\n ...(dynamicProps ? evalProp(staticProps, params) : {})\n };\n }\n },\n};\n"],"names":["evalProp","value","values","props","dynamicProps","type","Boolean","default","methods","getCompProps","params","def","staticProps"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEO,MAAMA,QAAQ,GAAGA,CAACC,KAAK,EAAEC,MAAM,KAAK;AACvC,EAAA,IAAI,OAAOD,KAAK,KAAK,UAAU,EAAE;IAC7B,OAAOA,KAAK,CAACC,MAAM,CAAC,CAAA;AACxB,GAAA;AAEA,EAAA,OAAOD,KAAK,CAAA;AAChB,CAAC;;ACbD;AACA;AACA;AACA;AACA;AACA;;AAIA,kBAAe;AACXE,EAAAA,KAAK,EAAE;AACHC,IAAAA,YAAY,EAAE;AACVC,MAAAA,IAAI,EAAEC,OAAO;AACbC,MAAAA,OAAO,EAAE,KAAA;AACb,KAAA;GACH;AAEDC,EAAAA,OAAO,EAAE;IACLC,YAAYA,CAACC,MAAM,EAAE;MACjB,MAAM;AAACC,QAAAA,GAAG,EAAE;AAACC,UAAAA,WAAAA;AAAW,SAAA;AAAC,OAAC,GAAGF,MAAM,CAAA;MACnC,MAAM;AAACN,QAAAA,YAAAA;AAAY,OAAC,GAAG,IAAI,CAAA;MAE3B,OAAO;AACH,QAAA,GAAGM,MAAM;QACT,IAAIN,YAAY,GAAGJ,QAAQ,CAACY,WAAW,EAAEF,MAAM,CAAC,GAAG,EAAE,CAAA;OACxD,CAAA;AACL,KAAA;AACJ,GAAA;AACJ,CAAC;;;;"}
|