fit2cloud-ui-plus 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/fit2cloud-ui-plus.es.js +1326 -1341
- package/lib/fit2cloud-ui-plus.umd.js +1 -1
- package/package.json +2 -2
- package/src/components/filter-bar/filter-components/FuFilterDateTime.vue +0 -1
- package/src/components/filter-bar/filter-components/FuFilterInputText.vue +1 -2
- package/src/components/icon-button/FuIconButton.vue +0 -4
- package/src/components/read-write-switch/FuReadWriteSwitch.vue +2 -3
- package/src/components/search-bar/FuComplexSearch.vue +1 -1
- package/src/components/search-bar/FuQuickSearch.vue +1 -1
- package/src/components/search-bar/complex-components/FuComplexDateTime.vue +0 -1
- package/src/components/speed-dial/FuSpeedDial.vue +3 -3
- package/src/components/speed-dial/FuSpeedDialActionButton.vue +0 -3
- package/src/components/{ steps/FuVerticalNavigation.vue → steps/FuVerticalNavigation.vue} +1 -1
- package/src/components/{ steps/Stepper.ts → steps/Stepper.ts} +11 -29
- package/src/components/{ steps/types.ts → steps/types.ts} +1 -1
- package/src/components/table/FuTableColumnDropdown.vue +1 -2
- package/src/components/table/table-column-select/FuTableColumnSelectDialog.vue +1 -1
- package/src/components/table/table-operations/FuTableMoreButton.vue +2 -2
- package/src/components/tabs/FuTabs.vue +1 -2
- package/src/tools/size.ts +2 -2
- package/types/src/components/{ steps/FuVerticalNavigation.vue.d.ts → steps/FuVerticalNavigation.vue.d.ts} +1 -1
- package/types/src/components/{ steps/types.d.ts → steps/types.d.ts} +1 -1
- package/src/tools/utils.ts +0 -60
- package/types/src/tools/utils.d.ts +0 -2
- /package/src/components/{ steps → steps}/FuHorizontalNavigation.vue +0 -0
- /package/src/components/{ steps → steps}/FuHorizontalSteps.vue +0 -0
- /package/src/components/{ steps → steps}/FuStep.vue +0 -0
- /package/src/components/{ steps → steps}/FuStepButton.vue +0 -0
- /package/src/components/{ steps → steps}/FuSteps.vue +0 -0
- /package/src/components/{ steps → steps}/FuStepsFooter.ts +0 -0
- /package/src/components/{ steps → steps}/FuVerticalSteps.vue +0 -0
- /package/src/components/{ steps → steps}/index.ts +0 -0
- /package/types/src/components/{ steps → steps}/FuHorizontalNavigation.vue.d.ts +0 -0
- /package/types/src/components/{ steps → steps}/FuHorizontalSteps.vue.d.ts +0 -0
- /package/types/src/components/{ steps → steps}/FuStep.vue.d.ts +0 -0
- /package/types/src/components/{ steps → steps}/FuStepButton.vue.d.ts +0 -0
- /package/types/src/components/{ steps → steps}/FuSteps.vue.d.ts +0 -0
- /package/types/src/components/{ steps → steps}/FuStepsFooter.d.ts +0 -0
- /package/types/src/components/{ steps → steps}/FuVerticalSteps.vue.d.ts +0 -0
- /package/types/src/components/{ steps → steps}/Stepper.d.ts +0 -0
- /package/types/src/components/{ steps → steps}/index.d.ts +0 -0
|
@@ -21,110 +21,9 @@ var __publicField = (obj, key, value) => {
|
|
|
21
21
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
22
|
return value;
|
|
23
23
|
};
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
for (const [key, val] of props) {
|
|
28
|
-
target[key] = val;
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
33
|
-
__name: "FuHorizontalNavigation",
|
|
34
|
-
props: {
|
|
35
|
-
stepper: Object,
|
|
36
|
-
steps: Array,
|
|
37
|
-
disable: Function
|
|
38
|
-
},
|
|
39
|
-
emits: ["active"],
|
|
40
|
-
setup(__props, { emit }) {
|
|
41
|
-
const props = __props;
|
|
42
|
-
const active = computed(() => {
|
|
43
|
-
return props.stepper.index;
|
|
44
|
-
});
|
|
45
|
-
function click(index) {
|
|
46
|
-
!props.disable(index) && emit("active", index);
|
|
47
|
-
}
|
|
48
|
-
return (_ctx, _cache) => {
|
|
49
|
-
const _component_el_step = resolveComponent("el-step");
|
|
50
|
-
const _component_el_steps = resolveComponent("el-steps");
|
|
51
|
-
return openBlock(), createBlock(_component_el_steps, mergeProps({ active: unref(active) }, __props.stepper), {
|
|
52
|
-
default: withCtx(() => [
|
|
53
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.steps, (step, index) => {
|
|
54
|
-
return openBlock(), createBlock(_component_el_step, mergeProps({ key: index }, step, {
|
|
55
|
-
onClick: ($event) => click(index),
|
|
56
|
-
class: __props.disable(index) && "fu-step--disable"
|
|
57
|
-
}), null, 16, ["onClick", "class"]);
|
|
58
|
-
}), 128))
|
|
59
|
-
]),
|
|
60
|
-
_: 1
|
|
61
|
-
}, 16, ["active"]);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
var FuHorizontalNavigation = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/ steps/FuHorizontalNavigation.vue"]]);
|
|
66
|
-
const _sfc_main$I = {};
|
|
67
|
-
function _sfc_render(_ctx, _cache) {
|
|
68
|
-
const _component_el_button = resolveComponent("el-button");
|
|
69
|
-
return openBlock(), createBlock(_component_el_button, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
|
70
|
-
default: withCtx(() => [
|
|
71
|
-
renderSlot(_ctx.$slots, "default")
|
|
72
|
-
]),
|
|
73
|
-
_: 3
|
|
74
|
-
}, 16);
|
|
75
|
-
}
|
|
76
|
-
var FuStepButton = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render], ["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/ steps/FuStepButton.vue"]]);
|
|
77
|
-
var FuStepsFooter = defineComponent({
|
|
78
|
-
name: "FuStepsFooter",
|
|
79
|
-
components: {
|
|
80
|
-
FuStepButton
|
|
81
|
-
},
|
|
82
|
-
emits: ["stepperFn"],
|
|
83
|
-
setup(props, { emit }) {
|
|
84
|
-
const stepper = inject("stepper");
|
|
85
|
-
const disabledButton = ref(false);
|
|
86
|
-
const isFirst = computed(() => {
|
|
87
|
-
return stepper.isFirst(stepper.index);
|
|
88
|
-
});
|
|
89
|
-
const isLast = computed(() => {
|
|
90
|
-
return stepper.isLast(stepper.index);
|
|
91
|
-
});
|
|
92
|
-
const showCancel = computed(() => {
|
|
93
|
-
return stepper.showCancel !== false;
|
|
94
|
-
});
|
|
95
|
-
const disabled = computed(() => {
|
|
96
|
-
return (stepper == null ? void 0 : stepper.isLoading) || disabledButton.value;
|
|
97
|
-
});
|
|
98
|
-
function clickHandle(fnName) {
|
|
99
|
-
stepper[fnName] ? stepper[fnName]() : emit("stepperFn", fnName);
|
|
100
|
-
disabledButton.value = true;
|
|
101
|
-
setTimeout(() => {
|
|
102
|
-
disabledButton.value = false;
|
|
103
|
-
}, 500);
|
|
104
|
-
}
|
|
105
|
-
const button = (value) => {
|
|
106
|
-
return h(FuStepButton, {
|
|
107
|
-
disabled: disabled.value,
|
|
108
|
-
size: stepper.buttonSize,
|
|
109
|
-
onClick: () => clickHandle(value)
|
|
110
|
-
}, () => stepper[`${value}ButtonText`]);
|
|
111
|
-
};
|
|
112
|
-
return () => h("div", {
|
|
113
|
-
class: `fu-steps__footer--${stepper.footerAlign}`
|
|
114
|
-
}, [
|
|
115
|
-
h("div", {
|
|
116
|
-
class: "fu-steps__footer--block",
|
|
117
|
-
style: "margin-right:10px"
|
|
118
|
-
}, [showCancel.value && button("onCancel")]),
|
|
119
|
-
h("div", {
|
|
120
|
-
class: "fu-steps__footer--block"
|
|
121
|
-
}, [
|
|
122
|
-
!isFirst.value && button("prev"),
|
|
123
|
-
isLast.value ? button("onFinish") : button("next")
|
|
124
|
-
])
|
|
125
|
-
]);
|
|
126
|
-
}
|
|
127
|
-
});
|
|
24
|
+
import { ref, getCurrentInstance, inject, computed, provide, unref, isRef, defineComponent, watch, resolveComponent, openBlock, createBlock, mergeProps, onMounted, onUpdated, withCtx, createElementVNode, toDisplayString, nextTick, createElementBlock, Fragment, renderList, createVNode, withDirectives, createTextVNode, createCommentVNode, vShow, renderSlot, resolveDynamicComponent, normalizeClass, withModifiers, h, vModelText, normalizeStyle, Transition, useSlots, normalizeProps, guardReactiveProps, resolveDirective, isVNode, Comment } from "vue";
|
|
25
|
+
const COMPONENTS_SIZE = ["", "default", "small", "large"];
|
|
26
|
+
const validateSize = (val) => ["", ...COMPONENTS_SIZE].includes(val);
|
|
128
27
|
const globalConfig = ref();
|
|
129
28
|
const globalConfigKey = Symbol("GlobalConfigKey");
|
|
130
29
|
function useGlobalConfig(key, defaultValue = void 0) {
|
|
@@ -595,8 +494,6 @@ const useLocale = () => {
|
|
|
595
494
|
const locale = useGlobalConfig("locale");
|
|
596
495
|
return buildLocaleContext(computed(() => locale.value || Chinese));
|
|
597
496
|
};
|
|
598
|
-
const COMPONENTS_SIZE = ["", "default", "small", "large"];
|
|
599
|
-
const validateSize = (val) => ["", ...COMPONENTS_SIZE].includes(val);
|
|
600
497
|
const useProp = (name2) => {
|
|
601
498
|
const vm = getCurrentInstance();
|
|
602
499
|
return computed(() => {
|
|
@@ -614,912 +511,734 @@ const useSizeProp = {
|
|
|
614
511
|
type: String,
|
|
615
512
|
validator: validateSize
|
|
616
513
|
};
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
__publicField(this, "index");
|
|
622
|
-
__publicField(this, "activeSet");
|
|
623
|
-
__publicField(this, "isLoading");
|
|
624
|
-
__publicField(this, "onCancelButtonText");
|
|
625
|
-
__publicField(this, "onFinishButtonText");
|
|
626
|
-
__publicField(this, "prevButtonText");
|
|
627
|
-
__publicField(this, "nextButtonText");
|
|
628
|
-
__publicField(this, "buttonSize");
|
|
629
|
-
__publicField(this, "footerAlign");
|
|
630
|
-
__publicField(this, "showCancel");
|
|
631
|
-
__publicField(this, "beforeActive");
|
|
632
|
-
__publicField(this, "beforeLeave");
|
|
633
|
-
__publicField(this, "height");
|
|
634
|
-
options = options || {};
|
|
635
|
-
this.steps = options.steps;
|
|
636
|
-
this.index = options.index === void 0 ? 0 : options.index;
|
|
637
|
-
this.activeSet = /* @__PURE__ */ new Set();
|
|
638
|
-
this.isLoading = (options == null ? void 0 : options.isLoading) || false;
|
|
639
|
-
this.onCancelButtonText = options.onCancelButtonText || t("fu.steps.cancel");
|
|
640
|
-
this.onFinishButtonText = options.onFinishButtonText || t("fu.steps.finish");
|
|
641
|
-
this.prevButtonText = options.prevButtonText || t("fu.steps.prev");
|
|
642
|
-
this.nextButtonText = options.nextButtonText || t("fu.steps.next");
|
|
643
|
-
this.buttonSize = options.buttonSize || "default";
|
|
644
|
-
this.footerAlign = options.footerAlign || "flex";
|
|
645
|
-
this.showCancel = options.showCancel === void 0 ? false : options.showCancel;
|
|
646
|
-
this.beforeActive = options.beforeActive;
|
|
647
|
-
this.beforeLeave = options.beforeLeave;
|
|
648
|
-
this.height = options.height;
|
|
649
|
-
}
|
|
650
|
-
isFirst(index) {
|
|
651
|
-
return index === 0;
|
|
652
|
-
}
|
|
653
|
-
isLast(index) {
|
|
654
|
-
return index === this.steps.length - 1;
|
|
655
|
-
}
|
|
656
|
-
isActive(index) {
|
|
657
|
-
return this.activeSet.has(index);
|
|
658
|
-
}
|
|
659
|
-
isCurrent(index) {
|
|
660
|
-
return this.index === index;
|
|
514
|
+
var _export_sfc = (sfc, props) => {
|
|
515
|
+
const target = sfc.__vccOpts || sfc;
|
|
516
|
+
for (const [key, val] of props) {
|
|
517
|
+
target[key] = val;
|
|
661
518
|
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
519
|
+
return target;
|
|
520
|
+
};
|
|
521
|
+
const __default__$u = { name: "FuFilterInput" };
|
|
522
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$u), {
|
|
523
|
+
props: {
|
|
524
|
+
size: {
|
|
525
|
+
type: String,
|
|
526
|
+
validator: validateSize
|
|
527
|
+
},
|
|
528
|
+
modelValue: String
|
|
529
|
+
},
|
|
530
|
+
emits: ["update:modelValue", "change"],
|
|
531
|
+
setup(__props, { emit }) {
|
|
532
|
+
const props = __props;
|
|
533
|
+
const quick = ref("");
|
|
534
|
+
const configSize = useSize();
|
|
535
|
+
watch(() => props.modelValue, (val) => {
|
|
536
|
+
quick.value = val;
|
|
537
|
+
});
|
|
538
|
+
function input(e) {
|
|
539
|
+
emit("update:modelValue", quick.value, e);
|
|
672
540
|
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
if (!this.isLast(this.index)) {
|
|
676
|
-
this.active(this.index + 1);
|
|
541
|
+
function blur(e) {
|
|
542
|
+
emit("change", quick.value, e);
|
|
677
543
|
}
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
this.active(this.index - 1);
|
|
544
|
+
function clear() {
|
|
545
|
+
emit("update:modelValue", quick.value);
|
|
546
|
+
emit("change", quick.value);
|
|
682
547
|
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
548
|
+
function keydown(e) {
|
|
549
|
+
const event = e;
|
|
550
|
+
if (event.key === "Enter") {
|
|
551
|
+
emit("change", quick.value, e);
|
|
552
|
+
}
|
|
687
553
|
}
|
|
554
|
+
return (_ctx, _cache) => {
|
|
555
|
+
const _component_el_input = resolveComponent("el-input");
|
|
556
|
+
return openBlock(), createBlock(_component_el_input, mergeProps({
|
|
557
|
+
class: "fu-filter-input",
|
|
558
|
+
"prefix-icon": "Search",
|
|
559
|
+
modelValue: quick.value,
|
|
560
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => quick.value = $event),
|
|
561
|
+
onInput: input,
|
|
562
|
+
onBlur: blur,
|
|
563
|
+
onKeydown: keydown,
|
|
564
|
+
onClear: clear
|
|
565
|
+
}, _ctx.$attrs, {
|
|
566
|
+
clearable: "",
|
|
567
|
+
size: unref(configSize)
|
|
568
|
+
}), null, 16, ["modelValue", "size"]);
|
|
569
|
+
};
|
|
688
570
|
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
571
|
+
}));
|
|
572
|
+
var FuFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/FuFilterInput.vue"]]);
|
|
573
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
574
|
+
__name: "FuFilterConditionText",
|
|
575
|
+
props: {
|
|
576
|
+
condition: {
|
|
577
|
+
type: Object,
|
|
578
|
+
required: true
|
|
693
579
|
}
|
|
694
|
-
|
|
695
|
-
|
|
580
|
+
},
|
|
581
|
+
setup(__props) {
|
|
582
|
+
const props = __props;
|
|
583
|
+
const textRef = ref(null);
|
|
584
|
+
const disabled = ref(true);
|
|
585
|
+
const text = computed(() => {
|
|
586
|
+
let condition = props.condition;
|
|
587
|
+
return condition.label + " " + condition.valueLabel || condition.value;
|
|
588
|
+
});
|
|
589
|
+
function computeDisable() {
|
|
590
|
+
nextTick(() => {
|
|
591
|
+
const el = textRef.value;
|
|
592
|
+
disabled.value = el === null || el.getBoundingClientRect().width < 320;
|
|
593
|
+
});
|
|
696
594
|
}
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
return
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
class
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
__publicField(this, "icon");
|
|
717
|
-
__publicField(this, "status");
|
|
718
|
-
options = options || {};
|
|
719
|
-
this.id = options.id;
|
|
720
|
-
this.index = options.index;
|
|
721
|
-
this.beforeActive = options.beforeActive;
|
|
722
|
-
this.beforeLeave = options.beforeLeave;
|
|
723
|
-
this.title = options.title;
|
|
724
|
-
this.description = options.description;
|
|
725
|
-
this.icon = options.icon;
|
|
726
|
-
this.status = options.status;
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
const _sfc_main$H = defineComponent({
|
|
730
|
-
name: "FuHorizontalSteps",
|
|
731
|
-
components: {
|
|
732
|
-
FuHorizontalNavigation,
|
|
733
|
-
FuStepsFooter
|
|
734
|
-
},
|
|
735
|
-
emits: ["change"],
|
|
736
|
-
setup(_, { attrs, slots, emit, expose }) {
|
|
737
|
-
var _a2;
|
|
738
|
-
const stepper = ref(new Stepper());
|
|
739
|
-
(_a2 = stepper.value) == null ? void 0 : _a2.activeSet.add(0);
|
|
740
|
-
watch(() => stepper.value.index, (value) => {
|
|
741
|
-
emit("change", stepper.value.steps[value]);
|
|
742
|
-
});
|
|
743
|
-
const heightStyle = computed(() => {
|
|
744
|
-
var _a3;
|
|
745
|
-
return { height: parseInt((_a3 = stepper.value) == null ? void 0 : _a3.height) + "px" || "auto" };
|
|
746
|
-
});
|
|
747
|
-
function active(index) {
|
|
748
|
-
var _a3;
|
|
749
|
-
(_a3 = stepper.value) == null ? void 0 : _a3.active(index);
|
|
750
|
-
}
|
|
751
|
-
function disable(index) {
|
|
752
|
-
var _a3;
|
|
753
|
-
return !((_a3 = stepper.value) == null ? void 0 : _a3.isActive(index));
|
|
754
|
-
}
|
|
755
|
-
function next() {
|
|
756
|
-
stepper.value.next();
|
|
757
|
-
}
|
|
758
|
-
function prev() {
|
|
759
|
-
stepper.value.prev();
|
|
760
|
-
}
|
|
761
|
-
function $func(name2) {
|
|
762
|
-
emit(name2);
|
|
763
|
-
}
|
|
764
|
-
provide("stepper", stepper.value);
|
|
765
|
-
expose({
|
|
766
|
-
next,
|
|
767
|
-
prev,
|
|
768
|
-
active
|
|
769
|
-
});
|
|
770
|
-
return () => {
|
|
771
|
-
var _a3, _b, _c;
|
|
772
|
-
let steps = [];
|
|
773
|
-
if ((_a3 = slots.default) == null ? void 0 : _a3.call(slots)) {
|
|
774
|
-
(_b = slots.default) == null ? void 0 : _b.call(slots).forEach((node, index) => {
|
|
775
|
-
const options = __spreadValues({
|
|
776
|
-
index
|
|
777
|
-
}, node.props);
|
|
778
|
-
const step = new Step(options);
|
|
779
|
-
steps.push(step);
|
|
780
|
-
});
|
|
781
|
-
}
|
|
782
|
-
stepper.value.steps = steps;
|
|
783
|
-
stepper.value = Object.assign(stepper.value, attrs);
|
|
784
|
-
return h("div", {
|
|
785
|
-
class: ["fu-steps", "fu-steps--horizontal"]
|
|
786
|
-
}, [
|
|
787
|
-
h(FuHorizontalNavigation, {
|
|
788
|
-
stepper: stepper.value,
|
|
789
|
-
steps,
|
|
790
|
-
disable,
|
|
791
|
-
onActive: active
|
|
792
|
-
}),
|
|
793
|
-
h("div", { class: "fu-steps__wrapper" }, h("div", { class: "fu-steps__container", style: heightStyle.value }, h(Transition, { name: "carousel", mode: "out-in", tag: "p" }, () => {
|
|
794
|
-
var _a4;
|
|
795
|
-
return (_a4 = slots.default) == null ? void 0 : _a4.call(slots).map((item, index) => {
|
|
796
|
-
item["key"] = index;
|
|
797
|
-
return stepper.value.index === index && item;
|
|
798
|
-
});
|
|
799
|
-
}))),
|
|
800
|
-
h("div", { class: "fu-steps__footer" }, ((_c = slots.footer) == null ? void 0 : _c.call(slots)) || h(FuStepsFooter, { onStepperFn: $func }))
|
|
801
|
-
]);
|
|
802
|
-
};
|
|
595
|
+
onMounted(() => computeDisable());
|
|
596
|
+
onUpdated(() => computeDisable());
|
|
597
|
+
return (_ctx, _cache) => {
|
|
598
|
+
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
599
|
+
return openBlock(), createBlock(_component_el_tooltip, {
|
|
600
|
+
content: unref(text),
|
|
601
|
+
placement: "top",
|
|
602
|
+
disabled: disabled.value
|
|
603
|
+
}, {
|
|
604
|
+
default: withCtx(() => [
|
|
605
|
+
createElementVNode("div", {
|
|
606
|
+
class: "condition-text",
|
|
607
|
+
ref_key: "textRef",
|
|
608
|
+
ref: textRef
|
|
609
|
+
}, toDisplayString(unref(text)), 513)
|
|
610
|
+
]),
|
|
611
|
+
_: 1
|
|
612
|
+
}, 8, ["content", "disabled"]);
|
|
613
|
+
};
|
|
803
614
|
}
|
|
804
615
|
});
|
|
805
|
-
var
|
|
806
|
-
const
|
|
807
|
-
|
|
616
|
+
var FuFilterConditionText = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/FuFilterConditionText.vue"]]);
|
|
617
|
+
const _hoisted_1$o = { class: "fu-filter-conditions" };
|
|
618
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
619
|
+
__name: "FuFilterConditions",
|
|
808
620
|
props: {
|
|
809
|
-
|
|
810
|
-
steps: Array,
|
|
811
|
-
disable: Function
|
|
621
|
+
conditions: Array
|
|
812
622
|
},
|
|
813
|
-
emits: ["
|
|
623
|
+
emits: ["change"],
|
|
814
624
|
setup(__props, { emit }) {
|
|
815
625
|
const props = __props;
|
|
816
|
-
|
|
817
|
-
return props.stepper.index;
|
|
818
|
-
});
|
|
819
|
-
const heightStyle = computed(() => {
|
|
626
|
+
function remove(index) {
|
|
820
627
|
var _a2;
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
};
|
|
824
|
-
});
|
|
825
|
-
function click(index) {
|
|
826
|
-
!props.disable(index) && emit("active", index);
|
|
628
|
+
(_a2 = props.conditions) == null ? void 0 : _a2.splice(index, 1);
|
|
629
|
+
emit("change", props.conditions);
|
|
827
630
|
}
|
|
828
631
|
return (_ctx, _cache) => {
|
|
829
|
-
const
|
|
830
|
-
const
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
key: 0,
|
|
845
|
-
class: "fu-steps__container",
|
|
846
|
-
style: normalizeStyle(unref(heightStyle))
|
|
847
|
-
}, [
|
|
848
|
-
renderSlot(_ctx.$slots, "default", { step })
|
|
849
|
-
], 4)) : createCommentVNode("v-if", true)
|
|
850
|
-
]),
|
|
851
|
-
_: 2
|
|
852
|
-
}, 1024)
|
|
632
|
+
const _component_CloseBold = resolveComponent("CloseBold");
|
|
633
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
634
|
+
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
635
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.conditions, (condition, index) => {
|
|
636
|
+
return openBlock(), createElementBlock("div", {
|
|
637
|
+
class: "fu-filter-conditions__item",
|
|
638
|
+
key: index
|
|
639
|
+
}, [
|
|
640
|
+
createVNode(FuFilterConditionText, { condition }, null, 8, ["condition"]),
|
|
641
|
+
createVNode(_component_el_icon, {
|
|
642
|
+
class: "fu-scale-click",
|
|
643
|
+
onClick: ($event) => remove(index)
|
|
644
|
+
}, {
|
|
645
|
+
default: withCtx(() => [
|
|
646
|
+
createVNode(_component_CloseBold)
|
|
853
647
|
]),
|
|
854
648
|
_: 2
|
|
855
|
-
},
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
}, 16, ["active"]);
|
|
649
|
+
}, 1032, ["onClick"])
|
|
650
|
+
]);
|
|
651
|
+
}), 128))
|
|
652
|
+
]);
|
|
860
653
|
};
|
|
861
654
|
}
|
|
862
655
|
});
|
|
863
|
-
var
|
|
864
|
-
const
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
656
|
+
var FuFilterConditions = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/FuFilterConditions.vue"]]);
|
|
657
|
+
const selectKey = Symbol("SelectKey");
|
|
658
|
+
const referenceKey$1 = Symbol("ReferenceKey");
|
|
659
|
+
const _hoisted_1$n = { class: "fu-filter__result" };
|
|
660
|
+
const _hoisted_2$f = { style: { "opacity": "0.6" } };
|
|
661
|
+
const _hoisted_3$d = /* @__PURE__ */ createElementVNode("div", { class: "fu-filter__split" }, null, -1);
|
|
662
|
+
const _hoisted_4$2 = { class: "drawer-body" };
|
|
663
|
+
const _hoisted_5$1 = { class: "drawer-footer" };
|
|
664
|
+
const __default__$t = { name: "FuFilter" };
|
|
665
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$t), {
|
|
666
|
+
props: {
|
|
667
|
+
size: {
|
|
668
|
+
type: String,
|
|
669
|
+
validator: validateSize,
|
|
670
|
+
required: true
|
|
671
|
+
},
|
|
672
|
+
count: {
|
|
673
|
+
type: Number,
|
|
674
|
+
default: 0
|
|
675
|
+
},
|
|
676
|
+
components: Array,
|
|
677
|
+
drawerWidth: {
|
|
678
|
+
type: [Number, String],
|
|
679
|
+
default: "680px"
|
|
680
|
+
},
|
|
681
|
+
showEmpty: Boolean
|
|
682
|
+
},
|
|
683
|
+
emits: ["filter"],
|
|
684
|
+
setup(__props, { expose, emit }) {
|
|
685
|
+
const props = __props;
|
|
686
|
+
const { t: t2 } = useLocale();
|
|
687
|
+
const filterRef = ref(null);
|
|
688
|
+
const conditionsRef = ref(null);
|
|
689
|
+
const configSize = useSize();
|
|
690
|
+
const drawer = ref(true);
|
|
691
|
+
const scroll = ref(false);
|
|
692
|
+
const conditions = ref([]);
|
|
693
|
+
const references = ref([]);
|
|
694
|
+
let leftTimer, rightTimer;
|
|
695
|
+
function mouseup() {
|
|
696
|
+
clearInterval(leftTimer);
|
|
697
|
+
clearInterval(rightTimer);
|
|
879
698
|
}
|
|
880
|
-
function
|
|
881
|
-
|
|
699
|
+
function left() {
|
|
700
|
+
var _a2;
|
|
701
|
+
let el = (_a2 = conditionsRef.value) == null ? void 0 : _a2.$el;
|
|
702
|
+
leftTimer = setInterval(() => {
|
|
703
|
+
if (el)
|
|
704
|
+
el.scrollLeft -= 15;
|
|
705
|
+
}, 50);
|
|
882
706
|
}
|
|
883
|
-
function
|
|
884
|
-
|
|
707
|
+
function right() {
|
|
708
|
+
var _a2;
|
|
709
|
+
let el = (_a2 = conditionsRef.value) == null ? void 0 : _a2.$el;
|
|
710
|
+
rightTimer = setInterval(() => {
|
|
711
|
+
if (el)
|
|
712
|
+
el.scrollLeft += 15;
|
|
713
|
+
}, 50);
|
|
885
714
|
}
|
|
886
|
-
function
|
|
887
|
-
|
|
715
|
+
function change() {
|
|
716
|
+
nextTick(() => {
|
|
717
|
+
var _a2;
|
|
718
|
+
let el = (_a2 = conditionsRef.value) == null ? void 0 : _a2.$el;
|
|
719
|
+
scroll.value = el != null && (el == null ? void 0 : el.getBoundingClientRect().width) >= scrollWidth.value;
|
|
720
|
+
});
|
|
721
|
+
emit("filter", conditions.value);
|
|
888
722
|
}
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
}, node.props);
|
|
904
|
-
const step = new Step(options);
|
|
905
|
-
steps.push(step);
|
|
906
|
-
if (stepper.value.isCurrent(index)) {
|
|
907
|
-
currentNode = node;
|
|
908
|
-
}
|
|
723
|
+
function setConditions(conditionObj) {
|
|
724
|
+
conditions.value = [];
|
|
725
|
+
if (conditionObj) {
|
|
726
|
+
Object.keys(conditionObj).forEach((key) => {
|
|
727
|
+
let value = conditionObj[key].value;
|
|
728
|
+
references.value.forEach((r) => {
|
|
729
|
+
if (r.field === key) {
|
|
730
|
+
r.init(value);
|
|
731
|
+
const condition = r.getCondition();
|
|
732
|
+
if (condition) {
|
|
733
|
+
conditions.value.push(condition);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
});
|
|
909
737
|
});
|
|
738
|
+
change();
|
|
910
739
|
}
|
|
911
|
-
stepper.value.steps = steps;
|
|
912
|
-
stepper.value = Object.assign(stepper.value, attrs);
|
|
913
|
-
return h("div", {
|
|
914
|
-
class: ["fu-steps", "fu-steps--vertical"]
|
|
915
|
-
}, [
|
|
916
|
-
h(FuVerticalNavigation, {
|
|
917
|
-
stepper: stepper.value,
|
|
918
|
-
steps,
|
|
919
|
-
disable,
|
|
920
|
-
onActive: active
|
|
921
|
-
}, () => currentNode),
|
|
922
|
-
h("div", { class: "fu-steps__footer" }, h(FuStepsFooter, { onStepperFn: $func }))
|
|
923
|
-
]);
|
|
924
|
-
};
|
|
925
|
-
}
|
|
926
|
-
});
|
|
927
|
-
var FuVerticalSteps = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/ steps/FuVerticalSteps.vue"]]);
|
|
928
|
-
const _sfc_main$E = defineComponent({
|
|
929
|
-
name: "FuSteps",
|
|
930
|
-
components: {
|
|
931
|
-
FuHorizontalSteps,
|
|
932
|
-
FuVerticalSteps
|
|
933
|
-
},
|
|
934
|
-
emits: ["change"],
|
|
935
|
-
props: ["direction"],
|
|
936
|
-
setup(props, { attrs, slots, emit, expose }) {
|
|
937
|
-
const { direction } = props;
|
|
938
|
-
const FuSteps2 = ref();
|
|
939
|
-
function next() {
|
|
940
|
-
var _a2;
|
|
941
|
-
(_a2 = FuSteps2.value) == null ? void 0 : _a2.next();
|
|
942
740
|
}
|
|
943
|
-
function
|
|
944
|
-
|
|
945
|
-
|
|
741
|
+
function filter() {
|
|
742
|
+
conditions.value = [];
|
|
743
|
+
references.value.forEach((r) => {
|
|
744
|
+
let condition;
|
|
745
|
+
condition = r.getCondition();
|
|
746
|
+
if (condition) {
|
|
747
|
+
conditions.value.push(condition);
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
drawer.value = false;
|
|
751
|
+
change();
|
|
946
752
|
}
|
|
947
|
-
function
|
|
948
|
-
|
|
949
|
-
(_a2 = FuSteps2.value) == null ? void 0 : _a2.active(index);
|
|
753
|
+
function open() {
|
|
754
|
+
drawer.value = true;
|
|
950
755
|
}
|
|
951
|
-
function
|
|
952
|
-
|
|
756
|
+
function initComponents() {
|
|
757
|
+
references.value.forEach((r) => {
|
|
758
|
+
let condition = conditions.value.find((c) => c.field === r.field);
|
|
759
|
+
r.init(condition == null ? void 0 : condition.value);
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
function clear() {
|
|
763
|
+
conditions.value = [];
|
|
764
|
+
initComponents();
|
|
765
|
+
change();
|
|
953
766
|
}
|
|
767
|
+
const scrollWidth = computed(() => {
|
|
768
|
+
const el = filterRef.value;
|
|
769
|
+
return el === null ? 0 : el.getBoundingClientRect().width - 210;
|
|
770
|
+
});
|
|
771
|
+
const show = computed(() => {
|
|
772
|
+
return conditions.value.length > 0 && props.showEmpty === false || props.showEmpty;
|
|
773
|
+
});
|
|
774
|
+
provide(referenceKey$1, references);
|
|
775
|
+
onMounted(() => {
|
|
776
|
+
drawer.value = false;
|
|
777
|
+
});
|
|
954
778
|
expose({
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
active
|
|
779
|
+
open,
|
|
780
|
+
setConditions
|
|
958
781
|
});
|
|
959
|
-
if (direction === "vertical") {
|
|
960
|
-
return () => h(FuVerticalSteps, __spreadValues({ ref: FuSteps2, onChange: handleChange }, attrs), slots);
|
|
961
|
-
} else {
|
|
962
|
-
return () => h(FuHorizontalSteps, __spreadValues({ ref: FuSteps2, onChange: handleChange }, attrs), slots);
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
});
|
|
966
|
-
var FuSteps = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/ steps/FuSteps.vue"]]);
|
|
967
|
-
const _hoisted_1$o = { class: "fu-step" };
|
|
968
|
-
const __default__$u = { name: "FuStep" };
|
|
969
|
-
const _sfc_main$D = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$u), {
|
|
970
|
-
setup(__props) {
|
|
971
|
-
const stepper = inject("stepper");
|
|
972
|
-
const loading = computed(() => stepper.isLoading || false);
|
|
973
782
|
return (_ctx, _cache) => {
|
|
974
|
-
const
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
783
|
+
const _component_ArrowLeftBold = resolveComponent("ArrowLeftBold");
|
|
784
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
785
|
+
const _component_ArrowRightBold = resolveComponent("ArrowRightBold");
|
|
786
|
+
const _component_Delete = resolveComponent("Delete");
|
|
787
|
+
const _component_el_button = resolveComponent("el-button");
|
|
788
|
+
const _component_el_drawer = resolveComponent("el-drawer");
|
|
789
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
790
|
+
withDirectives(createElementVNode("div", {
|
|
791
|
+
class: "fu-filter",
|
|
792
|
+
ref_key: "filterRef",
|
|
793
|
+
ref: filterRef
|
|
794
|
+
}, [
|
|
795
|
+
createElementVNode("div", _hoisted_1$n, [
|
|
796
|
+
createTextVNode(toDisplayString(__props.count) + " ", 1),
|
|
797
|
+
createElementVNode("span", _hoisted_2$f, toDisplayString(unref(t2)("fu.filter_bar.results")), 1)
|
|
798
|
+
]),
|
|
799
|
+
_hoisted_3$d,
|
|
800
|
+
scroll.value ? (openBlock(), createElementBlock("div", {
|
|
801
|
+
key: 0,
|
|
802
|
+
class: "fu-filter__scroll",
|
|
803
|
+
onMousedown: left,
|
|
804
|
+
onMouseup: mouseup
|
|
805
|
+
}, [
|
|
806
|
+
createVNode(_component_el_icon, null, {
|
|
807
|
+
default: withCtx(() => [
|
|
808
|
+
createVNode(_component_ArrowLeftBold)
|
|
809
|
+
]),
|
|
810
|
+
_: 1
|
|
811
|
+
})
|
|
812
|
+
], 32)) : createCommentVNode("v-if", true),
|
|
813
|
+
createVNode(FuFilterConditions, {
|
|
814
|
+
conditions: conditions.value,
|
|
815
|
+
onChange: change,
|
|
816
|
+
ref_key: "conditionsRef",
|
|
817
|
+
ref: conditionsRef
|
|
818
|
+
}, null, 8, ["conditions"]),
|
|
819
|
+
scroll.value ? (openBlock(), createElementBlock("div", {
|
|
820
|
+
key: 1,
|
|
821
|
+
class: "fu-filter__scroll",
|
|
822
|
+
onMousedown: right,
|
|
823
|
+
onMouseup: mouseup
|
|
824
|
+
}, [
|
|
825
|
+
createVNode(_component_el_icon, null, {
|
|
826
|
+
default: withCtx(() => [
|
|
827
|
+
createVNode(_component_ArrowRightBold)
|
|
828
|
+
]),
|
|
829
|
+
_: 1
|
|
830
|
+
})
|
|
831
|
+
], 32)) : createCommentVNode("v-if", true),
|
|
832
|
+
conditions.value.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
833
|
+
key: 2,
|
|
834
|
+
class: "fu-filter__clear fu-scale-click",
|
|
835
|
+
onClick: clear
|
|
836
|
+
}, [
|
|
837
|
+
createVNode(_component_el_icon, null, {
|
|
838
|
+
default: withCtx(() => [
|
|
839
|
+
createVNode(_component_Delete)
|
|
840
|
+
]),
|
|
841
|
+
_: 1
|
|
842
|
+
}),
|
|
843
|
+
createTextVNode(" " + toDisplayString(unref(t2)("fu.filter_bar.clear")), 1)
|
|
844
|
+
])) : createCommentVNode("v-if", true)
|
|
845
|
+
], 512), [
|
|
846
|
+
[vShow, unref(show)]
|
|
847
|
+
]),
|
|
848
|
+
createVNode(_component_el_drawer, {
|
|
849
|
+
size: __props.drawerWidth,
|
|
850
|
+
class: "fu-filter__drawer",
|
|
851
|
+
title: unref(t2)("fu.filter_bar.drawer_title"),
|
|
852
|
+
modelValue: drawer.value,
|
|
853
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => drawer.value = $event),
|
|
854
|
+
onOpen: initComponents
|
|
855
|
+
}, {
|
|
856
|
+
default: withCtx(() => [
|
|
857
|
+
createElementVNode("div", _hoisted_4$2, [
|
|
858
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
859
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.components, (c, i) => {
|
|
860
|
+
return openBlock(), createBlock(resolveDynamicComponent(c.component), mergeProps({ key: i }, c, { size: unref(configSize) }), null, 16, ["size"]);
|
|
861
|
+
}), 128))
|
|
862
|
+
])
|
|
863
|
+
]),
|
|
864
|
+
createElementVNode("div", _hoisted_5$1, [
|
|
865
|
+
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
866
|
+
createVNode(_component_el_button, {
|
|
867
|
+
size: __props.size,
|
|
868
|
+
onClick: _cache[0] || (_cache[0] = ($event) => drawer.value = false)
|
|
869
|
+
}, {
|
|
870
|
+
default: withCtx(() => [
|
|
871
|
+
createTextVNode(toDisplayString(unref(t2)("fu.filter_bar.cancel")), 1)
|
|
872
|
+
]),
|
|
873
|
+
_: 1
|
|
874
|
+
}, 8, ["size"]),
|
|
875
|
+
createVNode(_component_el_button, {
|
|
876
|
+
size: __props.size,
|
|
877
|
+
type: "primary",
|
|
878
|
+
onClick: filter
|
|
879
|
+
}, {
|
|
880
|
+
default: withCtx(() => [
|
|
881
|
+
createTextVNode(toDisplayString(unref(t2)("fu.filter_bar.search")), 1)
|
|
882
|
+
]),
|
|
883
|
+
_: 1
|
|
884
|
+
}, 8, ["size"])
|
|
885
|
+
])
|
|
886
|
+
])
|
|
887
|
+
]),
|
|
888
|
+
_: 3
|
|
889
|
+
}, 8, ["size", "title", "modelValue"])
|
|
890
|
+
], 64);
|
|
980
891
|
};
|
|
981
892
|
}
|
|
982
893
|
}));
|
|
983
|
-
var
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
};
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
const __default__$t = { name: "FuFilterInput" };
|
|
993
|
-
const _sfc_main$C = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$t), {
|
|
894
|
+
var FuFilter = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/FuFilter.vue"]]);
|
|
895
|
+
const _hoisted_1$m = { class: "fu-filter-bar" };
|
|
896
|
+
const _hoisted_2$e = { class: "fu-filter-bar__top" };
|
|
897
|
+
const _hoisted_3$c = { class: "top_left" };
|
|
898
|
+
const _hoisted_4$1 = { class: "top_right" };
|
|
899
|
+
const _hoisted_5 = { key: 0 };
|
|
900
|
+
const _hoisted_6 = { class: "fu-filter-bar__bottom" };
|
|
901
|
+
const __default__$s = { name: "FuFilterBar" };
|
|
902
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$s), {
|
|
994
903
|
props: {
|
|
995
904
|
size: {
|
|
996
905
|
type: String,
|
|
997
906
|
validator: validateSize
|
|
998
907
|
},
|
|
999
|
-
|
|
908
|
+
resultCount: Number,
|
|
909
|
+
quickPlaceholder: String,
|
|
910
|
+
components: Array,
|
|
911
|
+
showEmpty: {
|
|
912
|
+
type: Boolean,
|
|
913
|
+
default: false
|
|
914
|
+
}
|
|
1000
915
|
},
|
|
1001
|
-
emits: ["
|
|
1002
|
-
setup(__props, { emit }) {
|
|
1003
|
-
const
|
|
1004
|
-
const quick = ref("");
|
|
916
|
+
emits: ["exec"],
|
|
917
|
+
setup(__props, { expose, emit }) {
|
|
918
|
+
const { t: t2 } = useLocale();
|
|
1005
919
|
const configSize = useSize();
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
function
|
|
1010
|
-
|
|
920
|
+
const quick = ref("");
|
|
921
|
+
const conditions = ref([]);
|
|
922
|
+
const filterRef = ref();
|
|
923
|
+
function open() {
|
|
924
|
+
var _a2;
|
|
925
|
+
(_a2 = filterRef.value) == null ? void 0 : _a2.open();
|
|
1011
926
|
}
|
|
1012
|
-
function
|
|
1013
|
-
emit("
|
|
927
|
+
function change() {
|
|
928
|
+
emit("exec", conditionObj.value);
|
|
1014
929
|
}
|
|
1015
|
-
function
|
|
1016
|
-
|
|
1017
|
-
emit("
|
|
930
|
+
function filter(c) {
|
|
931
|
+
conditions.value = c;
|
|
932
|
+
emit("exec", conditionObj.value);
|
|
1018
933
|
}
|
|
1019
|
-
function
|
|
1020
|
-
|
|
1021
|
-
if (
|
|
1022
|
-
|
|
934
|
+
function setConditions(conditionObj2) {
|
|
935
|
+
var _a2;
|
|
936
|
+
if (conditionObj2.quick) {
|
|
937
|
+
quick.value = conditionObj2.quick;
|
|
1023
938
|
}
|
|
939
|
+
(_a2 = filterRef.value) == null ? void 0 : _a2.setConditions(conditionObj2);
|
|
1024
940
|
}
|
|
941
|
+
const conditionObj = computed(() => {
|
|
942
|
+
let obj = {};
|
|
943
|
+
if (quick.value) {
|
|
944
|
+
obj.quick = quick.value;
|
|
945
|
+
}
|
|
946
|
+
conditions.value.forEach((c) => {
|
|
947
|
+
obj[c.field] = c;
|
|
948
|
+
});
|
|
949
|
+
return obj;
|
|
950
|
+
});
|
|
951
|
+
expose({
|
|
952
|
+
setConditions,
|
|
953
|
+
open
|
|
954
|
+
});
|
|
1025
955
|
return (_ctx, _cache) => {
|
|
1026
|
-
const
|
|
1027
|
-
return openBlock(),
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
956
|
+
const _component_el_button = resolveComponent("el-button");
|
|
957
|
+
return openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
958
|
+
createElementVNode("div", _hoisted_2$e, [
|
|
959
|
+
createElementVNode("div", _hoisted_3$c, [
|
|
960
|
+
renderSlot(_ctx.$slots, "tl")
|
|
961
|
+
]),
|
|
962
|
+
createElementVNode("div", _hoisted_4$1, [
|
|
963
|
+
renderSlot(_ctx.$slots, "tr", { condition: unref(conditionObj) }, () => [
|
|
964
|
+
createVNode(FuFilterInput, {
|
|
965
|
+
size: unref(configSize),
|
|
966
|
+
modelValue: quick.value,
|
|
967
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => quick.value = $event),
|
|
968
|
+
placeholder: __props.quickPlaceholder,
|
|
969
|
+
onChange: change
|
|
970
|
+
}, null, 8, ["size", "modelValue", "placeholder"])
|
|
971
|
+
]),
|
|
972
|
+
createVNode(_component_el_button, {
|
|
973
|
+
class: "fu-filter-button",
|
|
974
|
+
onClick: open,
|
|
975
|
+
icon: "Filter",
|
|
976
|
+
size: unref(configSize)
|
|
977
|
+
}, {
|
|
978
|
+
default: withCtx(() => [
|
|
979
|
+
createTextVNode(toDisplayString(unref(t2)("fu.filter_bar.filter")) + " ", 1),
|
|
980
|
+
conditions.value.length > 0 ? (openBlock(), createElementBlock("span", _hoisted_5, "(" + toDisplayString(conditions.value.length) + ")", 1)) : createCommentVNode("v-if", true)
|
|
981
|
+
]),
|
|
982
|
+
_: 1
|
|
983
|
+
}, 8, ["size"]),
|
|
984
|
+
renderSlot(_ctx.$slots, "buttons")
|
|
985
|
+
])
|
|
986
|
+
]),
|
|
987
|
+
createElementVNode("div", _hoisted_6, [
|
|
988
|
+
createVNode(FuFilter, {
|
|
989
|
+
ref_key: "filterRef",
|
|
990
|
+
ref: filterRef,
|
|
991
|
+
onFilter: filter,
|
|
992
|
+
count: __props.resultCount,
|
|
993
|
+
components: __props.components,
|
|
994
|
+
size: unref(configSize),
|
|
995
|
+
"show-empty": __props.showEmpty
|
|
996
|
+
}, {
|
|
997
|
+
default: withCtx(() => [
|
|
998
|
+
renderSlot(_ctx.$slots, "default")
|
|
999
|
+
]),
|
|
1000
|
+
_: 3
|
|
1001
|
+
}, 8, ["count", "components", "size", "show-empty"])
|
|
1002
|
+
])
|
|
1003
|
+
]);
|
|
1040
1004
|
};
|
|
1041
1005
|
}
|
|
1042
1006
|
}));
|
|
1043
|
-
var
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1007
|
+
var FuFilterBar = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/FuFilterBar.vue"]]);
|
|
1008
|
+
const _hoisted_1$l = ["onClick"];
|
|
1009
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
1010
|
+
__name: "FuFilterOption",
|
|
1046
1011
|
props: {
|
|
1047
|
-
|
|
1048
|
-
type: Object,
|
|
1012
|
+
value: {
|
|
1013
|
+
type: [String, Number, Boolean, Object],
|
|
1049
1014
|
required: true
|
|
1015
|
+
},
|
|
1016
|
+
label: [String, Number],
|
|
1017
|
+
disabled: {
|
|
1018
|
+
type: Boolean,
|
|
1019
|
+
default: false
|
|
1050
1020
|
}
|
|
1051
1021
|
},
|
|
1052
1022
|
setup(__props) {
|
|
1053
1023
|
const props = __props;
|
|
1054
|
-
const
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1024
|
+
const select = inject(selectKey);
|
|
1025
|
+
const selected = computed(() => {
|
|
1026
|
+
if (!select)
|
|
1027
|
+
return false;
|
|
1028
|
+
if (Array.isArray(select.selection.value)) {
|
|
1029
|
+
return select.selection.value.includes(props.value);
|
|
1030
|
+
} else {
|
|
1031
|
+
return select.selection.value === props.value;
|
|
1032
|
+
}
|
|
1059
1033
|
});
|
|
1060
|
-
function
|
|
1061
|
-
|
|
1062
|
-
const el = textRef.value;
|
|
1063
|
-
disabled.value = el === null || el.getBoundingClientRect().width < 320;
|
|
1064
|
-
});
|
|
1065
|
-
}
|
|
1066
|
-
onMounted(() => computeDisable());
|
|
1067
|
-
onUpdated(() => computeDisable());
|
|
1068
|
-
return (_ctx, _cache) => {
|
|
1069
|
-
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
1070
|
-
return openBlock(), createBlock(_component_el_tooltip, {
|
|
1071
|
-
content: unref(text),
|
|
1072
|
-
placement: "top",
|
|
1073
|
-
disabled: disabled.value
|
|
1074
|
-
}, {
|
|
1075
|
-
default: withCtx(() => [
|
|
1076
|
-
createElementVNode("div", {
|
|
1077
|
-
class: "condition-text",
|
|
1078
|
-
ref_key: "textRef",
|
|
1079
|
-
ref: textRef
|
|
1080
|
-
}, toDisplayString(unref(text)), 513)
|
|
1081
|
-
]),
|
|
1082
|
-
_: 1
|
|
1083
|
-
}, 8, ["content", "disabled"]);
|
|
1084
|
-
};
|
|
1085
|
-
}
|
|
1086
|
-
});
|
|
1087
|
-
var FuFilterConditionText = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/FuFilterConditionText.vue"]]);
|
|
1088
|
-
const _hoisted_1$n = { class: "fu-filter-conditions" };
|
|
1089
|
-
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
1090
|
-
__name: "FuFilterConditions",
|
|
1091
|
-
props: {
|
|
1092
|
-
conditions: Array
|
|
1093
|
-
},
|
|
1094
|
-
emits: ["change"],
|
|
1095
|
-
setup(__props, { emit }) {
|
|
1096
|
-
const props = __props;
|
|
1097
|
-
function remove(index) {
|
|
1098
|
-
var _a2;
|
|
1099
|
-
(_a2 = props.conditions) == null ? void 0 : _a2.splice(index, 1);
|
|
1100
|
-
emit("change", props.conditions);
|
|
1034
|
+
function click() {
|
|
1035
|
+
select == null ? void 0 : select.setSelected(props.value, selected.value);
|
|
1101
1036
|
}
|
|
1102
1037
|
return (_ctx, _cache) => {
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
return openBlock(), createElementBlock("div", {
|
|
1108
|
-
class: "fu-filter-conditions__item",
|
|
1109
|
-
key: index
|
|
1110
|
-
}, [
|
|
1111
|
-
createVNode(FuFilterConditionText, { condition }, null, 8, ["condition"]),
|
|
1112
|
-
createVNode(_component_el_icon, {
|
|
1113
|
-
class: "fu-scale-click",
|
|
1114
|
-
onClick: ($event) => remove(index)
|
|
1115
|
-
}, {
|
|
1116
|
-
default: withCtx(() => [
|
|
1117
|
-
createVNode(_component_CloseBold)
|
|
1118
|
-
]),
|
|
1119
|
-
_: 2
|
|
1120
|
-
}, 1032, ["onClick"])
|
|
1121
|
-
]);
|
|
1122
|
-
}), 128))
|
|
1123
|
-
]);
|
|
1038
|
+
return openBlock(), createElementBlock("div", {
|
|
1039
|
+
class: normalizeClass(["fu-filter-option", { "is-selected": unref(selected), "is-disabled": __props.disabled }]),
|
|
1040
|
+
onClick: withModifiers(click, ["stop"])
|
|
1041
|
+
}, toDisplayString(__props.label || __props.value), 11, _hoisted_1$l);
|
|
1124
1042
|
};
|
|
1125
1043
|
}
|
|
1126
1044
|
});
|
|
1127
|
-
var
|
|
1128
|
-
const
|
|
1129
|
-
const
|
|
1130
|
-
const
|
|
1131
|
-
const
|
|
1132
|
-
const
|
|
1133
|
-
const
|
|
1134
|
-
const _hoisted_5$1 = { class: "drawer-footer" };
|
|
1135
|
-
const __default__$s = { name: "FuFilter" };
|
|
1136
|
-
const _sfc_main$z = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$s), {
|
|
1045
|
+
var FuFilterOption = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterOption.vue"]]);
|
|
1046
|
+
const _hoisted_1$k = { class: "fu-filter-component" };
|
|
1047
|
+
const _hoisted_2$d = { class: "fu-filter-component__label" };
|
|
1048
|
+
const _hoisted_3$b = { class: "fu-filter-component__content" };
|
|
1049
|
+
const _hoisted_4 = { class: "fu-filter-option" };
|
|
1050
|
+
const __default__$r = { name: "FuFilterSelect" };
|
|
1051
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$r), {
|
|
1137
1052
|
props: {
|
|
1138
1053
|
size: {
|
|
1139
1054
|
type: String,
|
|
1140
|
-
validator: validateSize
|
|
1141
|
-
required: true
|
|
1055
|
+
validator: validateSize
|
|
1142
1056
|
},
|
|
1143
|
-
|
|
1057
|
+
multiple: {
|
|
1058
|
+
type: Boolean,
|
|
1059
|
+
default: false
|
|
1060
|
+
},
|
|
1061
|
+
showLimit: {
|
|
1144
1062
|
type: Number,
|
|
1145
|
-
default:
|
|
1063
|
+
default: 3
|
|
1146
1064
|
},
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
default: "680px"
|
|
1065
|
+
useSelectAll: {
|
|
1066
|
+
type: Boolean,
|
|
1067
|
+
default: false
|
|
1151
1068
|
},
|
|
1152
|
-
|
|
1069
|
+
label: String,
|
|
1070
|
+
field: {
|
|
1071
|
+
type: String,
|
|
1072
|
+
required: true
|
|
1073
|
+
},
|
|
1074
|
+
options: {
|
|
1075
|
+
type: Array,
|
|
1076
|
+
default: []
|
|
1077
|
+
}
|
|
1153
1078
|
},
|
|
1154
|
-
emits: ["
|
|
1079
|
+
emits: ["change"],
|
|
1155
1080
|
setup(__props, { expose, emit }) {
|
|
1156
1081
|
const props = __props;
|
|
1157
|
-
const
|
|
1158
|
-
const filterRef = ref(null);
|
|
1159
|
-
const conditionsRef = ref(null);
|
|
1082
|
+
const selection = ref(props.multiple ? [] : "");
|
|
1160
1083
|
const configSize = useSize();
|
|
1161
|
-
const
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1084
|
+
const showOptions = computed(() => {
|
|
1085
|
+
return props.options.filter((o, i) => {
|
|
1086
|
+
let show = props.showLimit < 0 ? true : i < props.showLimit;
|
|
1087
|
+
if (Array.isArray(selection.value)) {
|
|
1088
|
+
return show || selection.value.includes(o.value);
|
|
1089
|
+
} else {
|
|
1090
|
+
return show || selection.value === o.value;
|
|
1091
|
+
}
|
|
1092
|
+
});
|
|
1093
|
+
});
|
|
1094
|
+
const showMore = computed(() => {
|
|
1171
1095
|
var _a2;
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
var _a2;
|
|
1180
|
-
let el = (_a2 = conditionsRef.value) == null ? void 0 : _a2.$el;
|
|
1181
|
-
rightTimer = setInterval(() => {
|
|
1182
|
-
if (el)
|
|
1183
|
-
el.scrollLeft += 15;
|
|
1184
|
-
}, 50);
|
|
1185
|
-
}
|
|
1186
|
-
function change() {
|
|
1187
|
-
nextTick(() => {
|
|
1188
|
-
var _a2;
|
|
1189
|
-
let el = (_a2 = conditionsRef.value) == null ? void 0 : _a2.$el;
|
|
1190
|
-
scroll.value = el != null && (el == null ? void 0 : el.getBoundingClientRect().width) >= scrollWidth.value;
|
|
1191
|
-
});
|
|
1192
|
-
emit("filter", conditions.value);
|
|
1193
|
-
}
|
|
1194
|
-
function setConditions(conditionObj) {
|
|
1195
|
-
conditions.value = [];
|
|
1196
|
-
if (conditionObj) {
|
|
1197
|
-
Object.keys(conditionObj).forEach((key) => {
|
|
1198
|
-
let value = conditionObj[key].value;
|
|
1199
|
-
references.value.forEach((r) => {
|
|
1200
|
-
if (r.field === key) {
|
|
1201
|
-
r.init(value);
|
|
1202
|
-
const condition = r.getCondition();
|
|
1203
|
-
if (condition) {
|
|
1204
|
-
conditions.value.push(condition);
|
|
1205
|
-
}
|
|
1206
|
-
}
|
|
1207
|
-
});
|
|
1096
|
+
return ((_a2 = props.options) == null ? void 0 : _a2.length) > props.showLimit && props.showLimit > 0;
|
|
1097
|
+
});
|
|
1098
|
+
const valueLabel = computed(() => {
|
|
1099
|
+
if (Array.isArray(selection.value)) {
|
|
1100
|
+
let values = [];
|
|
1101
|
+
selection.value.forEach((v) => {
|
|
1102
|
+
values.push(getValueLabel(v));
|
|
1208
1103
|
});
|
|
1209
|
-
|
|
1104
|
+
return values.join(", ");
|
|
1105
|
+
}
|
|
1106
|
+
return getValueLabel(selection.value);
|
|
1107
|
+
});
|
|
1108
|
+
const showSelectAll = computed(() => {
|
|
1109
|
+
return props.useSelectAll && props.multiple;
|
|
1110
|
+
});
|
|
1111
|
+
const { t: t2 } = useLocale();
|
|
1112
|
+
function change(v) {
|
|
1113
|
+
if (showSelectAll.value && (v == null ? void 0 : v.includes("-$SELECT-ALL$-"))) {
|
|
1114
|
+
selection.value = props.options.map((o) => o.value);
|
|
1210
1115
|
}
|
|
1116
|
+
emit("change", selection.value);
|
|
1211
1117
|
}
|
|
1212
|
-
function
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
|
|
1118
|
+
function setSelected(value, selected) {
|
|
1119
|
+
if (!Array.isArray(selection.value)) {
|
|
1120
|
+
selection.value = selected ? "" : value;
|
|
1121
|
+
return;
|
|
1122
|
+
}
|
|
1123
|
+
if (selected) {
|
|
1124
|
+
let index = selection.value.indexOf(value);
|
|
1125
|
+
selection.value.splice(index, 1);
|
|
1126
|
+
} else {
|
|
1127
|
+
selection.value.push(value);
|
|
1128
|
+
}
|
|
1223
1129
|
}
|
|
1224
|
-
function
|
|
1225
|
-
|
|
1130
|
+
function selectAll() {
|
|
1131
|
+
selection.value = props.options.map((o) => o.value);
|
|
1226
1132
|
}
|
|
1227
|
-
function
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1133
|
+
function getValueLabel(value) {
|
|
1134
|
+
for (let o of props.options) {
|
|
1135
|
+
if (o.value === value) {
|
|
1136
|
+
return o.label;
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
return value;
|
|
1232
1140
|
}
|
|
1233
|
-
function
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1141
|
+
function getCondition() {
|
|
1142
|
+
if (!selection.value || Array.isArray(selection.value) && selection.value.length === 0)
|
|
1143
|
+
return;
|
|
1144
|
+
let { field: field2, label } = props;
|
|
1145
|
+
return { field: field2, label, value: selection.value, valueLabel: valueLabel.value };
|
|
1237
1146
|
}
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
});
|
|
1245
|
-
provide(referenceKey$1, references);
|
|
1246
|
-
onMounted(() => {
|
|
1247
|
-
drawer.value = false;
|
|
1147
|
+
function init(v) {
|
|
1148
|
+
selection.value = v !== void 0 ? v : props.multiple ? [] : "";
|
|
1149
|
+
}
|
|
1150
|
+
provide(selectKey, {
|
|
1151
|
+
setSelected,
|
|
1152
|
+
selection
|
|
1248
1153
|
});
|
|
1154
|
+
const references = inject(referenceKey$1);
|
|
1155
|
+
const field = props.field;
|
|
1156
|
+
const reference = { field, init, getCondition };
|
|
1157
|
+
references == null ? void 0 : references.value.push(reference);
|
|
1249
1158
|
expose({
|
|
1250
|
-
|
|
1251
|
-
|
|
1159
|
+
getCondition,
|
|
1160
|
+
init
|
|
1252
1161
|
});
|
|
1253
1162
|
return (_ctx, _cache) => {
|
|
1254
|
-
const
|
|
1163
|
+
const _component_el_option = resolveComponent("el-option");
|
|
1164
|
+
const _component_el_select = resolveComponent("el-select");
|
|
1165
|
+
const _component_Plus = resolveComponent("Plus");
|
|
1255
1166
|
const _component_el_icon = resolveComponent("el-icon");
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
createElementVNode("span", _hoisted_2$f, toDisplayString(unref(t2)("fu.filter_bar.results")), 1)
|
|
1269
|
-
]),
|
|
1270
|
-
_hoisted_3$d,
|
|
1271
|
-
scroll.value ? (openBlock(), createElementBlock("div", {
|
|
1167
|
+
const _component_el_popover = resolveComponent("el-popover");
|
|
1168
|
+
return openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
1169
|
+
createElementVNode("div", _hoisted_2$d, toDisplayString(__props.label), 1),
|
|
1170
|
+
createElementVNode("div", _hoisted_3$b, [
|
|
1171
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(showOptions), (o) => {
|
|
1172
|
+
return openBlock(), createBlock(FuFilterOption, {
|
|
1173
|
+
label: o.label,
|
|
1174
|
+
value: o.value,
|
|
1175
|
+
key: o.value
|
|
1176
|
+
}, null, 8, ["label", "value"]);
|
|
1177
|
+
}), 128)),
|
|
1178
|
+
unref(showMore) ? (openBlock(), createBlock(_component_el_popover, {
|
|
1272
1179
|
key: 0,
|
|
1273
|
-
class: "fu-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
})
|
|
1283
|
-
], 32)) : createCommentVNode("v-if", true),
|
|
1284
|
-
createVNode(FuFilterConditions, {
|
|
1285
|
-
conditions: conditions.value,
|
|
1286
|
-
onChange: change,
|
|
1287
|
-
ref_key: "conditionsRef",
|
|
1288
|
-
ref: conditionsRef
|
|
1289
|
-
}, null, 8, ["conditions"]),
|
|
1290
|
-
scroll.value ? (openBlock(), createElementBlock("div", {
|
|
1291
|
-
key: 1,
|
|
1292
|
-
class: "fu-filter__scroll",
|
|
1293
|
-
onMousedown: right,
|
|
1294
|
-
onMouseup: mouseup
|
|
1295
|
-
}, [
|
|
1296
|
-
createVNode(_component_el_icon, null, {
|
|
1297
|
-
default: withCtx(() => [
|
|
1298
|
-
createVNode(_component_ArrowRightBold)
|
|
1299
|
-
]),
|
|
1300
|
-
_: 1
|
|
1301
|
-
})
|
|
1302
|
-
], 32)) : createCommentVNode("v-if", true),
|
|
1303
|
-
conditions.value.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
1304
|
-
key: 2,
|
|
1305
|
-
class: "fu-filter__clear fu-scale-click",
|
|
1306
|
-
onClick: clear
|
|
1307
|
-
}, [
|
|
1308
|
-
createVNode(_component_el_icon, null, {
|
|
1309
|
-
default: withCtx(() => [
|
|
1310
|
-
createVNode(_component_Delete)
|
|
1311
|
-
]),
|
|
1312
|
-
_: 1
|
|
1313
|
-
}),
|
|
1314
|
-
createTextVNode(" " + toDisplayString(unref(t2)("fu.filter_bar.clear")), 1)
|
|
1315
|
-
])) : createCommentVNode("v-if", true)
|
|
1316
|
-
], 512), [
|
|
1317
|
-
[vShow, unref(show)]
|
|
1318
|
-
]),
|
|
1319
|
-
createVNode(_component_el_drawer, {
|
|
1320
|
-
size: __props.drawerWidth,
|
|
1321
|
-
class: "fu-filter__drawer",
|
|
1322
|
-
title: unref(t2)("fu.filter_bar.drawer_title"),
|
|
1323
|
-
modelValue: drawer.value,
|
|
1324
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => drawer.value = $event),
|
|
1325
|
-
onOpen: initComponents
|
|
1326
|
-
}, {
|
|
1327
|
-
default: withCtx(() => [
|
|
1328
|
-
createElementVNode("div", _hoisted_4$2, [
|
|
1329
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1330
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.components, (c, i) => {
|
|
1331
|
-
return openBlock(), createBlock(resolveDynamicComponent(c.component), mergeProps({ key: i }, c, { size: unref(configSize) }), null, 16, ["size"]);
|
|
1332
|
-
}), 128))
|
|
1333
|
-
])
|
|
1334
|
-
]),
|
|
1335
|
-
createElementVNode("div", _hoisted_5$1, [
|
|
1336
|
-
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
1337
|
-
createVNode(_component_el_button, {
|
|
1338
|
-
size: __props.size,
|
|
1339
|
-
onClick: _cache[0] || (_cache[0] = ($event) => drawer.value = false)
|
|
1340
|
-
}, {
|
|
1341
|
-
default: withCtx(() => [
|
|
1342
|
-
createTextVNode(toDisplayString(unref(t2)("fu.filter_bar.cancel")), 1)
|
|
1343
|
-
]),
|
|
1344
|
-
_: 1
|
|
1345
|
-
}, 8, ["size"]),
|
|
1346
|
-
createVNode(_component_el_button, {
|
|
1347
|
-
size: __props.size,
|
|
1348
|
-
type: "primary",
|
|
1349
|
-
onClick: filter
|
|
1350
|
-
}, {
|
|
1180
|
+
"popper-class": "fu-filter-component-popover",
|
|
1181
|
+
"show-arrow": false,
|
|
1182
|
+
placement: "bottom-start",
|
|
1183
|
+
trigger: "click",
|
|
1184
|
+
width: "240"
|
|
1185
|
+
}, {
|
|
1186
|
+
reference: withCtx(() => [
|
|
1187
|
+
createElementVNode("div", _hoisted_4, [
|
|
1188
|
+
createVNode(_component_el_icon, null, {
|
|
1351
1189
|
default: withCtx(() => [
|
|
1352
|
-
|
|
1190
|
+
createVNode(_component_Plus)
|
|
1353
1191
|
]),
|
|
1354
1192
|
_: 1
|
|
1355
|
-
},
|
|
1193
|
+
}),
|
|
1194
|
+
createTextVNode(" " + toDisplayString(unref(t2)("fu.filter_bar.more")), 1)
|
|
1356
1195
|
])
|
|
1357
|
-
])
|
|
1358
|
-
]),
|
|
1359
|
-
_: 3
|
|
1360
|
-
}, 8, ["size", "title", "modelValue"])
|
|
1361
|
-
], 64);
|
|
1362
|
-
};
|
|
1363
|
-
}
|
|
1364
|
-
}));
|
|
1365
|
-
var FuFilter = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/FuFilter.vue"]]);
|
|
1366
|
-
const _hoisted_1$l = { class: "fu-filter-bar" };
|
|
1367
|
-
const _hoisted_2$e = { class: "fu-filter-bar__top" };
|
|
1368
|
-
const _hoisted_3$c = { class: "top_left" };
|
|
1369
|
-
const _hoisted_4$1 = { class: "top_right" };
|
|
1370
|
-
const _hoisted_5 = { key: 0 };
|
|
1371
|
-
const _hoisted_6 = { class: "fu-filter-bar__bottom" };
|
|
1372
|
-
const __default__$r = { name: "FuFilterBar" };
|
|
1373
|
-
const _sfc_main$y = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$r), {
|
|
1374
|
-
props: {
|
|
1375
|
-
size: {
|
|
1376
|
-
type: String,
|
|
1377
|
-
validator: validateSize
|
|
1378
|
-
},
|
|
1379
|
-
resultCount: Number,
|
|
1380
|
-
quickPlaceholder: String,
|
|
1381
|
-
components: Array,
|
|
1382
|
-
showEmpty: {
|
|
1383
|
-
type: Boolean,
|
|
1384
|
-
default: false
|
|
1385
|
-
}
|
|
1386
|
-
},
|
|
1387
|
-
emits: ["exec"],
|
|
1388
|
-
setup(__props, { expose, emit }) {
|
|
1389
|
-
const { t: t2 } = useLocale();
|
|
1390
|
-
const configSize = useSize();
|
|
1391
|
-
const quick = ref("");
|
|
1392
|
-
const conditions = ref([]);
|
|
1393
|
-
const filterRef = ref();
|
|
1394
|
-
function open() {
|
|
1395
|
-
var _a2;
|
|
1396
|
-
(_a2 = filterRef.value) == null ? void 0 : _a2.open();
|
|
1397
|
-
}
|
|
1398
|
-
function change() {
|
|
1399
|
-
emit("exec", conditionObj.value);
|
|
1400
|
-
}
|
|
1401
|
-
function filter(c) {
|
|
1402
|
-
conditions.value = c;
|
|
1403
|
-
emit("exec", conditionObj.value);
|
|
1404
|
-
}
|
|
1405
|
-
function setConditions(conditionObj2) {
|
|
1406
|
-
var _a2;
|
|
1407
|
-
if (conditionObj2.quick) {
|
|
1408
|
-
quick.value = conditionObj2.quick;
|
|
1409
|
-
}
|
|
1410
|
-
(_a2 = filterRef.value) == null ? void 0 : _a2.setConditions(conditionObj2);
|
|
1411
|
-
}
|
|
1412
|
-
const conditionObj = computed(() => {
|
|
1413
|
-
let obj = {};
|
|
1414
|
-
if (quick.value) {
|
|
1415
|
-
obj.quick = quick.value;
|
|
1416
|
-
}
|
|
1417
|
-
conditions.value.forEach((c) => {
|
|
1418
|
-
obj[c.field] = c;
|
|
1419
|
-
});
|
|
1420
|
-
return obj;
|
|
1421
|
-
});
|
|
1422
|
-
expose({
|
|
1423
|
-
setConditions,
|
|
1424
|
-
open
|
|
1425
|
-
});
|
|
1426
|
-
return (_ctx, _cache) => {
|
|
1427
|
-
const _component_el_button = resolveComponent("el-button");
|
|
1428
|
-
return openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
1429
|
-
createElementVNode("div", _hoisted_2$e, [
|
|
1430
|
-
createElementVNode("div", _hoisted_3$c, [
|
|
1431
|
-
renderSlot(_ctx.$slots, "tl")
|
|
1432
|
-
]),
|
|
1433
|
-
createElementVNode("div", _hoisted_4$1, [
|
|
1434
|
-
renderSlot(_ctx.$slots, "tr", { condition: unref(conditionObj) }, () => [
|
|
1435
|
-
createVNode(FuFilterInput, {
|
|
1436
|
-
size: unref(configSize),
|
|
1437
|
-
modelValue: quick.value,
|
|
1438
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => quick.value = $event),
|
|
1439
|
-
placeholder: __props.quickPlaceholder,
|
|
1440
|
-
onChange: change
|
|
1441
|
-
}, null, 8, ["size", "modelValue", "placeholder"])
|
|
1442
1196
|
]),
|
|
1443
|
-
createVNode(_component_el_button, {
|
|
1444
|
-
class: "fu-filter-button",
|
|
1445
|
-
onClick: open,
|
|
1446
|
-
icon: "Filter",
|
|
1447
|
-
size: unref(configSize)
|
|
1448
|
-
}, {
|
|
1449
|
-
default: withCtx(() => [
|
|
1450
|
-
createTextVNode(toDisplayString(unref(t2)("fu.filter_bar.filter")) + " ", 1),
|
|
1451
|
-
conditions.value.length > 0 ? (openBlock(), createElementBlock("span", _hoisted_5, "(" + toDisplayString(conditions.value.length) + ")", 1)) : createCommentVNode("v-if", true)
|
|
1452
|
-
]),
|
|
1453
|
-
_: 1
|
|
1454
|
-
}, 8, ["size"]),
|
|
1455
|
-
renderSlot(_ctx.$slots, "buttons")
|
|
1456
|
-
])
|
|
1457
|
-
]),
|
|
1458
|
-
createElementVNode("div", _hoisted_6, [
|
|
1459
|
-
createVNode(FuFilter, {
|
|
1460
|
-
ref_key: "filterRef",
|
|
1461
|
-
ref: filterRef,
|
|
1462
|
-
onFilter: filter,
|
|
1463
|
-
count: __props.resultCount,
|
|
1464
|
-
components: __props.components,
|
|
1465
|
-
size: unref(configSize),
|
|
1466
|
-
"show-empty": __props.showEmpty
|
|
1467
|
-
}, {
|
|
1468
1197
|
default: withCtx(() => [
|
|
1469
|
-
|
|
1198
|
+
createVNode(_component_el_select, mergeProps({
|
|
1199
|
+
modelValue: selection.value,
|
|
1200
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selection.value = $event)
|
|
1201
|
+
}, _ctx.$attrs, {
|
|
1202
|
+
multiple: __props.multiple,
|
|
1203
|
+
onChange: change,
|
|
1204
|
+
teleported: false,
|
|
1205
|
+
size: unref(configSize),
|
|
1206
|
+
placeholder: unref(t2)("fu.search_bar.please_select")
|
|
1207
|
+
}), {
|
|
1208
|
+
default: withCtx(() => [
|
|
1209
|
+
unref(showSelectAll) ? (openBlock(), createBlock(_component_el_option, {
|
|
1210
|
+
key: 0,
|
|
1211
|
+
value: "-$SELECT-ALL$-"
|
|
1212
|
+
}, {
|
|
1213
|
+
default: withCtx(() => [
|
|
1214
|
+
createElementVNode("div", { onClick: selectAll }, toDisplayString(unref(t2)("fu.filter_bar.select_all")), 1)
|
|
1215
|
+
]),
|
|
1216
|
+
_: 1
|
|
1217
|
+
})) : createCommentVNode("v-if", true),
|
|
1218
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (o) => {
|
|
1219
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
1220
|
+
label: o.label,
|
|
1221
|
+
value: o.value,
|
|
1222
|
+
key: o.value
|
|
1223
|
+
}, null, 8, ["label", "value"]);
|
|
1224
|
+
}), 128))
|
|
1225
|
+
]),
|
|
1226
|
+
_: 1
|
|
1227
|
+
}, 16, ["modelValue", "multiple", "size", "placeholder"])
|
|
1470
1228
|
]),
|
|
1471
|
-
_:
|
|
1472
|
-
}
|
|
1229
|
+
_: 1
|
|
1230
|
+
})) : createCommentVNode("v-if", true)
|
|
1473
1231
|
])
|
|
1474
1232
|
]);
|
|
1475
1233
|
};
|
|
1476
1234
|
}
|
|
1477
1235
|
}));
|
|
1478
|
-
var
|
|
1479
|
-
const _hoisted_1$k = ["onClick"];
|
|
1480
|
-
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
1481
|
-
__name: "FuFilterOption",
|
|
1482
|
-
props: {
|
|
1483
|
-
value: {
|
|
1484
|
-
type: [String, Number, Boolean, Object],
|
|
1485
|
-
required: true
|
|
1486
|
-
},
|
|
1487
|
-
label: [String, Number],
|
|
1488
|
-
disabled: {
|
|
1489
|
-
type: Boolean,
|
|
1490
|
-
default: false
|
|
1491
|
-
}
|
|
1492
|
-
},
|
|
1493
|
-
setup(__props) {
|
|
1494
|
-
const props = __props;
|
|
1495
|
-
const select = inject(selectKey);
|
|
1496
|
-
const selected = computed(() => {
|
|
1497
|
-
if (!select)
|
|
1498
|
-
return false;
|
|
1499
|
-
if (Array.isArray(select.selection.value)) {
|
|
1500
|
-
return select.selection.value.includes(props.value);
|
|
1501
|
-
} else {
|
|
1502
|
-
return select.selection.value === props.value;
|
|
1503
|
-
}
|
|
1504
|
-
});
|
|
1505
|
-
function click() {
|
|
1506
|
-
select == null ? void 0 : select.setSelected(props.value, selected.value);
|
|
1507
|
-
}
|
|
1508
|
-
return (_ctx, _cache) => {
|
|
1509
|
-
return openBlock(), createElementBlock("div", {
|
|
1510
|
-
class: normalizeClass(["fu-filter-option", { "is-selected": unref(selected), "is-disabled": __props.disabled }]),
|
|
1511
|
-
onClick: withModifiers(click, ["stop"])
|
|
1512
|
-
}, toDisplayString(__props.label || __props.value), 11, _hoisted_1$k);
|
|
1513
|
-
};
|
|
1514
|
-
}
|
|
1515
|
-
});
|
|
1516
|
-
var FuFilterOption = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterOption.vue"]]);
|
|
1236
|
+
var FuFilterSelect = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterSelect.vue"]]);
|
|
1517
1237
|
const _hoisted_1$j = { class: "fu-filter-component" };
|
|
1518
|
-
const _hoisted_2$
|
|
1519
|
-
const _hoisted_3$
|
|
1520
|
-
const
|
|
1521
|
-
const
|
|
1522
|
-
const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$q), {
|
|
1238
|
+
const _hoisted_2$c = { class: "fu-filter-component__label" };
|
|
1239
|
+
const _hoisted_3$a = { class: "fu-filter-component__content" };
|
|
1240
|
+
const __default__$q = { name: "FuFilterNormalSelect" };
|
|
1241
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$q), {
|
|
1523
1242
|
props: {
|
|
1524
1243
|
size: {
|
|
1525
1244
|
type: String,
|
|
@@ -1529,10 +1248,6 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1529
1248
|
type: Boolean,
|
|
1530
1249
|
default: false
|
|
1531
1250
|
},
|
|
1532
|
-
showLimit: {
|
|
1533
|
-
type: Number,
|
|
1534
|
-
default: 3
|
|
1535
|
-
},
|
|
1536
1251
|
useSelectAll: {
|
|
1537
1252
|
type: Boolean,
|
|
1538
1253
|
default: false
|
|
@@ -1552,20 +1267,6 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1552
1267
|
const props = __props;
|
|
1553
1268
|
const selection = ref(props.multiple ? [] : "");
|
|
1554
1269
|
const configSize = useSize();
|
|
1555
|
-
const showOptions = computed(() => {
|
|
1556
|
-
return props.options.filter((o, i) => {
|
|
1557
|
-
let show = props.showLimit < 0 ? true : i < props.showLimit;
|
|
1558
|
-
if (Array.isArray(selection.value)) {
|
|
1559
|
-
return show || selection.value.includes(o.value);
|
|
1560
|
-
} else {
|
|
1561
|
-
return show || selection.value === o.value;
|
|
1562
|
-
}
|
|
1563
|
-
});
|
|
1564
|
-
});
|
|
1565
|
-
const showMore = computed(() => {
|
|
1566
|
-
var _a2;
|
|
1567
|
-
return ((_a2 = props.options) == null ? void 0 : _a2.length) > props.showLimit && props.showLimit > 0;
|
|
1568
|
-
});
|
|
1569
1270
|
const valueLabel = computed(() => {
|
|
1570
1271
|
if (Array.isArray(selection.value)) {
|
|
1571
1272
|
let values = [];
|
|
@@ -1633,197 +1334,25 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1633
1334
|
return (_ctx, _cache) => {
|
|
1634
1335
|
const _component_el_option = resolveComponent("el-option");
|
|
1635
1336
|
const _component_el_select = resolveComponent("el-select");
|
|
1636
|
-
const _component_Plus = resolveComponent("Plus");
|
|
1637
|
-
const _component_el_icon = resolveComponent("el-icon");
|
|
1638
|
-
const _component_el_popover = resolveComponent("el-popover");
|
|
1639
1337
|
return openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
1640
|
-
createElementVNode("div", _hoisted_2$
|
|
1641
|
-
createElementVNode("div", _hoisted_3$
|
|
1642
|
-
(
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
placement: "bottom-start",
|
|
1654
|
-
trigger: "click",
|
|
1655
|
-
width: "240"
|
|
1656
|
-
}, {
|
|
1657
|
-
reference: withCtx(() => [
|
|
1658
|
-
createElementVNode("div", _hoisted_4, [
|
|
1659
|
-
createVNode(_component_el_icon, null, {
|
|
1660
|
-
default: withCtx(() => [
|
|
1661
|
-
createVNode(_component_Plus)
|
|
1662
|
-
]),
|
|
1663
|
-
_: 1
|
|
1664
|
-
}),
|
|
1665
|
-
createTextVNode(" " + toDisplayString(unref(t2)("fu.filter_bar.more")), 1)
|
|
1666
|
-
])
|
|
1667
|
-
]),
|
|
1338
|
+
createElementVNode("div", _hoisted_2$c, toDisplayString(__props.label), 1),
|
|
1339
|
+
createElementVNode("div", _hoisted_3$a, [
|
|
1340
|
+
createVNode(_component_el_select, mergeProps({
|
|
1341
|
+
modelValue: selection.value,
|
|
1342
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selection.value = $event)
|
|
1343
|
+
}, _ctx.$attrs, {
|
|
1344
|
+
multiple: __props.multiple,
|
|
1345
|
+
onChange: change,
|
|
1346
|
+
teleported: false,
|
|
1347
|
+
size: unref(configSize),
|
|
1348
|
+
placeholder: unref(t2)("fu.search_bar.please_select"),
|
|
1349
|
+
class: "fu-filter-select"
|
|
1350
|
+
}), {
|
|
1668
1351
|
default: withCtx(() => [
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
},
|
|
1673
|
-
multiple: __props.multiple,
|
|
1674
|
-
onChange: change,
|
|
1675
|
-
teleported: false,
|
|
1676
|
-
size: unref(configSize),
|
|
1677
|
-
placeholder: unref(t2)("fu.search_bar.please_select")
|
|
1678
|
-
}), {
|
|
1679
|
-
default: withCtx(() => [
|
|
1680
|
-
unref(showSelectAll) ? (openBlock(), createBlock(_component_el_option, {
|
|
1681
|
-
key: 0,
|
|
1682
|
-
value: "-$SELECT-ALL$-"
|
|
1683
|
-
}, {
|
|
1684
|
-
default: withCtx(() => [
|
|
1685
|
-
createElementVNode("div", { onClick: selectAll }, toDisplayString(unref(t2)("fu.filter_bar.select_all")), 1)
|
|
1686
|
-
]),
|
|
1687
|
-
_: 1
|
|
1688
|
-
})) : createCommentVNode("v-if", true),
|
|
1689
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (o) => {
|
|
1690
|
-
return openBlock(), createBlock(_component_el_option, {
|
|
1691
|
-
label: o.label,
|
|
1692
|
-
value: o.value,
|
|
1693
|
-
key: o.value
|
|
1694
|
-
}, null, 8, ["label", "value"]);
|
|
1695
|
-
}), 128))
|
|
1696
|
-
]),
|
|
1697
|
-
_: 1
|
|
1698
|
-
}, 16, ["modelValue", "multiple", "size", "placeholder"])
|
|
1699
|
-
]),
|
|
1700
|
-
_: 1
|
|
1701
|
-
})) : createCommentVNode("v-if", true)
|
|
1702
|
-
])
|
|
1703
|
-
]);
|
|
1704
|
-
};
|
|
1705
|
-
}
|
|
1706
|
-
}));
|
|
1707
|
-
var FuFilterSelect = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterSelect.vue"]]);
|
|
1708
|
-
const _hoisted_1$i = { class: "fu-filter-component" };
|
|
1709
|
-
const _hoisted_2$c = { class: "fu-filter-component__label" };
|
|
1710
|
-
const _hoisted_3$a = { class: "fu-filter-component__content" };
|
|
1711
|
-
const __default__$p = { name: "FuFilterNormalSelect" };
|
|
1712
|
-
const _sfc_main$v = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$p), {
|
|
1713
|
-
props: {
|
|
1714
|
-
size: {
|
|
1715
|
-
type: String,
|
|
1716
|
-
validator: validateSize
|
|
1717
|
-
},
|
|
1718
|
-
multiple: {
|
|
1719
|
-
type: Boolean,
|
|
1720
|
-
default: false
|
|
1721
|
-
},
|
|
1722
|
-
useSelectAll: {
|
|
1723
|
-
type: Boolean,
|
|
1724
|
-
default: false
|
|
1725
|
-
},
|
|
1726
|
-
label: String,
|
|
1727
|
-
field: {
|
|
1728
|
-
type: String,
|
|
1729
|
-
required: true
|
|
1730
|
-
},
|
|
1731
|
-
options: {
|
|
1732
|
-
type: Array,
|
|
1733
|
-
default: []
|
|
1734
|
-
}
|
|
1735
|
-
},
|
|
1736
|
-
emits: ["change"],
|
|
1737
|
-
setup(__props, { expose, emit }) {
|
|
1738
|
-
const props = __props;
|
|
1739
|
-
const selection = ref(props.multiple ? [] : "");
|
|
1740
|
-
const configSize = useSize();
|
|
1741
|
-
const valueLabel = computed(() => {
|
|
1742
|
-
if (Array.isArray(selection.value)) {
|
|
1743
|
-
let values = [];
|
|
1744
|
-
selection.value.forEach((v) => {
|
|
1745
|
-
values.push(getValueLabel(v));
|
|
1746
|
-
});
|
|
1747
|
-
return values.join(", ");
|
|
1748
|
-
}
|
|
1749
|
-
return getValueLabel(selection.value);
|
|
1750
|
-
});
|
|
1751
|
-
const showSelectAll = computed(() => {
|
|
1752
|
-
return props.useSelectAll && props.multiple;
|
|
1753
|
-
});
|
|
1754
|
-
const { t: t2 } = useLocale();
|
|
1755
|
-
function change(v) {
|
|
1756
|
-
if (showSelectAll.value && (v == null ? void 0 : v.includes("-$SELECT-ALL$-"))) {
|
|
1757
|
-
selection.value = props.options.map((o) => o.value);
|
|
1758
|
-
}
|
|
1759
|
-
emit("change", selection.value);
|
|
1760
|
-
}
|
|
1761
|
-
function setSelected(value, selected) {
|
|
1762
|
-
if (!Array.isArray(selection.value)) {
|
|
1763
|
-
selection.value = selected ? "" : value;
|
|
1764
|
-
return;
|
|
1765
|
-
}
|
|
1766
|
-
if (selected) {
|
|
1767
|
-
let index = selection.value.indexOf(value);
|
|
1768
|
-
selection.value.splice(index, 1);
|
|
1769
|
-
} else {
|
|
1770
|
-
selection.value.push(value);
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
function selectAll() {
|
|
1774
|
-
selection.value = props.options.map((o) => o.value);
|
|
1775
|
-
}
|
|
1776
|
-
function getValueLabel(value) {
|
|
1777
|
-
for (let o of props.options) {
|
|
1778
|
-
if (o.value === value) {
|
|
1779
|
-
return o.label;
|
|
1780
|
-
}
|
|
1781
|
-
}
|
|
1782
|
-
return value;
|
|
1783
|
-
}
|
|
1784
|
-
function getCondition() {
|
|
1785
|
-
if (!selection.value || Array.isArray(selection.value) && selection.value.length === 0)
|
|
1786
|
-
return;
|
|
1787
|
-
let { field: field2, label } = props;
|
|
1788
|
-
return { field: field2, label, value: selection.value, valueLabel: valueLabel.value };
|
|
1789
|
-
}
|
|
1790
|
-
function init(v) {
|
|
1791
|
-
selection.value = v !== void 0 ? v : props.multiple ? [] : "";
|
|
1792
|
-
}
|
|
1793
|
-
provide(selectKey, {
|
|
1794
|
-
setSelected,
|
|
1795
|
-
selection
|
|
1796
|
-
});
|
|
1797
|
-
const references = inject(referenceKey$1);
|
|
1798
|
-
const field = props.field;
|
|
1799
|
-
const reference = { field, init, getCondition };
|
|
1800
|
-
references == null ? void 0 : references.value.push(reference);
|
|
1801
|
-
expose({
|
|
1802
|
-
getCondition,
|
|
1803
|
-
init
|
|
1804
|
-
});
|
|
1805
|
-
return (_ctx, _cache) => {
|
|
1806
|
-
const _component_el_option = resolveComponent("el-option");
|
|
1807
|
-
const _component_el_select = resolveComponent("el-select");
|
|
1808
|
-
return openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
1809
|
-
createElementVNode("div", _hoisted_2$c, toDisplayString(__props.label), 1),
|
|
1810
|
-
createElementVNode("div", _hoisted_3$a, [
|
|
1811
|
-
createVNode(_component_el_select, mergeProps({
|
|
1812
|
-
modelValue: selection.value,
|
|
1813
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selection.value = $event)
|
|
1814
|
-
}, _ctx.$attrs, {
|
|
1815
|
-
multiple: __props.multiple,
|
|
1816
|
-
onChange: change,
|
|
1817
|
-
teleported: false,
|
|
1818
|
-
size: unref(configSize),
|
|
1819
|
-
placeholder: unref(t2)("fu.search_bar.please_select"),
|
|
1820
|
-
class: "fu-filter-select"
|
|
1821
|
-
}), {
|
|
1822
|
-
default: withCtx(() => [
|
|
1823
|
-
unref(showSelectAll) ? (openBlock(), createBlock(_component_el_option, {
|
|
1824
|
-
key: 0,
|
|
1825
|
-
value: "-$SELECT-ALL$-"
|
|
1826
|
-
}, {
|
|
1352
|
+
unref(showSelectAll) ? (openBlock(), createBlock(_component_el_option, {
|
|
1353
|
+
key: 0,
|
|
1354
|
+
value: "-$SELECT-ALL$-"
|
|
1355
|
+
}, {
|
|
1827
1356
|
default: withCtx(() => [
|
|
1828
1357
|
createElementVNode("div", { onClick: selectAll }, toDisplayString(unref(t2)("fu.filter_bar.select_all")), 1)
|
|
1829
1358
|
]),
|
|
@@ -1844,7 +1373,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1844
1373
|
};
|
|
1845
1374
|
}
|
|
1846
1375
|
}));
|
|
1847
|
-
var FuFilterNormalSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1376
|
+
var FuFilterNormalSelect = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterNormalSelect.vue"]]);
|
|
1848
1377
|
const getCheckDate = (timestamp) => {
|
|
1849
1378
|
if (!timestamp)
|
|
1850
1379
|
return false;
|
|
@@ -1874,11 +1403,11 @@ const dateFormat = (timestamp) => {
|
|
|
1874
1403
|
const d = (dt.getDate() + "").padStart(2, "0");
|
|
1875
1404
|
return `${y}-${m}-${d}`;
|
|
1876
1405
|
};
|
|
1877
|
-
const _hoisted_1$
|
|
1406
|
+
const _hoisted_1$i = { class: "fu-filter-component" };
|
|
1878
1407
|
const _hoisted_2$b = { class: "fu-filter-component__label" };
|
|
1879
1408
|
const _hoisted_3$9 = { class: "fu-filter-component__content" };
|
|
1880
|
-
const __default__$
|
|
1881
|
-
const _sfc_main$
|
|
1409
|
+
const __default__$p = { name: "FuFilterDate" };
|
|
1410
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$p), {
|
|
1882
1411
|
props: {
|
|
1883
1412
|
size: {
|
|
1884
1413
|
type: String,
|
|
@@ -1921,7 +1450,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1921
1450
|
});
|
|
1922
1451
|
return (_ctx, _cache) => {
|
|
1923
1452
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
1924
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1453
|
+
return openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
1925
1454
|
createElementVNode("div", _hoisted_2$b, toDisplayString(__props.label), 1),
|
|
1926
1455
|
createElementVNode("div", _hoisted_3$9, [
|
|
1927
1456
|
createCommentVNode("configSize"),
|
|
@@ -1942,12 +1471,12 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1942
1471
|
};
|
|
1943
1472
|
}
|
|
1944
1473
|
}));
|
|
1945
|
-
var FuFilterDate = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1946
|
-
const _hoisted_1$
|
|
1474
|
+
var FuFilterDate = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterDate.vue"]]);
|
|
1475
|
+
const _hoisted_1$h = { class: "fu-filter-component" };
|
|
1947
1476
|
const _hoisted_2$a = { class: "fu-filter-component__label" };
|
|
1948
1477
|
const _hoisted_3$8 = { class: "fu-filter-component__content" };
|
|
1949
|
-
const __default__$
|
|
1950
|
-
const _sfc_main$
|
|
1478
|
+
const __default__$o = { name: "FuFilterDateTime" };
|
|
1479
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$o), {
|
|
1951
1480
|
props: {
|
|
1952
1481
|
size: {
|
|
1953
1482
|
type: String,
|
|
@@ -1990,10 +1519,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1990
1519
|
});
|
|
1991
1520
|
return (_ctx, _cache) => {
|
|
1992
1521
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
1993
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1522
|
+
return openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
1994
1523
|
createElementVNode("div", _hoisted_2$a, toDisplayString(__props.label), 1),
|
|
1995
1524
|
createElementVNode("div", _hoisted_3$8, [
|
|
1996
|
-
createCommentVNode(' :size="configSize" '),
|
|
1997
1525
|
createVNode(_component_el_date_picker, mergeProps({
|
|
1998
1526
|
class: "fu-filter-date",
|
|
1999
1527
|
modelValue: value.value,
|
|
@@ -2011,12 +1539,12 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2011
1539
|
};
|
|
2012
1540
|
}
|
|
2013
1541
|
}));
|
|
2014
|
-
var FuFilterDateTime = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2015
|
-
const _hoisted_1$
|
|
1542
|
+
var FuFilterDateTime = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterDateTime.vue"]]);
|
|
1543
|
+
const _hoisted_1$g = { class: "fu-filter-component" };
|
|
2016
1544
|
const _hoisted_2$9 = { class: "fu-filter-component__label" };
|
|
2017
1545
|
const _hoisted_3$7 = { class: "fu-filter-component__content" };
|
|
2018
|
-
const __default__$
|
|
2019
|
-
const _sfc_main$
|
|
1546
|
+
const __default__$n = { name: "FuFilterInputText" };
|
|
1547
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$n), {
|
|
2020
1548
|
props: {
|
|
2021
1549
|
size: {
|
|
2022
1550
|
type: String,
|
|
@@ -2052,7 +1580,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2052
1580
|
});
|
|
2053
1581
|
return (_ctx, _cache) => {
|
|
2054
1582
|
const _component_el_input = resolveComponent("el-input");
|
|
2055
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1583
|
+
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
2056
1584
|
createElementVNode("div", _hoisted_2$9, toDisplayString(__props.label), 1),
|
|
2057
1585
|
createElementVNode("div", _hoisted_3$7, [
|
|
2058
1586
|
createVNode(_component_el_input, mergeProps({
|
|
@@ -2065,7 +1593,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2065
1593
|
};
|
|
2066
1594
|
}
|
|
2067
1595
|
}));
|
|
2068
|
-
var FuFilterInputText = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1596
|
+
var FuFilterInputText = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/filter-bar/filter-components/FuFilterInputText.vue"]]);
|
|
2069
1597
|
FuFilterBar.install = (app) => {
|
|
2070
1598
|
app.component(FuFilterBar.name, FuFilterBar);
|
|
2071
1599
|
app.component(FuFilter.name, FuFilter);
|
|
@@ -2076,7 +1604,7 @@ FuFilterBar.install = (app) => {
|
|
|
2076
1604
|
app.component(FuFilterDateTime.name, FuFilterDateTime);
|
|
2077
1605
|
app.component(FuFilterInputText.name, FuFilterInputText);
|
|
2078
1606
|
};
|
|
2079
|
-
var
|
|
1607
|
+
var __glob_2_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2080
1608
|
__proto__: null,
|
|
2081
1609
|
"default": FuFilterBar
|
|
2082
1610
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -2090,9 +1618,9 @@ const validateType = (value) => {
|
|
|
2090
1618
|
console.error("types is not contains " + value);
|
|
2091
1619
|
return false;
|
|
2092
1620
|
};
|
|
2093
|
-
const _hoisted_1$
|
|
2094
|
-
const __default__$
|
|
2095
|
-
const _sfc_main$
|
|
1621
|
+
const _hoisted_1$f = ["tabindex"];
|
|
1622
|
+
const __default__$m = { name: "FuIconButton" };
|
|
1623
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$m), {
|
|
2096
1624
|
props: {
|
|
2097
1625
|
name: String,
|
|
2098
1626
|
size: {
|
|
@@ -2141,35 +1669,20 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2141
1669
|
_: 1
|
|
2142
1670
|
}, 8, ["color", "size", "class"])
|
|
2143
1671
|
])
|
|
2144
|
-
], 10, _hoisted_1$
|
|
1672
|
+
], 10, _hoisted_1$f);
|
|
2145
1673
|
};
|
|
2146
1674
|
}
|
|
2147
1675
|
}));
|
|
2148
|
-
var FuIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1676
|
+
var FuIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/icon-button/FuIconButton.vue"]]);
|
|
2149
1677
|
FuIconButton.install = (app) => {
|
|
2150
1678
|
app.component(FuIconButton.name, FuIconButton);
|
|
2151
1679
|
};
|
|
2152
|
-
var
|
|
1680
|
+
var __glob_2_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2153
1681
|
__proto__: null,
|
|
2154
1682
|
"default": FuIconButton
|
|
2155
1683
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2156
|
-
const uuid = function() {
|
|
2157
|
-
let d = new Date().getTime();
|
|
2158
|
-
let d2 = performance && performance.now && performance.now() * 1e3 || 0;
|
|
2159
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
2160
|
-
let r = Math.random() * 16;
|
|
2161
|
-
if (d > 0) {
|
|
2162
|
-
r = (d + r) % 16 | 0;
|
|
2163
|
-
d = Math.floor(d / 16);
|
|
2164
|
-
} else {
|
|
2165
|
-
r = (d2 + r) % 16 | 0;
|
|
2166
|
-
d2 = Math.floor(d2 / 16);
|
|
2167
|
-
}
|
|
2168
|
-
return (c === "x" ? r : r & 3 | 8).toString(16);
|
|
2169
|
-
});
|
|
2170
|
-
};
|
|
2171
1684
|
const TRIGGERS = ["manual", "onClick", "onDblclick"];
|
|
2172
|
-
const _sfc_main$
|
|
1685
|
+
const _sfc_main$x = defineComponent({
|
|
2173
1686
|
name: "FuReadWriteSwitch",
|
|
2174
1687
|
props: {
|
|
2175
1688
|
modelValue: Boolean,
|
|
@@ -2183,8 +1696,8 @@ const _sfc_main$q = defineComponent({
|
|
|
2183
1696
|
}
|
|
2184
1697
|
},
|
|
2185
1698
|
setup(props, { slots, emit }) {
|
|
2186
|
-
const id = ref(
|
|
2187
|
-
const write = ref(props.modelValue
|
|
1699
|
+
const id = ref(crypto.randomUUID());
|
|
1700
|
+
const write = ref(props.modelValue);
|
|
2188
1701
|
watch(() => props.modelValue, (v) => {
|
|
2189
1702
|
if (v === write.value)
|
|
2190
1703
|
return;
|
|
@@ -2237,9 +1750,9 @@ const _sfc_main$q = defineComponent({
|
|
|
2237
1750
|
};
|
|
2238
1751
|
}
|
|
2239
1752
|
});
|
|
2240
|
-
var FuReadWriteSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2241
|
-
const __default__$
|
|
2242
|
-
const _sfc_main$
|
|
1753
|
+
var FuReadWriteSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/read-write-switch/FuReadWriteSwitch.vue"]]);
|
|
1754
|
+
const __default__$l = { name: "FuInputRwSwitch" };
|
|
1755
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$l), {
|
|
2243
1756
|
props: {
|
|
2244
1757
|
modelValue: [String, Number],
|
|
2245
1758
|
writeTrigger: {
|
|
@@ -2290,9 +1803,9 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2290
1803
|
};
|
|
2291
1804
|
}
|
|
2292
1805
|
}));
|
|
2293
|
-
var FuInputRwSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2294
|
-
const __default__$
|
|
2295
|
-
const _sfc_main$
|
|
1806
|
+
var FuInputRwSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/read-write-switch/FuInputRwSwitch.vue"]]);
|
|
1807
|
+
const __default__$k = { name: "FuSelectRwSwitch" };
|
|
1808
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$k), {
|
|
2296
1809
|
props: {
|
|
2297
1810
|
modelValue: [String, Number],
|
|
2298
1811
|
options: {
|
|
@@ -2374,19 +1887,19 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2374
1887
|
};
|
|
2375
1888
|
}
|
|
2376
1889
|
}));
|
|
2377
|
-
var FuSelectRwSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1890
|
+
var FuSelectRwSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/read-write-switch/FuSelectRwSwitch.vue"]]);
|
|
2378
1891
|
FuReadWriteSwitch.install = (app) => {
|
|
2379
1892
|
app.component(FuReadWriteSwitch.name, FuReadWriteSwitch);
|
|
2380
1893
|
app.component(FuInputRwSwitch.name, FuInputRwSwitch);
|
|
2381
1894
|
app.component(FuSelectRwSwitch.name, FuSelectRwSwitch);
|
|
2382
1895
|
};
|
|
2383
|
-
var
|
|
1896
|
+
var __glob_2_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2384
1897
|
__proto__: null,
|
|
2385
1898
|
"default": FuReadWriteSwitch
|
|
2386
1899
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2387
|
-
const _hoisted_1$
|
|
2388
|
-
const __default__$
|
|
2389
|
-
const _sfc_main$
|
|
1900
|
+
const _hoisted_1$e = ["placeholder"];
|
|
1901
|
+
const __default__$j = { name: "FuQuickSearch" };
|
|
1902
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$j), {
|
|
2390
1903
|
props: {
|
|
2391
1904
|
size: {
|
|
2392
1905
|
type: String,
|
|
@@ -2445,7 +1958,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2445
1958
|
onBlur: blur,
|
|
2446
1959
|
onFocus: focus,
|
|
2447
1960
|
onKeydown: keydown
|
|
2448
|
-
}, null, 40, _hoisted_1$
|
|
1961
|
+
}, null, 40, _hoisted_1$e), [
|
|
2449
1962
|
[vModelText, unref(value)]
|
|
2450
1963
|
])
|
|
2451
1964
|
])
|
|
@@ -2453,13 +1966,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2453
1966
|
};
|
|
2454
1967
|
}
|
|
2455
1968
|
}));
|
|
2456
|
-
var FuQuickSearch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1969
|
+
var FuQuickSearch = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/search-bar/FuQuickSearch.vue"]]);
|
|
2457
1970
|
const referenceKey = Symbol("ReferenceKey");
|
|
2458
|
-
const _hoisted_1$
|
|
1971
|
+
const _hoisted_1$d = { class: "fu-complex-components" };
|
|
2459
1972
|
const _hoisted_2$8 = { class: "fu-complex-components__body" };
|
|
2460
1973
|
const _hoisted_3$6 = { class: "fu-complex-components__footer" };
|
|
2461
|
-
const __default__$
|
|
2462
|
-
const _sfc_main$
|
|
1974
|
+
const __default__$i = { name: "FuComplexSearch" };
|
|
1975
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$i), {
|
|
2463
1976
|
props: {
|
|
2464
1977
|
size: {
|
|
2465
1978
|
type: String,
|
|
@@ -2496,7 +2009,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2496
2009
|
let conditions = [];
|
|
2497
2010
|
references == null ? void 0 : references.value.forEach((r) => {
|
|
2498
2011
|
let condition = r.getCondition();
|
|
2499
|
-
if (condition
|
|
2012
|
+
if ((condition == null ? void 0 : condition.value) !== void 0) {
|
|
2500
2013
|
conditions.push(condition);
|
|
2501
2014
|
}
|
|
2502
2015
|
});
|
|
@@ -2546,7 +2059,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2546
2059
|
])
|
|
2547
2060
|
]),
|
|
2548
2061
|
default: withCtx(() => [
|
|
2549
|
-
createElementVNode("div", _hoisted_1$
|
|
2062
|
+
createElementVNode("div", _hoisted_1$d, [
|
|
2550
2063
|
createElementVNode("div", _hoisted_2$8, [
|
|
2551
2064
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2552
2065
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.components, (c) => {
|
|
@@ -2582,9 +2095,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2582
2095
|
};
|
|
2583
2096
|
}
|
|
2584
2097
|
}));
|
|
2585
|
-
var FuComplexSearch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2586
|
-
const __default__$
|
|
2587
|
-
const _sfc_main$
|
|
2098
|
+
var FuComplexSearch = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/search-bar/FuComplexSearch.vue"]]);
|
|
2099
|
+
const __default__$h = { name: "FuSearchBarButton" };
|
|
2100
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$h), {
|
|
2588
2101
|
props: {
|
|
2589
2102
|
size: {
|
|
2590
2103
|
type: String,
|
|
@@ -2613,12 +2126,12 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2613
2126
|
};
|
|
2614
2127
|
}
|
|
2615
2128
|
}));
|
|
2616
|
-
var FuSearchBarButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2617
|
-
const _hoisted_1$
|
|
2129
|
+
var FuSearchBarButton = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/search-bar/FuSearchBarButton.vue"]]);
|
|
2130
|
+
const _hoisted_1$c = { class: "fu-search-conditions__item" };
|
|
2618
2131
|
const _hoisted_2$7 = { key: 0 };
|
|
2619
2132
|
const _hoisted_3$5 = { class: "condition-value" };
|
|
2620
|
-
const __default__$
|
|
2621
|
-
const _sfc_main$
|
|
2133
|
+
const __default__$g = { name: "FuSearchConditions" };
|
|
2134
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$g), {
|
|
2622
2135
|
props: {
|
|
2623
2136
|
size: {
|
|
2624
2137
|
type: String,
|
|
@@ -2644,7 +2157,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2644
2157
|
class: normalizeClass(["fu-search-conditions", "fu-search-conditions--" + unref(configSize)])
|
|
2645
2158
|
}, [
|
|
2646
2159
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.conditions, (condition, index) => {
|
|
2647
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2160
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
2648
2161
|
condition.label ? (openBlock(), createElementBlock("div", _hoisted_2$7, toDisplayString(condition.label), 1)) : createCommentVNode("v-if", true),
|
|
2649
2162
|
createElementVNode("div", _hoisted_3$5, toDisplayString(condition.valueLabel), 1),
|
|
2650
2163
|
createVNode(_component_el_icon, {
|
|
@@ -2662,12 +2175,12 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2662
2175
|
};
|
|
2663
2176
|
}
|
|
2664
2177
|
}));
|
|
2665
|
-
var FuSearchConditions = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2666
|
-
const _hoisted_1$
|
|
2178
|
+
var FuSearchConditions = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/search-bar/FuSearchContions.vue"]]);
|
|
2179
|
+
const _hoisted_1$b = { class: "fu-search-bar" };
|
|
2667
2180
|
const _hoisted_2$6 = { class: "fu-search-bar__content" };
|
|
2668
2181
|
const _hoisted_3$4 = { class: "fu-search-bar__buttons" };
|
|
2669
|
-
const __default__$
|
|
2670
|
-
const _sfc_main$
|
|
2182
|
+
const __default__$f = { name: "FuSearchBar" };
|
|
2183
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$f), {
|
|
2671
2184
|
props: {
|
|
2672
2185
|
size: useSizeProp,
|
|
2673
2186
|
quickKey: {
|
|
@@ -2771,7 +2284,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2771
2284
|
setConditions
|
|
2772
2285
|
});
|
|
2773
2286
|
return (_ctx, _cache) => {
|
|
2774
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2287
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
2775
2288
|
createElementVNode("div", _hoisted_2$6, [
|
|
2776
2289
|
createVNode(FuComplexSearch, {
|
|
2777
2290
|
ref_key: "complexRef",
|
|
@@ -2825,12 +2338,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2825
2338
|
};
|
|
2826
2339
|
}
|
|
2827
2340
|
}));
|
|
2828
|
-
var FuSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2829
|
-
const _hoisted_1$
|
|
2341
|
+
var FuSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/search-bar/FuSearchBar.vue"]]);
|
|
2342
|
+
const _hoisted_1$a = { class: "fu-complex-component" };
|
|
2830
2343
|
const _hoisted_2$5 = { class: "fu-complex-component__label" };
|
|
2831
2344
|
const _hoisted_3$3 = { class: "fu-complex-component__content" };
|
|
2832
|
-
const __default__$
|
|
2833
|
-
const _sfc_main$
|
|
2345
|
+
const __default__$e = { name: "FuComplexSelect" };
|
|
2346
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$e), {
|
|
2834
2347
|
props: {
|
|
2835
2348
|
size: {
|
|
2836
2349
|
type: String,
|
|
@@ -2895,7 +2408,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2895
2408
|
return (_ctx, _cache) => {
|
|
2896
2409
|
const _component_el_option = resolveComponent("el-option");
|
|
2897
2410
|
const _component_el_select = resolveComponent("el-select");
|
|
2898
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2411
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
2899
2412
|
createElementVNode("div", _hoisted_2$5, toDisplayString(__props.label), 1),
|
|
2900
2413
|
createElementVNode("div", _hoisted_3$3, [
|
|
2901
2414
|
createVNode(_component_el_select, mergeProps({
|
|
@@ -2921,12 +2434,12 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2921
2434
|
};
|
|
2922
2435
|
}
|
|
2923
2436
|
}));
|
|
2924
|
-
var FuComplexSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2925
|
-
const _hoisted_1$
|
|
2437
|
+
var FuComplexSelect = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/search-bar/complex-components/FuComplexSelect.vue"]]);
|
|
2438
|
+
const _hoisted_1$9 = { class: "fu-complex-component" };
|
|
2926
2439
|
const _hoisted_2$4 = { class: "fu-complex-component__label" };
|
|
2927
2440
|
const _hoisted_3$2 = { class: "fu-complex-component__content" };
|
|
2928
|
-
const __default__$
|
|
2929
|
-
const _sfc_main$
|
|
2441
|
+
const __default__$d = { name: "FuComplexInput" };
|
|
2442
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$d), {
|
|
2930
2443
|
props: {
|
|
2931
2444
|
size: {
|
|
2932
2445
|
type: String,
|
|
@@ -2964,7 +2477,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2964
2477
|
});
|
|
2965
2478
|
return (_ctx, _cache) => {
|
|
2966
2479
|
const _component_el_input = resolveComponent("el-input");
|
|
2967
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2480
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
2968
2481
|
createElementVNode("div", _hoisted_2$4, toDisplayString(__props.label), 1),
|
|
2969
2482
|
createElementVNode("div", _hoisted_3$2, [
|
|
2970
2483
|
createVNode(_component_el_input, mergeProps({
|
|
@@ -2978,12 +2491,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2978
2491
|
};
|
|
2979
2492
|
}
|
|
2980
2493
|
}));
|
|
2981
|
-
var FuComplexInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2982
|
-
const _hoisted_1$
|
|
2494
|
+
var FuComplexInput = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/search-bar/complex-components/FuComplexInput.vue"]]);
|
|
2495
|
+
const _hoisted_1$8 = { class: "fu-complex-component" };
|
|
2983
2496
|
const _hoisted_2$3 = { class: "fu-complex-component__label" };
|
|
2984
2497
|
const _hoisted_3$1 = { class: "fu-complex-component__content" };
|
|
2985
|
-
const __default__$
|
|
2986
|
-
const _sfc_main$
|
|
2498
|
+
const __default__$c = { name: "FuComplexDate" };
|
|
2499
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$c), {
|
|
2987
2500
|
props: {
|
|
2988
2501
|
size: {
|
|
2989
2502
|
type: String,
|
|
@@ -3026,7 +2539,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3026
2539
|
});
|
|
3027
2540
|
return (_ctx, _cache) => {
|
|
3028
2541
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
3029
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2542
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
3030
2543
|
createElementVNode("div", _hoisted_2$3, toDisplayString(__props.label), 1),
|
|
3031
2544
|
createElementVNode("div", _hoisted_3$1, [
|
|
3032
2545
|
createVNode(_component_el_date_picker, mergeProps({
|
|
@@ -3046,12 +2559,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3046
2559
|
};
|
|
3047
2560
|
}
|
|
3048
2561
|
}));
|
|
3049
|
-
var FuComplexDate = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3050
|
-
const _hoisted_1$
|
|
2562
|
+
var FuComplexDate = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/search-bar/complex-components/FuComplexDate.vue"]]);
|
|
2563
|
+
const _hoisted_1$7 = { class: "fu-complex-component" };
|
|
3051
2564
|
const _hoisted_2$2 = { class: "fu-complex-component__label" };
|
|
3052
2565
|
const _hoisted_3 = { class: "fu-complex-component__content" };
|
|
3053
|
-
const __default__$
|
|
3054
|
-
const _sfc_main$
|
|
2566
|
+
const __default__$b = { name: "FuComplexDateTime" };
|
|
2567
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$b), {
|
|
3055
2568
|
props: {
|
|
3056
2569
|
size: {
|
|
3057
2570
|
type: String,
|
|
@@ -3094,10 +2607,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3094
2607
|
});
|
|
3095
2608
|
return (_ctx, _cache) => {
|
|
3096
2609
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
3097
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2610
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
3098
2611
|
createElementVNode("div", _hoisted_2$2, toDisplayString(__props.label), 1),
|
|
3099
2612
|
createElementVNode("div", _hoisted_3, [
|
|
3100
|
-
createCommentVNode(' :size="configSize" '),
|
|
3101
2613
|
createVNode(_component_el_date_picker, mergeProps({
|
|
3102
2614
|
class: "fu-complex-date-time",
|
|
3103
2615
|
modelValue: value.value,
|
|
@@ -3115,7 +2627,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3115
2627
|
};
|
|
3116
2628
|
}
|
|
3117
2629
|
}));
|
|
3118
|
-
var FuComplexDateTime = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2630
|
+
var FuComplexDateTime = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/search-bar/complex-components/FuComplexDateTime.vue"]]);
|
|
3119
2631
|
FuSearchBar.install = (app) => {
|
|
3120
2632
|
app.component(FuQuickSearch.name, FuQuickSearch);
|
|
3121
2633
|
app.component(FuSearchBar.name, FuSearchBar);
|
|
@@ -3125,7 +2637,7 @@ FuSearchBar.install = (app) => {
|
|
|
3125
2637
|
app.component(FuComplexDate.name, FuComplexDate);
|
|
3126
2638
|
app.component(FuComplexDateTime.name, FuComplexDateTime);
|
|
3127
2639
|
};
|
|
3128
|
-
var
|
|
2640
|
+
var __glob_2_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3129
2641
|
__proto__: null,
|
|
3130
2642
|
"default": FuSearchBar
|
|
3131
2643
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -3205,7 +2717,7 @@ const ClickOutside = {
|
|
|
3205
2717
|
nodeList.delete(el);
|
|
3206
2718
|
}
|
|
3207
2719
|
};
|
|
3208
|
-
const _sfc_main$
|
|
2720
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
3209
2721
|
__name: "FuSpeedDialButton",
|
|
3210
2722
|
props: {
|
|
3211
2723
|
type: {
|
|
@@ -3259,10 +2771,10 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
3259
2771
|
};
|
|
3260
2772
|
}
|
|
3261
2773
|
});
|
|
3262
|
-
var FuSpeedDialButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2774
|
+
var FuSpeedDialButton = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDialButton.vue"]]);
|
|
3263
2775
|
const SpeedDialKey = Symbol("SpeedDialKey");
|
|
3264
|
-
const _hoisted_1$
|
|
3265
|
-
const _sfc_main$
|
|
2776
|
+
const _hoisted_1$6 = { class: "fu-speed-dial-action-button" };
|
|
2777
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
3266
2778
|
__name: "FuSpeedDialActionButton",
|
|
3267
2779
|
props: {
|
|
3268
2780
|
index: Number,
|
|
@@ -3327,7 +2839,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
3327
2839
|
speedDialKey == null ? void 0 : speedDialKey.close();
|
|
3328
2840
|
}
|
|
3329
2841
|
return (_ctx, _cache) => {
|
|
3330
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2842
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
3331
2843
|
__props.title ? (openBlock(), createElementBlock("div", {
|
|
3332
2844
|
key: 0,
|
|
3333
2845
|
class: "fu-speed-dial-action-button__title",
|
|
@@ -3351,9 +2863,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
3351
2863
|
};
|
|
3352
2864
|
}
|
|
3353
2865
|
});
|
|
3354
|
-
var FuSpeedDialActionButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3355
|
-
const __default__$
|
|
3356
|
-
const _sfc_main$
|
|
2866
|
+
var FuSpeedDialActionButton = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDialActionButton.vue"]]);
|
|
2867
|
+
const __default__$a = { name: "FuSpeedDialItem" };
|
|
2868
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$a), {
|
|
3357
2869
|
props: {
|
|
3358
2870
|
index: {
|
|
3359
2871
|
type: Number,
|
|
@@ -3442,10 +2954,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3442
2954
|
};
|
|
3443
2955
|
}
|
|
3444
2956
|
}));
|
|
3445
|
-
var FuSpeedDialItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3446
|
-
const _hoisted_1$
|
|
3447
|
-
const __default__$
|
|
3448
|
-
const _sfc_main$
|
|
2957
|
+
var FuSpeedDialItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDialItem.vue"]]);
|
|
2958
|
+
const _hoisted_1$5 = { class: "fu-speed-dial__content" };
|
|
2959
|
+
const __default__$9 = { name: "FuSpeedDial" };
|
|
2960
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$9), {
|
|
3449
2961
|
props: {
|
|
3450
2962
|
modelValue: Boolean,
|
|
3451
2963
|
id: String,
|
|
@@ -3550,7 +3062,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3550
3062
|
if (props.items && props.items.length > 0) {
|
|
3551
3063
|
return true;
|
|
3552
3064
|
}
|
|
3553
|
-
return slots
|
|
3065
|
+
return slots == null ? void 0 : slots.default;
|
|
3554
3066
|
});
|
|
3555
3067
|
const config = computed(() => {
|
|
3556
3068
|
return props.sizeOptions[props.size] || props.sizeOptions["default"];
|
|
@@ -3605,6 +3117,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3605
3117
|
}
|
|
3606
3118
|
}
|
|
3607
3119
|
function mousemove(e) {
|
|
3120
|
+
var _a2, _b;
|
|
3608
3121
|
moving.value = true;
|
|
3609
3122
|
if (props.position === "fixed") {
|
|
3610
3123
|
const el = instance == null ? void 0 : instance.vnode.el;
|
|
@@ -3618,8 +3131,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3618
3131
|
}
|
|
3619
3132
|
if (props.position === "absolute") {
|
|
3620
3133
|
const { offsetLeft, offsetTop, clientWidth, clientHeight, offsetParent } = instance == null ? void 0 : instance.vnode.el;
|
|
3621
|
-
const maxWidth = offsetParent
|
|
3622
|
-
const maxHeight = offsetParent
|
|
3134
|
+
const maxWidth = (_a2 = offsetParent == null ? void 0 : offsetParent.clientWidth) != null ? _a2 : 0 - clientWidth;
|
|
3135
|
+
const maxHeight = (_b = offsetParent == null ? void 0 : offsetParent.clientHeight) != null ? _b : 0 - clientHeight;
|
|
3623
3136
|
let left2 = offsetLeft + e.movementX;
|
|
3624
3137
|
let top2 = offsetTop + e.movementY;
|
|
3625
3138
|
if (left2 > 0 && left2 < maxWidth) {
|
|
@@ -3684,7 +3197,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3684
3197
|
class: "fu-speed-dial",
|
|
3685
3198
|
style: normalizeStyle(style.value)
|
|
3686
3199
|
}, [
|
|
3687
|
-
createElementVNode("div", _hoisted_1$
|
|
3200
|
+
createElementVNode("div", _hoisted_1$5, [
|
|
3688
3201
|
renderSlot(_ctx.$slots, "fab", {}, () => [
|
|
3689
3202
|
createVNode(FuSpeedDialButton, mergeProps(unref(buttonProps), {
|
|
3690
3203
|
onClick: click,
|
|
@@ -3712,21 +3225,21 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3712
3225
|
};
|
|
3713
3226
|
}
|
|
3714
3227
|
}));
|
|
3715
|
-
var FuSpeedDial = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3228
|
+
var FuSpeedDial = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDial.vue"]]);
|
|
3716
3229
|
FuSpeedDial.install = (app) => {
|
|
3717
3230
|
app.component(FuSpeedDial.name, FuSpeedDial);
|
|
3718
3231
|
app.component(FuSpeedDialItem.name, FuSpeedDialItem);
|
|
3719
3232
|
};
|
|
3720
|
-
var
|
|
3233
|
+
var __glob_2_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3721
3234
|
__proto__: null,
|
|
3722
3235
|
"default": FuSpeedDial
|
|
3723
3236
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3724
|
-
const _hoisted_1$
|
|
3237
|
+
const _hoisted_1$4 = {
|
|
3725
3238
|
key: 0,
|
|
3726
3239
|
class: "icon"
|
|
3727
3240
|
};
|
|
3728
|
-
const __default__$
|
|
3729
|
-
const _sfc_main$
|
|
3241
|
+
const __default__$8 = { name: "FuSplitPane" };
|
|
3242
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$8), {
|
|
3730
3243
|
props: {
|
|
3731
3244
|
min: {
|
|
3732
3245
|
type: [Number, String],
|
|
@@ -3813,128 +3326,600 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3813
3326
|
const saveKey = computed(() => {
|
|
3814
3327
|
return "Fu-SP-" + props.localKey;
|
|
3815
3328
|
});
|
|
3816
|
-
const resizerClasses = computed(() => {
|
|
3817
|
-
const classes = [
|
|
3818
|
-
`fu-split-pane__${props.resizerType}`,
|
|
3819
|
-
`is-${props.direction}`,
|
|
3820
|
-
props.resizable && "is-resizable",
|
|
3821
|
-
props.resizerClass,
|
|
3822
|
-
hover.value && (props.resizerHoverClass || "hover")
|
|
3823
|
-
];
|
|
3824
|
-
return classes;
|
|
3329
|
+
const resizerClasses = computed(() => {
|
|
3330
|
+
const classes = [
|
|
3331
|
+
`fu-split-pane__${props.resizerType}`,
|
|
3332
|
+
`is-${props.direction}`,
|
|
3333
|
+
props.resizable && "is-resizable",
|
|
3334
|
+
props.resizerClass,
|
|
3335
|
+
hover.value && (props.resizerHoverClass || "hover")
|
|
3336
|
+
];
|
|
3337
|
+
return classes;
|
|
3338
|
+
});
|
|
3339
|
+
const padding = computed(() => {
|
|
3340
|
+
return props.resizerType === "resizer" && isHorizontal.value && "3px";
|
|
3341
|
+
});
|
|
3342
|
+
function onMouseDown(e) {
|
|
3343
|
+
initOffset.value = isHorizontal.value ? e.pageX : e.pageY;
|
|
3344
|
+
oldValue.value = usedValue.value;
|
|
3345
|
+
active.value = true;
|
|
3346
|
+
document.addEventListener("mousemove", onMouseMove);
|
|
3347
|
+
document.addEventListener("mouseup", onMouseUp);
|
|
3348
|
+
}
|
|
3349
|
+
function onMouseUp() {
|
|
3350
|
+
active.value = false;
|
|
3351
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
3352
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
3353
|
+
emit("changeSplit", usedValue.value);
|
|
3354
|
+
}
|
|
3355
|
+
function onMouseMove(e) {
|
|
3356
|
+
if (!props.resizable)
|
|
3357
|
+
return;
|
|
3358
|
+
if (active.value) {
|
|
3359
|
+
const currentPage = isHorizontal.value ? e.pageX : e.pageY;
|
|
3360
|
+
const offset = currentPage - initOffset.value;
|
|
3361
|
+
const value = isReverse.value ? oldValue.value - offset : oldValue.value + offset;
|
|
3362
|
+
if (value > percentToValue(props.min) && value < outerWrapperSize.value - percentToValue(props.min)) {
|
|
3363
|
+
usedValue.value = value;
|
|
3364
|
+
writeValue();
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
function percentToValue(val) {
|
|
3369
|
+
const size = instance.refs.outerWrapper[offsetSize.value];
|
|
3370
|
+
if (typeof val === "string" && val.includes("%")) {
|
|
3371
|
+
return parseInt(val) / 100 * size;
|
|
3372
|
+
} else {
|
|
3373
|
+
return parseInt(val);
|
|
3374
|
+
}
|
|
3375
|
+
}
|
|
3376
|
+
function getMin(val) {
|
|
3377
|
+
return val < percentToValue(props.min) ? percentToValue(props.min) : val;
|
|
3378
|
+
}
|
|
3379
|
+
function writeValue() {
|
|
3380
|
+
const obj = {
|
|
3381
|
+
[resizerAttr.value]: usedValue.value
|
|
3382
|
+
};
|
|
3383
|
+
if (props.localKey) {
|
|
3384
|
+
localStorage.setItem(saveKey.value, JSON.stringify(obj));
|
|
3385
|
+
}
|
|
3386
|
+
}
|
|
3387
|
+
function readValue() {
|
|
3388
|
+
if (props.localKey) {
|
|
3389
|
+
const local = localStorage.getItem(saveKey.value);
|
|
3390
|
+
if (local && local[resizerAttr.value]) {
|
|
3391
|
+
usedValue.value = parseInt(local) || defaultValue.value;
|
|
3392
|
+
} else {
|
|
3393
|
+
usedValue.value = defaultValue.value;
|
|
3394
|
+
}
|
|
3395
|
+
} else {
|
|
3396
|
+
usedValue.value = defaultValue.value;
|
|
3397
|
+
}
|
|
3398
|
+
}
|
|
3399
|
+
onMounted(() => {
|
|
3400
|
+
readValue();
|
|
3401
|
+
});
|
|
3402
|
+
return (_ctx, _cache) => {
|
|
3403
|
+
const _component_MoreFilled = resolveComponent("MoreFilled");
|
|
3404
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
3405
|
+
return openBlock(), createElementBlock("div", {
|
|
3406
|
+
style: normalizeStyle({ cursor: unref(cursor), userSelect: unref(userSelect) }),
|
|
3407
|
+
class: "fu-split-pane",
|
|
3408
|
+
ref: "outerWrapper"
|
|
3409
|
+
}, [
|
|
3410
|
+
createElementVNode("div", {
|
|
3411
|
+
class: normalizeClass([`is-${__props.direction}`, "fu-split-pane__left"]),
|
|
3412
|
+
style: normalizeStyle({ [unref(attr)]: unref(isReverse) ? unref(valueAnother) : `${usedValue.value}px`, "padding-right": unref(padding) })
|
|
3413
|
+
}, [
|
|
3414
|
+
renderSlot(_ctx.$slots, unref(isHorizontal) ? "left" : "top")
|
|
3415
|
+
], 6),
|
|
3416
|
+
createElementVNode("div", {
|
|
3417
|
+
class: normalizeClass(unref(resizerClasses)),
|
|
3418
|
+
style: normalizeStyle(__spreadValues({ [unref(resizerAttr)]: `${usedValue.value}px` }, __props.resizerStyle)),
|
|
3419
|
+
onMousedown: onMouseDown,
|
|
3420
|
+
onMouseover: _cache[0] || (_cache[0] = ($event) => hover.value = true),
|
|
3421
|
+
onMouseleave: _cache[1] || (_cache[1] = ($event) => hover.value = false)
|
|
3422
|
+
}, [
|
|
3423
|
+
__props.resizerType === "resizer" ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
3424
|
+
renderSlot(_ctx.$slots, "resizer", {}, () => [
|
|
3425
|
+
createVNode(_component_el_icon, { size: 10 }, {
|
|
3426
|
+
default: withCtx(() => [
|
|
3427
|
+
createVNode(_component_MoreFilled)
|
|
3428
|
+
]),
|
|
3429
|
+
_: 1
|
|
3430
|
+
})
|
|
3431
|
+
])
|
|
3432
|
+
])) : createCommentVNode("v-if", true)
|
|
3433
|
+
], 38),
|
|
3434
|
+
createElementVNode("div", {
|
|
3435
|
+
class: normalizeClass([`is-${__props.direction}`, "fu-split-pane__right"]),
|
|
3436
|
+
style: normalizeStyle({ [unref(attr)]: unref(isReverse) ? `${usedValue.value}px` : unref(valueAnother), "padding-left": unref(padding) })
|
|
3437
|
+
}, [
|
|
3438
|
+
renderSlot(_ctx.$slots, unref(isHorizontal) ? "right" : "bottom")
|
|
3439
|
+
], 6)
|
|
3440
|
+
], 4);
|
|
3441
|
+
};
|
|
3442
|
+
}
|
|
3443
|
+
}));
|
|
3444
|
+
var FuSplitPane = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/split-pane/FuSplitPane.vue"]]);
|
|
3445
|
+
FuSplitPane.install = (app) => {
|
|
3446
|
+
app.component(FuSplitPane.name, FuSplitPane);
|
|
3447
|
+
};
|
|
3448
|
+
var __glob_2_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3449
|
+
__proto__: null,
|
|
3450
|
+
"default": FuSplitPane
|
|
3451
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
3452
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
3453
|
+
__name: "FuHorizontalNavigation",
|
|
3454
|
+
props: {
|
|
3455
|
+
stepper: Object,
|
|
3456
|
+
steps: Array,
|
|
3457
|
+
disable: Function
|
|
3458
|
+
},
|
|
3459
|
+
emits: ["active"],
|
|
3460
|
+
setup(__props, { emit }) {
|
|
3461
|
+
const props = __props;
|
|
3462
|
+
const active = computed(() => {
|
|
3463
|
+
return props.stepper.index;
|
|
3464
|
+
});
|
|
3465
|
+
function click(index) {
|
|
3466
|
+
!props.disable(index) && emit("active", index);
|
|
3467
|
+
}
|
|
3468
|
+
return (_ctx, _cache) => {
|
|
3469
|
+
const _component_el_step = resolveComponent("el-step");
|
|
3470
|
+
const _component_el_steps = resolveComponent("el-steps");
|
|
3471
|
+
return openBlock(), createBlock(_component_el_steps, mergeProps({ active: unref(active) }, __props.stepper), {
|
|
3472
|
+
default: withCtx(() => [
|
|
3473
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.steps, (step, index) => {
|
|
3474
|
+
return openBlock(), createBlock(_component_el_step, mergeProps({ key: index }, step, {
|
|
3475
|
+
onClick: ($event) => click(index),
|
|
3476
|
+
class: __props.disable(index) && "fu-step--disable"
|
|
3477
|
+
}), null, 16, ["onClick", "class"]);
|
|
3478
|
+
}), 128))
|
|
3479
|
+
]),
|
|
3480
|
+
_: 1
|
|
3481
|
+
}, 16, ["active"]);
|
|
3482
|
+
};
|
|
3483
|
+
}
|
|
3484
|
+
});
|
|
3485
|
+
var FuHorizontalNavigation = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/steps/FuHorizontalNavigation.vue"]]);
|
|
3486
|
+
const _sfc_main$f = {};
|
|
3487
|
+
function _sfc_render(_ctx, _cache) {
|
|
3488
|
+
const _component_el_button = resolveComponent("el-button");
|
|
3489
|
+
return openBlock(), createBlock(_component_el_button, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
|
3490
|
+
default: withCtx(() => [
|
|
3491
|
+
renderSlot(_ctx.$slots, "default")
|
|
3492
|
+
]),
|
|
3493
|
+
_: 3
|
|
3494
|
+
}, 16);
|
|
3495
|
+
}
|
|
3496
|
+
var FuStepButton = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render], ["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/steps/FuStepButton.vue"]]);
|
|
3497
|
+
var FuStepsFooter = defineComponent({
|
|
3498
|
+
name: "FuStepsFooter",
|
|
3499
|
+
components: {
|
|
3500
|
+
FuStepButton
|
|
3501
|
+
},
|
|
3502
|
+
emits: ["stepperFn"],
|
|
3503
|
+
setup(props, { emit }) {
|
|
3504
|
+
const stepper = inject("stepper");
|
|
3505
|
+
const disabledButton = ref(false);
|
|
3506
|
+
const isFirst = computed(() => {
|
|
3507
|
+
return stepper.isFirst(stepper.index);
|
|
3508
|
+
});
|
|
3509
|
+
const isLast = computed(() => {
|
|
3510
|
+
return stepper.isLast(stepper.index);
|
|
3511
|
+
});
|
|
3512
|
+
const showCancel = computed(() => {
|
|
3513
|
+
return stepper.showCancel !== false;
|
|
3514
|
+
});
|
|
3515
|
+
const disabled = computed(() => {
|
|
3516
|
+
return (stepper == null ? void 0 : stepper.isLoading) || disabledButton.value;
|
|
3517
|
+
});
|
|
3518
|
+
function clickHandle(fnName) {
|
|
3519
|
+
stepper[fnName] ? stepper[fnName]() : emit("stepperFn", fnName);
|
|
3520
|
+
disabledButton.value = true;
|
|
3521
|
+
setTimeout(() => {
|
|
3522
|
+
disabledButton.value = false;
|
|
3523
|
+
}, 500);
|
|
3524
|
+
}
|
|
3525
|
+
const button = (value) => {
|
|
3526
|
+
return h(FuStepButton, {
|
|
3527
|
+
disabled: disabled.value,
|
|
3528
|
+
size: stepper.buttonSize,
|
|
3529
|
+
onClick: () => clickHandle(value)
|
|
3530
|
+
}, () => stepper[`${value}ButtonText`]);
|
|
3531
|
+
};
|
|
3532
|
+
return () => h("div", {
|
|
3533
|
+
class: `fu-steps__footer--${stepper.footerAlign}`
|
|
3534
|
+
}, [
|
|
3535
|
+
h("div", {
|
|
3536
|
+
class: "fu-steps__footer--block",
|
|
3537
|
+
style: "margin-right:10px"
|
|
3538
|
+
}, [showCancel.value && button("onCancel")]),
|
|
3539
|
+
h("div", {
|
|
3540
|
+
class: "fu-steps__footer--block"
|
|
3541
|
+
}, [
|
|
3542
|
+
!isFirst.value && button("prev"),
|
|
3543
|
+
isLast.value ? button("onFinish") : button("next")
|
|
3544
|
+
])
|
|
3545
|
+
]);
|
|
3546
|
+
}
|
|
3547
|
+
});
|
|
3548
|
+
const { t } = useLocale();
|
|
3549
|
+
class Stepper {
|
|
3550
|
+
constructor(options) {
|
|
3551
|
+
__publicField(this, "steps");
|
|
3552
|
+
__publicField(this, "index");
|
|
3553
|
+
__publicField(this, "activeSet");
|
|
3554
|
+
__publicField(this, "isLoading");
|
|
3555
|
+
__publicField(this, "onCancelButtonText");
|
|
3556
|
+
__publicField(this, "onFinishButtonText");
|
|
3557
|
+
__publicField(this, "prevButtonText");
|
|
3558
|
+
__publicField(this, "nextButtonText");
|
|
3559
|
+
__publicField(this, "buttonSize");
|
|
3560
|
+
__publicField(this, "footerAlign");
|
|
3561
|
+
__publicField(this, "showCancel");
|
|
3562
|
+
__publicField(this, "beforeActive");
|
|
3563
|
+
__publicField(this, "beforeLeave");
|
|
3564
|
+
__publicField(this, "height");
|
|
3565
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
3566
|
+
options != null ? options : options = {};
|
|
3567
|
+
this.steps = options.steps;
|
|
3568
|
+
this.index = (_a2 = options.index) != null ? _a2 : 0;
|
|
3569
|
+
this.activeSet = /* @__PURE__ */ new Set();
|
|
3570
|
+
this.isLoading = (_b = options.isLoading) != null ? _b : false;
|
|
3571
|
+
this.onCancelButtonText = (_c = options.onCancelButtonText) != null ? _c : t("fu.steps.cancel");
|
|
3572
|
+
this.onFinishButtonText = (_d = options.onFinishButtonText) != null ? _d : t("fu.steps.finish");
|
|
3573
|
+
this.prevButtonText = (_e = options.prevButtonText) != null ? _e : t("fu.steps.prev");
|
|
3574
|
+
this.nextButtonText = (_f = options.nextButtonText) != null ? _f : t("fu.steps.next");
|
|
3575
|
+
this.buttonSize = (_g = options.buttonSize) != null ? _g : "default";
|
|
3576
|
+
this.footerAlign = (_h = options.footerAlign) != null ? _h : "flex";
|
|
3577
|
+
this.showCancel = (_i = options.showCancel) != null ? _i : false;
|
|
3578
|
+
this.beforeActive = options.beforeActive;
|
|
3579
|
+
this.beforeLeave = options.beforeLeave;
|
|
3580
|
+
this.height = options.height;
|
|
3581
|
+
}
|
|
3582
|
+
isFirst(index) {
|
|
3583
|
+
return index === 0;
|
|
3584
|
+
}
|
|
3585
|
+
isLast(index) {
|
|
3586
|
+
return index === this.steps.length - 1;
|
|
3587
|
+
}
|
|
3588
|
+
isActive(index) {
|
|
3589
|
+
return this.activeSet.has(index);
|
|
3590
|
+
}
|
|
3591
|
+
isCurrent(index) {
|
|
3592
|
+
return this.index === index;
|
|
3593
|
+
}
|
|
3594
|
+
async active(index) {
|
|
3595
|
+
const isValid = index >= 0 && index < this.steps.length && this.index !== index;
|
|
3596
|
+
const forward = index > this.index;
|
|
3597
|
+
if (isValid) {
|
|
3598
|
+
if (await this.executeBeforeLeave(this.index, forward) !== false) {
|
|
3599
|
+
if (await this.executeBeforeActive(index, forward) !== false) {
|
|
3600
|
+
this.index = index;
|
|
3601
|
+
this.activeSet.add(index);
|
|
3602
|
+
}
|
|
3603
|
+
}
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3606
|
+
next() {
|
|
3607
|
+
if (!this.isLast(this.index)) {
|
|
3608
|
+
this.active(this.index + 1);
|
|
3609
|
+
}
|
|
3610
|
+
}
|
|
3611
|
+
prev() {
|
|
3612
|
+
if (!this.isFirst(this.index)) {
|
|
3613
|
+
this.active(this.index - 1);
|
|
3614
|
+
}
|
|
3615
|
+
}
|
|
3616
|
+
getStep(index) {
|
|
3617
|
+
if (this.steps && this.steps.length > index) {
|
|
3618
|
+
return this.steps[index];
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
executeBeforeLeave(index, forward) {
|
|
3622
|
+
const step = this.getStep(index);
|
|
3623
|
+
if (step.beforeLeave) {
|
|
3624
|
+
return step.beforeLeave(step, forward);
|
|
3625
|
+
}
|
|
3626
|
+
if (this.beforeLeave) {
|
|
3627
|
+
return this.beforeLeave(step, forward);
|
|
3628
|
+
}
|
|
3629
|
+
}
|
|
3630
|
+
executeBeforeActive(index, forward) {
|
|
3631
|
+
const step = this.getStep(index);
|
|
3632
|
+
if (step.beforeActive) {
|
|
3633
|
+
return step.beforeActive(step, forward);
|
|
3634
|
+
}
|
|
3635
|
+
if (this.beforeActive) {
|
|
3636
|
+
return this.beforeActive(step, forward);
|
|
3637
|
+
}
|
|
3638
|
+
}
|
|
3639
|
+
}
|
|
3640
|
+
class Step {
|
|
3641
|
+
constructor(options) {
|
|
3642
|
+
__publicField(this, "id");
|
|
3643
|
+
__publicField(this, "index");
|
|
3644
|
+
__publicField(this, "beforeActive");
|
|
3645
|
+
__publicField(this, "beforeLeave");
|
|
3646
|
+
__publicField(this, "title");
|
|
3647
|
+
__publicField(this, "description");
|
|
3648
|
+
__publicField(this, "icon");
|
|
3649
|
+
__publicField(this, "status");
|
|
3650
|
+
options != null ? options : options = {};
|
|
3651
|
+
this.id = options.id;
|
|
3652
|
+
this.index = options.index;
|
|
3653
|
+
this.beforeActive = options.beforeActive;
|
|
3654
|
+
this.beforeLeave = options.beforeLeave;
|
|
3655
|
+
this.title = options.title;
|
|
3656
|
+
this.description = options.description;
|
|
3657
|
+
this.icon = options.icon;
|
|
3658
|
+
this.status = options.status;
|
|
3659
|
+
}
|
|
3660
|
+
}
|
|
3661
|
+
const _sfc_main$e = defineComponent({
|
|
3662
|
+
name: "FuHorizontalSteps",
|
|
3663
|
+
components: {
|
|
3664
|
+
FuHorizontalNavigation,
|
|
3665
|
+
FuStepsFooter
|
|
3666
|
+
},
|
|
3667
|
+
emits: ["change"],
|
|
3668
|
+
setup(_, { attrs, slots, emit, expose }) {
|
|
3669
|
+
var _a2;
|
|
3670
|
+
const stepper = ref(new Stepper());
|
|
3671
|
+
(_a2 = stepper.value) == null ? void 0 : _a2.activeSet.add(0);
|
|
3672
|
+
watch(() => stepper.value.index, (value) => {
|
|
3673
|
+
emit("change", stepper.value.steps[value]);
|
|
3674
|
+
});
|
|
3675
|
+
const heightStyle = computed(() => {
|
|
3676
|
+
var _a3;
|
|
3677
|
+
return { height: parseInt((_a3 = stepper.value) == null ? void 0 : _a3.height) + "px" || "auto" };
|
|
3678
|
+
});
|
|
3679
|
+
function active(index) {
|
|
3680
|
+
var _a3;
|
|
3681
|
+
(_a3 = stepper.value) == null ? void 0 : _a3.active(index);
|
|
3682
|
+
}
|
|
3683
|
+
function disable(index) {
|
|
3684
|
+
var _a3;
|
|
3685
|
+
return !((_a3 = stepper.value) == null ? void 0 : _a3.isActive(index));
|
|
3686
|
+
}
|
|
3687
|
+
function next() {
|
|
3688
|
+
stepper.value.next();
|
|
3689
|
+
}
|
|
3690
|
+
function prev() {
|
|
3691
|
+
stepper.value.prev();
|
|
3692
|
+
}
|
|
3693
|
+
function $func(name2) {
|
|
3694
|
+
emit(name2);
|
|
3695
|
+
}
|
|
3696
|
+
provide("stepper", stepper.value);
|
|
3697
|
+
expose({
|
|
3698
|
+
next,
|
|
3699
|
+
prev,
|
|
3700
|
+
active
|
|
3701
|
+
});
|
|
3702
|
+
return () => {
|
|
3703
|
+
var _a3, _b, _c;
|
|
3704
|
+
let steps = [];
|
|
3705
|
+
if ((_a3 = slots.default) == null ? void 0 : _a3.call(slots)) {
|
|
3706
|
+
(_b = slots.default) == null ? void 0 : _b.call(slots).forEach((node, index) => {
|
|
3707
|
+
const options = __spreadValues({
|
|
3708
|
+
index
|
|
3709
|
+
}, node.props);
|
|
3710
|
+
const step = new Step(options);
|
|
3711
|
+
steps.push(step);
|
|
3712
|
+
});
|
|
3713
|
+
}
|
|
3714
|
+
stepper.value.steps = steps;
|
|
3715
|
+
stepper.value = Object.assign(stepper.value, attrs);
|
|
3716
|
+
return h("div", {
|
|
3717
|
+
class: ["fu-steps", "fu-steps--horizontal"]
|
|
3718
|
+
}, [
|
|
3719
|
+
h(FuHorizontalNavigation, {
|
|
3720
|
+
stepper: stepper.value,
|
|
3721
|
+
steps,
|
|
3722
|
+
disable,
|
|
3723
|
+
onActive: active
|
|
3724
|
+
}),
|
|
3725
|
+
h("div", { class: "fu-steps__wrapper" }, h("div", { class: "fu-steps__container", style: heightStyle.value }, h(Transition, { name: "carousel", mode: "out-in", tag: "p" }, () => {
|
|
3726
|
+
var _a4;
|
|
3727
|
+
return (_a4 = slots.default) == null ? void 0 : _a4.call(slots).map((item, index) => {
|
|
3728
|
+
item["key"] = index;
|
|
3729
|
+
return stepper.value.index === index && item;
|
|
3730
|
+
});
|
|
3731
|
+
}))),
|
|
3732
|
+
h("div", { class: "fu-steps__footer" }, ((_c = slots.footer) == null ? void 0 : _c.call(slots)) || h(FuStepsFooter, { onStepperFn: $func }))
|
|
3733
|
+
]);
|
|
3734
|
+
};
|
|
3735
|
+
}
|
|
3736
|
+
});
|
|
3737
|
+
var FuHorizontalSteps = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/steps/FuHorizontalSteps.vue"]]);
|
|
3738
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
3739
|
+
__name: "FuVerticalNavigation",
|
|
3740
|
+
props: {
|
|
3741
|
+
stepper: Object,
|
|
3742
|
+
steps: Array,
|
|
3743
|
+
disable: Function
|
|
3744
|
+
},
|
|
3745
|
+
emits: ["active"],
|
|
3746
|
+
setup(__props, { emit }) {
|
|
3747
|
+
const props = __props;
|
|
3748
|
+
const active = computed(() => {
|
|
3749
|
+
return props.stepper.index;
|
|
3750
|
+
});
|
|
3751
|
+
const heightStyle = computed(() => {
|
|
3752
|
+
var _a2;
|
|
3753
|
+
return {
|
|
3754
|
+
height: parseInt((_a2 = props.stepper) == null ? void 0 : _a2.height) + "px" || "auto"
|
|
3755
|
+
};
|
|
3825
3756
|
});
|
|
3826
|
-
|
|
3827
|
-
|
|
3757
|
+
function click(index) {
|
|
3758
|
+
!props.disable(index) && emit("active", index);
|
|
3759
|
+
}
|
|
3760
|
+
return (_ctx, _cache) => {
|
|
3761
|
+
const _component_el_collapse_transition = resolveComponent("el-collapse-transition");
|
|
3762
|
+
const _component_el_step = resolveComponent("el-step");
|
|
3763
|
+
const _component_el_steps = resolveComponent("el-steps");
|
|
3764
|
+
return openBlock(), createBlock(_component_el_steps, mergeProps({ active: unref(active) }, __props.stepper, { direction: "vertical" }), {
|
|
3765
|
+
default: withCtx(() => [
|
|
3766
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.steps, (step, i) => {
|
|
3767
|
+
return openBlock(), createBlock(_component_el_step, mergeProps({ key: i }, step, {
|
|
3768
|
+
onClick: ($event) => click(i),
|
|
3769
|
+
class: __props.disable(i) && "fu-step--disable"
|
|
3770
|
+
}), {
|
|
3771
|
+
description: withCtx(() => [
|
|
3772
|
+
createElementVNode("span", null, toDisplayString(step.description), 1),
|
|
3773
|
+
createVNode(_component_el_collapse_transition, null, {
|
|
3774
|
+
default: withCtx(() => [
|
|
3775
|
+
i === unref(active) ? (openBlock(), createElementBlock("div", {
|
|
3776
|
+
key: 0,
|
|
3777
|
+
class: "fu-steps__container",
|
|
3778
|
+
style: normalizeStyle(unref(heightStyle))
|
|
3779
|
+
}, [
|
|
3780
|
+
renderSlot(_ctx.$slots, "default", { step })
|
|
3781
|
+
], 4)) : createCommentVNode("v-if", true)
|
|
3782
|
+
]),
|
|
3783
|
+
_: 2
|
|
3784
|
+
}, 1024)
|
|
3785
|
+
]),
|
|
3786
|
+
_: 2
|
|
3787
|
+
}, 1040, ["onClick", "class"]);
|
|
3788
|
+
}), 128))
|
|
3789
|
+
]),
|
|
3790
|
+
_: 3
|
|
3791
|
+
}, 16, ["active"]);
|
|
3792
|
+
};
|
|
3793
|
+
}
|
|
3794
|
+
});
|
|
3795
|
+
var FuVerticalNavigation = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/steps/FuVerticalNavigation.vue"]]);
|
|
3796
|
+
const _sfc_main$c = defineComponent({
|
|
3797
|
+
name: "FuVerticalSteps",
|
|
3798
|
+
components: { FuVerticalNavigation, FuStepsFooter },
|
|
3799
|
+
emits: ["change"],
|
|
3800
|
+
setup(_, { attrs, slots, emit, expose }) {
|
|
3801
|
+
const stepper = ref(new Stepper());
|
|
3802
|
+
stepper.value.activeSet.add(0);
|
|
3803
|
+
watch(() => stepper.value.index, (value) => {
|
|
3804
|
+
emit("change", stepper.value.steps[value]);
|
|
3828
3805
|
});
|
|
3829
|
-
function
|
|
3830
|
-
|
|
3831
|
-
oldValue.value = usedValue.value;
|
|
3832
|
-
active.value = true;
|
|
3833
|
-
document.addEventListener("mousemove", onMouseMove);
|
|
3834
|
-
document.addEventListener("mouseup", onMouseUp);
|
|
3806
|
+
function active(index) {
|
|
3807
|
+
stepper.value.active(index);
|
|
3835
3808
|
}
|
|
3836
|
-
function
|
|
3837
|
-
|
|
3838
|
-
document.removeEventListener("mousemove", onMouseMove);
|
|
3839
|
-
document.removeEventListener("mouseup", onMouseUp);
|
|
3840
|
-
emit("changeSplit", usedValue.value);
|
|
3809
|
+
function disable(index) {
|
|
3810
|
+
return !stepper.value.isActive(index);
|
|
3841
3811
|
}
|
|
3842
|
-
function
|
|
3843
|
-
|
|
3844
|
-
return;
|
|
3845
|
-
if (active.value) {
|
|
3846
|
-
const currentPage = isHorizontal.value ? e.pageX : e.pageY;
|
|
3847
|
-
const offset = currentPage - initOffset.value;
|
|
3848
|
-
const value = isReverse.value ? oldValue.value - offset : oldValue.value + offset;
|
|
3849
|
-
if (value > percentToValue(props.min) && value < outerWrapperSize.value - percentToValue(props.min)) {
|
|
3850
|
-
usedValue.value = value;
|
|
3851
|
-
writeValue();
|
|
3852
|
-
}
|
|
3853
|
-
}
|
|
3812
|
+
function next() {
|
|
3813
|
+
stepper.value.next();
|
|
3854
3814
|
}
|
|
3855
|
-
function
|
|
3856
|
-
|
|
3857
|
-
if (typeof val === "string" && val.includes("%")) {
|
|
3858
|
-
return parseInt(val) / 100 * size;
|
|
3859
|
-
} else {
|
|
3860
|
-
return parseInt(val);
|
|
3861
|
-
}
|
|
3815
|
+
function prev() {
|
|
3816
|
+
stepper.value.prev();
|
|
3862
3817
|
}
|
|
3863
|
-
function
|
|
3864
|
-
|
|
3818
|
+
function $func(name2) {
|
|
3819
|
+
emit(name2);
|
|
3865
3820
|
}
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3821
|
+
provide("stepper", stepper.value);
|
|
3822
|
+
expose({
|
|
3823
|
+
next,
|
|
3824
|
+
prev,
|
|
3825
|
+
active
|
|
3826
|
+
});
|
|
3827
|
+
return () => {
|
|
3828
|
+
var _a2, _b;
|
|
3829
|
+
let currentNode;
|
|
3830
|
+
let steps = [];
|
|
3831
|
+
if ((_a2 = slots.default) == null ? void 0 : _a2.call(slots)) {
|
|
3832
|
+
(_b = slots.default) == null ? void 0 : _b.call(slots).forEach((node, index) => {
|
|
3833
|
+
const options = __spreadValues({
|
|
3834
|
+
index
|
|
3835
|
+
}, node.props);
|
|
3836
|
+
const step = new Step(options);
|
|
3837
|
+
steps.push(step);
|
|
3838
|
+
if (stepper.value.isCurrent(index)) {
|
|
3839
|
+
currentNode = node;
|
|
3840
|
+
}
|
|
3841
|
+
});
|
|
3872
3842
|
}
|
|
3843
|
+
stepper.value.steps = steps;
|
|
3844
|
+
stepper.value = Object.assign(stepper.value, attrs);
|
|
3845
|
+
return h("div", {
|
|
3846
|
+
class: ["fu-steps", "fu-steps--vertical"]
|
|
3847
|
+
}, [
|
|
3848
|
+
h(FuVerticalNavigation, {
|
|
3849
|
+
stepper: stepper.value,
|
|
3850
|
+
steps,
|
|
3851
|
+
disable,
|
|
3852
|
+
onActive: active
|
|
3853
|
+
}, () => currentNode),
|
|
3854
|
+
h("div", { class: "fu-steps__footer" }, h(FuStepsFooter, { onStepperFn: $func }))
|
|
3855
|
+
]);
|
|
3856
|
+
};
|
|
3857
|
+
}
|
|
3858
|
+
});
|
|
3859
|
+
var FuVerticalSteps = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/steps/FuVerticalSteps.vue"]]);
|
|
3860
|
+
const _sfc_main$b = defineComponent({
|
|
3861
|
+
name: "FuSteps",
|
|
3862
|
+
components: {
|
|
3863
|
+
FuHorizontalSteps,
|
|
3864
|
+
FuVerticalSteps
|
|
3865
|
+
},
|
|
3866
|
+
emits: ["change"],
|
|
3867
|
+
props: ["direction"],
|
|
3868
|
+
setup(props, { attrs, slots, emit, expose }) {
|
|
3869
|
+
const { direction } = props;
|
|
3870
|
+
const FuSteps2 = ref();
|
|
3871
|
+
function next() {
|
|
3872
|
+
var _a2;
|
|
3873
|
+
(_a2 = FuSteps2.value) == null ? void 0 : _a2.next();
|
|
3873
3874
|
}
|
|
3874
|
-
function
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
if (local && local[resizerAttr.value]) {
|
|
3878
|
-
usedValue.value = parseInt(local) || defaultValue.value;
|
|
3879
|
-
} else {
|
|
3880
|
-
usedValue.value = defaultValue.value;
|
|
3881
|
-
}
|
|
3882
|
-
} else {
|
|
3883
|
-
usedValue.value = defaultValue.value;
|
|
3884
|
-
}
|
|
3875
|
+
function prev() {
|
|
3876
|
+
var _a2;
|
|
3877
|
+
(_a2 = FuSteps2.value) == null ? void 0 : _a2.prev();
|
|
3885
3878
|
}
|
|
3886
|
-
|
|
3887
|
-
|
|
3879
|
+
function active(index) {
|
|
3880
|
+
var _a2;
|
|
3881
|
+
(_a2 = FuSteps2.value) == null ? void 0 : _a2.active(index);
|
|
3882
|
+
}
|
|
3883
|
+
function handleChange({ id, title, index }) {
|
|
3884
|
+
emit("change", { id, title, index });
|
|
3885
|
+
}
|
|
3886
|
+
expose({
|
|
3887
|
+
next,
|
|
3888
|
+
prev,
|
|
3889
|
+
active
|
|
3888
3890
|
});
|
|
3891
|
+
if (direction === "vertical") {
|
|
3892
|
+
return () => h(FuVerticalSteps, __spreadValues({ ref: FuSteps2, onChange: handleChange }, attrs), slots);
|
|
3893
|
+
} else {
|
|
3894
|
+
return () => h(FuHorizontalSteps, __spreadValues({ ref: FuSteps2, onChange: handleChange }, attrs), slots);
|
|
3895
|
+
}
|
|
3896
|
+
}
|
|
3897
|
+
});
|
|
3898
|
+
var FuSteps = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/steps/FuSteps.vue"]]);
|
|
3899
|
+
const _hoisted_1$3 = { class: "fu-step" };
|
|
3900
|
+
const __default__$7 = { name: "FuStep" };
|
|
3901
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$7), {
|
|
3902
|
+
setup(__props) {
|
|
3903
|
+
const stepper = inject("stepper");
|
|
3904
|
+
const loading = computed(() => stepper.isLoading || false);
|
|
3889
3905
|
return (_ctx, _cache) => {
|
|
3890
|
-
const
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
}, [
|
|
3897
|
-
createElementVNode("div", {
|
|
3898
|
-
class: normalizeClass([`is-${__props.direction}`, "fu-split-pane__left"]),
|
|
3899
|
-
style: normalizeStyle({ [unref(attr)]: unref(isReverse) ? unref(valueAnother) : `${usedValue.value}px`, "padding-right": unref(padding) })
|
|
3900
|
-
}, [
|
|
3901
|
-
renderSlot(_ctx.$slots, unref(isHorizontal) ? "left" : "top")
|
|
3902
|
-
], 6),
|
|
3903
|
-
createElementVNode("div", {
|
|
3904
|
-
class: normalizeClass(unref(resizerClasses)),
|
|
3905
|
-
style: normalizeStyle(__spreadValues({ [unref(resizerAttr)]: `${usedValue.value}px` }, __props.resizerStyle)),
|
|
3906
|
-
onMousedown: onMouseDown,
|
|
3907
|
-
onMouseover: _cache[0] || (_cache[0] = ($event) => hover.value = true),
|
|
3908
|
-
onMouseleave: _cache[1] || (_cache[1] = ($event) => hover.value = false)
|
|
3909
|
-
}, [
|
|
3910
|
-
__props.resizerType === "resizer" ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
3911
|
-
renderSlot(_ctx.$slots, "resizer", {}, () => [
|
|
3912
|
-
createVNode(_component_el_icon, { size: 10 }, {
|
|
3913
|
-
default: withCtx(() => [
|
|
3914
|
-
createVNode(_component_MoreFilled)
|
|
3915
|
-
]),
|
|
3916
|
-
_: 1
|
|
3917
|
-
})
|
|
3918
|
-
])
|
|
3919
|
-
])) : createCommentVNode("v-if", true)
|
|
3920
|
-
], 38),
|
|
3921
|
-
createElementVNode("div", {
|
|
3922
|
-
class: normalizeClass([`is-${__props.direction}`, "fu-split-pane__right"]),
|
|
3923
|
-
style: normalizeStyle({ [unref(attr)]: unref(isReverse) ? `${usedValue.value}px` : unref(valueAnother), "padding-left": unref(padding) })
|
|
3924
|
-
}, [
|
|
3925
|
-
renderSlot(_ctx.$slots, unref(isHorizontal) ? "right" : "bottom")
|
|
3926
|
-
], 6)
|
|
3927
|
-
], 4);
|
|
3906
|
+
const _directive_loading = resolveDirective("loading");
|
|
3907
|
+
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
3908
|
+
renderSlot(_ctx.$slots, "default")
|
|
3909
|
+
])), [
|
|
3910
|
+
[_directive_loading, unref(loading)]
|
|
3911
|
+
]);
|
|
3928
3912
|
};
|
|
3929
3913
|
}
|
|
3930
3914
|
}));
|
|
3931
|
-
var
|
|
3932
|
-
|
|
3933
|
-
app.component(
|
|
3915
|
+
var FuStep = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/steps/FuStep.vue"]]);
|
|
3916
|
+
FuSteps.install = (app) => {
|
|
3917
|
+
app.component(FuStep.name, FuStep);
|
|
3918
|
+
app.component(FuSteps.name, FuSteps);
|
|
3934
3919
|
};
|
|
3935
3920
|
var __glob_2_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3936
3921
|
__proto__: null,
|
|
3937
|
-
"default":
|
|
3922
|
+
"default": FuSteps
|
|
3938
3923
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3939
3924
|
function isFragment(node) {
|
|
3940
3925
|
return isVNode(node) && node.type === Fragment;
|
|
@@ -4344,7 +4329,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
4344
4329
|
const { t: t2 } = useLocale();
|
|
4345
4330
|
const cloneColumn = (source, target) => {
|
|
4346
4331
|
source.forEach((col) => {
|
|
4347
|
-
target.push(
|
|
4332
|
+
target.push(__spreadValues({}, col));
|
|
4348
4333
|
});
|
|
4349
4334
|
return target;
|
|
4350
4335
|
};
|
|
@@ -4923,7 +4908,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
4923
4908
|
setup(__props, { emit }) {
|
|
4924
4909
|
const props = __props;
|
|
4925
4910
|
function handleCommand(e) {
|
|
4926
|
-
const name2 =
|
|
4911
|
+
const name2 = crypto.randomUUID();
|
|
4927
4912
|
let obj = null;
|
|
4928
4913
|
if (e) {
|
|
4929
4914
|
obj = props.dropdownMenus.find((item) => item.command === e);
|
|
@@ -5047,7 +5032,7 @@ var __glob_2_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
5047
5032
|
"default": FuTabs
|
|
5048
5033
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5049
5034
|
const name = "fit2cloud-ui-plus";
|
|
5050
|
-
const version = "1.1.
|
|
5035
|
+
const version = "1.1.2";
|
|
5051
5036
|
const main = "./lib/fit2cloud-ui-plus.es.js";
|
|
5052
5037
|
const files = [
|
|
5053
5038
|
"lib",
|
|
@@ -5086,7 +5071,7 @@ const devDependencies = {
|
|
|
5086
5071
|
"sass-loader": "^12.6.0",
|
|
5087
5072
|
typescript: "^4.5.4",
|
|
5088
5073
|
"unplugin-vue-define-options": "^0.6.1",
|
|
5089
|
-
vite: "^2.9.
|
|
5074
|
+
vite: "^2.9.16",
|
|
5090
5075
|
"vue-tsc": "^0.34.7"
|
|
5091
5076
|
};
|
|
5092
5077
|
var PackageJSON = {
|
|
@@ -5103,7 +5088,7 @@ var PackageJSON = {
|
|
|
5103
5088
|
dependencies,
|
|
5104
5089
|
devDependencies
|
|
5105
5090
|
};
|
|
5106
|
-
const components = { "./components/
|
|
5091
|
+
const components = { "./components/filter-bar/index.ts": __glob_2_0, "./components/icon-button/index.ts": __glob_2_1, "./components/read-write-switch/index.ts": __glob_2_2, "./components/search-bar/index.ts": __glob_2_3, "./components/speed-dial/index.ts": __glob_2_4, "./components/split-pane/index.ts": __glob_2_5, "./components/steps/index.ts": __glob_2_6, "./components/table/index.ts": __glob_2_7, "./components/tabs/index.ts": __glob_2_8 };
|
|
5107
5092
|
const install = (app, config) => {
|
|
5108
5093
|
Object.keys(components).forEach((key) => {
|
|
5109
5094
|
let component = components[key].default;
|