@fmdeui/fmui 1.0.9 → 1.0.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/es/components/svgIcon/index.d.ts +7 -26
- package/es/hooks/index.d.ts +0 -26
- package/es/hooks/other.d.ts +0 -8
- package/es/index.d.ts +30 -0
- package/es/index.mjs +8 -5
- package/es/make-installer.mjs +8 -3
- package/es/packages/components/index.mjs +10 -0
- package/es/packages/components/svgIcon/index.mjs +17 -0
- package/es/packages/components/svgIcon/svgicon.vue.mjs +5 -0
- package/es/packages/components/svgIcon/svgicon.vue2.mjs +94 -0
- package/es/packages/hooks/index.mjs +0 -5
- package/es/packages/hooks/other.mjs +137 -0
- package/es/packages/utils/index.mjs +0 -3
- package/es/utils/index.d.ts +0 -4
- package/index.js +752 -497
- package/index.min.js +4 -4
- package/index.min.mjs +4 -4
- package/index.mjs +732 -499
- package/lib/components/svgIcon/index.d.ts +7 -26
- package/lib/hooks/index.d.ts +0 -26
- package/lib/hooks/other.d.ts +0 -8
- package/lib/index.d.ts +30 -0
- package/lib/index.js +30 -23
- package/lib/make-installer.js +9 -4
- package/lib/packages/components/index.js +25 -0
- package/lib/packages/components/svgIcon/index.js +38 -0
- package/lib/packages/components/svgIcon/svgicon.vue.js +9 -0
- package/lib/packages/components/svgIcon/svgicon.vue2.js +98 -0
- package/lib/packages/hooks/index.js +1 -4
- package/lib/packages/hooks/other.js +149 -0
- package/lib/packages/utils/index.js +0 -5
- package/lib/utils/index.d.ts +0 -4
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/package.json +1 -1
- /package/es/components/svgIcon/{index.vue.d.ts → svgicon.vue.d.ts} +0 -0
- /package/{lib → es}/defaults.css +0 -0
- /package/lib/components/svgIcon/{index.vue.d.ts → svgicon.vue.d.ts} +0 -0
- /package/{es/make-installer.css → lib/version.css} +0 -0
|
@@ -1,26 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
default: () => number;
|
|
9
|
-
};
|
|
10
|
-
color: {
|
|
11
|
-
type: StringConstructor;
|
|
12
|
-
};
|
|
13
|
-
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
14
|
-
name: {
|
|
15
|
-
type: StringConstructor;
|
|
16
|
-
};
|
|
17
|
-
size: {
|
|
18
|
-
type: NumberConstructor;
|
|
19
|
-
default: () => number;
|
|
20
|
-
};
|
|
21
|
-
color: {
|
|
22
|
-
type: StringConstructor;
|
|
23
|
-
};
|
|
24
|
-
}>> & Readonly<{}>, {
|
|
25
|
-
size: number;
|
|
26
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 导出全局注册 element plus svg 图标
|
|
4
|
+
* @param app vue 实例
|
|
5
|
+
* @description 使用:https://element-plus.gitee.io/zh-CN/component/icon.html
|
|
6
|
+
*/
|
|
7
|
+
export declare function elSvg(app: App): void;
|
package/lib/hooks/index.d.ts
CHANGED
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
import { default as commonFunction } from './commonFunction';
|
|
2
|
-
import { EmptyArrayType } from 'fmdeui-fmui';
|
|
3
|
-
import { MessageHandler } from 'element-plus';
|
|
4
|
-
declare const commonFun: {
|
|
5
|
-
percentFormat: (row: EmptyArrayType, column: number, cellValue: string) => string;
|
|
6
|
-
dateFormatYMD: (row: EmptyArrayType, column: number, cellValue: string) => string;
|
|
7
|
-
dateFormatYMDHMS: (row: EmptyArrayType, column: number, cellValue: string) => string;
|
|
8
|
-
dateFormatHMS: (row: EmptyArrayType, column: number, cellValue: string) => string;
|
|
9
|
-
scaleFormat: (value?: string, scale?: number) => string;
|
|
10
|
-
scale2Format: (value?: string) => string;
|
|
11
|
-
groupSeparator: (value: number, minimumFractionDigits?: number) => string;
|
|
12
|
-
copyText: (text: string) => Promise<unknown>;
|
|
13
|
-
removeHtmlSub: (value: string) => string;
|
|
14
|
-
removeHtml: (value: string) => string;
|
|
15
|
-
getEnumDesc: (key: any, lstEnum: any) => any;
|
|
16
|
-
appendQueryParams: (url: string, params: {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}) => string;
|
|
19
|
-
getNameAbbr: (text: string, callback?: (abbr: any) => void) => Promise<any> | MessageHandler | undefined;
|
|
20
|
-
handleConditionalClear: (condition: boolean, fieldValue: any, clearValue?: any) => any;
|
|
21
|
-
getTimeRangePickerShortcuts: () => {
|
|
22
|
-
text: string;
|
|
23
|
-
value: () => Date[];
|
|
24
|
-
}[];
|
|
25
|
-
};
|
|
26
|
-
export { commonFunction, commonFun, };
|
|
27
1
|
export * from './useLocale';
|
|
28
2
|
export * from './authFunction';
|
|
29
3
|
export * from './useVxeTableOptionsHook';
|
package/lib/hooks/other.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
1
|
import { EmptyArrayType, EmptyObjectType, RouteItem, RouteToFrom } from 'fmdeui-fmui/es/types';
|
|
3
|
-
/**
|
|
4
|
-
* 导出全局注册 element plus svg 图标
|
|
5
|
-
* @param app vue 实例
|
|
6
|
-
* @description 使用:https://element-plus.gitee.io/zh-CN/component/icon.html
|
|
7
|
-
*/
|
|
8
|
-
export declare function elSvg(app: App): void;
|
|
9
2
|
/**
|
|
10
3
|
* 设置浏览器标题国际化
|
|
11
4
|
* @method const title = useTitle(); ==> title()
|
|
@@ -64,7 +57,6 @@ export declare function handleOpenLink(val: RouteItem): void;
|
|
|
64
57
|
* @method handleOpenLink 打开外部链接
|
|
65
58
|
*/
|
|
66
59
|
declare const other: {
|
|
67
|
-
elSvg: (app: App) => void;
|
|
68
60
|
useTitle: () => void;
|
|
69
61
|
setTagsViewNameI18n(route: RouteToFrom): string;
|
|
70
62
|
lazyImg: (el: string, arr: EmptyArrayType) => void;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { default as installer } from './defaults';
|
|
2
|
+
import { default as setIntroduction, setCssCdn, setJsCdn } from './utils/setIconfont';
|
|
3
|
+
import { default as emitter } from './utils/mitt';
|
|
4
|
+
import { default as Watermark } from './utils/watermark';
|
|
5
|
+
import { default as commonFunction } from './hooks/commonFunction';
|
|
6
|
+
import { default as other } from './hooks/other';
|
|
7
|
+
import { EmptyArrayType } from './types';
|
|
8
|
+
import { MessageHandler } from 'element-plus';
|
|
2
9
|
import { App } from 'vue';
|
|
3
10
|
export * from './types';
|
|
4
11
|
export * from './api';
|
|
@@ -7,6 +14,29 @@ export * from './stores';
|
|
|
7
14
|
export * from './hooks';
|
|
8
15
|
export * from './router';
|
|
9
16
|
export * from './locale';
|
|
17
|
+
declare const commonFun: {
|
|
18
|
+
percentFormat: (row: EmptyArrayType, column: number, cellValue: string) => string;
|
|
19
|
+
dateFormatYMD: (row: EmptyArrayType, column: number, cellValue: string) => string;
|
|
20
|
+
dateFormatYMDHMS: (row: EmptyArrayType, column: number, cellValue: string) => string;
|
|
21
|
+
dateFormatHMS: (row: EmptyArrayType, column: number, cellValue: string) => string;
|
|
22
|
+
scaleFormat: (value?: string, scale?: number) => string;
|
|
23
|
+
scale2Format: (value?: string) => string;
|
|
24
|
+
groupSeparator: (value: number, minimumFractionDigits?: number) => string;
|
|
25
|
+
copyText: (text: string) => Promise<unknown>;
|
|
26
|
+
removeHtmlSub: (value: string) => string;
|
|
27
|
+
removeHtml: (value: string) => string;
|
|
28
|
+
getEnumDesc: (key: any, lstEnum: any) => any;
|
|
29
|
+
appendQueryParams: (url: string, params: {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}) => string;
|
|
32
|
+
getNameAbbr: (text: string, callback?: (abbr: any) => void) => Promise<any> | MessageHandler | undefined;
|
|
33
|
+
handleConditionalClear: (condition: boolean, fieldValue: any, clearValue?: any) => any;
|
|
34
|
+
getTimeRangePickerShortcuts: () => {
|
|
35
|
+
text: string;
|
|
36
|
+
value: () => Date[];
|
|
37
|
+
}[];
|
|
38
|
+
};
|
|
39
|
+
export { setIntroduction, emitter as mittBus, Watermark, other, commonFunction, commonFun, setCssCdn, setJsCdn };
|
|
10
40
|
export { version } from './version';
|
|
11
41
|
export declare const install: (app: App) => void;
|
|
12
42
|
export default installer;
|
package/lib/index.js
CHANGED
|
@@ -3,13 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var defaults = require('./defaults.js');
|
|
6
|
+
var setIconfont = require('./packages/utils/setIconfont.js');
|
|
7
|
+
var mitt = require('./packages/utils/mitt.js');
|
|
8
|
+
var watermark = require('./packages/utils/watermark.js');
|
|
9
|
+
var commonFunction = require('./packages/hooks/commonFunction.js');
|
|
10
|
+
var other = require('./packages/hooks/other.js');
|
|
6
11
|
require('./packages/types/index.js');
|
|
7
12
|
var index = require('./packages/api/index.js');
|
|
8
13
|
require('./packages/utils/index.js');
|
|
9
14
|
require('./packages/stores/index.js');
|
|
10
|
-
|
|
11
|
-
var index$
|
|
12
|
-
var index$
|
|
15
|
+
require('./packages/hooks/index.js');
|
|
16
|
+
var index$3 = require('./packages/router/index.js');
|
|
17
|
+
var index$2 = require('./packages/locale/index.js');
|
|
13
18
|
var version = require('./version.js');
|
|
14
19
|
var storage = require('./packages/utils/storage.js');
|
|
15
20
|
var loading = require('./packages/utils/loading.js');
|
|
@@ -19,12 +24,11 @@ var authFunction = require('./packages/hooks/authFunction.js');
|
|
|
19
24
|
var base64Conver = require('./packages/utils/base64Conver.js');
|
|
20
25
|
var useLocale = require('./packages/hooks/useLocale.js');
|
|
21
26
|
var arrayOperation = require('./packages/utils/arrayOperation.js');
|
|
22
|
-
var commonFunction = require('./packages/hooks/commonFunction.js');
|
|
23
27
|
var route = require('./packages/router/route.js');
|
|
24
28
|
var download = require('./packages/utils/download.js');
|
|
25
29
|
var en = require('./packages/locale/lang/en.js');
|
|
26
30
|
var exportExcel = require('./packages/utils/exportExcel.js');
|
|
27
|
-
var index$
|
|
31
|
+
var index$1 = require('./packages/api/sys/index.js');
|
|
28
32
|
var flowLoading = require('./packages/utils/flowLoading.js');
|
|
29
33
|
var formatTime = require('./packages/utils/formatTime.js');
|
|
30
34
|
var gpsConvertor = require('./packages/utils/gpsConvertor.js');
|
|
@@ -33,11 +37,9 @@ var backEnd = require('./packages/router/backEnd.js');
|
|
|
33
37
|
var frontEnd = require('./packages/router/frontEnd.js');
|
|
34
38
|
var toolsValidate = require('./packages/utils/toolsValidate.js');
|
|
35
39
|
var sysInfo = require('./packages/hooks/sysInfo.js');
|
|
36
|
-
var mitt = require('./packages/utils/mitt.js');
|
|
37
40
|
var saulVModel = require('./packages/utils/saulVModel.js');
|
|
38
|
-
var setIconfont = require('./packages/utils/setIconfont.js');
|
|
39
41
|
var dataSignature = require('./packages/utils/data-signature.js');
|
|
40
|
-
var index$
|
|
42
|
+
var index$4 = require('./packages/api/base/index.js');
|
|
41
43
|
var theme = require('./packages/utils/theme.js');
|
|
42
44
|
var dateTimeShortCust = require('./packages/hooks/dateTimeShortCust.js');
|
|
43
45
|
var formRule = require('./packages/utils/formRule.js');
|
|
@@ -51,20 +53,27 @@ var useVxeTableOptionsHook = require('./packages/hooks/useVxeTableOptionsHook.js
|
|
|
51
53
|
var formValidate = require('./packages/utils/formValidate.js');
|
|
52
54
|
var zhCn = require('./packages/locale/lang/zh-cn.js');
|
|
53
55
|
|
|
56
|
+
const commonFun = commonFunction.default();
|
|
54
57
|
const install = defaults.default.install;
|
|
55
58
|
|
|
56
59
|
exports.default = defaults.default;
|
|
60
|
+
exports.setCssCdn = setIconfont.setCssCdn;
|
|
61
|
+
exports.setIntroduction = setIconfont.default;
|
|
62
|
+
exports.setJsCdn = setIconfont.setJsCdn;
|
|
63
|
+
exports.mittBus = mitt.default;
|
|
64
|
+
exports.Watermark = watermark.default;
|
|
65
|
+
exports.commonFunction = commonFunction.default;
|
|
66
|
+
exports.other = other.default;
|
|
57
67
|
exports.AccountTypeEnum = index.AccountTypeEnum;
|
|
58
68
|
exports.HttpMethodEnum = index.HttpMethodEnum;
|
|
59
69
|
exports.JobCreateTypeEnum = index.JobCreateTypeEnum;
|
|
60
|
-
exports.
|
|
61
|
-
exports.
|
|
62
|
-
exports.
|
|
63
|
-
exports.
|
|
64
|
-
exports.
|
|
65
|
-
exports.
|
|
66
|
-
exports.
|
|
67
|
-
exports.setupI18n = index$3.setupI18n;
|
|
70
|
+
exports.initRouter = index$3.initRouter;
|
|
71
|
+
exports.getCountryCode = index$2.getCountryCode;
|
|
72
|
+
exports.i18n = index$2.i18n;
|
|
73
|
+
exports.iso_3166_1_CountryList = index$2.iso_3166_1_CountryList;
|
|
74
|
+
exports.languageList = index$2.languageList;
|
|
75
|
+
exports.mergMessage = index$2.mergMessage;
|
|
76
|
+
exports.setupI18n = index$2.setupI18n;
|
|
68
77
|
exports.version = version.version;
|
|
69
78
|
exports.Local = storage.Local;
|
|
70
79
|
exports.Session = storage.Session;
|
|
@@ -105,7 +114,6 @@ exports.clone = arrayOperation.clone;
|
|
|
105
114
|
exports.isObjectValueEqual = arrayOperation.isObjectValueEqual;
|
|
106
115
|
exports.judgementSameArr = arrayOperation.judgementSameArr;
|
|
107
116
|
exports.removeDuplicate = arrayOperation.removeDuplicate;
|
|
108
|
-
exports.commonFunction = commonFunction.default;
|
|
109
117
|
exports.configureRoutes = route.configureRoutes;
|
|
110
118
|
exports.setPathPrefix = route.setPathPrefix;
|
|
111
119
|
exports.downloadByBase64 = download.downloadByBase64;
|
|
@@ -117,8 +125,8 @@ exports.getFileName = download.getFileName;
|
|
|
117
125
|
exports.openWindow = download.openWindow;
|
|
118
126
|
exports.en = en.default;
|
|
119
127
|
exports.exportExcel = exportExcel.exportExcel;
|
|
120
|
-
exports.feature = index$
|
|
121
|
-
exports.useSysApi = index$
|
|
128
|
+
exports.feature = index$1.feature;
|
|
129
|
+
exports.useSysApi = index$1.useSysApi;
|
|
122
130
|
exports.flowLoading = flowLoading.flowLoading;
|
|
123
131
|
exports.formatAxis = formatTime.formatAxis;
|
|
124
132
|
exports.formatDate = formatTime.formatDate;
|
|
@@ -175,12 +183,10 @@ exports.verifyTextColor = toolsValidate.verifyTextColor;
|
|
|
175
183
|
exports.verifyUrl = toolsValidate.verifyUrl;
|
|
176
184
|
exports.loadSysInfo = sysInfo.loadSysInfo;
|
|
177
185
|
exports.updateFavicon = sysInfo.updateFavicon;
|
|
178
|
-
exports.mittBus = mitt.default;
|
|
179
186
|
exports.saulVModel = saulVModel.saulVModel;
|
|
180
|
-
exports.setIntroduction = setIconfont.default;
|
|
181
187
|
exports.signatureByKSort = dataSignature.signatureByKSort;
|
|
182
|
-
exports.useApi = index$
|
|
183
|
-
exports.useBaseApi = index$
|
|
188
|
+
exports.useApi = index$4.useApi;
|
|
189
|
+
exports.useBaseApi = index$4.useBaseApi;
|
|
184
190
|
exports.useChangeColor = theme.useChangeColor;
|
|
185
191
|
exports.useDateTimeShortCust = dateTimeShortCust.useDateTimeShortCust;
|
|
186
192
|
exports.useFormRulePresets = formRule.useFormRulePresets;
|
|
@@ -194,4 +200,5 @@ exports.useVxeTable = useVxeTableOptionsHook.useVxeTable;
|
|
|
194
200
|
exports.validateFormWithScroll = formValidate.validateFormWithScroll;
|
|
195
201
|
exports.validateFormWithScrollCallback = formValidate.validateFormWithScrollCallback;
|
|
196
202
|
exports.zhCn = zhCn.default;
|
|
203
|
+
exports.commonFun = commonFun;
|
|
197
204
|
exports.install = install;
|
package/lib/make-installer.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var inpinia = require('./packages/stores/inpinia.js');
|
|
4
|
-
var index = require('./packages/directive/index.js');
|
|
4
|
+
var index$1 = require('./packages/directive/index.js');
|
|
5
5
|
var setupVXETableHook = require('./packages/hooks/setupVXETableHook.js');
|
|
6
|
+
require('./packages/components/index.js');
|
|
7
|
+
var index = require('./packages/components/svgIcon/index.js');
|
|
6
8
|
|
|
7
9
|
const makeInstaller = (components = []) => {
|
|
8
10
|
const install = (app) => {
|
|
@@ -13,9 +15,12 @@ const makeInstaller = (components = []) => {
|
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
17
|
);
|
|
16
|
-
app
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
if (app) {
|
|
19
|
+
app.use(inpinia.default);
|
|
20
|
+
index.elSvg(app);
|
|
21
|
+
index$1.directive(app);
|
|
22
|
+
app.use(setupVXETableHook.setupVXETable);
|
|
23
|
+
}
|
|
19
24
|
};
|
|
20
25
|
return {
|
|
21
26
|
install
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./button/index.js');
|
|
4
|
+
var index$3 = require('./input/index.js');
|
|
5
|
+
var index$4 = require('./layout-page/index.js');
|
|
6
|
+
var index$5 = require('./layout-page-item/index.js');
|
|
7
|
+
var index$1 = require('./chart/index.js');
|
|
8
|
+
var index$7 = require('./select/index.js');
|
|
9
|
+
var index$8 = require('./select-table/index.js');
|
|
10
|
+
var index$6 = require('./query-condition/index.js');
|
|
11
|
+
var index$2 = require('./form/index.js');
|
|
12
|
+
var index$9 = require('./svgIcon/index.js');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.FButton = index.FButton;
|
|
17
|
+
exports.FInput = index$3.FInput;
|
|
18
|
+
exports.FLayoutPage = index$4.FLayoutPage;
|
|
19
|
+
exports.FLayoutPageItem = index$5.FLayoutPageItem;
|
|
20
|
+
exports.FChart = index$1.FChart;
|
|
21
|
+
exports.FSelect = index$7.FSelect;
|
|
22
|
+
exports.FSelectTable = index$8.FSelectTable;
|
|
23
|
+
exports.FQueryCondition = index$6.FQueryCondition;
|
|
24
|
+
exports.FForm = index$2.FForm;
|
|
25
|
+
exports.elSvg = index$9.elSvg;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var svg = require('@element-plus/icons-vue');
|
|
4
|
+
require('./svgicon.vue.js');
|
|
5
|
+
var svgicon_vue_vue_type_script_setup_true_name_svgIcon_lang = require('./svgicon.vue2.js');
|
|
6
|
+
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
var n = Object.create(null);
|
|
9
|
+
if (e) {
|
|
10
|
+
Object.keys(e).forEach(function (k) {
|
|
11
|
+
if (k !== 'default') {
|
|
12
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return e[k]; }
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var svg__namespace = /*#__PURE__*/_interopNamespaceDefault(svg);
|
|
25
|
+
|
|
26
|
+
function elSvg(app) {
|
|
27
|
+
const icons = svg__namespace;
|
|
28
|
+
for (const i in icons) {
|
|
29
|
+
if (!app._context.components[`ele-${icons[i].name}`]) {
|
|
30
|
+
app.component(`ele-${icons[i].name}`, icons[i]);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (!app._context.components[`SvgIcon`]) {
|
|
34
|
+
app.component("SvgIcon", svgicon_vue_vue_type_script_setup_true_name_svgIcon_lang.default);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
exports.elSvg = elSvg;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var svgicon_vue_vue_type_script_setup_true_name_svgIcon_lang = require('./svgicon.vue2.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.default = svgicon_vue_vue_type_script_setup_true_name_svgIcon_lang.default;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
const _hoisted_1 = ["src"];
|
|
8
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
...{
|
|
10
|
+
name: "svgIcon"
|
|
11
|
+
},
|
|
12
|
+
__name: "svgicon",
|
|
13
|
+
props: {
|
|
14
|
+
// svg 图标组件名字
|
|
15
|
+
name: {
|
|
16
|
+
type: String
|
|
17
|
+
},
|
|
18
|
+
// svg 大小
|
|
19
|
+
size: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: () => 14
|
|
22
|
+
},
|
|
23
|
+
// svg 颜色
|
|
24
|
+
color: {
|
|
25
|
+
type: String
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
setup(__props) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const linesString = ["https", "http", "/src", "/assets", "data:image", window.__env__.VITE_PUBLIC_PATH];
|
|
31
|
+
const getIconName = vue.computed(() => {
|
|
32
|
+
return props == null ? void 0 : props.name;
|
|
33
|
+
});
|
|
34
|
+
const isShowIconSvg = vue.computed(() => {
|
|
35
|
+
var _a;
|
|
36
|
+
return (_a = props == null ? void 0 : props.name) == null ? void 0 : _a.startsWith("ele-");
|
|
37
|
+
});
|
|
38
|
+
const isShowIconImg = vue.computed(() => {
|
|
39
|
+
return linesString.find((str) => {
|
|
40
|
+
var _a;
|
|
41
|
+
return (_a = props.name) == null ? void 0 : _a.startsWith(str);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
const setIconSvgStyle = vue.computed(() => {
|
|
45
|
+
return `font-size: ${props.size}px;color: ${props.color};`;
|
|
46
|
+
});
|
|
47
|
+
const setIconImgOutStyle = vue.computed(() => {
|
|
48
|
+
return `width: ${props.size}px;height: ${props.size}px;display: inline-block;overflow: hidden;`;
|
|
49
|
+
});
|
|
50
|
+
const setIconSvgInsStyle = vue.computed(() => {
|
|
51
|
+
const filterStyle = [];
|
|
52
|
+
const compatibles = ["-webkit", "-ms", "-o", "-moz"];
|
|
53
|
+
compatibles.forEach((j) => filterStyle.push(`${j}-filter: drop-shadow(${props.color} ${props.size}px 0);`));
|
|
54
|
+
return `width: ${props.size}px;height: ${props.size}px;position: relative;left: -${props.size}px;${filterStyle.join("")}`;
|
|
55
|
+
});
|
|
56
|
+
return (_ctx, _cache) => {
|
|
57
|
+
return isShowIconSvg.value ? (vue.openBlock(), vue.createElementBlock(
|
|
58
|
+
"i",
|
|
59
|
+
{
|
|
60
|
+
key: 0,
|
|
61
|
+
class: "el-icon",
|
|
62
|
+
style: vue.normalizeStyle(setIconSvgStyle.value)
|
|
63
|
+
},
|
|
64
|
+
[
|
|
65
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getIconName.value)))
|
|
66
|
+
],
|
|
67
|
+
4
|
|
68
|
+
/* STYLE */
|
|
69
|
+
)) : isShowIconImg.value ? (vue.openBlock(), vue.createElementBlock(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
key: 1,
|
|
73
|
+
style: vue.normalizeStyle(setIconImgOutStyle.value)
|
|
74
|
+
},
|
|
75
|
+
[
|
|
76
|
+
vue.createElementVNode("img", {
|
|
77
|
+
src: getIconName.value,
|
|
78
|
+
style: vue.normalizeStyle(setIconSvgInsStyle.value)
|
|
79
|
+
}, null, 12, _hoisted_1)
|
|
80
|
+
],
|
|
81
|
+
4
|
|
82
|
+
/* STYLE */
|
|
83
|
+
)) : (vue.openBlock(), vue.createElementBlock(
|
|
84
|
+
"i",
|
|
85
|
+
{
|
|
86
|
+
key: 2,
|
|
87
|
+
class: vue.normalizeClass(getIconName.value),
|
|
88
|
+
style: vue.normalizeStyle(setIconSvgStyle.value)
|
|
89
|
+
},
|
|
90
|
+
null,
|
|
91
|
+
6
|
|
92
|
+
/* CLASS, STYLE */
|
|
93
|
+
));
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
exports.default = _sfc_main;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var commonFunction = require('./commonFunction.js');
|
|
4
3
|
var useLocale = require('./useLocale.js');
|
|
5
4
|
var authFunction = require('./authFunction.js');
|
|
6
5
|
var useVxeTableOptionsHook = require('./useVxeTableOptionsHook.js');
|
|
@@ -8,9 +7,8 @@ var sysInfo = require('./sysInfo.js');
|
|
|
8
7
|
var useInfo = require('./useInfo.js');
|
|
9
8
|
var dateTimeShortCust = require('./dateTimeShortCust.js');
|
|
10
9
|
|
|
11
|
-
const commonFun = commonFunction.default();
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
|
|
14
12
|
exports.buildLocaleContext = useLocale.buildLocaleContext;
|
|
15
13
|
exports.buildTranslator = useLocale.buildTranslator;
|
|
16
14
|
exports.translate = useLocale.translate;
|
|
@@ -44,4 +42,3 @@ exports.userId = useInfo.userId;
|
|
|
44
42
|
exports.userName = useInfo.userName;
|
|
45
43
|
exports.userPhone = useInfo.userPhone;
|
|
46
44
|
exports.useDateTimeShortCust = dateTimeShortCust.useDateTimeShortCust;
|
|
47
|
-
exports.commonFun = commonFun;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
require('../router/index.js');
|
|
7
|
+
var inpinia = require('../stores/inpinia.js');
|
|
8
|
+
var pinia = require('pinia');
|
|
9
|
+
var themeConfig = require('../stores/themeConfig.js');
|
|
10
|
+
var index = require('../locale/index.js');
|
|
11
|
+
var toolsValidate = require('../utils/toolsValidate.js');
|
|
12
|
+
var createRouter = require('../router/createRouter.js');
|
|
13
|
+
|
|
14
|
+
function useTitle() {
|
|
15
|
+
const stores = themeConfig.useThemeConfig(inpinia.default);
|
|
16
|
+
const { themeConfig: themeConfig$1 } = pinia.storeToRefs(stores);
|
|
17
|
+
vue.nextTick(() => {
|
|
18
|
+
let webTitle = "";
|
|
19
|
+
let globalTitle = themeConfig$1.value.globalTitle;
|
|
20
|
+
const { path, meta } = createRouter.router.currentRoute.value;
|
|
21
|
+
if (path === "/login") {
|
|
22
|
+
webTitle = meta.title;
|
|
23
|
+
} else {
|
|
24
|
+
webTitle = setTagsViewNameI18n(createRouter.router.currentRoute.value);
|
|
25
|
+
}
|
|
26
|
+
document.title = `${webTitle} - ${globalTitle}` || globalTitle;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function setTagsViewNameI18n(item) {
|
|
30
|
+
let tagsViewName = "";
|
|
31
|
+
const { query, params, meta } = item;
|
|
32
|
+
const pattern = /^\{("(zh-CN|en|zh-TW)":"[^,]+",?){1,3}}$/;
|
|
33
|
+
if ((query == null ? void 0 : query.tagsViewName) || (params == null ? void 0 : params.tagsViewName)) {
|
|
34
|
+
if (pattern.test(query == null ? void 0 : query.tagsViewName) || pattern.test(params == null ? void 0 : params.tagsViewName)) {
|
|
35
|
+
const urlTagsParams = (query == null ? void 0 : query.tagsViewName) && JSON.parse(query == null ? void 0 : query.tagsViewName) || (params == null ? void 0 : params.tagsViewName) && JSON.parse(params == null ? void 0 : params.tagsViewName);
|
|
36
|
+
tagsViewName = urlTagsParams[index.i18n.global.locale.value];
|
|
37
|
+
} else {
|
|
38
|
+
tagsViewName = (query == null ? void 0 : query.tagsViewName) || (params == null ? void 0 : params.tagsViewName);
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
tagsViewName = index.i18n.global.t(`message.menu.${meta.title}`);
|
|
42
|
+
}
|
|
43
|
+
return tagsViewName;
|
|
44
|
+
}
|
|
45
|
+
const lazyImg = (el, arr) => {
|
|
46
|
+
const io = new IntersectionObserver((res) => {
|
|
47
|
+
res.forEach((v) => {
|
|
48
|
+
if (v.isIntersecting) {
|
|
49
|
+
const { img, key } = v.target.dataset;
|
|
50
|
+
v.target.src = img;
|
|
51
|
+
v.target.onload = () => {
|
|
52
|
+
io.unobserve(v.target);
|
|
53
|
+
arr[key]["loading"] = false;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
vue.nextTick(() => {
|
|
59
|
+
document.querySelectorAll(el).forEach((img) => io.observe(img));
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
const globalComponentSize = () => {
|
|
63
|
+
const stores = themeConfig.useThemeConfig(inpinia.default);
|
|
64
|
+
const { themeConfig: themeConfig$1 } = pinia.storeToRefs(stores);
|
|
65
|
+
return themeConfig$1.value.globalComponentSize;
|
|
66
|
+
};
|
|
67
|
+
function deepClone(obj) {
|
|
68
|
+
let newObj;
|
|
69
|
+
try {
|
|
70
|
+
newObj = obj.push ? [] : {};
|
|
71
|
+
} catch (error) {
|
|
72
|
+
newObj = {};
|
|
73
|
+
}
|
|
74
|
+
for (let attr in obj) {
|
|
75
|
+
if (obj[attr] && typeof obj[attr] === "object") {
|
|
76
|
+
newObj[attr] = deepClone(obj[attr]);
|
|
77
|
+
} else {
|
|
78
|
+
newObj[attr] = obj[attr];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return newObj;
|
|
82
|
+
}
|
|
83
|
+
function isMobile() {
|
|
84
|
+
if (navigator.userAgent.match(/('phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone')/i)) {
|
|
85
|
+
return true;
|
|
86
|
+
} else {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function handleEmpty(list) {
|
|
91
|
+
const arr = [];
|
|
92
|
+
for (const i in list) {
|
|
93
|
+
const d = [];
|
|
94
|
+
for (const j in list[i]) {
|
|
95
|
+
d.push(list[i][j]);
|
|
96
|
+
}
|
|
97
|
+
const leng = d.filter((item) => item === "").length;
|
|
98
|
+
if (leng !== d.length) {
|
|
99
|
+
arr.push(list[i]);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return arr;
|
|
103
|
+
}
|
|
104
|
+
function handleOpenLink(val) {
|
|
105
|
+
var _a, _b, _c;
|
|
106
|
+
const { origin, pathname } = window.location;
|
|
107
|
+
createRouter.router.push(val.path);
|
|
108
|
+
if (toolsValidate.verifyUrl((_a = val.meta) == null ? void 0 : _a.isLink)) window.open((_b = val.meta) == null ? void 0 : _b.isLink);
|
|
109
|
+
else window.open(`${origin}${pathname}#${(_c = val.meta) == null ? void 0 : _c.isLink}`);
|
|
110
|
+
}
|
|
111
|
+
const other = {
|
|
112
|
+
// elSvg: (app: App) => {
|
|
113
|
+
// elSvg(app);
|
|
114
|
+
// },
|
|
115
|
+
useTitle: () => {
|
|
116
|
+
useTitle();
|
|
117
|
+
},
|
|
118
|
+
setTagsViewNameI18n(route) {
|
|
119
|
+
return setTagsViewNameI18n(route);
|
|
120
|
+
},
|
|
121
|
+
lazyImg: (el, arr) => {
|
|
122
|
+
lazyImg(el, arr);
|
|
123
|
+
},
|
|
124
|
+
globalComponentSize: () => {
|
|
125
|
+
return globalComponentSize();
|
|
126
|
+
},
|
|
127
|
+
deepClone: (obj) => {
|
|
128
|
+
return deepClone(obj);
|
|
129
|
+
},
|
|
130
|
+
isMobile: () => {
|
|
131
|
+
return isMobile();
|
|
132
|
+
},
|
|
133
|
+
handleEmpty: (list) => {
|
|
134
|
+
return handleEmpty(list);
|
|
135
|
+
},
|
|
136
|
+
handleOpenLink: (val) => {
|
|
137
|
+
handleOpenLink(val);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
exports.deepClone = deepClone;
|
|
142
|
+
exports.default = other;
|
|
143
|
+
exports.globalComponentSize = globalComponentSize;
|
|
144
|
+
exports.handleEmpty = handleEmpty;
|
|
145
|
+
exports.handleOpenLink = handleOpenLink;
|
|
146
|
+
exports.isMobile = isMobile;
|
|
147
|
+
exports.lazyImg = lazyImg;
|
|
148
|
+
exports.setTagsViewNameI18n = setTagsViewNameI18n;
|
|
149
|
+
exports.useTitle = useTitle;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var mitt = require('./mitt.js');
|
|
4
|
-
var setIconfont = require('./setIconfont.js');
|
|
5
3
|
var arrayOperation = require('./arrayOperation.js');
|
|
6
4
|
require('./auto-update.js');
|
|
7
5
|
var base64Conver = require('./base64Conver.js');
|
|
@@ -22,12 +20,9 @@ var saulVModel = require('./saulVModel.js');
|
|
|
22
20
|
var storage = require('./storage.js');
|
|
23
21
|
var theme = require('./theme.js');
|
|
24
22
|
var toolsValidate = require('./toolsValidate.js');
|
|
25
|
-
require('./watermark.js');
|
|
26
23
|
|
|
27
24
|
|
|
28
25
|
|
|
29
|
-
exports.mittBus = mitt.default;
|
|
30
|
-
exports.setIntroduction = setIconfont.default;
|
|
31
26
|
exports.clone = arrayOperation.clone;
|
|
32
27
|
exports.isObjectValueEqual = arrayOperation.isObjectValueEqual;
|
|
33
28
|
exports.judgementSameArr = arrayOperation.judgementSameArr;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { default as mittBus } from './mitt';
|
|
2
|
-
import { default as setIntroduction } from './setIconfont';
|
|
3
|
-
export { mittBus, setIntroduction };
|
|
4
1
|
export * from './arrayOperation';
|
|
5
2
|
export * from './auto-update';
|
|
6
3
|
export * from './base64Conver';
|
|
@@ -21,4 +18,3 @@ export * from './saulVModel';
|
|
|
21
18
|
export * from './storage';
|
|
22
19
|
export * from './theme';
|
|
23
20
|
export * from './toolsValidate';
|
|
24
|
-
export * from './watermark';
|
package/locale/en.js
CHANGED