@fmdeui/fmui 1.0.8 → 1.0.10
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/hooks/index.d.ts +0 -2
- package/es/index.d.ts +28 -3
- package/es/index.mjs +4 -3
- package/es/packages/hooks/index.mjs +0 -1
- package/es/packages/utils/index.mjs +0 -2
- package/es/utils/index.d.ts +0 -2
- package/index.js +215 -213
- package/index.min.js +4 -4
- package/index.min.mjs +4 -4
- package/index.mjs +213 -212
- package/lib/hooks/index.d.ts +0 -2
- package/lib/index.d.ts +28 -3
- package/lib/index.js +6 -4
- package/lib/packages/hooks/index.js +0 -2
- package/lib/packages/utils/index.js +0 -4
- package/lib/utils/index.d.ts +0 -2
- 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/{defaults.css → make-installer.css} +0 -0
- /package/lib/{version.css → defaults.css} +0 -0
package/index.mjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.10 */
|
|
2
2
|
import { createPinia, defineStore, storeToRefs } from 'pinia';
|
|
3
3
|
import CryptoJS from 'crypto-js';
|
|
4
4
|
import XLSXS from 'xlsx-js-style';
|
|
5
5
|
import { ElLoading, ElMessage, localeContextKey, dayjs } from 'element-plus';
|
|
6
6
|
import { isRef, unref, watch, nextTick, computed, defineComponent, ref, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, renderSlot, inject, withDirectives, resolveDirective, reactive, useAttrs, useSlots, createSlots, renderList, normalizeProps, guardReactiveProps, createElementBlock, toDisplayString, createElementVNode, onMounted, onActivated, normalizeClass, createCommentVNode, resolveDynamicComponent, Fragment, createTextVNode, withModifiers, toHandlers, onBeforeUnmount, onUpdated, normalizeStyle, getCurrentInstance, vShow, markRaw } from 'vue';
|
|
7
7
|
import { CaretTop, ArrowDown, ArrowUp } from '@element-plus/icons-vue';
|
|
8
|
-
import mitt from 'mitt';
|
|
9
8
|
import axios from 'axios';
|
|
10
9
|
import Cookies from 'js-cookie';
|
|
11
10
|
import VxeUITable from 'vxe-table';
|
|
@@ -15,7 +14,8 @@ import VxeUI from 'vxe-pc-ui';
|
|
|
15
14
|
import { createI18n, useI18n } from 'vue-i18n';
|
|
16
15
|
import ExcelJS from 'exceljs';
|
|
17
16
|
import { get, merge } from 'lodash-es';
|
|
18
|
-
import {
|
|
17
|
+
import { isClient, useResizeObserver, useClipboard } from '@vueuse/core';
|
|
18
|
+
import mitt from 'mitt';
|
|
19
19
|
import { createRouter, createWebHashHistory } from 'vue-router';
|
|
20
20
|
import NProgress from 'nprogress';
|
|
21
21
|
|
|
@@ -1177,8 +1177,6 @@ const NextLoading = {
|
|
|
1177
1177
|
}
|
|
1178
1178
|
};
|
|
1179
1179
|
|
|
1180
|
-
const emitter = mitt();
|
|
1181
|
-
|
|
1182
1180
|
const Local = {
|
|
1183
1181
|
// 查看 v2.4.3版本更新日志
|
|
1184
1182
|
setKey(key) {
|
|
@@ -1459,41 +1457,6 @@ const saulVModel = (props, propName, emit) => {
|
|
|
1459
1457
|
});
|
|
1460
1458
|
};
|
|
1461
1459
|
|
|
1462
|
-
const cssCdnUrlList = [
|
|
1463
|
-
// 调整为从本地引入,注释下面的 url
|
|
1464
|
-
// '//at.alicdn.com/t/c/font_2298093_rnp72ifj3ba.css',
|
|
1465
|
-
// '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
|
|
1466
|
-
];
|
|
1467
|
-
const jsCdnUrlList = [];
|
|
1468
|
-
function setCssCdn() {
|
|
1469
|
-
if (cssCdnUrlList.length <= 0) return false;
|
|
1470
|
-
cssCdnUrlList.map((v) => {
|
|
1471
|
-
let link = document.createElement("link");
|
|
1472
|
-
link.rel = "stylesheet";
|
|
1473
|
-
link.href = v;
|
|
1474
|
-
link.crossOrigin = "anonymous";
|
|
1475
|
-
document.getElementsByTagName("head")[0].appendChild(link);
|
|
1476
|
-
});
|
|
1477
|
-
}
|
|
1478
|
-
function setJsCdn() {
|
|
1479
|
-
if (jsCdnUrlList.length <= 0) return false;
|
|
1480
|
-
jsCdnUrlList.map((v) => {
|
|
1481
|
-
let link = document.createElement("script");
|
|
1482
|
-
link.src = v;
|
|
1483
|
-
document.body.appendChild(link);
|
|
1484
|
-
});
|
|
1485
|
-
}
|
|
1486
|
-
const setIntroduction = {
|
|
1487
|
-
// 设置css
|
|
1488
|
-
cssCdn: () => {
|
|
1489
|
-
setCssCdn();
|
|
1490
|
-
},
|
|
1491
|
-
// 设置js
|
|
1492
|
-
jsCdn: () => {
|
|
1493
|
-
setJsCdn();
|
|
1494
|
-
}
|
|
1495
|
-
};
|
|
1496
|
-
|
|
1497
1460
|
function useChangeColor() {
|
|
1498
1461
|
const hexToRgb = (str) => {
|
|
1499
1462
|
let hexs = "";
|
|
@@ -18874,177 +18837,6 @@ const useDateTimeShortCust = () => {
|
|
|
18874
18837
|
];
|
|
18875
18838
|
};
|
|
18876
18839
|
|
|
18877
|
-
const themeStore = useThemeConfig();
|
|
18878
|
-
function commonFunction() {
|
|
18879
|
-
const { t } = useI18n();
|
|
18880
|
-
const { copy, isSupported } = useClipboard();
|
|
18881
|
-
const percentFormat = (row, column, cellValue) => {
|
|
18882
|
-
return cellValue ? `${cellValue}%` : "-";
|
|
18883
|
-
};
|
|
18884
|
-
const dateFormatYMD = (row, column, cellValue) => {
|
|
18885
|
-
if (!cellValue) return "-";
|
|
18886
|
-
return formatDate(new Date(cellValue), "YYYY-mm-dd");
|
|
18887
|
-
};
|
|
18888
|
-
const dateFormatYMDHMS = (row, column, cellValue) => {
|
|
18889
|
-
if (!cellValue) return "-";
|
|
18890
|
-
return formatDate(new Date(cellValue), "YYYY-mm-dd HH:MM:SS");
|
|
18891
|
-
};
|
|
18892
|
-
const dateFormatHMS = (row, column, cellValue) => {
|
|
18893
|
-
if (!cellValue) return "-";
|
|
18894
|
-
let time = 0;
|
|
18895
|
-
if (typeof row === "number") time = row;
|
|
18896
|
-
if (typeof cellValue === "number") time = cellValue;
|
|
18897
|
-
return formatDate(new Date(time * 1e3), "HH:MM:SS");
|
|
18898
|
-
};
|
|
18899
|
-
const scaleFormat = (value = "0", scale = 4) => {
|
|
18900
|
-
return Number.parseFloat(value).toFixed(scale);
|
|
18901
|
-
};
|
|
18902
|
-
const scale2Format = (value = "0") => {
|
|
18903
|
-
return Number.parseFloat(value).toFixed(2);
|
|
18904
|
-
};
|
|
18905
|
-
const groupSeparator = (value, minimumFractionDigits = 2) => {
|
|
18906
|
-
return value.toLocaleString("en-US", {
|
|
18907
|
-
minimumFractionDigits,
|
|
18908
|
-
maximumFractionDigits: 2
|
|
18909
|
-
});
|
|
18910
|
-
};
|
|
18911
|
-
const copyText = (text) => {
|
|
18912
|
-
return new Promise((resolve, reject) => {
|
|
18913
|
-
try {
|
|
18914
|
-
if (!isSupported.value) {
|
|
18915
|
-
console.error("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u526A\u8D34\u677F API");
|
|
18916
|
-
reject("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u526A\u8D34\u677F API");
|
|
18917
|
-
} else {
|
|
18918
|
-
copy(text);
|
|
18919
|
-
ElMessage.success(t("message.layout.copyTextSuccess"));
|
|
18920
|
-
resolve(text);
|
|
18921
|
-
}
|
|
18922
|
-
} catch (e) {
|
|
18923
|
-
ElMessage.error(t("message.layout.copyTextError"));
|
|
18924
|
-
reject(e);
|
|
18925
|
-
}
|
|
18926
|
-
});
|
|
18927
|
-
};
|
|
18928
|
-
const removeHtmlSub = (value) => {
|
|
18929
|
-
var str = value.replace(/<[^>]+>/g, "");
|
|
18930
|
-
if (str.length > 50) return str.substring(0, 50) + "......";
|
|
18931
|
-
else return str;
|
|
18932
|
-
};
|
|
18933
|
-
const removeHtml = (value) => {
|
|
18934
|
-
return value.replace(/<[^>]+>/g, "");
|
|
18935
|
-
};
|
|
18936
|
-
const getEnumDesc = (key, lstEnum) => {
|
|
18937
|
-
var _a;
|
|
18938
|
-
return (_a = lstEnum.find((x) => x.value == key)) == null ? void 0 : _a.describe;
|
|
18939
|
-
};
|
|
18940
|
-
const appendQueryParams = (url, params) => {
|
|
18941
|
-
if (!params || Object.keys(params).length == 0) return url;
|
|
18942
|
-
const queryString = Object.keys(params).map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`).join("&");
|
|
18943
|
-
return `${url}${url.includes("?") ? "&" : "?"}${queryString}`;
|
|
18944
|
-
};
|
|
18945
|
-
const getNameAbbr = (text, callback) => {
|
|
18946
|
-
if (!text) return ElMessage.error("\u83B7\u53D6\u7B80\u79F0\u6587\u672C\u4E0D\u80FD\u4E3A\u7A7A");
|
|
18947
|
-
try {
|
|
18948
|
-
return useBaseApi("sysCommon").post({ text }, "nameAbbr").then((res) => {
|
|
18949
|
-
if (callback) callback(res.data.result);
|
|
18950
|
-
return res.data.result;
|
|
18951
|
-
});
|
|
18952
|
-
} catch (e) {
|
|
18953
|
-
ElMessage.error("\u83B7\u53D6\u5931\u8D25");
|
|
18954
|
-
}
|
|
18955
|
-
};
|
|
18956
|
-
const handleConditionalClear = (condition, fieldValue, clearValue = void 0) => {
|
|
18957
|
-
if (condition) {
|
|
18958
|
-
return clearValue;
|
|
18959
|
-
}
|
|
18960
|
-
return fieldValue;
|
|
18961
|
-
};
|
|
18962
|
-
const getTimeRangePickerShortcuts = () => {
|
|
18963
|
-
return [
|
|
18964
|
-
{
|
|
18965
|
-
text: "\u8FD1\u4E00\u5468",
|
|
18966
|
-
value: () => {
|
|
18967
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
18968
|
-
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
18969
|
-
const start = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 7);
|
|
18970
|
-
return [start, end];
|
|
18971
|
-
}
|
|
18972
|
-
},
|
|
18973
|
-
{
|
|
18974
|
-
text: "\u8FD1\u4E00\u6708",
|
|
18975
|
-
value: () => {
|
|
18976
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
18977
|
-
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
18978
|
-
const start = new Date(now.getFullYear(), now.getMonth() - 1, now.getDate());
|
|
18979
|
-
return [start, end];
|
|
18980
|
-
}
|
|
18981
|
-
},
|
|
18982
|
-
{
|
|
18983
|
-
text: "\u8FD1\u4E09\u6708",
|
|
18984
|
-
value: () => {
|
|
18985
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
18986
|
-
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
18987
|
-
const start = new Date(now.getFullYear(), now.getMonth() - 3, now.getDate());
|
|
18988
|
-
return [start, end];
|
|
18989
|
-
}
|
|
18990
|
-
},
|
|
18991
|
-
{
|
|
18992
|
-
text: "\u8FD1\u534A\u5E74",
|
|
18993
|
-
value: () => {
|
|
18994
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
18995
|
-
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
18996
|
-
const start = new Date(now.getFullYear(), now.getMonth() - 6, now.getDate());
|
|
18997
|
-
return [start, end];
|
|
18998
|
-
}
|
|
18999
|
-
},
|
|
19000
|
-
{
|
|
19001
|
-
text: "\u672C\u5E74",
|
|
19002
|
-
value: () => {
|
|
19003
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
19004
|
-
const end = new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
|
|
19005
|
-
const start = new Date(now.getFullYear(), 0, 1);
|
|
19006
|
-
return [start, end];
|
|
19007
|
-
}
|
|
19008
|
-
},
|
|
19009
|
-
{
|
|
19010
|
-
text: "\u8FD1\u4E24\u5E74",
|
|
19011
|
-
value: () => {
|
|
19012
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
19013
|
-
const end = new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
|
|
19014
|
-
const start = new Date(now.getFullYear() - 1, 0, 1);
|
|
19015
|
-
return [start, end];
|
|
19016
|
-
}
|
|
19017
|
-
},
|
|
19018
|
-
{
|
|
19019
|
-
text: "\u8FD1\u4E09\u5E74",
|
|
19020
|
-
value: () => {
|
|
19021
|
-
const now = new Date(themeStore.themeConfig.serverTime);
|
|
19022
|
-
const end = new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
|
|
19023
|
-
const start = new Date(now.getFullYear() - 2, 0, 1);
|
|
19024
|
-
return [start, end];
|
|
19025
|
-
}
|
|
19026
|
-
}
|
|
19027
|
-
];
|
|
19028
|
-
};
|
|
19029
|
-
return {
|
|
19030
|
-
percentFormat,
|
|
19031
|
-
dateFormatYMD,
|
|
19032
|
-
dateFormatYMDHMS,
|
|
19033
|
-
dateFormatHMS,
|
|
19034
|
-
scaleFormat,
|
|
19035
|
-
scale2Format,
|
|
19036
|
-
groupSeparator,
|
|
19037
|
-
copyText,
|
|
19038
|
-
removeHtmlSub,
|
|
19039
|
-
removeHtml,
|
|
19040
|
-
getEnumDesc,
|
|
19041
|
-
appendQueryParams,
|
|
19042
|
-
getNameAbbr,
|
|
19043
|
-
handleConditionalClear,
|
|
19044
|
-
getTimeRangePickerShortcuts
|
|
19045
|
-
};
|
|
19046
|
-
}
|
|
19047
|
-
|
|
19048
18840
|
const _hoisted_1$6 = { key: 0 };
|
|
19049
18841
|
const _hoisted_2$3 = { key: 0 };
|
|
19050
18842
|
var _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
@@ -22200,6 +21992,214 @@ const plugins = [
|
|
|
22200
21992
|
|
|
22201
21993
|
var installer = makeInstaller([...plugins]);
|
|
22202
21994
|
|
|
21995
|
+
const cssCdnUrlList = [
|
|
21996
|
+
// 调整为从本地引入,注释下面的 url
|
|
21997
|
+
// '//at.alicdn.com/t/c/font_2298093_rnp72ifj3ba.css',
|
|
21998
|
+
// '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
|
|
21999
|
+
];
|
|
22000
|
+
const jsCdnUrlList = [];
|
|
22001
|
+
function setCssCdn() {
|
|
22002
|
+
if (cssCdnUrlList.length <= 0) return false;
|
|
22003
|
+
cssCdnUrlList.map((v) => {
|
|
22004
|
+
let link = document.createElement("link");
|
|
22005
|
+
link.rel = "stylesheet";
|
|
22006
|
+
link.href = v;
|
|
22007
|
+
link.crossOrigin = "anonymous";
|
|
22008
|
+
document.getElementsByTagName("head")[0].appendChild(link);
|
|
22009
|
+
});
|
|
22010
|
+
}
|
|
22011
|
+
function setJsCdn() {
|
|
22012
|
+
if (jsCdnUrlList.length <= 0) return false;
|
|
22013
|
+
jsCdnUrlList.map((v) => {
|
|
22014
|
+
let link = document.createElement("script");
|
|
22015
|
+
link.src = v;
|
|
22016
|
+
document.body.appendChild(link);
|
|
22017
|
+
});
|
|
22018
|
+
}
|
|
22019
|
+
const setIntroduction = {
|
|
22020
|
+
// 设置css
|
|
22021
|
+
cssCdn: () => {
|
|
22022
|
+
setCssCdn();
|
|
22023
|
+
},
|
|
22024
|
+
// 设置js
|
|
22025
|
+
jsCdn: () => {
|
|
22026
|
+
setJsCdn();
|
|
22027
|
+
}
|
|
22028
|
+
};
|
|
22029
|
+
|
|
22030
|
+
const emitter = mitt();
|
|
22031
|
+
|
|
22032
|
+
const themeStore = useThemeConfig();
|
|
22033
|
+
function commonFunction() {
|
|
22034
|
+
const { t } = useI18n();
|
|
22035
|
+
const { copy, isSupported } = useClipboard();
|
|
22036
|
+
const percentFormat = (row, column, cellValue) => {
|
|
22037
|
+
return cellValue ? `${cellValue}%` : "-";
|
|
22038
|
+
};
|
|
22039
|
+
const dateFormatYMD = (row, column, cellValue) => {
|
|
22040
|
+
if (!cellValue) return "-";
|
|
22041
|
+
return formatDate(new Date(cellValue), "YYYY-mm-dd");
|
|
22042
|
+
};
|
|
22043
|
+
const dateFormatYMDHMS = (row, column, cellValue) => {
|
|
22044
|
+
if (!cellValue) return "-";
|
|
22045
|
+
return formatDate(new Date(cellValue), "YYYY-mm-dd HH:MM:SS");
|
|
22046
|
+
};
|
|
22047
|
+
const dateFormatHMS = (row, column, cellValue) => {
|
|
22048
|
+
if (!cellValue) return "-";
|
|
22049
|
+
let time = 0;
|
|
22050
|
+
if (typeof row === "number") time = row;
|
|
22051
|
+
if (typeof cellValue === "number") time = cellValue;
|
|
22052
|
+
return formatDate(new Date(time * 1e3), "HH:MM:SS");
|
|
22053
|
+
};
|
|
22054
|
+
const scaleFormat = (value = "0", scale = 4) => {
|
|
22055
|
+
return Number.parseFloat(value).toFixed(scale);
|
|
22056
|
+
};
|
|
22057
|
+
const scale2Format = (value = "0") => {
|
|
22058
|
+
return Number.parseFloat(value).toFixed(2);
|
|
22059
|
+
};
|
|
22060
|
+
const groupSeparator = (value, minimumFractionDigits = 2) => {
|
|
22061
|
+
return value.toLocaleString("en-US", {
|
|
22062
|
+
minimumFractionDigits,
|
|
22063
|
+
maximumFractionDigits: 2
|
|
22064
|
+
});
|
|
22065
|
+
};
|
|
22066
|
+
const copyText = (text) => {
|
|
22067
|
+
return new Promise((resolve, reject) => {
|
|
22068
|
+
try {
|
|
22069
|
+
if (!isSupported.value) {
|
|
22070
|
+
console.error("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u526A\u8D34\u677F API");
|
|
22071
|
+
reject("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u526A\u8D34\u677F API");
|
|
22072
|
+
} else {
|
|
22073
|
+
copy(text);
|
|
22074
|
+
ElMessage.success(t("message.layout.copyTextSuccess"));
|
|
22075
|
+
resolve(text);
|
|
22076
|
+
}
|
|
22077
|
+
} catch (e) {
|
|
22078
|
+
ElMessage.error(t("message.layout.copyTextError"));
|
|
22079
|
+
reject(e);
|
|
22080
|
+
}
|
|
22081
|
+
});
|
|
22082
|
+
};
|
|
22083
|
+
const removeHtmlSub = (value) => {
|
|
22084
|
+
var str = value.replace(/<[^>]+>/g, "");
|
|
22085
|
+
if (str.length > 50) return str.substring(0, 50) + "......";
|
|
22086
|
+
else return str;
|
|
22087
|
+
};
|
|
22088
|
+
const removeHtml = (value) => {
|
|
22089
|
+
return value.replace(/<[^>]+>/g, "");
|
|
22090
|
+
};
|
|
22091
|
+
const getEnumDesc = (key, lstEnum) => {
|
|
22092
|
+
var _a;
|
|
22093
|
+
return (_a = lstEnum.find((x) => x.value == key)) == null ? void 0 : _a.describe;
|
|
22094
|
+
};
|
|
22095
|
+
const appendQueryParams = (url, params) => {
|
|
22096
|
+
if (!params || Object.keys(params).length == 0) return url;
|
|
22097
|
+
const queryString = Object.keys(params).map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`).join("&");
|
|
22098
|
+
return `${url}${url.includes("?") ? "&" : "?"}${queryString}`;
|
|
22099
|
+
};
|
|
22100
|
+
const getNameAbbr = (text, callback) => {
|
|
22101
|
+
if (!text) return ElMessage.error("\u83B7\u53D6\u7B80\u79F0\u6587\u672C\u4E0D\u80FD\u4E3A\u7A7A");
|
|
22102
|
+
try {
|
|
22103
|
+
return useBaseApi("sysCommon").post({ text }, "nameAbbr").then((res) => {
|
|
22104
|
+
if (callback) callback(res.data.result);
|
|
22105
|
+
return res.data.result;
|
|
22106
|
+
});
|
|
22107
|
+
} catch (e) {
|
|
22108
|
+
ElMessage.error("\u83B7\u53D6\u5931\u8D25");
|
|
22109
|
+
}
|
|
22110
|
+
};
|
|
22111
|
+
const handleConditionalClear = (condition, fieldValue, clearValue = void 0) => {
|
|
22112
|
+
if (condition) {
|
|
22113
|
+
return clearValue;
|
|
22114
|
+
}
|
|
22115
|
+
return fieldValue;
|
|
22116
|
+
};
|
|
22117
|
+
const getTimeRangePickerShortcuts = () => {
|
|
22118
|
+
return [
|
|
22119
|
+
{
|
|
22120
|
+
text: "\u8FD1\u4E00\u5468",
|
|
22121
|
+
value: () => {
|
|
22122
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22123
|
+
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
22124
|
+
const start = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 7);
|
|
22125
|
+
return [start, end];
|
|
22126
|
+
}
|
|
22127
|
+
},
|
|
22128
|
+
{
|
|
22129
|
+
text: "\u8FD1\u4E00\u6708",
|
|
22130
|
+
value: () => {
|
|
22131
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22132
|
+
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
22133
|
+
const start = new Date(now.getFullYear(), now.getMonth() - 1, now.getDate());
|
|
22134
|
+
return [start, end];
|
|
22135
|
+
}
|
|
22136
|
+
},
|
|
22137
|
+
{
|
|
22138
|
+
text: "\u8FD1\u4E09\u6708",
|
|
22139
|
+
value: () => {
|
|
22140
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22141
|
+
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
22142
|
+
const start = new Date(now.getFullYear(), now.getMonth() - 3, now.getDate());
|
|
22143
|
+
return [start, end];
|
|
22144
|
+
}
|
|
22145
|
+
},
|
|
22146
|
+
{
|
|
22147
|
+
text: "\u8FD1\u534A\u5E74",
|
|
22148
|
+
value: () => {
|
|
22149
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22150
|
+
const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
|
22151
|
+
const start = new Date(now.getFullYear(), now.getMonth() - 6, now.getDate());
|
|
22152
|
+
return [start, end];
|
|
22153
|
+
}
|
|
22154
|
+
},
|
|
22155
|
+
{
|
|
22156
|
+
text: "\u672C\u5E74",
|
|
22157
|
+
value: () => {
|
|
22158
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22159
|
+
const end = new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
|
|
22160
|
+
const start = new Date(now.getFullYear(), 0, 1);
|
|
22161
|
+
return [start, end];
|
|
22162
|
+
}
|
|
22163
|
+
},
|
|
22164
|
+
{
|
|
22165
|
+
text: "\u8FD1\u4E24\u5E74",
|
|
22166
|
+
value: () => {
|
|
22167
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22168
|
+
const end = new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
|
|
22169
|
+
const start = new Date(now.getFullYear() - 1, 0, 1);
|
|
22170
|
+
return [start, end];
|
|
22171
|
+
}
|
|
22172
|
+
},
|
|
22173
|
+
{
|
|
22174
|
+
text: "\u8FD1\u4E09\u5E74",
|
|
22175
|
+
value: () => {
|
|
22176
|
+
const now = new Date(themeStore.themeConfig.serverTime);
|
|
22177
|
+
const end = new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
|
|
22178
|
+
const start = new Date(now.getFullYear() - 2, 0, 1);
|
|
22179
|
+
return [start, end];
|
|
22180
|
+
}
|
|
22181
|
+
}
|
|
22182
|
+
];
|
|
22183
|
+
};
|
|
22184
|
+
return {
|
|
22185
|
+
percentFormat,
|
|
22186
|
+
dateFormatYMD,
|
|
22187
|
+
dateFormatYMDHMS,
|
|
22188
|
+
dateFormatHMS,
|
|
22189
|
+
scaleFormat,
|
|
22190
|
+
scale2Format,
|
|
22191
|
+
groupSeparator,
|
|
22192
|
+
copyText,
|
|
22193
|
+
removeHtmlSub,
|
|
22194
|
+
removeHtml,
|
|
22195
|
+
getEnumDesc,
|
|
22196
|
+
appendQueryParams,
|
|
22197
|
+
getNameAbbr,
|
|
22198
|
+
handleConditionalClear,
|
|
22199
|
+
getTimeRangePickerShortcuts
|
|
22200
|
+
};
|
|
22201
|
+
}
|
|
22202
|
+
|
|
22203
22203
|
let pathPrefix = "/@";
|
|
22204
22204
|
function setPathPrefix(prefix) {
|
|
22205
22205
|
pathPrefix = prefix;
|
|
@@ -22578,6 +22578,7 @@ function initRouter() {
|
|
|
22578
22578
|
|
|
22579
22579
|
const version = "1.0.0";
|
|
22580
22580
|
|
|
22581
|
+
const commonFun = commonFunction();
|
|
22581
22582
|
const install = installer.install;
|
|
22582
22583
|
|
|
22583
|
-
export { AccountTypeEnum, HttpMethodEnum, JobCreateTypeEnum, Local, NextLoading, Session, StringToObj, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, buildLocaleContext, buildTranslator, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, commonFunction, configureRoutes, dataURLtoBlob, decryptJWT, installer as default, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, en, exportExcel, feature, fileToBase64, flowLoading, formatAxis, formatDate, formatPast, gcj02ToBd09, getCountryCode, getFileName, getHeader, getJWTDate, getToken, getWeek, hAuth, hAuthAll, hAuths, hasPrivilege, hasRoleCode, i18n, initBackEndControlRoutes, initFrontEndControlRoutes, initRouter, install, isAdmin, isMember, isNormalUser, isObjectValueEqual, isSupperAdmin, isTenantAdmin, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, loadSysInfo, mergMessage, emitter as mittBus, openWindow, orgId, orgName, posId, posName, reLoadLoginAccessToken, refreshAccessTokenKey, removeDuplicate, request2, roles, saulVModel, service, setCssCdn, setDynamicViewsModules, setIntroduction, setJsCdn, setPathPrefix, setupI18n, signatureByKSort, sleep, tansParams, tenantId, translate, updateFavicon, urlToBase64, useApi, useBaseApi, useChangeColor, useDateTimeShortCust, useFormRulePresets, useKeepALiveNames, useLocale, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, useVxeTable, userAccount, userEmail, userFriendName, userId, userName, userPhone, validateFormWithScroll, validateFormWithScrollCallback, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version, wgs84ToBd09, wgs84ToGcj02, plusZhCn as zhCn };
|
|
22584
|
+
export { AccountTypeEnum, HttpMethodEnum, JobCreateTypeEnum, Local, NextLoading, Session, StringToObj, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, buildLocaleContext, buildTranslator, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, commonFun, commonFunction, configureRoutes, dataURLtoBlob, decryptJWT, installer as default, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, en, exportExcel, feature, fileToBase64, flowLoading, formatAxis, formatDate, formatPast, gcj02ToBd09, getCountryCode, getFileName, getHeader, getJWTDate, getToken, getWeek, hAuth, hAuthAll, hAuths, hasPrivilege, hasRoleCode, i18n, initBackEndControlRoutes, initFrontEndControlRoutes, initRouter, install, isAdmin, isMember, isNormalUser, isObjectValueEqual, isSupperAdmin, isTenantAdmin, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, loadSysInfo, mergMessage, emitter as mittBus, openWindow, orgId, orgName, posId, posName, reLoadLoginAccessToken, refreshAccessTokenKey, removeDuplicate, request2, roles, saulVModel, service, setCssCdn, setDynamicViewsModules, setIntroduction, setJsCdn, setPathPrefix, setupI18n, signatureByKSort, sleep, tansParams, tenantId, translate, updateFavicon, urlToBase64, useApi, useBaseApi, useChangeColor, useDateTimeShortCust, useFormRulePresets, useKeepALiveNames, useLocale, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, useVxeTable, userAccount, userEmail, userFriendName, userId, userName, userPhone, validateFormWithScroll, validateFormWithScrollCallback, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version, wgs84ToBd09, wgs84ToGcj02, plusZhCn as zhCn };
|
package/lib/hooks/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { default as commonFunction } from './commonFunction';
|
|
2
1
|
export * from './useLocale';
|
|
3
2
|
export * from './authFunction';
|
|
4
3
|
export * from './useVxeTableOptionsHook';
|
|
5
4
|
export * from './sysInfo';
|
|
6
5
|
export * from './useInfo';
|
|
7
6
|
export * from './dateTimeShortCust';
|
|
8
|
-
export { commonFunction };
|
package/lib/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { default as installer } from './defaults';
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
2
|
+
import { default as setIntroduction, setCssCdn, setJsCdn } from './utils/setIconfont';
|
|
3
|
+
import { default as emitter } from './utils/mitt';
|
|
4
|
+
import { default as commonFunction } from './hooks/commonFunction';
|
|
5
|
+
import { EmptyArrayType } from './types';
|
|
6
|
+
import { MessageHandler } from 'element-plus';
|
|
4
7
|
import { App } from 'vue';
|
|
5
|
-
export { mittBus, setIntroduction };
|
|
6
8
|
export * from './types';
|
|
7
9
|
export * from './api';
|
|
8
10
|
export * from './utils';
|
|
@@ -10,6 +12,29 @@ export * from './stores';
|
|
|
10
12
|
export * from './hooks';
|
|
11
13
|
export * from './router';
|
|
12
14
|
export * from './locale';
|
|
15
|
+
declare const commonFun: {
|
|
16
|
+
percentFormat: (row: EmptyArrayType, column: number, cellValue: string) => string;
|
|
17
|
+
dateFormatYMD: (row: EmptyArrayType, column: number, cellValue: string) => string;
|
|
18
|
+
dateFormatYMDHMS: (row: EmptyArrayType, column: number, cellValue: string) => string;
|
|
19
|
+
dateFormatHMS: (row: EmptyArrayType, column: number, cellValue: string) => string;
|
|
20
|
+
scaleFormat: (value?: string, scale?: number) => string;
|
|
21
|
+
scale2Format: (value?: string) => string;
|
|
22
|
+
groupSeparator: (value: number, minimumFractionDigits?: number) => string;
|
|
23
|
+
copyText: (text: string) => Promise<unknown>;
|
|
24
|
+
removeHtmlSub: (value: string) => string;
|
|
25
|
+
removeHtml: (value: string) => string;
|
|
26
|
+
getEnumDesc: (key: any, lstEnum: any) => any;
|
|
27
|
+
appendQueryParams: (url: string, params: {
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}) => string;
|
|
30
|
+
getNameAbbr: (text: string, callback?: (abbr: any) => void) => Promise<any> | MessageHandler | undefined;
|
|
31
|
+
handleConditionalClear: (condition: boolean, fieldValue: any, clearValue?: any) => any;
|
|
32
|
+
getTimeRangePickerShortcuts: () => {
|
|
33
|
+
text: string;
|
|
34
|
+
value: () => Date[];
|
|
35
|
+
}[];
|
|
36
|
+
};
|
|
37
|
+
export { setIntroduction, emitter as mittBus, commonFunction, commonFun, setCssCdn, setJsCdn };
|
|
13
38
|
export { version } from './version';
|
|
14
39
|
export declare const install: (app: App) => void;
|
|
15
40
|
export default installer;
|
package/lib/index.js
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var defaults = require('./defaults.js');
|
|
6
|
-
var mitt = require('./packages/utils/mitt.js');
|
|
7
6
|
var setIconfont = require('./packages/utils/setIconfont.js');
|
|
7
|
+
var mitt = require('./packages/utils/mitt.js');
|
|
8
|
+
var commonFunction = require('./packages/hooks/commonFunction.js');
|
|
8
9
|
require('./packages/types/index.js');
|
|
9
10
|
var index = require('./packages/api/index.js');
|
|
10
11
|
require('./packages/utils/index.js');
|
|
@@ -21,7 +22,6 @@ var authFunction = require('./packages/hooks/authFunction.js');
|
|
|
21
22
|
var base64Conver = require('./packages/utils/base64Conver.js');
|
|
22
23
|
var useLocale = require('./packages/hooks/useLocale.js');
|
|
23
24
|
var arrayOperation = require('./packages/utils/arrayOperation.js');
|
|
24
|
-
var commonFunction = require('./packages/hooks/commonFunction.js');
|
|
25
25
|
var route = require('./packages/router/route.js');
|
|
26
26
|
var download = require('./packages/utils/download.js');
|
|
27
27
|
var en = require('./packages/locale/lang/en.js');
|
|
@@ -51,13 +51,15 @@ var useVxeTableOptionsHook = require('./packages/hooks/useVxeTableOptionsHook.js
|
|
|
51
51
|
var formValidate = require('./packages/utils/formValidate.js');
|
|
52
52
|
var zhCn = require('./packages/locale/lang/zh-cn.js');
|
|
53
53
|
|
|
54
|
+
const commonFun = commonFunction.default();
|
|
54
55
|
const install = defaults.default.install;
|
|
55
56
|
|
|
56
57
|
exports.default = defaults.default;
|
|
57
|
-
exports.mittBus = mitt.default;
|
|
58
58
|
exports.setCssCdn = setIconfont.setCssCdn;
|
|
59
59
|
exports.setIntroduction = setIconfont.default;
|
|
60
60
|
exports.setJsCdn = setIconfont.setJsCdn;
|
|
61
|
+
exports.mittBus = mitt.default;
|
|
62
|
+
exports.commonFunction = commonFunction.default;
|
|
61
63
|
exports.AccountTypeEnum = index.AccountTypeEnum;
|
|
62
64
|
exports.HttpMethodEnum = index.HttpMethodEnum;
|
|
63
65
|
exports.JobCreateTypeEnum = index.JobCreateTypeEnum;
|
|
@@ -108,7 +110,6 @@ exports.clone = arrayOperation.clone;
|
|
|
108
110
|
exports.isObjectValueEqual = arrayOperation.isObjectValueEqual;
|
|
109
111
|
exports.judgementSameArr = arrayOperation.judgementSameArr;
|
|
110
112
|
exports.removeDuplicate = arrayOperation.removeDuplicate;
|
|
111
|
-
exports.commonFunction = commonFunction.default;
|
|
112
113
|
exports.configureRoutes = route.configureRoutes;
|
|
113
114
|
exports.setPathPrefix = route.setPathPrefix;
|
|
114
115
|
exports.downloadByBase64 = download.downloadByBase64;
|
|
@@ -195,4 +196,5 @@ exports.useVxeTable = useVxeTableOptionsHook.useVxeTable;
|
|
|
195
196
|
exports.validateFormWithScroll = formValidate.validateFormWithScroll;
|
|
196
197
|
exports.validateFormWithScrollCallback = formValidate.validateFormWithScrollCallback;
|
|
197
198
|
exports.zhCn = zhCn.default;
|
|
199
|
+
exports.commonFun = commonFun;
|
|
198
200
|
exports.install = install;
|
|
@@ -6,7 +6,6 @@ var useVxeTableOptionsHook = require('./useVxeTableOptionsHook.js');
|
|
|
6
6
|
var sysInfo = require('./sysInfo.js');
|
|
7
7
|
var useInfo = require('./useInfo.js');
|
|
8
8
|
var dateTimeShortCust = require('./dateTimeShortCust.js');
|
|
9
|
-
var commonFunction = require('./commonFunction.js');
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
|
|
@@ -43,4 +42,3 @@ exports.userId = useInfo.userId;
|
|
|
43
42
|
exports.userName = useInfo.userName;
|
|
44
43
|
exports.userPhone = useInfo.userPhone;
|
|
45
44
|
exports.useDateTimeShortCust = dateTimeShortCust.useDateTimeShortCust;
|
|
46
|
-
exports.commonFunction = commonFunction.default;
|
|
@@ -15,10 +15,8 @@ var gpsConvertor = require('./gpsConvertor.js');
|
|
|
15
15
|
var jsonUtils = require('./json-utils.js');
|
|
16
16
|
var loading = require('./loading.js');
|
|
17
17
|
require('./md5Signature.js');
|
|
18
|
-
require('./mitt.js');
|
|
19
18
|
var request = require('./request.js');
|
|
20
19
|
var saulVModel = require('./saulVModel.js');
|
|
21
|
-
var setIconfont = require('./setIconfont.js');
|
|
22
20
|
var storage = require('./storage.js');
|
|
23
21
|
var theme = require('./theme.js');
|
|
24
22
|
var toolsValidate = require('./toolsValidate.js');
|
|
@@ -74,8 +72,6 @@ exports.service = request.default;
|
|
|
74
72
|
exports.sleep = request.sleep;
|
|
75
73
|
exports.tansParams = request.tansParams;
|
|
76
74
|
exports.saulVModel = saulVModel.saulVModel;
|
|
77
|
-
exports.setCssCdn = setIconfont.setCssCdn;
|
|
78
|
-
exports.setJsCdn = setIconfont.setJsCdn;
|
|
79
75
|
exports.Local = storage.Local;
|
|
80
76
|
exports.Session = storage.Session;
|
|
81
77
|
exports.useChangeColor = theme.useChangeColor;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -13,10 +13,8 @@ export * from './gpsConvertor';
|
|
|
13
13
|
export * from './json-utils';
|
|
14
14
|
export * from './loading';
|
|
15
15
|
export * from './md5Signature';
|
|
16
|
-
export * from './mitt';
|
|
17
16
|
export * from './request';
|
|
18
17
|
export * from './saulVModel';
|
|
19
|
-
export * from './setIconfont';
|
|
20
18
|
export * from './storage';
|
|
21
19
|
export * from './theme';
|
|
22
20
|
export * from './toolsValidate';
|
package/locale/en.js
CHANGED
package/locale/en.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.10 */(function(e,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.fmdeuiPlusLocaleEn=t())})(this,(function(){"use strict";var e={name:"en",plus:{datepicker:{date:"Please select date",dates:"Please select dates",week:"Please select week",month:"Please select month",months:"Please select months",year:"Please select year",years:"Please select years",startDatePlaceholder:"Please select start date",endDatePlaceholder:"Please select end date",datetime:"Please select datetime",startMonthPlaceholder:"Please select start month",endMonthPlaceholder:"Please select end month",startTimePlaceholder:"Please select start time",endTimePlaceholder:"Please select end time",shortcutsDate:{today:"Today",yesterday:"Yesterday",lastWeek:"Last week"},shortcutsDaterange:{pastWeek:"Past week",pastMonth:"Past month",pastThreeMonths:"Past three months"},shortcutsMonthrange:{thisMonth:"This month",thisYear:"This year",pastSixMonths:"Past six months"},shortcutsDatetime:{today:"Today",yesterday:"Yesterday",lastWeek:"Last week"},shortcutsDatetimerange:{pastWeek:"Past week",pastMonth:"Past month",pastThreeMonths:"Past three months"}},form:{pleaseEnter:"Please enter ",pleaseSelect:"Please select "},input:{placeholder:"Please enter ",appendTitle:"Yuan",validatePhone:"Please enter a valid phone number",validateIdCard:"Please enter a valid ID card number",validateInteger:"Please enter a valid integer",format:"Please enter a valid ",amount:"amount",numbers:"numbers",digitUppercase:"Please enter a valid amount format",validateError:"Please enter a valid format",escaped:{0:"Cent",1:"Penny",2:"Zero",3:"One",4:"Two",5:"Three",6:"Four",7:"Five",8:"Six",9:"Seven",10:"Eight",11:"Nine",12:"Yuan",13:"Ten thousand",14:"Ten million",15:"Ten billion",16:"Ten",17:"Hundred",18:"Thousand",19:"Short",20:"Whole"}},moduleForm:{save:"Save",back:"Back"},search:{searchText:"Search",resetText:"Reset",expand:"Expand",retract:"Retract",pleaseEnter:"Please enter ",pleaseSelect:"Please select ",popoverAttrs:{showTxt:"More",title:"All conditions",allTxt:"SelectAll",reverseTxt:"Reverse",clearTxt:"ClearAll"}},select:{selectAllTxt:"Select all"},selectIcon:{placeholder:"Please select icon",dialogTitle:"Please select icon",searchPlaceholder:"Search icon",emptyDescription:"No icon found"},copy:{copySuccess:"Copy success",copyFail:"Copy fail",invalidCopyContent:"Invalid copy content"},selectTable:{searchBtnTxt:"Search",radioTxt:"Radio",loadingTxt:"Loading...",copySuccess:"Copy success",copyFail:"Copy fail"},stepWizard:{lastBtnTitle:"Complete"},table:{columnBind:{btnTxt:"Column setting",title:"Column setting"},fistColumn:{label:"Number",radio:"Radio"},operator:{label:"Operation",more:"More",sum:"Sum",total:"Total",allSum:"All sum"},singleEdit:{tipText:"Click to edit"},pleaseEnter:"Please enter ",pleaseSelect:"Please select ",loadingTxt:"Loading...",dragTxt:"Drag",saveBtnTxt:"Save",density:"Density",default:"Default",loose:"Loose",compact:"Compact"},list:{idleTimeoutMessage:"Long time no operation, system logged out.",sysMessage:"System Message"}}};return e}));
|