@fmdeui/fmui 1.0.10 → 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/other.d.ts +0 -8
- package/es/index.d.ts +3 -1
- package/es/index.mjs +2 -0
- 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/other.mjs +137 -0
- package/es/packages/utils/index.mjs +0 -1
- package/es/utils/index.d.ts +0 -1
- package/index.js +409 -155
- package/index.min.js +4 -4
- package/index.min.mjs +4 -4
- package/index.mjs +392 -158
- package/lib/components/svgIcon/index.d.ts +7 -26
- package/lib/hooks/other.d.ts +0 -8
- package/lib/index.d.ts +3 -1
- package/lib/index.js +4 -0
- 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/other.js +149 -0
- package/lib/packages/utils/index.js +0 -1
- package/lib/utils/index.d.ts +0 -1
- 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
package/index.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.11 */
|
|
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
|
-
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,
|
|
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, getCurrentInstance, onBeforeUnmount, vShow, markRaw, resolveDynamicComponent, Fragment, createTextVNode, withModifiers, toHandlers, onUpdated, normalizeStyle } from 'vue';
|
|
7
|
+
import * as svg from '@element-plus/icons-vue';
|
|
7
8
|
import { CaretTop, ArrowDown, ArrowUp } from '@element-plus/icons-vue';
|
|
8
9
|
import axios from 'axios';
|
|
9
10
|
import Cookies from 'js-cookie';
|
|
@@ -14,7 +15,7 @@ import VxeUI from 'vxe-pc-ui';
|
|
|
14
15
|
import { createI18n, useI18n } from 'vue-i18n';
|
|
15
16
|
import ExcelJS from 'exceljs';
|
|
16
17
|
import { get, merge } from 'lodash-es';
|
|
17
|
-
import {
|
|
18
|
+
import { useResizeObserver, isClient, useClipboard } from '@vueuse/core';
|
|
18
19
|
import mitt from 'mitt';
|
|
19
20
|
import { createRouter, createWebHashHistory } from 'vue-router';
|
|
20
21
|
import NProgress from 'nprogress';
|
|
@@ -18342,25 +18343,7 @@ const setupVXETable = (app) => {
|
|
|
18342
18343
|
app.use(VxeUITable);
|
|
18343
18344
|
};
|
|
18344
18345
|
|
|
18345
|
-
|
|
18346
|
-
const install = (app) => {
|
|
18347
|
-
components.forEach(
|
|
18348
|
-
(component) => {
|
|
18349
|
-
if (!app._context.components[component.name]) {
|
|
18350
|
-
app.component(component.name, component);
|
|
18351
|
-
}
|
|
18352
|
-
}
|
|
18353
|
-
);
|
|
18354
|
-
app.use(pinia);
|
|
18355
|
-
directive(app);
|
|
18356
|
-
app.use(setupVXETable);
|
|
18357
|
-
};
|
|
18358
|
-
return {
|
|
18359
|
-
install
|
|
18360
|
-
};
|
|
18361
|
-
};
|
|
18362
|
-
|
|
18363
|
-
var _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
18346
|
+
var _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
18364
18347
|
...{
|
|
18365
18348
|
name: "FButton"
|
|
18366
18349
|
},
|
|
@@ -18430,7 +18413,7 @@ var _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
18430
18413
|
}
|
|
18431
18414
|
});
|
|
18432
18415
|
|
|
18433
|
-
const FButton = _sfc_main$
|
|
18416
|
+
const FButton = _sfc_main$e;
|
|
18434
18417
|
|
|
18435
18418
|
const buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
|
|
18436
18419
|
const translate = (path, option, locale) => get(locale, path, path).replace(
|
|
@@ -18837,9 +18820,9 @@ const useDateTimeShortCust = () => {
|
|
|
18837
18820
|
];
|
|
18838
18821
|
};
|
|
18839
18822
|
|
|
18840
|
-
const _hoisted_1$
|
|
18823
|
+
const _hoisted_1$7 = { key: 0 };
|
|
18841
18824
|
const _hoisted_2$3 = { key: 0 };
|
|
18842
|
-
var _sfc_main$
|
|
18825
|
+
var _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
18843
18826
|
...{
|
|
18844
18827
|
name: "FInput"
|
|
18845
18828
|
},
|
|
@@ -19043,7 +19026,7 @@ var _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
19043
19026
|
fn: withCtx(() => [
|
|
19044
19027
|
__props.inputType === "amount" ? (openBlock(), createElementBlock(
|
|
19045
19028
|
"span",
|
|
19046
|
-
_hoisted_1$
|
|
19029
|
+
_hoisted_1$7,
|
|
19047
19030
|
toDisplayString(appendTitleText.value),
|
|
19048
19031
|
1
|
|
19049
19032
|
/* TEXT */
|
|
@@ -19089,13 +19072,13 @@ var _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
19089
19072
|
}
|
|
19090
19073
|
});
|
|
19091
19074
|
|
|
19092
|
-
const FInput = _sfc_main$
|
|
19075
|
+
const FInput = _sfc_main$d;
|
|
19093
19076
|
|
|
19094
|
-
const _hoisted_1$
|
|
19077
|
+
const _hoisted_1$6 = {
|
|
19095
19078
|
key: 0,
|
|
19096
19079
|
class: "back_to_top"
|
|
19097
19080
|
};
|
|
19098
|
-
var _sfc_main$
|
|
19081
|
+
var _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
19099
19082
|
...{
|
|
19100
19083
|
name: "FLayoutPage"
|
|
19101
19084
|
},
|
|
@@ -19157,7 +19140,7 @@ var _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
19157
19140
|
},
|
|
19158
19141
|
[
|
|
19159
19142
|
renderSlot(_ctx.$slots, "default"),
|
|
19160
|
-
__props.showGoTopButton ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
19143
|
+
__props.showGoTopButton ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
19161
19144
|
isShowGoTopButton.value ? (openBlock(), createElementBlock("div", {
|
|
19162
19145
|
key: 0,
|
|
19163
19146
|
onClick: backToTop
|
|
@@ -19185,9 +19168,9 @@ var _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
19185
19168
|
}
|
|
19186
19169
|
});
|
|
19187
19170
|
|
|
19188
|
-
const FLayoutPage = _sfc_main$
|
|
19171
|
+
const FLayoutPage = _sfc_main$c;
|
|
19189
19172
|
|
|
19190
|
-
var _sfc_main$
|
|
19173
|
+
var _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
19191
19174
|
...{
|
|
19192
19175
|
name: "FLayoutPageItem"
|
|
19193
19176
|
},
|
|
@@ -19215,7 +19198,150 @@ var _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
19215
19198
|
}
|
|
19216
19199
|
});
|
|
19217
19200
|
|
|
19218
|
-
const FLayoutPageItem = _sfc_main$
|
|
19201
|
+
const FLayoutPageItem = _sfc_main$b;
|
|
19202
|
+
|
|
19203
|
+
function debounce(func, delay = 500, immediate, resultCallback) {
|
|
19204
|
+
let timer = null;
|
|
19205
|
+
let isInvoke = false;
|
|
19206
|
+
const _debounce = function(...args) {
|
|
19207
|
+
return new Promise((resolve, reject) => {
|
|
19208
|
+
if (timer) clearTimeout(timer);
|
|
19209
|
+
if (!isInvoke) {
|
|
19210
|
+
try {
|
|
19211
|
+
const result = func.apply(this, args);
|
|
19212
|
+
if (resultCallback) ;
|
|
19213
|
+
resolve(result);
|
|
19214
|
+
} catch (e) {
|
|
19215
|
+
reject(e);
|
|
19216
|
+
}
|
|
19217
|
+
isInvoke = true;
|
|
19218
|
+
} else {
|
|
19219
|
+
timer = setTimeout(() => {
|
|
19220
|
+
try {
|
|
19221
|
+
const result = func.apply(this, args);
|
|
19222
|
+
if (resultCallback) ;
|
|
19223
|
+
resolve(result);
|
|
19224
|
+
} catch (e) {
|
|
19225
|
+
reject(e);
|
|
19226
|
+
}
|
|
19227
|
+
isInvoke = false;
|
|
19228
|
+
timer = null;
|
|
19229
|
+
}, delay);
|
|
19230
|
+
}
|
|
19231
|
+
});
|
|
19232
|
+
};
|
|
19233
|
+
_debounce.cancel = function() {
|
|
19234
|
+
if (timer) clearTimeout(timer);
|
|
19235
|
+
isInvoke = false;
|
|
19236
|
+
timer = null;
|
|
19237
|
+
};
|
|
19238
|
+
return _debounce;
|
|
19239
|
+
}
|
|
19240
|
+
function toLine(name) {
|
|
19241
|
+
return name.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
19242
|
+
}
|
|
19243
|
+
|
|
19244
|
+
const _hoisted_1$5 = ["id"];
|
|
19245
|
+
var _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
19246
|
+
...{
|
|
19247
|
+
name: "FChart"
|
|
19248
|
+
},
|
|
19249
|
+
__name: "index",
|
|
19250
|
+
props: {
|
|
19251
|
+
options: { default: () => ({}) },
|
|
19252
|
+
id: { default: () => Math.random().toString(36).substring(2, 8) },
|
|
19253
|
+
theme: { default: "" },
|
|
19254
|
+
isEmpty: { type: [Boolean, Function], default: false },
|
|
19255
|
+
description: { default: "\u6682\u65E0\u6570\u636E" }
|
|
19256
|
+
},
|
|
19257
|
+
setup(__props, { emit: __emit }) {
|
|
19258
|
+
const { proxy } = getCurrentInstance();
|
|
19259
|
+
const props = __props;
|
|
19260
|
+
const echartRef = ref();
|
|
19261
|
+
const chart = ref();
|
|
19262
|
+
const emits = __emit;
|
|
19263
|
+
const events = Object.entries(useAttrs());
|
|
19264
|
+
const renderChart = () => {
|
|
19265
|
+
chart.value = markRaw(proxy.$echarts.init(echartRef.value, props.theme));
|
|
19266
|
+
setOption(props.options);
|
|
19267
|
+
emits("chart", chart.value);
|
|
19268
|
+
events.forEach(([key, value]) => {
|
|
19269
|
+
if (key.startsWith("on") && !key.startsWith("onChart")) {
|
|
19270
|
+
const on = toLine(key).substring(3);
|
|
19271
|
+
chart.value.on(on, (...args) => emits(on, ...args));
|
|
19272
|
+
}
|
|
19273
|
+
});
|
|
19274
|
+
useResizeObserver(echartRef.value, resizeChart);
|
|
19275
|
+
};
|
|
19276
|
+
const resizeChart = debounce(
|
|
19277
|
+
() => {
|
|
19278
|
+
var _a;
|
|
19279
|
+
(_a = chart.value) == null ? void 0 : _a.resize();
|
|
19280
|
+
},
|
|
19281
|
+
300);
|
|
19282
|
+
const setOption = debounce(
|
|
19283
|
+
async (data) => {
|
|
19284
|
+
if (!chart.value) return;
|
|
19285
|
+
chart.value.setOption(data, true, true);
|
|
19286
|
+
await nextTick();
|
|
19287
|
+
resizeChart();
|
|
19288
|
+
},
|
|
19289
|
+
300);
|
|
19290
|
+
const formatEmpty = computed(() => {
|
|
19291
|
+
if (typeof props.isEmpty === "function") {
|
|
19292
|
+
return props.isEmpty(props.options);
|
|
19293
|
+
}
|
|
19294
|
+
return props.isEmpty;
|
|
19295
|
+
});
|
|
19296
|
+
watch(
|
|
19297
|
+
() => props.options,
|
|
19298
|
+
async (nw) => {
|
|
19299
|
+
await nextTick();
|
|
19300
|
+
setOption(nw);
|
|
19301
|
+
},
|
|
19302
|
+
{ deep: true }
|
|
19303
|
+
);
|
|
19304
|
+
watch(
|
|
19305
|
+
() => props.theme,
|
|
19306
|
+
async () => {
|
|
19307
|
+
chart.value.dispose();
|
|
19308
|
+
renderChart();
|
|
19309
|
+
}
|
|
19310
|
+
);
|
|
19311
|
+
onMounted(() => {
|
|
19312
|
+
renderChart();
|
|
19313
|
+
});
|
|
19314
|
+
onBeforeUnmount(() => {
|
|
19315
|
+
chart.value.dispose();
|
|
19316
|
+
chart.value = null;
|
|
19317
|
+
});
|
|
19318
|
+
return (_ctx, _cache) => {
|
|
19319
|
+
const _component_el_empty = resolveComponent("el-empty");
|
|
19320
|
+
return openBlock(), createElementBlock(
|
|
19321
|
+
"div",
|
|
19322
|
+
mergeProps({ class: "f-chart" }, _ctx.$attrs),
|
|
19323
|
+
[
|
|
19324
|
+
withDirectives(createElementVNode("div", {
|
|
19325
|
+
class: "f-chart-container",
|
|
19326
|
+
id: __props.id,
|
|
19327
|
+
ref_key: "echartRef",
|
|
19328
|
+
ref: echartRef
|
|
19329
|
+
}, null, 8, _hoisted_1$5), [
|
|
19330
|
+
[vShow, !formatEmpty.value]
|
|
19331
|
+
]),
|
|
19332
|
+
formatEmpty.value ? renderSlot(_ctx.$slots, "empty", { key: 0 }, () => [
|
|
19333
|
+
createVNode(_component_el_empty, mergeProps(_ctx.$attrs, { description: __props.description }), null, 16, ["description"])
|
|
19334
|
+
]) : createCommentVNode("v-if", true),
|
|
19335
|
+
renderSlot(_ctx.$slots, "default")
|
|
19336
|
+
],
|
|
19337
|
+
16
|
|
19338
|
+
/* FULL_PROPS */
|
|
19339
|
+
);
|
|
19340
|
+
};
|
|
19341
|
+
}
|
|
19342
|
+
});
|
|
19343
|
+
|
|
19344
|
+
const FChart = _sfc_main$a;
|
|
19219
19345
|
|
|
19220
19346
|
const _hoisted_1$4 = {
|
|
19221
19347
|
key: 1,
|
|
@@ -21835,148 +21961,129 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
21835
21961
|
|
|
21836
21962
|
const FForm = _sfc_main$1;
|
|
21837
21963
|
|
|
21838
|
-
|
|
21839
|
-
let timer = null;
|
|
21840
|
-
let isInvoke = false;
|
|
21841
|
-
const _debounce = function(...args) {
|
|
21842
|
-
return new Promise((resolve, reject) => {
|
|
21843
|
-
if (timer) clearTimeout(timer);
|
|
21844
|
-
if (!isInvoke) {
|
|
21845
|
-
try {
|
|
21846
|
-
const result = func.apply(this, args);
|
|
21847
|
-
if (resultCallback) ;
|
|
21848
|
-
resolve(result);
|
|
21849
|
-
} catch (e) {
|
|
21850
|
-
reject(e);
|
|
21851
|
-
}
|
|
21852
|
-
isInvoke = true;
|
|
21853
|
-
} else {
|
|
21854
|
-
timer = setTimeout(() => {
|
|
21855
|
-
try {
|
|
21856
|
-
const result = func.apply(this, args);
|
|
21857
|
-
if (resultCallback) ;
|
|
21858
|
-
resolve(result);
|
|
21859
|
-
} catch (e) {
|
|
21860
|
-
reject(e);
|
|
21861
|
-
}
|
|
21862
|
-
isInvoke = false;
|
|
21863
|
-
timer = null;
|
|
21864
|
-
}, delay);
|
|
21865
|
-
}
|
|
21866
|
-
});
|
|
21867
|
-
};
|
|
21868
|
-
_debounce.cancel = function() {
|
|
21869
|
-
if (timer) clearTimeout(timer);
|
|
21870
|
-
isInvoke = false;
|
|
21871
|
-
timer = null;
|
|
21872
|
-
};
|
|
21873
|
-
return _debounce;
|
|
21874
|
-
}
|
|
21875
|
-
function toLine(name) {
|
|
21876
|
-
return name.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
21877
|
-
}
|
|
21878
|
-
|
|
21879
|
-
const _hoisted_1 = ["id"];
|
|
21964
|
+
const _hoisted_1 = ["src"];
|
|
21880
21965
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21881
21966
|
...{
|
|
21882
|
-
name: "
|
|
21967
|
+
name: "svgIcon"
|
|
21883
21968
|
},
|
|
21884
|
-
__name: "
|
|
21969
|
+
__name: "svgicon",
|
|
21885
21970
|
props: {
|
|
21886
|
-
|
|
21887
|
-
|
|
21888
|
-
|
|
21889
|
-
|
|
21890
|
-
|
|
21971
|
+
// svg 图标组件名字
|
|
21972
|
+
name: {
|
|
21973
|
+
type: String
|
|
21974
|
+
},
|
|
21975
|
+
// svg 大小
|
|
21976
|
+
size: {
|
|
21977
|
+
type: Number,
|
|
21978
|
+
default: () => 14
|
|
21979
|
+
},
|
|
21980
|
+
// svg 颜色
|
|
21981
|
+
color: {
|
|
21982
|
+
type: String
|
|
21983
|
+
}
|
|
21891
21984
|
},
|
|
21892
|
-
setup(__props
|
|
21893
|
-
const { proxy } = getCurrentInstance();
|
|
21985
|
+
setup(__props) {
|
|
21894
21986
|
const props = __props;
|
|
21895
|
-
const
|
|
21896
|
-
const
|
|
21897
|
-
|
|
21898
|
-
|
|
21899
|
-
const
|
|
21900
|
-
|
|
21901
|
-
|
|
21902
|
-
|
|
21903
|
-
|
|
21904
|
-
|
|
21905
|
-
const on = toLine(key).substring(3);
|
|
21906
|
-
chart.value.on(on, (...args) => emits(on, ...args));
|
|
21907
|
-
}
|
|
21908
|
-
});
|
|
21909
|
-
useResizeObserver(echartRef.value, resizeChart);
|
|
21910
|
-
};
|
|
21911
|
-
const resizeChart = debounce(
|
|
21912
|
-
() => {
|
|
21987
|
+
const linesString = ["https", "http", "/src", "/assets", "data:image", window.__env__.VITE_PUBLIC_PATH];
|
|
21988
|
+
const getIconName = computed(() => {
|
|
21989
|
+
return props == null ? void 0 : props.name;
|
|
21990
|
+
});
|
|
21991
|
+
const isShowIconSvg = computed(() => {
|
|
21992
|
+
var _a;
|
|
21993
|
+
return (_a = props == null ? void 0 : props.name) == null ? void 0 : _a.startsWith("ele-");
|
|
21994
|
+
});
|
|
21995
|
+
const isShowIconImg = computed(() => {
|
|
21996
|
+
return linesString.find((str) => {
|
|
21913
21997
|
var _a;
|
|
21914
|
-
(_a =
|
|
21915
|
-
}
|
|
21916
|
-
300);
|
|
21917
|
-
const setOption = debounce(
|
|
21918
|
-
async (data) => {
|
|
21919
|
-
if (!chart.value) return;
|
|
21920
|
-
chart.value.setOption(data, true, true);
|
|
21921
|
-
await nextTick();
|
|
21922
|
-
resizeChart();
|
|
21923
|
-
},
|
|
21924
|
-
300);
|
|
21925
|
-
const formatEmpty = computed(() => {
|
|
21926
|
-
if (typeof props.isEmpty === "function") {
|
|
21927
|
-
return props.isEmpty(props.options);
|
|
21928
|
-
}
|
|
21929
|
-
return props.isEmpty;
|
|
21998
|
+
return (_a = props.name) == null ? void 0 : _a.startsWith(str);
|
|
21999
|
+
});
|
|
21930
22000
|
});
|
|
21931
|
-
|
|
21932
|
-
|
|
21933
|
-
async (nw) => {
|
|
21934
|
-
await nextTick();
|
|
21935
|
-
setOption(nw);
|
|
21936
|
-
},
|
|
21937
|
-
{ deep: true }
|
|
21938
|
-
);
|
|
21939
|
-
watch(
|
|
21940
|
-
() => props.theme,
|
|
21941
|
-
async () => {
|
|
21942
|
-
chart.value.dispose();
|
|
21943
|
-
renderChart();
|
|
21944
|
-
}
|
|
21945
|
-
);
|
|
21946
|
-
onMounted(() => {
|
|
21947
|
-
renderChart();
|
|
22001
|
+
const setIconSvgStyle = computed(() => {
|
|
22002
|
+
return `font-size: ${props.size}px;color: ${props.color};`;
|
|
21948
22003
|
});
|
|
21949
|
-
|
|
21950
|
-
|
|
21951
|
-
|
|
22004
|
+
const setIconImgOutStyle = computed(() => {
|
|
22005
|
+
return `width: ${props.size}px;height: ${props.size}px;display: inline-block;overflow: hidden;`;
|
|
22006
|
+
});
|
|
22007
|
+
const setIconSvgInsStyle = computed(() => {
|
|
22008
|
+
const filterStyle = [];
|
|
22009
|
+
const compatibles = ["-webkit", "-ms", "-o", "-moz"];
|
|
22010
|
+
compatibles.forEach((j) => filterStyle.push(`${j}-filter: drop-shadow(${props.color} ${props.size}px 0);`));
|
|
22011
|
+
return `width: ${props.size}px;height: ${props.size}px;position: relative;left: -${props.size}px;${filterStyle.join("")}`;
|
|
21952
22012
|
});
|
|
21953
22013
|
return (_ctx, _cache) => {
|
|
21954
|
-
|
|
21955
|
-
|
|
22014
|
+
return isShowIconSvg.value ? (openBlock(), createElementBlock(
|
|
22015
|
+
"i",
|
|
22016
|
+
{
|
|
22017
|
+
key: 0,
|
|
22018
|
+
class: "el-icon",
|
|
22019
|
+
style: normalizeStyle(setIconSvgStyle.value)
|
|
22020
|
+
},
|
|
22021
|
+
[
|
|
22022
|
+
(openBlock(), createBlock(resolveDynamicComponent(getIconName.value)))
|
|
22023
|
+
],
|
|
22024
|
+
4
|
|
22025
|
+
/* STYLE */
|
|
22026
|
+
)) : isShowIconImg.value ? (openBlock(), createElementBlock(
|
|
21956
22027
|
"div",
|
|
21957
|
-
|
|
22028
|
+
{
|
|
22029
|
+
key: 1,
|
|
22030
|
+
style: normalizeStyle(setIconImgOutStyle.value)
|
|
22031
|
+
},
|
|
21958
22032
|
[
|
|
21959
|
-
|
|
21960
|
-
|
|
21961
|
-
|
|
21962
|
-
|
|
21963
|
-
ref: echartRef
|
|
21964
|
-
}, null, 8, _hoisted_1), [
|
|
21965
|
-
[vShow, !formatEmpty.value]
|
|
21966
|
-
]),
|
|
21967
|
-
formatEmpty.value ? renderSlot(_ctx.$slots, "empty", { key: 0 }, () => [
|
|
21968
|
-
createVNode(_component_el_empty, mergeProps(_ctx.$attrs, { description: __props.description }), null, 16, ["description"])
|
|
21969
|
-
]) : createCommentVNode("v-if", true),
|
|
21970
|
-
renderSlot(_ctx.$slots, "default")
|
|
22033
|
+
createElementVNode("img", {
|
|
22034
|
+
src: getIconName.value,
|
|
22035
|
+
style: normalizeStyle(setIconSvgInsStyle.value)
|
|
22036
|
+
}, null, 12, _hoisted_1)
|
|
21971
22037
|
],
|
|
21972
|
-
|
|
21973
|
-
/*
|
|
21974
|
-
)
|
|
22038
|
+
4
|
|
22039
|
+
/* STYLE */
|
|
22040
|
+
)) : (openBlock(), createElementBlock(
|
|
22041
|
+
"i",
|
|
22042
|
+
{
|
|
22043
|
+
key: 2,
|
|
22044
|
+
class: normalizeClass(getIconName.value),
|
|
22045
|
+
style: normalizeStyle(setIconSvgStyle.value)
|
|
22046
|
+
},
|
|
22047
|
+
null,
|
|
22048
|
+
6
|
|
22049
|
+
/* CLASS, STYLE */
|
|
22050
|
+
));
|
|
21975
22051
|
};
|
|
21976
22052
|
}
|
|
21977
22053
|
});
|
|
21978
22054
|
|
|
21979
|
-
|
|
22055
|
+
function elSvg(app) {
|
|
22056
|
+
const icons = svg;
|
|
22057
|
+
for (const i in icons) {
|
|
22058
|
+
if (!app._context.components[`ele-${icons[i].name}`]) {
|
|
22059
|
+
app.component(`ele-${icons[i].name}`, icons[i]);
|
|
22060
|
+
}
|
|
22061
|
+
}
|
|
22062
|
+
if (!app._context.components[`SvgIcon`]) {
|
|
22063
|
+
app.component("SvgIcon", _sfc_main);
|
|
22064
|
+
}
|
|
22065
|
+
}
|
|
22066
|
+
|
|
22067
|
+
const makeInstaller = (components = []) => {
|
|
22068
|
+
const install = (app) => {
|
|
22069
|
+
components.forEach(
|
|
22070
|
+
(component) => {
|
|
22071
|
+
if (!app._context.components[component.name]) {
|
|
22072
|
+
app.component(component.name, component);
|
|
22073
|
+
}
|
|
22074
|
+
}
|
|
22075
|
+
);
|
|
22076
|
+
if (app) {
|
|
22077
|
+
app.use(pinia);
|
|
22078
|
+
elSvg(app);
|
|
22079
|
+
directive(app);
|
|
22080
|
+
app.use(setupVXETable);
|
|
22081
|
+
}
|
|
22082
|
+
};
|
|
22083
|
+
return {
|
|
22084
|
+
install
|
|
22085
|
+
};
|
|
22086
|
+
};
|
|
21980
22087
|
|
|
21981
22088
|
const plugins = [
|
|
21982
22089
|
FButton,
|
|
@@ -22576,9 +22683,136 @@ function initRouter() {
|
|
|
22576
22683
|
return router;
|
|
22577
22684
|
}
|
|
22578
22685
|
|
|
22686
|
+
function useTitle() {
|
|
22687
|
+
const stores = useThemeConfig(pinia);
|
|
22688
|
+
const { themeConfig } = storeToRefs(stores);
|
|
22689
|
+
nextTick(() => {
|
|
22690
|
+
let webTitle = "";
|
|
22691
|
+
let globalTitle = themeConfig.value.globalTitle;
|
|
22692
|
+
const { path, meta } = router.currentRoute.value;
|
|
22693
|
+
if (path === "/login") {
|
|
22694
|
+
webTitle = meta.title;
|
|
22695
|
+
} else {
|
|
22696
|
+
webTitle = setTagsViewNameI18n(router.currentRoute.value);
|
|
22697
|
+
}
|
|
22698
|
+
document.title = `${webTitle} - ${globalTitle}` || globalTitle;
|
|
22699
|
+
});
|
|
22700
|
+
}
|
|
22701
|
+
function setTagsViewNameI18n(item) {
|
|
22702
|
+
let tagsViewName = "";
|
|
22703
|
+
const { query, params, meta } = item;
|
|
22704
|
+
const pattern = /^\{("(zh-CN|en|zh-TW)":"[^,]+",?){1,3}}$/;
|
|
22705
|
+
if ((query == null ? void 0 : query.tagsViewName) || (params == null ? void 0 : params.tagsViewName)) {
|
|
22706
|
+
if (pattern.test(query == null ? void 0 : query.tagsViewName) || pattern.test(params == null ? void 0 : params.tagsViewName)) {
|
|
22707
|
+
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);
|
|
22708
|
+
tagsViewName = urlTagsParams[i18n.global.locale.value];
|
|
22709
|
+
} else {
|
|
22710
|
+
tagsViewName = (query == null ? void 0 : query.tagsViewName) || (params == null ? void 0 : params.tagsViewName);
|
|
22711
|
+
}
|
|
22712
|
+
} else {
|
|
22713
|
+
tagsViewName = i18n.global.t(`message.menu.${meta.title}`);
|
|
22714
|
+
}
|
|
22715
|
+
return tagsViewName;
|
|
22716
|
+
}
|
|
22717
|
+
const lazyImg = (el, arr) => {
|
|
22718
|
+
const io = new IntersectionObserver((res) => {
|
|
22719
|
+
res.forEach((v) => {
|
|
22720
|
+
if (v.isIntersecting) {
|
|
22721
|
+
const { img, key } = v.target.dataset;
|
|
22722
|
+
v.target.src = img;
|
|
22723
|
+
v.target.onload = () => {
|
|
22724
|
+
io.unobserve(v.target);
|
|
22725
|
+
arr[key]["loading"] = false;
|
|
22726
|
+
};
|
|
22727
|
+
}
|
|
22728
|
+
});
|
|
22729
|
+
});
|
|
22730
|
+
nextTick(() => {
|
|
22731
|
+
document.querySelectorAll(el).forEach((img) => io.observe(img));
|
|
22732
|
+
});
|
|
22733
|
+
};
|
|
22734
|
+
const globalComponentSize = () => {
|
|
22735
|
+
const stores = useThemeConfig(pinia);
|
|
22736
|
+
const { themeConfig } = storeToRefs(stores);
|
|
22737
|
+
return themeConfig.value.globalComponentSize;
|
|
22738
|
+
};
|
|
22739
|
+
function deepClone(obj) {
|
|
22740
|
+
let newObj;
|
|
22741
|
+
try {
|
|
22742
|
+
newObj = obj.push ? [] : {};
|
|
22743
|
+
} catch (error) {
|
|
22744
|
+
newObj = {};
|
|
22745
|
+
}
|
|
22746
|
+
for (let attr in obj) {
|
|
22747
|
+
if (obj[attr] && typeof obj[attr] === "object") {
|
|
22748
|
+
newObj[attr] = deepClone(obj[attr]);
|
|
22749
|
+
} else {
|
|
22750
|
+
newObj[attr] = obj[attr];
|
|
22751
|
+
}
|
|
22752
|
+
}
|
|
22753
|
+
return newObj;
|
|
22754
|
+
}
|
|
22755
|
+
function isMobile() {
|
|
22756
|
+
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)) {
|
|
22757
|
+
return true;
|
|
22758
|
+
} else {
|
|
22759
|
+
return false;
|
|
22760
|
+
}
|
|
22761
|
+
}
|
|
22762
|
+
function handleEmpty(list) {
|
|
22763
|
+
const arr = [];
|
|
22764
|
+
for (const i in list) {
|
|
22765
|
+
const d = [];
|
|
22766
|
+
for (const j in list[i]) {
|
|
22767
|
+
d.push(list[i][j]);
|
|
22768
|
+
}
|
|
22769
|
+
const leng = d.filter((item) => item === "").length;
|
|
22770
|
+
if (leng !== d.length) {
|
|
22771
|
+
arr.push(list[i]);
|
|
22772
|
+
}
|
|
22773
|
+
}
|
|
22774
|
+
return arr;
|
|
22775
|
+
}
|
|
22776
|
+
function handleOpenLink(val) {
|
|
22777
|
+
var _a, _b, _c;
|
|
22778
|
+
const { origin, pathname } = window.location;
|
|
22779
|
+
router.push(val.path);
|
|
22780
|
+
if (verifyUrl((_a = val.meta) == null ? void 0 : _a.isLink)) window.open((_b = val.meta) == null ? void 0 : _b.isLink);
|
|
22781
|
+
else window.open(`${origin}${pathname}#${(_c = val.meta) == null ? void 0 : _c.isLink}`);
|
|
22782
|
+
}
|
|
22783
|
+
const other = {
|
|
22784
|
+
// elSvg: (app: App) => {
|
|
22785
|
+
// elSvg(app);
|
|
22786
|
+
// },
|
|
22787
|
+
useTitle: () => {
|
|
22788
|
+
useTitle();
|
|
22789
|
+
},
|
|
22790
|
+
setTagsViewNameI18n(route) {
|
|
22791
|
+
return setTagsViewNameI18n(route);
|
|
22792
|
+
},
|
|
22793
|
+
lazyImg: (el, arr) => {
|
|
22794
|
+
lazyImg(el, arr);
|
|
22795
|
+
},
|
|
22796
|
+
globalComponentSize: () => {
|
|
22797
|
+
return globalComponentSize();
|
|
22798
|
+
},
|
|
22799
|
+
deepClone: (obj) => {
|
|
22800
|
+
return deepClone(obj);
|
|
22801
|
+
},
|
|
22802
|
+
isMobile: () => {
|
|
22803
|
+
return isMobile();
|
|
22804
|
+
},
|
|
22805
|
+
handleEmpty: (list) => {
|
|
22806
|
+
return handleEmpty(list);
|
|
22807
|
+
},
|
|
22808
|
+
handleOpenLink: (val) => {
|
|
22809
|
+
handleOpenLink(val);
|
|
22810
|
+
}
|
|
22811
|
+
};
|
|
22812
|
+
|
|
22579
22813
|
const version = "1.0.0";
|
|
22580
22814
|
|
|
22581
22815
|
const commonFun = commonFunction();
|
|
22582
22816
|
const install = installer.install;
|
|
22583
22817
|
|
|
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 };
|
|
22818
|
+
export { AccountTypeEnum, HttpMethodEnum, JobCreateTypeEnum, Local, NextLoading, Session, StringToObj, watermark as Watermark, 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, other, 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 };
|
|
@@ -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;
|