fit2cloud-ui-plus 0.0.1-beta.18 → 0.0.1-beta.19
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/lib/fit2cloud-ui-plus.es.js +158 -108
- package/lib/fit2cloud-ui-plus.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/filter-bar/FuFilter.vue +3 -2
- package/src/components/filter-bar/FuFilterBar.vue +5 -5
- package/src/components/filter-bar/FuFilterInput.vue +4 -1
- package/src/components/filter-bar/filter-components/FuFilterDate.vue +17 -13
- package/src/components/filter-bar/filter-components/FuFilterDateTime.vue +4 -4
- package/src/components/filter-bar/filter-components/FuFilterSelect.vue +5 -4
- package/src/components/read-write-switch/FuSelectRwSwitch.vue +23 -10
- package/src/components/search-bar/FuComplexSearch.vue +7 -5
- package/src/components/search-bar/FuQuickSearch.vue +4 -1
- package/src/components/search-bar/FuSearchBar.vue +10 -11
- package/src/components/search-bar/FuSearchBarButton.vue +4 -1
- package/src/components/search-bar/FuSearchContions.vue +4 -1
- package/src/components/search-bar/complex-components/FuComplexDate.vue +4 -2
- package/src/components/search-bar/complex-components/FuComplexDateTime.vue +6 -3
- package/src/components/search-bar/complex-components/FuComplexInput.vue +4 -2
- package/src/components/search-bar/complex-components/FuComplexSelect.vue +4 -2
- package/src/hooks/index.ts +0 -1
- package/src/hooks/use-global-config/index.ts +26 -8
- package/src/hooks/use-locale/index.ts +1 -1
- package/src/hooks/use-size/index.ts +11 -5
- package/src/index.ts +5 -2
- package/types/src/components/read-write-switch/FuSelectRwSwitch.vue.d.ts +11 -1
- package/types/src/hooks/use-global-config/index.d.ts +9 -1
- package/types/src/hooks/use-size/index.d.ts +5 -1
- package/types/src/index.d.ts +2 -1
- package/src/hooks/use-global-config/index.d.ts +0 -1
- package/src/hooks/use-locale/index.d.ts +0 -14
- package/src/hooks/use-size/index.d.ts +0 -5
|
@@ -17,70 +17,13 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import {
|
|
20
|
+
import { ref, getCurrentInstance, inject, computed, provide, unref, isRef, defineComponent, watch, resolveComponent, openBlock, createBlock, mergeProps, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createVNode, withCtx, onMounted, withDirectives, createTextVNode, createCommentVNode, vShow, renderSlot, resolveDynamicComponent, toHandlers, nextTick, normalizeClass, withModifiers, h, vModelText, normalizeStyle, Transition, useSlots, isVNode, Comment, onUpdated, normalizeProps, guardReactiveProps } from "vue";
|
|
21
21
|
const COMPONENTS_SIZE = ["", "default", "small", "large"];
|
|
22
22
|
const validateSize = (val) => ["", ...COMPONENTS_SIZE].includes(val);
|
|
23
|
-
var _export_sfc = (sfc, props) => {
|
|
24
|
-
const target = sfc.__vccOpts || sfc;
|
|
25
|
-
for (const [key, val] of props) {
|
|
26
|
-
target[key] = val;
|
|
27
|
-
}
|
|
28
|
-
return target;
|
|
29
|
-
};
|
|
30
|
-
const __default__$q = { name: "FuFilterInput" };
|
|
31
|
-
const _sfc_main$y = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$q), {
|
|
32
|
-
props: {
|
|
33
|
-
size: {
|
|
34
|
-
type: String,
|
|
35
|
-
validator: validateSize
|
|
36
|
-
},
|
|
37
|
-
modelValue: String
|
|
38
|
-
},
|
|
39
|
-
emits: ["update:modelValue", "change"],
|
|
40
|
-
setup(__props, { emit }) {
|
|
41
|
-
const props = __props;
|
|
42
|
-
const quick = ref("");
|
|
43
|
-
watch(() => props.modelValue, (val) => {
|
|
44
|
-
quick.value = val;
|
|
45
|
-
});
|
|
46
|
-
function input(e) {
|
|
47
|
-
emit("update:modelValue", quick.value, e);
|
|
48
|
-
}
|
|
49
|
-
function blur(e) {
|
|
50
|
-
emit("change", quick.value, e);
|
|
51
|
-
}
|
|
52
|
-
function clear() {
|
|
53
|
-
emit("update:modelValue", quick.value);
|
|
54
|
-
emit("change", quick.value);
|
|
55
|
-
}
|
|
56
|
-
function keydown(e) {
|
|
57
|
-
const event = e;
|
|
58
|
-
if (event.key === "Enter") {
|
|
59
|
-
emit("change", quick.value, e);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return (_ctx, _cache) => {
|
|
63
|
-
const _component_el_input = resolveComponent("el-input");
|
|
64
|
-
return openBlock(), createBlock(_component_el_input, mergeProps({
|
|
65
|
-
class: "fu-filter-input",
|
|
66
|
-
"prefix-icon": "Search",
|
|
67
|
-
modelValue: quick.value,
|
|
68
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => quick.value = $event),
|
|
69
|
-
onInput: input,
|
|
70
|
-
onBlur: blur,
|
|
71
|
-
onKeydown: keydown,
|
|
72
|
-
onClear: clear
|
|
73
|
-
}, _ctx.$attrs, {
|
|
74
|
-
clearable: "",
|
|
75
|
-
size: __props.size
|
|
76
|
-
}), null, 16, ["modelValue", "size"]);
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
}));
|
|
80
|
-
var FuFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/filter-bar/FuFilterInput.vue"]]);
|
|
81
23
|
const globalConfig = ref();
|
|
24
|
+
const globalConfigKey = Symbol("GlobalConfigKey");
|
|
82
25
|
function useGlobalConfig(key, defaultValue = void 0) {
|
|
83
|
-
const config = getCurrentInstance() ? inject(
|
|
26
|
+
const config = getCurrentInstance() ? inject(globalConfigKey, globalConfig) : globalConfig;
|
|
84
27
|
if (key) {
|
|
85
28
|
return computed(() => {
|
|
86
29
|
var _a2, _b;
|
|
@@ -90,6 +33,19 @@ function useGlobalConfig(key, defaultValue = void 0) {
|
|
|
90
33
|
return config;
|
|
91
34
|
}
|
|
92
35
|
}
|
|
36
|
+
const provideGlobalConfig = (config, app) => {
|
|
37
|
+
var _a2;
|
|
38
|
+
const inSetup = !!getCurrentInstance();
|
|
39
|
+
const provideFn = (_a2 = app == null ? void 0 : app.provide) != null ? _a2 : inSetup ? provide : void 0;
|
|
40
|
+
const context = computed(() => {
|
|
41
|
+
return unref(config);
|
|
42
|
+
});
|
|
43
|
+
provideFn == null ? void 0 : provideFn(globalConfigKey, context);
|
|
44
|
+
if (!globalConfig.value) {
|
|
45
|
+
globalConfig.value = context.value;
|
|
46
|
+
}
|
|
47
|
+
return context;
|
|
48
|
+
};
|
|
93
49
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
94
50
|
var freeGlobal$1 = freeGlobal;
|
|
95
51
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
@@ -534,6 +490,82 @@ const useLocale = () => {
|
|
|
534
490
|
const locale = useGlobalConfig("locale");
|
|
535
491
|
return buildLocaleContext(computed(() => locale.value || Chinese));
|
|
536
492
|
};
|
|
493
|
+
const useProp = (name2) => {
|
|
494
|
+
const vm = getCurrentInstance();
|
|
495
|
+
return computed(() => {
|
|
496
|
+
var _a2, _b;
|
|
497
|
+
return (_b = ((_a2 = vm.proxy) == null ? void 0 : _a2.$props)[name2]) != null ? _b : void 0;
|
|
498
|
+
});
|
|
499
|
+
};
|
|
500
|
+
const useSize = (fallback, ignore = {}) => {
|
|
501
|
+
const emptyRef = ref(void 0);
|
|
502
|
+
const size = ignore.prop ? emptyRef : useProp("size");
|
|
503
|
+
const globalConfig2 = ignore.global ? emptyRef : useGlobalConfig("size");
|
|
504
|
+
return computed(() => size.value || unref(fallback) || globalConfig2.value || "");
|
|
505
|
+
};
|
|
506
|
+
const useSizeProp = {
|
|
507
|
+
type: String,
|
|
508
|
+
validator: validateSize
|
|
509
|
+
};
|
|
510
|
+
var _export_sfc = (sfc, props) => {
|
|
511
|
+
const target = sfc.__vccOpts || sfc;
|
|
512
|
+
for (const [key, val] of props) {
|
|
513
|
+
target[key] = val;
|
|
514
|
+
}
|
|
515
|
+
return target;
|
|
516
|
+
};
|
|
517
|
+
const __default__$q = { name: "FuFilterInput" };
|
|
518
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$q), {
|
|
519
|
+
props: {
|
|
520
|
+
size: {
|
|
521
|
+
type: String,
|
|
522
|
+
validator: validateSize
|
|
523
|
+
},
|
|
524
|
+
modelValue: String
|
|
525
|
+
},
|
|
526
|
+
emits: ["update:modelValue", "change"],
|
|
527
|
+
setup(__props, { emit }) {
|
|
528
|
+
const props = __props;
|
|
529
|
+
const quick = ref("");
|
|
530
|
+
const configSize = useSize();
|
|
531
|
+
watch(() => props.modelValue, (val) => {
|
|
532
|
+
quick.value = val;
|
|
533
|
+
});
|
|
534
|
+
function input(e) {
|
|
535
|
+
emit("update:modelValue", quick.value, e);
|
|
536
|
+
}
|
|
537
|
+
function blur(e) {
|
|
538
|
+
emit("change", quick.value, e);
|
|
539
|
+
}
|
|
540
|
+
function clear() {
|
|
541
|
+
emit("update:modelValue", quick.value);
|
|
542
|
+
emit("change", quick.value);
|
|
543
|
+
}
|
|
544
|
+
function keydown(e) {
|
|
545
|
+
const event = e;
|
|
546
|
+
if (event.key === "Enter") {
|
|
547
|
+
emit("change", quick.value, e);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
return (_ctx, _cache) => {
|
|
551
|
+
const _component_el_input = resolveComponent("el-input");
|
|
552
|
+
return openBlock(), createBlock(_component_el_input, mergeProps({
|
|
553
|
+
class: "fu-filter-input",
|
|
554
|
+
"prefix-icon": "Search",
|
|
555
|
+
modelValue: quick.value,
|
|
556
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => quick.value = $event),
|
|
557
|
+
onInput: input,
|
|
558
|
+
onBlur: blur,
|
|
559
|
+
onKeydown: keydown,
|
|
560
|
+
onClear: clear
|
|
561
|
+
}, _ctx.$attrs, {
|
|
562
|
+
clearable: "",
|
|
563
|
+
size: unref(configSize)
|
|
564
|
+
}), null, 16, ["modelValue", "size"]);
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
}));
|
|
568
|
+
var FuFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__file", "/Users/mokun/fit2cloud2.0/fit2cloud-ui-plus/src/components/filter-bar/FuFilterInput.vue"]]);
|
|
537
569
|
const _hoisted_1$k = { class: "fu-filter-conditions" };
|
|
538
570
|
const _hoisted_2$e = { class: "condition-text" };
|
|
539
571
|
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
@@ -609,6 +641,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
609
641
|
const { t } = useLocale();
|
|
610
642
|
const filterRef = ref(null);
|
|
611
643
|
const conditionsRef = ref(null);
|
|
644
|
+
const configSize = useSize();
|
|
612
645
|
const drawer = ref(true);
|
|
613
646
|
const scroll = ref(false);
|
|
614
647
|
const conditions = ref([]);
|
|
@@ -782,7 +815,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
782
815
|
return openBlock(), createBlock(resolveDynamicComponent(c.component), mergeProps({ key: i }, c, {
|
|
783
816
|
ref_for: true,
|
|
784
817
|
ref: c.field
|
|
785
|
-
}, toHandlers(c), { size:
|
|
818
|
+
}, toHandlers(c), { size: unref(configSize) }), null, 16, ["size"]);
|
|
786
819
|
}), 128))
|
|
787
820
|
])
|
|
788
821
|
]),
|
|
@@ -841,6 +874,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
841
874
|
emits: ["exec"],
|
|
842
875
|
setup(__props, { expose, emit }) {
|
|
843
876
|
const { t } = useLocale();
|
|
877
|
+
const configSize = useSize();
|
|
844
878
|
const quick = ref("");
|
|
845
879
|
const conditions = ref([]);
|
|
846
880
|
const filterRef = ref();
|
|
@@ -883,7 +917,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
883
917
|
createElementVNode("div", _hoisted_4$1, [
|
|
884
918
|
renderSlot(_ctx.$slots, "tr", { condition: unref(conditionObj) }, () => [
|
|
885
919
|
createVNode(FuFilterInput, {
|
|
886
|
-
size:
|
|
920
|
+
size: unref(configSize),
|
|
887
921
|
modelValue: quick.value,
|
|
888
922
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => quick.value = $event),
|
|
889
923
|
placeholder: __props.quickPlaceholder,
|
|
@@ -894,7 +928,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
894
928
|
class: "fu-filter-button",
|
|
895
929
|
onClick: open,
|
|
896
930
|
icon: "Filter",
|
|
897
|
-
size:
|
|
931
|
+
size: unref(configSize)
|
|
898
932
|
}, {
|
|
899
933
|
default: withCtx(() => [
|
|
900
934
|
createTextVNode(toDisplayString(unref(t)("fu.filter_bar.filter")) + " ", 1),
|
|
@@ -912,7 +946,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
912
946
|
onFilter: filter,
|
|
913
947
|
count: __props.resultCount,
|
|
914
948
|
components: __props.components,
|
|
915
|
-
size:
|
|
949
|
+
size: unref(configSize),
|
|
916
950
|
"show-empty": __props.showEmpty
|
|
917
951
|
}, {
|
|
918
952
|
default: withCtx(() => [
|
|
@@ -1000,8 +1034,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1000
1034
|
emits: ["change"],
|
|
1001
1035
|
setup(__props, { expose, emit }) {
|
|
1002
1036
|
const props = __props;
|
|
1003
|
-
const { t } = useLocale();
|
|
1004
1037
|
const selection = ref(props.multiple ? [] : "");
|
|
1038
|
+
const configSize = useSize();
|
|
1005
1039
|
const showOptions = computed(() => {
|
|
1006
1040
|
return props.options.filter((o, i) => {
|
|
1007
1041
|
let show = props.showLimit < 0 ? true : i < props.showLimit;
|
|
@@ -1022,6 +1056,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1022
1056
|
}
|
|
1023
1057
|
return getValueLabel(selection.value);
|
|
1024
1058
|
});
|
|
1059
|
+
const { t } = useLocale();
|
|
1025
1060
|
function change(v) {
|
|
1026
1061
|
if (v.includes("")) {
|
|
1027
1062
|
selection.value = props.options.map((o) => o.value);
|
|
@@ -1114,7 +1149,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1114
1149
|
multiple: __props.multiple,
|
|
1115
1150
|
onChange: change,
|
|
1116
1151
|
teleported: false,
|
|
1117
|
-
size:
|
|
1152
|
+
size: unref(configSize),
|
|
1118
1153
|
placeholder: unref(t)("fu.search_bar.please_select")
|
|
1119
1154
|
}), {
|
|
1120
1155
|
default: withCtx(() => [
|
|
@@ -1197,11 +1232,12 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1197
1232
|
},
|
|
1198
1233
|
setup(__props, { expose }) {
|
|
1199
1234
|
const props = __props;
|
|
1200
|
-
const { t } = useLocale();
|
|
1201
1235
|
const value = ref("");
|
|
1236
|
+
const configSize = useSize();
|
|
1202
1237
|
const valueLabel = computed(() => {
|
|
1203
1238
|
return dateFormat(value.value[0]) + " - " + dateFormat(value.value[1]);
|
|
1204
1239
|
});
|
|
1240
|
+
const { t } = useLocale();
|
|
1205
1241
|
function getCondition() {
|
|
1206
1242
|
if (!String(value.value))
|
|
1207
1243
|
return;
|
|
@@ -1230,7 +1266,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1230
1266
|
modelValue: value.value,
|
|
1231
1267
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
1232
1268
|
}, _ctx.$attrs, {
|
|
1233
|
-
size:
|
|
1269
|
+
size: unref(configSize),
|
|
1234
1270
|
placeholder: unref(t)("fu.search_bar.select_date"),
|
|
1235
1271
|
type: "daterange",
|
|
1236
1272
|
"value-format": __props.valueFormat,
|
|
@@ -1265,11 +1301,12 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1265
1301
|
},
|
|
1266
1302
|
setup(__props, { expose }) {
|
|
1267
1303
|
const props = __props;
|
|
1268
|
-
const { t } = useLocale();
|
|
1269
1304
|
const value = ref("");
|
|
1305
|
+
const configSize = useSize();
|
|
1270
1306
|
const valueLabel = computed(() => {
|
|
1271
1307
|
return datetimeFormat(value.value[0]) + " - " + datetimeFormat(value.value[1]);
|
|
1272
1308
|
});
|
|
1309
|
+
const { t } = useLocale();
|
|
1273
1310
|
function getCondition() {
|
|
1274
1311
|
if (!String(value.value))
|
|
1275
1312
|
return;
|
|
@@ -1298,7 +1335,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1298
1335
|
modelValue: value.value,
|
|
1299
1336
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
1300
1337
|
}, _ctx.$attrs, {
|
|
1301
|
-
size:
|
|
1338
|
+
size: unref(configSize),
|
|
1302
1339
|
placeholder: unref(t)("fu.search_bar.select_date_time"),
|
|
1303
1340
|
type: "datetimerange",
|
|
1304
1341
|
"value-format": __props.valueFormat,
|
|
@@ -1319,7 +1356,7 @@ FuFilterBar.install = (app) => {
|
|
|
1319
1356
|
app.component(FuFilterDate.name, FuFilterDate);
|
|
1320
1357
|
app.component(FuFilterDateTime.name, FuFilterDateTime);
|
|
1321
1358
|
};
|
|
1322
|
-
var
|
|
1359
|
+
var __glob_2_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1323
1360
|
__proto__: null,
|
|
1324
1361
|
"default": FuFilterBar
|
|
1325
1362
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -1469,6 +1506,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1469
1506
|
type: Array,
|
|
1470
1507
|
default: []
|
|
1471
1508
|
},
|
|
1509
|
+
blurTime: {
|
|
1510
|
+
type: Number,
|
|
1511
|
+
default: 150
|
|
1512
|
+
},
|
|
1472
1513
|
writeTrigger: {
|
|
1473
1514
|
type: String,
|
|
1474
1515
|
default: "onClick",
|
|
@@ -1477,7 +1518,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1477
1518
|
}
|
|
1478
1519
|
}
|
|
1479
1520
|
},
|
|
1480
|
-
emits: ["input", "blur", "change"],
|
|
1521
|
+
emits: ["input", "blur", "change", "update:modelValue"],
|
|
1481
1522
|
setup(__props, { emit }) {
|
|
1482
1523
|
const props = __props;
|
|
1483
1524
|
const data = ref(props.modelValue);
|
|
@@ -1488,20 +1529,22 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1488
1529
|
emit("input", data.value, e);
|
|
1489
1530
|
}
|
|
1490
1531
|
function blur(read, e) {
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1532
|
+
if (props.blurTime > 0) {
|
|
1533
|
+
setTimeout(() => {
|
|
1534
|
+
read();
|
|
1535
|
+
}, props.blurTime);
|
|
1536
|
+
emit("blur", e);
|
|
1537
|
+
}
|
|
1495
1538
|
}
|
|
1496
1539
|
function change(read, e) {
|
|
1540
|
+
emit("update:modelValue", data.value, e);
|
|
1497
1541
|
emit("change", data.value, e);
|
|
1498
1542
|
read();
|
|
1499
1543
|
}
|
|
1500
1544
|
return (_ctx, _cache) => {
|
|
1501
1545
|
const _component_el_option = resolveComponent("el-option");
|
|
1502
1546
|
const _component_el_select = resolveComponent("el-select");
|
|
1503
|
-
|
|
1504
|
-
return openBlock(), createBlock(_component_fu_read_write_switch, {
|
|
1547
|
+
return openBlock(), createBlock(FuReadWriteSwitch, {
|
|
1505
1548
|
"write-trigger": __props.writeTrigger,
|
|
1506
1549
|
data: data.value
|
|
1507
1550
|
}, {
|
|
@@ -1544,7 +1587,7 @@ FuReadWriteSwitch.install = (app) => {
|
|
|
1544
1587
|
app.component(FuInputRwSwitch.name, FuInputRwSwitch);
|
|
1545
1588
|
app.component(FuSelectRwSwitch.name, FuSelectRwSwitch);
|
|
1546
1589
|
};
|
|
1547
|
-
var
|
|
1590
|
+
var __glob_2_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1548
1591
|
__proto__: null,
|
|
1549
1592
|
"default": FuReadWriteSwitch
|
|
1550
1593
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -1567,6 +1610,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1567
1610
|
setup(__props, { emit }) {
|
|
1568
1611
|
const props = __props;
|
|
1569
1612
|
const focused = ref(false);
|
|
1613
|
+
const configSize = useSize();
|
|
1570
1614
|
const value = computed({
|
|
1571
1615
|
get: () => props.modelValue,
|
|
1572
1616
|
set: (val) => {
|
|
@@ -1593,7 +1637,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1593
1637
|
const _component_Search = resolveComponent("Search");
|
|
1594
1638
|
const _component_el_icon = resolveComponent("el-icon");
|
|
1595
1639
|
return openBlock(), createElementBlock("div", {
|
|
1596
|
-
class: normalizeClass(["fu-quick-search", "fu-quick-search--" +
|
|
1640
|
+
class: normalizeClass(["fu-quick-search", "fu-quick-search--" + unref(configSize)])
|
|
1597
1641
|
}, [
|
|
1598
1642
|
__props.useIcon ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, {
|
|
1599
1643
|
default: withCtx(() => [
|
|
@@ -1634,6 +1678,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1634
1678
|
setup(__props, { expose, emit }) {
|
|
1635
1679
|
const active = ref(false);
|
|
1636
1680
|
const references = inject(referenceKey);
|
|
1681
|
+
const configSize = useSize();
|
|
1637
1682
|
const showComplex = computed(() => {
|
|
1638
1683
|
return references ? references.value.length > 0 : false;
|
|
1639
1684
|
});
|
|
@@ -1701,7 +1746,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1701
1746
|
circle: "",
|
|
1702
1747
|
icon: "ArrowRightBold",
|
|
1703
1748
|
onClick: toggle,
|
|
1704
|
-
size:
|
|
1749
|
+
size: unref(configSize),
|
|
1705
1750
|
class: normalizeClass(["fu-complex-components-trigger", { "is-active": active.value }])
|
|
1706
1751
|
}, null, 8, ["size", "class"]), [
|
|
1707
1752
|
[vShow, unref(showComplex)]
|
|
@@ -1712,14 +1757,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1712
1757
|
createElementVNode("div", _hoisted_2$8, [
|
|
1713
1758
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1714
1759
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.components, (c) => {
|
|
1715
|
-
return openBlock(), createBlock(resolveDynamicComponent(c.component), mergeProps(c, { size:
|
|
1760
|
+
return openBlock(), createBlock(resolveDynamicComponent(c.component), mergeProps(c, { size: unref(configSize) }), null, 16, ["size"]);
|
|
1716
1761
|
}), 256))
|
|
1717
1762
|
])
|
|
1718
1763
|
]),
|
|
1719
1764
|
createElementVNode("div", _hoisted_3$6, [
|
|
1720
1765
|
createVNode(_component_el_button, {
|
|
1721
1766
|
onClick: close,
|
|
1722
|
-
size:
|
|
1767
|
+
size: unref(configSize)
|
|
1723
1768
|
}, {
|
|
1724
1769
|
default: withCtx(() => [
|
|
1725
1770
|
createTextVNode(toDisplayString(unref(t)("fu.search_bar.cancel")), 1)
|
|
@@ -1729,7 +1774,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1729
1774
|
createVNode(_component_el_button, {
|
|
1730
1775
|
type: "primary",
|
|
1731
1776
|
onClick: ok,
|
|
1732
|
-
size:
|
|
1777
|
+
size: unref(configSize)
|
|
1733
1778
|
}, {
|
|
1734
1779
|
default: withCtx(() => [
|
|
1735
1780
|
createTextVNode(toDisplayString(unref(t)("fu.search_bar.ok")), 1)
|
|
@@ -1755,6 +1800,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1755
1800
|
tooltip: String
|
|
1756
1801
|
},
|
|
1757
1802
|
setup(__props) {
|
|
1803
|
+
const configSize = useSize();
|
|
1758
1804
|
return (_ctx, _cache) => {
|
|
1759
1805
|
const _component_el_button = resolveComponent("el-button");
|
|
1760
1806
|
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
@@ -1766,7 +1812,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1766
1812
|
createVNode(_component_el_button, mergeProps({
|
|
1767
1813
|
class: "fu-search-bar-button",
|
|
1768
1814
|
circle: "",
|
|
1769
|
-
size:
|
|
1815
|
+
size: unref(configSize)
|
|
1770
1816
|
}, _ctx.$attrs), null, 16, ["size"])
|
|
1771
1817
|
]),
|
|
1772
1818
|
_: 1
|
|
@@ -1793,6 +1839,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1793
1839
|
emits: ["change"],
|
|
1794
1840
|
setup(__props, { emit }) {
|
|
1795
1841
|
const props = __props;
|
|
1842
|
+
const configSize = useSize();
|
|
1796
1843
|
function remove(index) {
|
|
1797
1844
|
props.conditions.splice(index, 1);
|
|
1798
1845
|
emit("change", props.conditions);
|
|
@@ -1801,7 +1848,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1801
1848
|
const _component_Close = resolveComponent("Close");
|
|
1802
1849
|
const _component_el_icon = resolveComponent("el-icon");
|
|
1803
1850
|
return openBlock(), createElementBlock("div", {
|
|
1804
|
-
class: normalizeClass(["fu-search-conditions", "fu-search-conditions--" +
|
|
1851
|
+
class: normalizeClass(["fu-search-conditions", "fu-search-conditions--" + unref(configSize)])
|
|
1805
1852
|
}, [
|
|
1806
1853
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.conditions, (condition, index) => {
|
|
1807
1854
|
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
@@ -1829,10 +1876,7 @@ const _hoisted_3$4 = { class: "fu-search-bar__buttons" };
|
|
|
1829
1876
|
const __default__$e = { name: "FuSearchBar" };
|
|
1830
1877
|
const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$e), {
|
|
1831
1878
|
props: {
|
|
1832
|
-
size:
|
|
1833
|
-
type: String,
|
|
1834
|
-
validator: validateSize
|
|
1835
|
-
},
|
|
1879
|
+
size: useSizeProp,
|
|
1836
1880
|
quickKey: {
|
|
1837
1881
|
type: String,
|
|
1838
1882
|
default: "quick"
|
|
@@ -1860,6 +1904,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1860
1904
|
const conditions = ref([]);
|
|
1861
1905
|
const references = ref([]);
|
|
1862
1906
|
provide(referenceKey, references);
|
|
1907
|
+
const configSize = useSize();
|
|
1863
1908
|
const placeholder = computed(() => {
|
|
1864
1909
|
return props.quickPlaceholder ? props.quickPlaceholder : t("fu.search_bar.search");
|
|
1865
1910
|
});
|
|
@@ -1940,7 +1985,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1940
1985
|
ref: complexRef,
|
|
1941
1986
|
components: __props.components,
|
|
1942
1987
|
onChange: change,
|
|
1943
|
-
size:
|
|
1988
|
+
size: unref(configSize),
|
|
1944
1989
|
onClose: closePopover
|
|
1945
1990
|
}, {
|
|
1946
1991
|
default: withCtx(() => [
|
|
@@ -1951,12 +1996,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1951
1996
|
unref(showComplex) ? (openBlock(), createBlock(FuSearchConditions, {
|
|
1952
1997
|
key: 0,
|
|
1953
1998
|
conditions: conditions.value,
|
|
1954
|
-
size:
|
|
1999
|
+
size: unref(configSize),
|
|
1955
2000
|
onChange: change
|
|
1956
2001
|
}, null, 8, ["conditions", "size"])) : createCommentVNode("v-if", true),
|
|
1957
2002
|
__props.useQuickSearch ? (openBlock(), createBlock(FuQuickSearch, {
|
|
1958
2003
|
key: 1,
|
|
1959
|
-
size:
|
|
2004
|
+
size: unref(configSize),
|
|
1960
2005
|
"use-icon": !unref(showComplex),
|
|
1961
2006
|
placeholder: unref(placeholder),
|
|
1962
2007
|
modelValue: quick.value,
|
|
@@ -1970,14 +2015,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1970
2015
|
key: 0,
|
|
1971
2016
|
icon: "Close",
|
|
1972
2017
|
onClick: clean,
|
|
1973
|
-
size:
|
|
2018
|
+
size: unref(configSize),
|
|
1974
2019
|
tooltip: unref(t)("fu.search_bar.clean")
|
|
1975
2020
|
}, null, 8, ["size", "tooltip"])) : createCommentVNode("v-if", true),
|
|
1976
2021
|
unref(showRefresh) ? (openBlock(), createBlock(FuSearchBarButton, {
|
|
1977
2022
|
key: 1,
|
|
1978
2023
|
icon: "Refresh",
|
|
1979
2024
|
onClick: refresh,
|
|
1980
|
-
size:
|
|
2025
|
+
size: unref(configSize),
|
|
1981
2026
|
tooltip: unref(t)("fu.search_bar.refresh")
|
|
1982
2027
|
}, null, 8, ["size", "tooltip"])) : createCommentVNode("v-if", true),
|
|
1983
2028
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -2016,6 +2061,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2016
2061
|
setup(__props, { expose, emit }) {
|
|
2017
2062
|
const props = __props;
|
|
2018
2063
|
const selection = ref(props.multiple ? [] : "");
|
|
2064
|
+
const configSize = useSize();
|
|
2019
2065
|
const valueLabel = computed(() => {
|
|
2020
2066
|
if (Array.isArray(selection.value)) {
|
|
2021
2067
|
let values = [];
|
|
@@ -2064,7 +2110,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2064
2110
|
placeholder: unref(t)("fu.search_bar.please_select"),
|
|
2065
2111
|
modelValue: selection.value,
|
|
2066
2112
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selection.value = $event),
|
|
2067
|
-
size:
|
|
2113
|
+
size: unref(configSize)
|
|
2068
2114
|
}, _ctx.$attrs, { clearable: "" }), {
|
|
2069
2115
|
default: withCtx(() => [
|
|
2070
2116
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (o) => {
|
|
@@ -2102,6 +2148,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2102
2148
|
setup(__props, { expose }) {
|
|
2103
2149
|
const props = __props;
|
|
2104
2150
|
const inputValue = ref("");
|
|
2151
|
+
const configSize = useSize();
|
|
2105
2152
|
const { t } = useLocale();
|
|
2106
2153
|
function getCondition() {
|
|
2107
2154
|
if (!inputValue.value)
|
|
@@ -2131,7 +2178,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2131
2178
|
modelValue: inputValue.value,
|
|
2132
2179
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
2133
2180
|
placeholder: unref(t)("fu.search_bar.please_input"),
|
|
2134
|
-
size:
|
|
2181
|
+
size: unref(configSize)
|
|
2135
2182
|
}, _ctx.$attrs), null, 16, ["modelValue", "placeholder", "size"])
|
|
2136
2183
|
])
|
|
2137
2184
|
]);
|
|
@@ -2166,6 +2213,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2166
2213
|
return dateFormat(value.value[0]) + " ~ " + dateFormat(value.value[1]);
|
|
2167
2214
|
});
|
|
2168
2215
|
const { t } = useLocale();
|
|
2216
|
+
const configSize = useSize();
|
|
2169
2217
|
function getCondition() {
|
|
2170
2218
|
if (!String(value.value))
|
|
2171
2219
|
return;
|
|
@@ -2193,7 +2241,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2193
2241
|
modelValue: value.value,
|
|
2194
2242
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
2195
2243
|
}, _ctx.$attrs, {
|
|
2196
|
-
size:
|
|
2244
|
+
size: unref(configSize),
|
|
2197
2245
|
placeholder: unref(t)("fu.search_bar.select_date"),
|
|
2198
2246
|
type: "daterange",
|
|
2199
2247
|
"value-format": __props.valueFormat,
|
|
@@ -2228,11 +2276,12 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2228
2276
|
},
|
|
2229
2277
|
setup(__props, { expose }) {
|
|
2230
2278
|
const props = __props;
|
|
2231
|
-
const { t } = useLocale();
|
|
2232
2279
|
const value = ref("");
|
|
2280
|
+
const configSize = useSize();
|
|
2233
2281
|
const valueLabel = computed(() => {
|
|
2234
2282
|
return datetimeFormat(value.value[0]) + " ~ " + datetimeFormat(value.value[1]);
|
|
2235
2283
|
});
|
|
2284
|
+
const { t } = useLocale();
|
|
2236
2285
|
function getCondition() {
|
|
2237
2286
|
if (!String(value.value))
|
|
2238
2287
|
return;
|
|
@@ -2261,7 +2310,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2261
2310
|
modelValue: value.value,
|
|
2262
2311
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
2263
2312
|
}, _ctx.$attrs, {
|
|
2264
|
-
size:
|
|
2313
|
+
size: unref(configSize),
|
|
2265
2314
|
placeholder: unref(t)("fu.search_bar.select_date_time"),
|
|
2266
2315
|
type: "datetimerange",
|
|
2267
2316
|
"value-format": __props.valueFormat,
|
|
@@ -2283,7 +2332,7 @@ FuSearchBar.install = (app) => {
|
|
|
2283
2332
|
app.component(FuComplexDate.name, FuComplexDate);
|
|
2284
2333
|
app.component(FuComplexDateTime.name, FuComplexDateTime);
|
|
2285
2334
|
};
|
|
2286
|
-
var
|
|
2335
|
+
var __glob_2_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2287
2336
|
__proto__: null,
|
|
2288
2337
|
"default": FuSearchBar
|
|
2289
2338
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -2885,7 +2934,7 @@ FuSpeedDial.install = (app) => {
|
|
|
2885
2934
|
app.component(FuSpeedDial.name, FuSpeedDial);
|
|
2886
2935
|
app.component(FuSpeedDialItem.name, FuSpeedDialItem);
|
|
2887
2936
|
};
|
|
2888
|
-
var
|
|
2937
|
+
var __glob_2_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2889
2938
|
__proto__: null,
|
|
2890
2939
|
"default": FuSpeedDial
|
|
2891
2940
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -3100,7 +3149,7 @@ var FuSplitPane = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "/Users/m
|
|
|
3100
3149
|
FuSplitPane.install = (app) => {
|
|
3101
3150
|
app.component(FuSplitPane.name, FuSplitPane);
|
|
3102
3151
|
};
|
|
3103
|
-
var
|
|
3152
|
+
var __glob_2_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3104
3153
|
__proto__: null,
|
|
3105
3154
|
"default": FuSplitPane
|
|
3106
3155
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -4028,7 +4077,7 @@ FuTable.install = (app) => {
|
|
|
4028
4077
|
app.component(FuTableButton.name, FuTableButton);
|
|
4029
4078
|
app.component(FuTableMoreButton.name, FuTableMoreButton);
|
|
4030
4079
|
};
|
|
4031
|
-
var
|
|
4080
|
+
var __glob_2_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4032
4081
|
__proto__: null,
|
|
4033
4082
|
"default": FuTable
|
|
4034
4083
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -4179,12 +4228,12 @@ var FuTabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/mokun/fi
|
|
|
4179
4228
|
FuTabs.install = (app) => {
|
|
4180
4229
|
app.component(FuTabs.name, FuTabs);
|
|
4181
4230
|
};
|
|
4182
|
-
var
|
|
4231
|
+
var __glob_2_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4183
4232
|
__proto__: null,
|
|
4184
4233
|
"default": FuTabs
|
|
4185
4234
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4186
4235
|
const name = "fit2cloud-ui-plus";
|
|
4187
|
-
const version = "0.0.1-beta.
|
|
4236
|
+
const version = "0.0.1-beta.19";
|
|
4188
4237
|
const main = "./lib/fit2cloud-ui-plus.es.js";
|
|
4189
4238
|
const files = [
|
|
4190
4239
|
"lib",
|
|
@@ -4240,12 +4289,13 @@ var PackageJSON = {
|
|
|
4240
4289
|
dependencies,
|
|
4241
4290
|
devDependencies
|
|
4242
4291
|
};
|
|
4243
|
-
const components = { "./components/filter-bar/index.ts":
|
|
4244
|
-
const install = (app) => {
|
|
4292
|
+
const components = { "./components/filter-bar/index.ts": __glob_2_0, "./components/read-write-switch/index.ts": __glob_2_1, "./components/search-bar/index.ts": __glob_2_2, "./components/speed-dial/index.ts": __glob_2_3, "./components/split-pane/index.ts": __glob_2_4, "./components/table/index.ts": __glob_2_5, "./components/tabs/index.ts": __glob_2_6 };
|
|
4293
|
+
const install = (app, config) => {
|
|
4245
4294
|
Object.keys(components).forEach((key) => {
|
|
4246
4295
|
let component = components[key].default;
|
|
4247
4296
|
app.use(component);
|
|
4248
4297
|
});
|
|
4298
|
+
provideGlobalConfig(config);
|
|
4249
4299
|
};
|
|
4250
4300
|
const plugin = {
|
|
4251
4301
|
name: "Fit2CloudUIPlus",
|