fit2cloud-ui-plus 1.1.0 → 1.1.1
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 +1314 -1314
- package/lib/fit2cloud-ui-plus.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/{ steps/FuVerticalNavigation.vue → steps/FuVerticalNavigation.vue} +1 -1
- package/src/components/{ steps/types.ts → steps/types.ts} +1 -1
- 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/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}/Stepper.ts +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;
|
|
661
|
-
}
|
|
662
|
-
async active(index) {
|
|
663
|
-
const isValid = index >= 0 && index < this.steps.length && this.index !== index;
|
|
664
|
-
const forward = index > this.index;
|
|
665
|
-
if (isValid) {
|
|
666
|
-
if (await this.executeBeforeLeave(this.index, forward) !== false) {
|
|
667
|
-
if (await this.executeBeforeActive(index, forward) !== false) {
|
|
668
|
-
this.index = index;
|
|
669
|
-
this.activeSet.add(index);
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
next() {
|
|
675
|
-
if (!this.isLast(this.index)) {
|
|
676
|
-
this.active(this.index + 1);
|
|
677
|
-
}
|
|
514
|
+
var _export_sfc = (sfc, props) => {
|
|
515
|
+
const target = sfc.__vccOpts || sfc;
|
|
516
|
+
for (const [key, val] of props) {
|
|
517
|
+
target[key] = val;
|
|
678
518
|
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
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);
|
|
682
540
|
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
if (this.steps && this.steps.length > index) {
|
|
686
|
-
return this.steps[index];
|
|
541
|
+
function blur(e) {
|
|
542
|
+
emit("change", quick.value, e);
|
|
687
543
|
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
if (step.beforeLeave) {
|
|
692
|
-
return step.beforeLeave(step, forward);
|
|
544
|
+
function clear() {
|
|
545
|
+
emit("update:modelValue", quick.value);
|
|
546
|
+
emit("change", quick.value);
|
|
693
547
|
}
|
|
694
|
-
|
|
695
|
-
|
|
548
|
+
function keydown(e) {
|
|
549
|
+
const event = e;
|
|
550
|
+
if (event.key === "Enter") {
|
|
551
|
+
emit("change", quick.value, e);
|
|
552
|
+
}
|
|
696
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
|
+
};
|
|
697
570
|
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
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
|
|
702
579
|
}
|
|
703
|
-
|
|
704
|
-
|
|
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
|
+
});
|
|
705
594
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
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
|
-
]);
|
|
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"]);
|
|
802
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
|
-
|
|
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);
|
|
876
698
|
}
|
|
877
|
-
function
|
|
878
|
-
|
|
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);
|
|
879
706
|
}
|
|
880
|
-
function
|
|
881
|
-
|
|
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);
|
|
882
714
|
}
|
|
883
|
-
function
|
|
884
|
-
|
|
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);
|
|
885
722
|
}
|
|
886
|
-
function
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
(_b = slots.default) == null ? void 0 : _b.call(slots).forEach((node, index) => {
|
|
901
|
-
const options = __spreadValues({
|
|
902
|
-
index
|
|
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
|
-
function left() {
|
|
1171
|
-
var _a2;
|
|
1172
|
-
let el = (_a2 = conditionsRef.value) == null ? void 0 : _a2.$el;
|
|
1173
|
-
leftTimer = setInterval(() => {
|
|
1174
|
-
if (el)
|
|
1175
|
-
el.scrollLeft -= 15;
|
|
1176
|
-
}, 50);
|
|
1177
|
-
}
|
|
1178
|
-
function right() {
|
|
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;
|
|
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
|
+
}
|
|
1191
1092
|
});
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
const condition = r.getCondition();
|
|
1203
|
-
if (condition) {
|
|
1204
|
-
conditions.value.push(condition);
|
|
1205
|
-
}
|
|
1206
|
-
}
|
|
1207
|
-
});
|
|
1093
|
+
});
|
|
1094
|
+
const showMore = computed(() => {
|
|
1095
|
+
var _a2;
|
|
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,7 +1519,7 @@ 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
1525
|
createCommentVNode(' :size="configSize" '),
|
|
@@ -2011,12 +1540,12 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2011
1540
|
};
|
|
2012
1541
|
}
|
|
2013
1542
|
}));
|
|
2014
|
-
var FuFilterDateTime = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2015
|
-
const _hoisted_1$
|
|
1543
|
+
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"]]);
|
|
1544
|
+
const _hoisted_1$g = { class: "fu-filter-component" };
|
|
2016
1545
|
const _hoisted_2$9 = { class: "fu-filter-component__label" };
|
|
2017
1546
|
const _hoisted_3$7 = { class: "fu-filter-component__content" };
|
|
2018
|
-
const __default__$
|
|
2019
|
-
const _sfc_main$
|
|
1547
|
+
const __default__$n = { name: "FuFilterInputText" };
|
|
1548
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$n), {
|
|
2020
1549
|
props: {
|
|
2021
1550
|
size: {
|
|
2022
1551
|
type: String,
|
|
@@ -2052,7 +1581,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2052
1581
|
});
|
|
2053
1582
|
return (_ctx, _cache) => {
|
|
2054
1583
|
const _component_el_input = resolveComponent("el-input");
|
|
2055
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1584
|
+
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
2056
1585
|
createElementVNode("div", _hoisted_2$9, toDisplayString(__props.label), 1),
|
|
2057
1586
|
createElementVNode("div", _hoisted_3$7, [
|
|
2058
1587
|
createVNode(_component_el_input, mergeProps({
|
|
@@ -2065,7 +1594,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2065
1594
|
};
|
|
2066
1595
|
}
|
|
2067
1596
|
}));
|
|
2068
|
-
var FuFilterInputText = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1597
|
+
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
1598
|
FuFilterBar.install = (app) => {
|
|
2070
1599
|
app.component(FuFilterBar.name, FuFilterBar);
|
|
2071
1600
|
app.component(FuFilter.name, FuFilter);
|
|
@@ -2076,7 +1605,7 @@ FuFilterBar.install = (app) => {
|
|
|
2076
1605
|
app.component(FuFilterDateTime.name, FuFilterDateTime);
|
|
2077
1606
|
app.component(FuFilterInputText.name, FuFilterInputText);
|
|
2078
1607
|
};
|
|
2079
|
-
var
|
|
1608
|
+
var __glob_2_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2080
1609
|
__proto__: null,
|
|
2081
1610
|
"default": FuFilterBar
|
|
2082
1611
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -2090,9 +1619,9 @@ const validateType = (value) => {
|
|
|
2090
1619
|
console.error("types is not contains " + value);
|
|
2091
1620
|
return false;
|
|
2092
1621
|
};
|
|
2093
|
-
const _hoisted_1$
|
|
2094
|
-
const __default__$
|
|
2095
|
-
const _sfc_main$
|
|
1622
|
+
const _hoisted_1$f = ["tabindex"];
|
|
1623
|
+
const __default__$m = { name: "FuIconButton" };
|
|
1624
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$m), {
|
|
2096
1625
|
props: {
|
|
2097
1626
|
name: String,
|
|
2098
1627
|
size: {
|
|
@@ -2141,15 +1670,15 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2141
1670
|
_: 1
|
|
2142
1671
|
}, 8, ["color", "size", "class"])
|
|
2143
1672
|
])
|
|
2144
|
-
], 10, _hoisted_1$
|
|
1673
|
+
], 10, _hoisted_1$f);
|
|
2145
1674
|
};
|
|
2146
1675
|
}
|
|
2147
1676
|
}));
|
|
2148
|
-
var FuIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1677
|
+
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
1678
|
FuIconButton.install = (app) => {
|
|
2150
1679
|
app.component(FuIconButton.name, FuIconButton);
|
|
2151
1680
|
};
|
|
2152
|
-
var
|
|
1681
|
+
var __glob_2_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2153
1682
|
__proto__: null,
|
|
2154
1683
|
"default": FuIconButton
|
|
2155
1684
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -2169,7 +1698,7 @@ const uuid = function() {
|
|
|
2169
1698
|
});
|
|
2170
1699
|
};
|
|
2171
1700
|
const TRIGGERS = ["manual", "onClick", "onDblclick"];
|
|
2172
|
-
const _sfc_main$
|
|
1701
|
+
const _sfc_main$x = defineComponent({
|
|
2173
1702
|
name: "FuReadWriteSwitch",
|
|
2174
1703
|
props: {
|
|
2175
1704
|
modelValue: Boolean,
|
|
@@ -2237,9 +1766,9 @@ const _sfc_main$q = defineComponent({
|
|
|
2237
1766
|
};
|
|
2238
1767
|
}
|
|
2239
1768
|
});
|
|
2240
|
-
var FuReadWriteSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2241
|
-
const __default__$
|
|
2242
|
-
const _sfc_main$
|
|
1769
|
+
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"]]);
|
|
1770
|
+
const __default__$l = { name: "FuInputRwSwitch" };
|
|
1771
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$l), {
|
|
2243
1772
|
props: {
|
|
2244
1773
|
modelValue: [String, Number],
|
|
2245
1774
|
writeTrigger: {
|
|
@@ -2290,9 +1819,9 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2290
1819
|
};
|
|
2291
1820
|
}
|
|
2292
1821
|
}));
|
|
2293
|
-
var FuInputRwSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2294
|
-
const __default__$
|
|
2295
|
-
const _sfc_main$
|
|
1822
|
+
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"]]);
|
|
1823
|
+
const __default__$k = { name: "FuSelectRwSwitch" };
|
|
1824
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$k), {
|
|
2296
1825
|
props: {
|
|
2297
1826
|
modelValue: [String, Number],
|
|
2298
1827
|
options: {
|
|
@@ -2374,19 +1903,19 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2374
1903
|
};
|
|
2375
1904
|
}
|
|
2376
1905
|
}));
|
|
2377
|
-
var FuSelectRwSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1906
|
+
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
1907
|
FuReadWriteSwitch.install = (app) => {
|
|
2379
1908
|
app.component(FuReadWriteSwitch.name, FuReadWriteSwitch);
|
|
2380
1909
|
app.component(FuInputRwSwitch.name, FuInputRwSwitch);
|
|
2381
1910
|
app.component(FuSelectRwSwitch.name, FuSelectRwSwitch);
|
|
2382
1911
|
};
|
|
2383
|
-
var
|
|
1912
|
+
var __glob_2_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2384
1913
|
__proto__: null,
|
|
2385
1914
|
"default": FuReadWriteSwitch
|
|
2386
1915
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2387
|
-
const _hoisted_1$
|
|
2388
|
-
const __default__$
|
|
2389
|
-
const _sfc_main$
|
|
1916
|
+
const _hoisted_1$e = ["placeholder"];
|
|
1917
|
+
const __default__$j = { name: "FuQuickSearch" };
|
|
1918
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$j), {
|
|
2390
1919
|
props: {
|
|
2391
1920
|
size: {
|
|
2392
1921
|
type: String,
|
|
@@ -2445,7 +1974,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2445
1974
|
onBlur: blur,
|
|
2446
1975
|
onFocus: focus,
|
|
2447
1976
|
onKeydown: keydown
|
|
2448
|
-
}, null, 40, _hoisted_1$
|
|
1977
|
+
}, null, 40, _hoisted_1$e), [
|
|
2449
1978
|
[vModelText, unref(value)]
|
|
2450
1979
|
])
|
|
2451
1980
|
])
|
|
@@ -2453,13 +1982,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2453
1982
|
};
|
|
2454
1983
|
}
|
|
2455
1984
|
}));
|
|
2456
|
-
var FuQuickSearch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1985
|
+
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
1986
|
const referenceKey = Symbol("ReferenceKey");
|
|
2458
|
-
const _hoisted_1$
|
|
1987
|
+
const _hoisted_1$d = { class: "fu-complex-components" };
|
|
2459
1988
|
const _hoisted_2$8 = { class: "fu-complex-components__body" };
|
|
2460
1989
|
const _hoisted_3$6 = { class: "fu-complex-components__footer" };
|
|
2461
|
-
const __default__$
|
|
2462
|
-
const _sfc_main$
|
|
1990
|
+
const __default__$i = { name: "FuComplexSearch" };
|
|
1991
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$i), {
|
|
2463
1992
|
props: {
|
|
2464
1993
|
size: {
|
|
2465
1994
|
type: String,
|
|
@@ -2546,7 +2075,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2546
2075
|
])
|
|
2547
2076
|
]),
|
|
2548
2077
|
default: withCtx(() => [
|
|
2549
|
-
createElementVNode("div", _hoisted_1$
|
|
2078
|
+
createElementVNode("div", _hoisted_1$d, [
|
|
2550
2079
|
createElementVNode("div", _hoisted_2$8, [
|
|
2551
2080
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2552
2081
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.components, (c) => {
|
|
@@ -2582,9 +2111,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2582
2111
|
};
|
|
2583
2112
|
}
|
|
2584
2113
|
}));
|
|
2585
|
-
var FuComplexSearch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2586
|
-
const __default__$
|
|
2587
|
-
const _sfc_main$
|
|
2114
|
+
var FuComplexSearch = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/search-bar/FuComplexSearch.vue"]]);
|
|
2115
|
+
const __default__$h = { name: "FuSearchBarButton" };
|
|
2116
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$h), {
|
|
2588
2117
|
props: {
|
|
2589
2118
|
size: {
|
|
2590
2119
|
type: String,
|
|
@@ -2613,12 +2142,12 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2613
2142
|
};
|
|
2614
2143
|
}
|
|
2615
2144
|
}));
|
|
2616
|
-
var FuSearchBarButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2617
|
-
const _hoisted_1$
|
|
2145
|
+
var FuSearchBarButton = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/search-bar/FuSearchBarButton.vue"]]);
|
|
2146
|
+
const _hoisted_1$c = { class: "fu-search-conditions__item" };
|
|
2618
2147
|
const _hoisted_2$7 = { key: 0 };
|
|
2619
2148
|
const _hoisted_3$5 = { class: "condition-value" };
|
|
2620
|
-
const __default__$
|
|
2621
|
-
const _sfc_main$
|
|
2149
|
+
const __default__$g = { name: "FuSearchConditions" };
|
|
2150
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$g), {
|
|
2622
2151
|
props: {
|
|
2623
2152
|
size: {
|
|
2624
2153
|
type: String,
|
|
@@ -2644,7 +2173,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2644
2173
|
class: normalizeClass(["fu-search-conditions", "fu-search-conditions--" + unref(configSize)])
|
|
2645
2174
|
}, [
|
|
2646
2175
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.conditions, (condition, index) => {
|
|
2647
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2176
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
2648
2177
|
condition.label ? (openBlock(), createElementBlock("div", _hoisted_2$7, toDisplayString(condition.label), 1)) : createCommentVNode("v-if", true),
|
|
2649
2178
|
createElementVNode("div", _hoisted_3$5, toDisplayString(condition.valueLabel), 1),
|
|
2650
2179
|
createVNode(_component_el_icon, {
|
|
@@ -2662,12 +2191,12 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2662
2191
|
};
|
|
2663
2192
|
}
|
|
2664
2193
|
}));
|
|
2665
|
-
var FuSearchConditions = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2666
|
-
const _hoisted_1$
|
|
2194
|
+
var FuSearchConditions = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/search-bar/FuSearchContions.vue"]]);
|
|
2195
|
+
const _hoisted_1$b = { class: "fu-search-bar" };
|
|
2667
2196
|
const _hoisted_2$6 = { class: "fu-search-bar__content" };
|
|
2668
2197
|
const _hoisted_3$4 = { class: "fu-search-bar__buttons" };
|
|
2669
|
-
const __default__$
|
|
2670
|
-
const _sfc_main$
|
|
2198
|
+
const __default__$f = { name: "FuSearchBar" };
|
|
2199
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$f), {
|
|
2671
2200
|
props: {
|
|
2672
2201
|
size: useSizeProp,
|
|
2673
2202
|
quickKey: {
|
|
@@ -2771,7 +2300,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2771
2300
|
setConditions
|
|
2772
2301
|
});
|
|
2773
2302
|
return (_ctx, _cache) => {
|
|
2774
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2303
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
2775
2304
|
createElementVNode("div", _hoisted_2$6, [
|
|
2776
2305
|
createVNode(FuComplexSearch, {
|
|
2777
2306
|
ref_key: "complexRef",
|
|
@@ -2825,12 +2354,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2825
2354
|
};
|
|
2826
2355
|
}
|
|
2827
2356
|
}));
|
|
2828
|
-
var FuSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2829
|
-
const _hoisted_1$
|
|
2357
|
+
var FuSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/search-bar/FuSearchBar.vue"]]);
|
|
2358
|
+
const _hoisted_1$a = { class: "fu-complex-component" };
|
|
2830
2359
|
const _hoisted_2$5 = { class: "fu-complex-component__label" };
|
|
2831
2360
|
const _hoisted_3$3 = { class: "fu-complex-component__content" };
|
|
2832
|
-
const __default__$
|
|
2833
|
-
const _sfc_main$
|
|
2361
|
+
const __default__$e = { name: "FuComplexSelect" };
|
|
2362
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$e), {
|
|
2834
2363
|
props: {
|
|
2835
2364
|
size: {
|
|
2836
2365
|
type: String,
|
|
@@ -2895,7 +2424,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2895
2424
|
return (_ctx, _cache) => {
|
|
2896
2425
|
const _component_el_option = resolveComponent("el-option");
|
|
2897
2426
|
const _component_el_select = resolveComponent("el-select");
|
|
2898
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2427
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
2899
2428
|
createElementVNode("div", _hoisted_2$5, toDisplayString(__props.label), 1),
|
|
2900
2429
|
createElementVNode("div", _hoisted_3$3, [
|
|
2901
2430
|
createVNode(_component_el_select, mergeProps({
|
|
@@ -2921,12 +2450,12 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2921
2450
|
};
|
|
2922
2451
|
}
|
|
2923
2452
|
}));
|
|
2924
|
-
var FuComplexSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2925
|
-
const _hoisted_1$
|
|
2453
|
+
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"]]);
|
|
2454
|
+
const _hoisted_1$9 = { class: "fu-complex-component" };
|
|
2926
2455
|
const _hoisted_2$4 = { class: "fu-complex-component__label" };
|
|
2927
2456
|
const _hoisted_3$2 = { class: "fu-complex-component__content" };
|
|
2928
|
-
const __default__$
|
|
2929
|
-
const _sfc_main$
|
|
2457
|
+
const __default__$d = { name: "FuComplexInput" };
|
|
2458
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$d), {
|
|
2930
2459
|
props: {
|
|
2931
2460
|
size: {
|
|
2932
2461
|
type: String,
|
|
@@ -2964,7 +2493,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2964
2493
|
});
|
|
2965
2494
|
return (_ctx, _cache) => {
|
|
2966
2495
|
const _component_el_input = resolveComponent("el-input");
|
|
2967
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2496
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
2968
2497
|
createElementVNode("div", _hoisted_2$4, toDisplayString(__props.label), 1),
|
|
2969
2498
|
createElementVNode("div", _hoisted_3$2, [
|
|
2970
2499
|
createVNode(_component_el_input, mergeProps({
|
|
@@ -2978,12 +2507,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2978
2507
|
};
|
|
2979
2508
|
}
|
|
2980
2509
|
}));
|
|
2981
|
-
var FuComplexInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2982
|
-
const _hoisted_1$
|
|
2510
|
+
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"]]);
|
|
2511
|
+
const _hoisted_1$8 = { class: "fu-complex-component" };
|
|
2983
2512
|
const _hoisted_2$3 = { class: "fu-complex-component__label" };
|
|
2984
2513
|
const _hoisted_3$1 = { class: "fu-complex-component__content" };
|
|
2985
|
-
const __default__$
|
|
2986
|
-
const _sfc_main$
|
|
2514
|
+
const __default__$c = { name: "FuComplexDate" };
|
|
2515
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$c), {
|
|
2987
2516
|
props: {
|
|
2988
2517
|
size: {
|
|
2989
2518
|
type: String,
|
|
@@ -3026,7 +2555,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3026
2555
|
});
|
|
3027
2556
|
return (_ctx, _cache) => {
|
|
3028
2557
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
3029
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2558
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
3030
2559
|
createElementVNode("div", _hoisted_2$3, toDisplayString(__props.label), 1),
|
|
3031
2560
|
createElementVNode("div", _hoisted_3$1, [
|
|
3032
2561
|
createVNode(_component_el_date_picker, mergeProps({
|
|
@@ -3046,12 +2575,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3046
2575
|
};
|
|
3047
2576
|
}
|
|
3048
2577
|
}));
|
|
3049
|
-
var FuComplexDate = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3050
|
-
const _hoisted_1$
|
|
2578
|
+
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"]]);
|
|
2579
|
+
const _hoisted_1$7 = { class: "fu-complex-component" };
|
|
3051
2580
|
const _hoisted_2$2 = { class: "fu-complex-component__label" };
|
|
3052
2581
|
const _hoisted_3 = { class: "fu-complex-component__content" };
|
|
3053
|
-
const __default__$
|
|
3054
|
-
const _sfc_main$
|
|
2582
|
+
const __default__$b = { name: "FuComplexDateTime" };
|
|
2583
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$b), {
|
|
3055
2584
|
props: {
|
|
3056
2585
|
size: {
|
|
3057
2586
|
type: String,
|
|
@@ -3094,7 +2623,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3094
2623
|
});
|
|
3095
2624
|
return (_ctx, _cache) => {
|
|
3096
2625
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
3097
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2626
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
3098
2627
|
createElementVNode("div", _hoisted_2$2, toDisplayString(__props.label), 1),
|
|
3099
2628
|
createElementVNode("div", _hoisted_3, [
|
|
3100
2629
|
createCommentVNode(' :size="configSize" '),
|
|
@@ -3115,7 +2644,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3115
2644
|
};
|
|
3116
2645
|
}
|
|
3117
2646
|
}));
|
|
3118
|
-
var FuComplexDateTime = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2647
|
+
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
2648
|
FuSearchBar.install = (app) => {
|
|
3120
2649
|
app.component(FuQuickSearch.name, FuQuickSearch);
|
|
3121
2650
|
app.component(FuSearchBar.name, FuSearchBar);
|
|
@@ -3125,7 +2654,7 @@ FuSearchBar.install = (app) => {
|
|
|
3125
2654
|
app.component(FuComplexDate.name, FuComplexDate);
|
|
3126
2655
|
app.component(FuComplexDateTime.name, FuComplexDateTime);
|
|
3127
2656
|
};
|
|
3128
|
-
var
|
|
2657
|
+
var __glob_2_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3129
2658
|
__proto__: null,
|
|
3130
2659
|
"default": FuSearchBar
|
|
3131
2660
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -3205,7 +2734,7 @@ const ClickOutside = {
|
|
|
3205
2734
|
nodeList.delete(el);
|
|
3206
2735
|
}
|
|
3207
2736
|
};
|
|
3208
|
-
const _sfc_main$
|
|
2737
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
3209
2738
|
__name: "FuSpeedDialButton",
|
|
3210
2739
|
props: {
|
|
3211
2740
|
type: {
|
|
@@ -3259,10 +2788,10 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
3259
2788
|
};
|
|
3260
2789
|
}
|
|
3261
2790
|
});
|
|
3262
|
-
var FuSpeedDialButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2791
|
+
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
2792
|
const SpeedDialKey = Symbol("SpeedDialKey");
|
|
3264
|
-
const _hoisted_1$
|
|
3265
|
-
const _sfc_main$
|
|
2793
|
+
const _hoisted_1$6 = { class: "fu-speed-dial-action-button" };
|
|
2794
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
3266
2795
|
__name: "FuSpeedDialActionButton",
|
|
3267
2796
|
props: {
|
|
3268
2797
|
index: Number,
|
|
@@ -3327,7 +2856,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
3327
2856
|
speedDialKey == null ? void 0 : speedDialKey.close();
|
|
3328
2857
|
}
|
|
3329
2858
|
return (_ctx, _cache) => {
|
|
3330
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2859
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
3331
2860
|
__props.title ? (openBlock(), createElementBlock("div", {
|
|
3332
2861
|
key: 0,
|
|
3333
2862
|
class: "fu-speed-dial-action-button__title",
|
|
@@ -3351,9 +2880,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
3351
2880
|
};
|
|
3352
2881
|
}
|
|
3353
2882
|
});
|
|
3354
|
-
var FuSpeedDialActionButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3355
|
-
const __default__$
|
|
3356
|
-
const _sfc_main$
|
|
2883
|
+
var FuSpeedDialActionButton = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDialActionButton.vue"]]);
|
|
2884
|
+
const __default__$a = { name: "FuSpeedDialItem" };
|
|
2885
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$a), {
|
|
3357
2886
|
props: {
|
|
3358
2887
|
index: {
|
|
3359
2888
|
type: Number,
|
|
@@ -3442,10 +2971,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3442
2971
|
};
|
|
3443
2972
|
}
|
|
3444
2973
|
}));
|
|
3445
|
-
var FuSpeedDialItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3446
|
-
const _hoisted_1$
|
|
3447
|
-
const __default__$
|
|
3448
|
-
const _sfc_main$
|
|
2974
|
+
var FuSpeedDialItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/speed-dial/FuSpeedDialItem.vue"]]);
|
|
2975
|
+
const _hoisted_1$5 = { class: "fu-speed-dial__content" };
|
|
2976
|
+
const __default__$9 = { name: "FuSpeedDial" };
|
|
2977
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$9), {
|
|
3449
2978
|
props: {
|
|
3450
2979
|
modelValue: Boolean,
|
|
3451
2980
|
id: String,
|
|
@@ -3684,7 +3213,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3684
3213
|
class: "fu-speed-dial",
|
|
3685
3214
|
style: normalizeStyle(style.value)
|
|
3686
3215
|
}, [
|
|
3687
|
-
createElementVNode("div", _hoisted_1$
|
|
3216
|
+
createElementVNode("div", _hoisted_1$5, [
|
|
3688
3217
|
renderSlot(_ctx.$slots, "fab", {}, () => [
|
|
3689
3218
|
createVNode(FuSpeedDialButton, mergeProps(unref(buttonProps), {
|
|
3690
3219
|
onClick: click,
|
|
@@ -3712,21 +3241,21 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3712
3241
|
};
|
|
3713
3242
|
}
|
|
3714
3243
|
}));
|
|
3715
|
-
var FuSpeedDial = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3244
|
+
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
3245
|
FuSpeedDial.install = (app) => {
|
|
3717
3246
|
app.component(FuSpeedDial.name, FuSpeedDial);
|
|
3718
3247
|
app.component(FuSpeedDialItem.name, FuSpeedDialItem);
|
|
3719
3248
|
};
|
|
3720
|
-
var
|
|
3249
|
+
var __glob_2_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3721
3250
|
__proto__: null,
|
|
3722
3251
|
"default": FuSpeedDial
|
|
3723
3252
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3724
|
-
const _hoisted_1$
|
|
3253
|
+
const _hoisted_1$4 = {
|
|
3725
3254
|
key: 0,
|
|
3726
3255
|
class: "icon"
|
|
3727
3256
|
};
|
|
3728
|
-
const __default__$
|
|
3729
|
-
const _sfc_main$
|
|
3257
|
+
const __default__$8 = { name: "FuSplitPane" };
|
|
3258
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$8), {
|
|
3730
3259
|
props: {
|
|
3731
3260
|
min: {
|
|
3732
3261
|
type: [Number, String],
|
|
@@ -3813,128 +3342,599 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3813
3342
|
const saveKey = computed(() => {
|
|
3814
3343
|
return "Fu-SP-" + props.localKey;
|
|
3815
3344
|
});
|
|
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;
|
|
3345
|
+
const resizerClasses = computed(() => {
|
|
3346
|
+
const classes = [
|
|
3347
|
+
`fu-split-pane__${props.resizerType}`,
|
|
3348
|
+
`is-${props.direction}`,
|
|
3349
|
+
props.resizable && "is-resizable",
|
|
3350
|
+
props.resizerClass,
|
|
3351
|
+
hover.value && (props.resizerHoverClass || "hover")
|
|
3352
|
+
];
|
|
3353
|
+
return classes;
|
|
3354
|
+
});
|
|
3355
|
+
const padding = computed(() => {
|
|
3356
|
+
return props.resizerType === "resizer" && isHorizontal.value && "3px";
|
|
3357
|
+
});
|
|
3358
|
+
function onMouseDown(e) {
|
|
3359
|
+
initOffset.value = isHorizontal.value ? e.pageX : e.pageY;
|
|
3360
|
+
oldValue.value = usedValue.value;
|
|
3361
|
+
active.value = true;
|
|
3362
|
+
document.addEventListener("mousemove", onMouseMove);
|
|
3363
|
+
document.addEventListener("mouseup", onMouseUp);
|
|
3364
|
+
}
|
|
3365
|
+
function onMouseUp() {
|
|
3366
|
+
active.value = false;
|
|
3367
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
3368
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
3369
|
+
emit("changeSplit", usedValue.value);
|
|
3370
|
+
}
|
|
3371
|
+
function onMouseMove(e) {
|
|
3372
|
+
if (!props.resizable)
|
|
3373
|
+
return;
|
|
3374
|
+
if (active.value) {
|
|
3375
|
+
const currentPage = isHorizontal.value ? e.pageX : e.pageY;
|
|
3376
|
+
const offset = currentPage - initOffset.value;
|
|
3377
|
+
const value = isReverse.value ? oldValue.value - offset : oldValue.value + offset;
|
|
3378
|
+
if (value > percentToValue(props.min) && value < outerWrapperSize.value - percentToValue(props.min)) {
|
|
3379
|
+
usedValue.value = value;
|
|
3380
|
+
writeValue();
|
|
3381
|
+
}
|
|
3382
|
+
}
|
|
3383
|
+
}
|
|
3384
|
+
function percentToValue(val) {
|
|
3385
|
+
const size = instance.refs.outerWrapper[offsetSize.value];
|
|
3386
|
+
if (typeof val === "string" && val.includes("%")) {
|
|
3387
|
+
return parseInt(val) / 100 * size;
|
|
3388
|
+
} else {
|
|
3389
|
+
return parseInt(val);
|
|
3390
|
+
}
|
|
3391
|
+
}
|
|
3392
|
+
function getMin(val) {
|
|
3393
|
+
return val < percentToValue(props.min) ? percentToValue(props.min) : val;
|
|
3394
|
+
}
|
|
3395
|
+
function writeValue() {
|
|
3396
|
+
const obj = {
|
|
3397
|
+
[resizerAttr.value]: usedValue.value
|
|
3398
|
+
};
|
|
3399
|
+
if (props.localKey) {
|
|
3400
|
+
localStorage.setItem(saveKey.value, JSON.stringify(obj));
|
|
3401
|
+
}
|
|
3402
|
+
}
|
|
3403
|
+
function readValue() {
|
|
3404
|
+
if (props.localKey) {
|
|
3405
|
+
const local = localStorage.getItem(saveKey.value);
|
|
3406
|
+
if (local && local[resizerAttr.value]) {
|
|
3407
|
+
usedValue.value = parseInt(local) || defaultValue.value;
|
|
3408
|
+
} else {
|
|
3409
|
+
usedValue.value = defaultValue.value;
|
|
3410
|
+
}
|
|
3411
|
+
} else {
|
|
3412
|
+
usedValue.value = defaultValue.value;
|
|
3413
|
+
}
|
|
3414
|
+
}
|
|
3415
|
+
onMounted(() => {
|
|
3416
|
+
readValue();
|
|
3417
|
+
});
|
|
3418
|
+
return (_ctx, _cache) => {
|
|
3419
|
+
const _component_MoreFilled = resolveComponent("MoreFilled");
|
|
3420
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
3421
|
+
return openBlock(), createElementBlock("div", {
|
|
3422
|
+
style: normalizeStyle({ cursor: unref(cursor), userSelect: unref(userSelect) }),
|
|
3423
|
+
class: "fu-split-pane",
|
|
3424
|
+
ref: "outerWrapper"
|
|
3425
|
+
}, [
|
|
3426
|
+
createElementVNode("div", {
|
|
3427
|
+
class: normalizeClass([`is-${__props.direction}`, "fu-split-pane__left"]),
|
|
3428
|
+
style: normalizeStyle({ [unref(attr)]: unref(isReverse) ? unref(valueAnother) : `${usedValue.value}px`, "padding-right": unref(padding) })
|
|
3429
|
+
}, [
|
|
3430
|
+
renderSlot(_ctx.$slots, unref(isHorizontal) ? "left" : "top")
|
|
3431
|
+
], 6),
|
|
3432
|
+
createElementVNode("div", {
|
|
3433
|
+
class: normalizeClass(unref(resizerClasses)),
|
|
3434
|
+
style: normalizeStyle(__spreadValues({ [unref(resizerAttr)]: `${usedValue.value}px` }, __props.resizerStyle)),
|
|
3435
|
+
onMousedown: onMouseDown,
|
|
3436
|
+
onMouseover: _cache[0] || (_cache[0] = ($event) => hover.value = true),
|
|
3437
|
+
onMouseleave: _cache[1] || (_cache[1] = ($event) => hover.value = false)
|
|
3438
|
+
}, [
|
|
3439
|
+
__props.resizerType === "resizer" ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
3440
|
+
renderSlot(_ctx.$slots, "resizer", {}, () => [
|
|
3441
|
+
createVNode(_component_el_icon, { size: 10 }, {
|
|
3442
|
+
default: withCtx(() => [
|
|
3443
|
+
createVNode(_component_MoreFilled)
|
|
3444
|
+
]),
|
|
3445
|
+
_: 1
|
|
3446
|
+
})
|
|
3447
|
+
])
|
|
3448
|
+
])) : createCommentVNode("v-if", true)
|
|
3449
|
+
], 38),
|
|
3450
|
+
createElementVNode("div", {
|
|
3451
|
+
class: normalizeClass([`is-${__props.direction}`, "fu-split-pane__right"]),
|
|
3452
|
+
style: normalizeStyle({ [unref(attr)]: unref(isReverse) ? `${usedValue.value}px` : unref(valueAnother), "padding-left": unref(padding) })
|
|
3453
|
+
}, [
|
|
3454
|
+
renderSlot(_ctx.$slots, unref(isHorizontal) ? "right" : "bottom")
|
|
3455
|
+
], 6)
|
|
3456
|
+
], 4);
|
|
3457
|
+
};
|
|
3458
|
+
}
|
|
3459
|
+
}));
|
|
3460
|
+
var FuSplitPane = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/split-pane/FuSplitPane.vue"]]);
|
|
3461
|
+
FuSplitPane.install = (app) => {
|
|
3462
|
+
app.component(FuSplitPane.name, FuSplitPane);
|
|
3463
|
+
};
|
|
3464
|
+
var __glob_2_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3465
|
+
__proto__: null,
|
|
3466
|
+
"default": FuSplitPane
|
|
3467
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
3468
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
3469
|
+
__name: "FuHorizontalNavigation",
|
|
3470
|
+
props: {
|
|
3471
|
+
stepper: Object,
|
|
3472
|
+
steps: Array,
|
|
3473
|
+
disable: Function
|
|
3474
|
+
},
|
|
3475
|
+
emits: ["active"],
|
|
3476
|
+
setup(__props, { emit }) {
|
|
3477
|
+
const props = __props;
|
|
3478
|
+
const active = computed(() => {
|
|
3479
|
+
return props.stepper.index;
|
|
3480
|
+
});
|
|
3481
|
+
function click(index) {
|
|
3482
|
+
!props.disable(index) && emit("active", index);
|
|
3483
|
+
}
|
|
3484
|
+
return (_ctx, _cache) => {
|
|
3485
|
+
const _component_el_step = resolveComponent("el-step");
|
|
3486
|
+
const _component_el_steps = resolveComponent("el-steps");
|
|
3487
|
+
return openBlock(), createBlock(_component_el_steps, mergeProps({ active: unref(active) }, __props.stepper), {
|
|
3488
|
+
default: withCtx(() => [
|
|
3489
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.steps, (step, index) => {
|
|
3490
|
+
return openBlock(), createBlock(_component_el_step, mergeProps({ key: index }, step, {
|
|
3491
|
+
onClick: ($event) => click(index),
|
|
3492
|
+
class: __props.disable(index) && "fu-step--disable"
|
|
3493
|
+
}), null, 16, ["onClick", "class"]);
|
|
3494
|
+
}), 128))
|
|
3495
|
+
]),
|
|
3496
|
+
_: 1
|
|
3497
|
+
}, 16, ["active"]);
|
|
3498
|
+
};
|
|
3499
|
+
}
|
|
3500
|
+
});
|
|
3501
|
+
var FuHorizontalNavigation = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/steps/FuHorizontalNavigation.vue"]]);
|
|
3502
|
+
const _sfc_main$f = {};
|
|
3503
|
+
function _sfc_render(_ctx, _cache) {
|
|
3504
|
+
const _component_el_button = resolveComponent("el-button");
|
|
3505
|
+
return openBlock(), createBlock(_component_el_button, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
|
3506
|
+
default: withCtx(() => [
|
|
3507
|
+
renderSlot(_ctx.$slots, "default")
|
|
3508
|
+
]),
|
|
3509
|
+
_: 3
|
|
3510
|
+
}, 16);
|
|
3511
|
+
}
|
|
3512
|
+
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"]]);
|
|
3513
|
+
var FuStepsFooter = defineComponent({
|
|
3514
|
+
name: "FuStepsFooter",
|
|
3515
|
+
components: {
|
|
3516
|
+
FuStepButton
|
|
3517
|
+
},
|
|
3518
|
+
emits: ["stepperFn"],
|
|
3519
|
+
setup(props, { emit }) {
|
|
3520
|
+
const stepper = inject("stepper");
|
|
3521
|
+
const disabledButton = ref(false);
|
|
3522
|
+
const isFirst = computed(() => {
|
|
3523
|
+
return stepper.isFirst(stepper.index);
|
|
3524
|
+
});
|
|
3525
|
+
const isLast = computed(() => {
|
|
3526
|
+
return stepper.isLast(stepper.index);
|
|
3527
|
+
});
|
|
3528
|
+
const showCancel = computed(() => {
|
|
3529
|
+
return stepper.showCancel !== false;
|
|
3530
|
+
});
|
|
3531
|
+
const disabled = computed(() => {
|
|
3532
|
+
return (stepper == null ? void 0 : stepper.isLoading) || disabledButton.value;
|
|
3533
|
+
});
|
|
3534
|
+
function clickHandle(fnName) {
|
|
3535
|
+
stepper[fnName] ? stepper[fnName]() : emit("stepperFn", fnName);
|
|
3536
|
+
disabledButton.value = true;
|
|
3537
|
+
setTimeout(() => {
|
|
3538
|
+
disabledButton.value = false;
|
|
3539
|
+
}, 500);
|
|
3540
|
+
}
|
|
3541
|
+
const button = (value) => {
|
|
3542
|
+
return h(FuStepButton, {
|
|
3543
|
+
disabled: disabled.value,
|
|
3544
|
+
size: stepper.buttonSize,
|
|
3545
|
+
onClick: () => clickHandle(value)
|
|
3546
|
+
}, () => stepper[`${value}ButtonText`]);
|
|
3547
|
+
};
|
|
3548
|
+
return () => h("div", {
|
|
3549
|
+
class: `fu-steps__footer--${stepper.footerAlign}`
|
|
3550
|
+
}, [
|
|
3551
|
+
h("div", {
|
|
3552
|
+
class: "fu-steps__footer--block",
|
|
3553
|
+
style: "margin-right:10px"
|
|
3554
|
+
}, [showCancel.value && button("onCancel")]),
|
|
3555
|
+
h("div", {
|
|
3556
|
+
class: "fu-steps__footer--block"
|
|
3557
|
+
}, [
|
|
3558
|
+
!isFirst.value && button("prev"),
|
|
3559
|
+
isLast.value ? button("onFinish") : button("next")
|
|
3560
|
+
])
|
|
3561
|
+
]);
|
|
3562
|
+
}
|
|
3563
|
+
});
|
|
3564
|
+
const { t } = useLocale();
|
|
3565
|
+
class Stepper {
|
|
3566
|
+
constructor(options) {
|
|
3567
|
+
__publicField(this, "steps");
|
|
3568
|
+
__publicField(this, "index");
|
|
3569
|
+
__publicField(this, "activeSet");
|
|
3570
|
+
__publicField(this, "isLoading");
|
|
3571
|
+
__publicField(this, "onCancelButtonText");
|
|
3572
|
+
__publicField(this, "onFinishButtonText");
|
|
3573
|
+
__publicField(this, "prevButtonText");
|
|
3574
|
+
__publicField(this, "nextButtonText");
|
|
3575
|
+
__publicField(this, "buttonSize");
|
|
3576
|
+
__publicField(this, "footerAlign");
|
|
3577
|
+
__publicField(this, "showCancel");
|
|
3578
|
+
__publicField(this, "beforeActive");
|
|
3579
|
+
__publicField(this, "beforeLeave");
|
|
3580
|
+
__publicField(this, "height");
|
|
3581
|
+
options = options || {};
|
|
3582
|
+
this.steps = options.steps;
|
|
3583
|
+
this.index = options.index === void 0 ? 0 : options.index;
|
|
3584
|
+
this.activeSet = /* @__PURE__ */ new Set();
|
|
3585
|
+
this.isLoading = (options == null ? void 0 : options.isLoading) || false;
|
|
3586
|
+
this.onCancelButtonText = options.onCancelButtonText || t("fu.steps.cancel");
|
|
3587
|
+
this.onFinishButtonText = options.onFinishButtonText || t("fu.steps.finish");
|
|
3588
|
+
this.prevButtonText = options.prevButtonText || t("fu.steps.prev");
|
|
3589
|
+
this.nextButtonText = options.nextButtonText || t("fu.steps.next");
|
|
3590
|
+
this.buttonSize = options.buttonSize || "default";
|
|
3591
|
+
this.footerAlign = options.footerAlign || "flex";
|
|
3592
|
+
this.showCancel = options.showCancel === void 0 ? false : options.showCancel;
|
|
3593
|
+
this.beforeActive = options.beforeActive;
|
|
3594
|
+
this.beforeLeave = options.beforeLeave;
|
|
3595
|
+
this.height = options.height;
|
|
3596
|
+
}
|
|
3597
|
+
isFirst(index) {
|
|
3598
|
+
return index === 0;
|
|
3599
|
+
}
|
|
3600
|
+
isLast(index) {
|
|
3601
|
+
return index === this.steps.length - 1;
|
|
3602
|
+
}
|
|
3603
|
+
isActive(index) {
|
|
3604
|
+
return this.activeSet.has(index);
|
|
3605
|
+
}
|
|
3606
|
+
isCurrent(index) {
|
|
3607
|
+
return this.index === index;
|
|
3608
|
+
}
|
|
3609
|
+
async active(index) {
|
|
3610
|
+
const isValid = index >= 0 && index < this.steps.length && this.index !== index;
|
|
3611
|
+
const forward = index > this.index;
|
|
3612
|
+
if (isValid) {
|
|
3613
|
+
if (await this.executeBeforeLeave(this.index, forward) !== false) {
|
|
3614
|
+
if (await this.executeBeforeActive(index, forward) !== false) {
|
|
3615
|
+
this.index = index;
|
|
3616
|
+
this.activeSet.add(index);
|
|
3617
|
+
}
|
|
3618
|
+
}
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
next() {
|
|
3622
|
+
if (!this.isLast(this.index)) {
|
|
3623
|
+
this.active(this.index + 1);
|
|
3624
|
+
}
|
|
3625
|
+
}
|
|
3626
|
+
prev() {
|
|
3627
|
+
if (!this.isFirst(this.index)) {
|
|
3628
|
+
this.active(this.index - 1);
|
|
3629
|
+
}
|
|
3630
|
+
}
|
|
3631
|
+
getStep(index) {
|
|
3632
|
+
if (this.steps && this.steps.length > index) {
|
|
3633
|
+
return this.steps[index];
|
|
3634
|
+
}
|
|
3635
|
+
}
|
|
3636
|
+
executeBeforeLeave(index, forward) {
|
|
3637
|
+
const step = this.getStep(index);
|
|
3638
|
+
if (step.beforeLeave) {
|
|
3639
|
+
return step.beforeLeave(step, forward);
|
|
3640
|
+
}
|
|
3641
|
+
if (this.beforeLeave) {
|
|
3642
|
+
return this.beforeLeave(step, forward);
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3645
|
+
executeBeforeActive(index, forward) {
|
|
3646
|
+
const step = this.getStep(index);
|
|
3647
|
+
if (step.beforeActive) {
|
|
3648
|
+
return step.beforeActive(step, forward);
|
|
3649
|
+
}
|
|
3650
|
+
if (this.beforeActive) {
|
|
3651
|
+
return this.beforeActive(step, forward);
|
|
3652
|
+
}
|
|
3653
|
+
}
|
|
3654
|
+
}
|
|
3655
|
+
class Step {
|
|
3656
|
+
constructor(options) {
|
|
3657
|
+
__publicField(this, "id");
|
|
3658
|
+
__publicField(this, "index");
|
|
3659
|
+
__publicField(this, "beforeActive");
|
|
3660
|
+
__publicField(this, "beforeLeave");
|
|
3661
|
+
__publicField(this, "title");
|
|
3662
|
+
__publicField(this, "description");
|
|
3663
|
+
__publicField(this, "icon");
|
|
3664
|
+
__publicField(this, "status");
|
|
3665
|
+
options = options || {};
|
|
3666
|
+
this.id = options.id;
|
|
3667
|
+
this.index = options.index;
|
|
3668
|
+
this.beforeActive = options.beforeActive;
|
|
3669
|
+
this.beforeLeave = options.beforeLeave;
|
|
3670
|
+
this.title = options.title;
|
|
3671
|
+
this.description = options.description;
|
|
3672
|
+
this.icon = options.icon;
|
|
3673
|
+
this.status = options.status;
|
|
3674
|
+
}
|
|
3675
|
+
}
|
|
3676
|
+
const _sfc_main$e = defineComponent({
|
|
3677
|
+
name: "FuHorizontalSteps",
|
|
3678
|
+
components: {
|
|
3679
|
+
FuHorizontalNavigation,
|
|
3680
|
+
FuStepsFooter
|
|
3681
|
+
},
|
|
3682
|
+
emits: ["change"],
|
|
3683
|
+
setup(_, { attrs, slots, emit, expose }) {
|
|
3684
|
+
var _a2;
|
|
3685
|
+
const stepper = ref(new Stepper());
|
|
3686
|
+
(_a2 = stepper.value) == null ? void 0 : _a2.activeSet.add(0);
|
|
3687
|
+
watch(() => stepper.value.index, (value) => {
|
|
3688
|
+
emit("change", stepper.value.steps[value]);
|
|
3689
|
+
});
|
|
3690
|
+
const heightStyle = computed(() => {
|
|
3691
|
+
var _a3;
|
|
3692
|
+
return { height: parseInt((_a3 = stepper.value) == null ? void 0 : _a3.height) + "px" || "auto" };
|
|
3693
|
+
});
|
|
3694
|
+
function active(index) {
|
|
3695
|
+
var _a3;
|
|
3696
|
+
(_a3 = stepper.value) == null ? void 0 : _a3.active(index);
|
|
3697
|
+
}
|
|
3698
|
+
function disable(index) {
|
|
3699
|
+
var _a3;
|
|
3700
|
+
return !((_a3 = stepper.value) == null ? void 0 : _a3.isActive(index));
|
|
3701
|
+
}
|
|
3702
|
+
function next() {
|
|
3703
|
+
stepper.value.next();
|
|
3704
|
+
}
|
|
3705
|
+
function prev() {
|
|
3706
|
+
stepper.value.prev();
|
|
3707
|
+
}
|
|
3708
|
+
function $func(name2) {
|
|
3709
|
+
emit(name2);
|
|
3710
|
+
}
|
|
3711
|
+
provide("stepper", stepper.value);
|
|
3712
|
+
expose({
|
|
3713
|
+
next,
|
|
3714
|
+
prev,
|
|
3715
|
+
active
|
|
3716
|
+
});
|
|
3717
|
+
return () => {
|
|
3718
|
+
var _a3, _b, _c;
|
|
3719
|
+
let steps = [];
|
|
3720
|
+
if ((_a3 = slots.default) == null ? void 0 : _a3.call(slots)) {
|
|
3721
|
+
(_b = slots.default) == null ? void 0 : _b.call(slots).forEach((node, index) => {
|
|
3722
|
+
const options = __spreadValues({
|
|
3723
|
+
index
|
|
3724
|
+
}, node.props);
|
|
3725
|
+
const step = new Step(options);
|
|
3726
|
+
steps.push(step);
|
|
3727
|
+
});
|
|
3728
|
+
}
|
|
3729
|
+
stepper.value.steps = steps;
|
|
3730
|
+
stepper.value = Object.assign(stepper.value, attrs);
|
|
3731
|
+
return h("div", {
|
|
3732
|
+
class: ["fu-steps", "fu-steps--horizontal"]
|
|
3733
|
+
}, [
|
|
3734
|
+
h(FuHorizontalNavigation, {
|
|
3735
|
+
stepper: stepper.value,
|
|
3736
|
+
steps,
|
|
3737
|
+
disable,
|
|
3738
|
+
onActive: active
|
|
3739
|
+
}),
|
|
3740
|
+
h("div", { class: "fu-steps__wrapper" }, h("div", { class: "fu-steps__container", style: heightStyle.value }, h(Transition, { name: "carousel", mode: "out-in", tag: "p" }, () => {
|
|
3741
|
+
var _a4;
|
|
3742
|
+
return (_a4 = slots.default) == null ? void 0 : _a4.call(slots).map((item, index) => {
|
|
3743
|
+
item["key"] = index;
|
|
3744
|
+
return stepper.value.index === index && item;
|
|
3745
|
+
});
|
|
3746
|
+
}))),
|
|
3747
|
+
h("div", { class: "fu-steps__footer" }, ((_c = slots.footer) == null ? void 0 : _c.call(slots)) || h(FuStepsFooter, { onStepperFn: $func }))
|
|
3748
|
+
]);
|
|
3749
|
+
};
|
|
3750
|
+
}
|
|
3751
|
+
});
|
|
3752
|
+
var FuHorizontalSteps = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/steps/FuHorizontalSteps.vue"]]);
|
|
3753
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
3754
|
+
__name: "FuVerticalNavigation",
|
|
3755
|
+
props: {
|
|
3756
|
+
stepper: Object,
|
|
3757
|
+
steps: Array,
|
|
3758
|
+
disable: Function
|
|
3759
|
+
},
|
|
3760
|
+
emits: ["active"],
|
|
3761
|
+
setup(__props, { emit }) {
|
|
3762
|
+
const props = __props;
|
|
3763
|
+
const active = computed(() => {
|
|
3764
|
+
return props.stepper.index;
|
|
3765
|
+
});
|
|
3766
|
+
const heightStyle = computed(() => {
|
|
3767
|
+
var _a2;
|
|
3768
|
+
return {
|
|
3769
|
+
height: parseInt((_a2 = props.stepper) == null ? void 0 : _a2.height) + "px" || "auto"
|
|
3770
|
+
};
|
|
3825
3771
|
});
|
|
3826
|
-
|
|
3827
|
-
|
|
3772
|
+
function click(index) {
|
|
3773
|
+
!props.disable(index) && emit("active", index);
|
|
3774
|
+
}
|
|
3775
|
+
return (_ctx, _cache) => {
|
|
3776
|
+
const _component_el_collapse_transition = resolveComponent("el-collapse-transition");
|
|
3777
|
+
const _component_el_step = resolveComponent("el-step");
|
|
3778
|
+
const _component_el_steps = resolveComponent("el-steps");
|
|
3779
|
+
return openBlock(), createBlock(_component_el_steps, mergeProps({ active: unref(active) }, __props.stepper, { direction: "vertical" }), {
|
|
3780
|
+
default: withCtx(() => [
|
|
3781
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.steps, (step, i) => {
|
|
3782
|
+
return openBlock(), createBlock(_component_el_step, mergeProps({ key: i }, step, {
|
|
3783
|
+
onClick: ($event) => click(i),
|
|
3784
|
+
class: __props.disable(i) && "fu-step--disable"
|
|
3785
|
+
}), {
|
|
3786
|
+
description: withCtx(() => [
|
|
3787
|
+
createElementVNode("span", null, toDisplayString(step.description), 1),
|
|
3788
|
+
createVNode(_component_el_collapse_transition, null, {
|
|
3789
|
+
default: withCtx(() => [
|
|
3790
|
+
i === unref(active) ? (openBlock(), createElementBlock("div", {
|
|
3791
|
+
key: 0,
|
|
3792
|
+
class: "fu-steps__container",
|
|
3793
|
+
style: normalizeStyle(unref(heightStyle))
|
|
3794
|
+
}, [
|
|
3795
|
+
renderSlot(_ctx.$slots, "default", { step })
|
|
3796
|
+
], 4)) : createCommentVNode("v-if", true)
|
|
3797
|
+
]),
|
|
3798
|
+
_: 2
|
|
3799
|
+
}, 1024)
|
|
3800
|
+
]),
|
|
3801
|
+
_: 2
|
|
3802
|
+
}, 1040, ["onClick", "class"]);
|
|
3803
|
+
}), 128))
|
|
3804
|
+
]),
|
|
3805
|
+
_: 3
|
|
3806
|
+
}, 16, ["active"]);
|
|
3807
|
+
};
|
|
3808
|
+
}
|
|
3809
|
+
});
|
|
3810
|
+
var FuVerticalNavigation = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/steps/FuVerticalNavigation.vue"]]);
|
|
3811
|
+
const _sfc_main$c = defineComponent({
|
|
3812
|
+
name: "FuVerticalSteps",
|
|
3813
|
+
components: { FuVerticalNavigation, FuStepsFooter },
|
|
3814
|
+
emits: ["change"],
|
|
3815
|
+
setup(_, { attrs, slots, emit, expose }) {
|
|
3816
|
+
const stepper = ref(new Stepper());
|
|
3817
|
+
stepper.value.activeSet.add(0);
|
|
3818
|
+
watch(() => stepper.value.index, (value) => {
|
|
3819
|
+
emit("change", stepper.value.steps[value]);
|
|
3828
3820
|
});
|
|
3829
|
-
function
|
|
3830
|
-
|
|
3831
|
-
oldValue.value = usedValue.value;
|
|
3832
|
-
active.value = true;
|
|
3833
|
-
document.addEventListener("mousemove", onMouseMove);
|
|
3834
|
-
document.addEventListener("mouseup", onMouseUp);
|
|
3821
|
+
function active(index) {
|
|
3822
|
+
stepper.value.active(index);
|
|
3835
3823
|
}
|
|
3836
|
-
function
|
|
3837
|
-
|
|
3838
|
-
document.removeEventListener("mousemove", onMouseMove);
|
|
3839
|
-
document.removeEventListener("mouseup", onMouseUp);
|
|
3840
|
-
emit("changeSplit", usedValue.value);
|
|
3824
|
+
function disable(index) {
|
|
3825
|
+
return !stepper.value.isActive(index);
|
|
3841
3826
|
}
|
|
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
|
-
}
|
|
3827
|
+
function next() {
|
|
3828
|
+
stepper.value.next();
|
|
3854
3829
|
}
|
|
3855
|
-
function
|
|
3856
|
-
|
|
3857
|
-
if (typeof val === "string" && val.includes("%")) {
|
|
3858
|
-
return parseInt(val) / 100 * size;
|
|
3859
|
-
} else {
|
|
3860
|
-
return parseInt(val);
|
|
3861
|
-
}
|
|
3830
|
+
function prev() {
|
|
3831
|
+
stepper.value.prev();
|
|
3862
3832
|
}
|
|
3863
|
-
function
|
|
3864
|
-
|
|
3833
|
+
function $func(name2) {
|
|
3834
|
+
emit(name2);
|
|
3865
3835
|
}
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3836
|
+
provide("stepper", stepper.value);
|
|
3837
|
+
expose({
|
|
3838
|
+
next,
|
|
3839
|
+
prev,
|
|
3840
|
+
active
|
|
3841
|
+
});
|
|
3842
|
+
return () => {
|
|
3843
|
+
var _a2, _b;
|
|
3844
|
+
let currentNode;
|
|
3845
|
+
let steps = [];
|
|
3846
|
+
if ((_a2 = slots.default) == null ? void 0 : _a2.call(slots)) {
|
|
3847
|
+
(_b = slots.default) == null ? void 0 : _b.call(slots).forEach((node, index) => {
|
|
3848
|
+
const options = __spreadValues({
|
|
3849
|
+
index
|
|
3850
|
+
}, node.props);
|
|
3851
|
+
const step = new Step(options);
|
|
3852
|
+
steps.push(step);
|
|
3853
|
+
if (stepper.value.isCurrent(index)) {
|
|
3854
|
+
currentNode = node;
|
|
3855
|
+
}
|
|
3856
|
+
});
|
|
3872
3857
|
}
|
|
3858
|
+
stepper.value.steps = steps;
|
|
3859
|
+
stepper.value = Object.assign(stepper.value, attrs);
|
|
3860
|
+
return h("div", {
|
|
3861
|
+
class: ["fu-steps", "fu-steps--vertical"]
|
|
3862
|
+
}, [
|
|
3863
|
+
h(FuVerticalNavigation, {
|
|
3864
|
+
stepper: stepper.value,
|
|
3865
|
+
steps,
|
|
3866
|
+
disable,
|
|
3867
|
+
onActive: active
|
|
3868
|
+
}, () => currentNode),
|
|
3869
|
+
h("div", { class: "fu-steps__footer" }, h(FuStepsFooter, { onStepperFn: $func }))
|
|
3870
|
+
]);
|
|
3871
|
+
};
|
|
3872
|
+
}
|
|
3873
|
+
});
|
|
3874
|
+
var FuVerticalSteps = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/steps/FuVerticalSteps.vue"]]);
|
|
3875
|
+
const _sfc_main$b = defineComponent({
|
|
3876
|
+
name: "FuSteps",
|
|
3877
|
+
components: {
|
|
3878
|
+
FuHorizontalSteps,
|
|
3879
|
+
FuVerticalSteps
|
|
3880
|
+
},
|
|
3881
|
+
emits: ["change"],
|
|
3882
|
+
props: ["direction"],
|
|
3883
|
+
setup(props, { attrs, slots, emit, expose }) {
|
|
3884
|
+
const { direction } = props;
|
|
3885
|
+
const FuSteps2 = ref();
|
|
3886
|
+
function next() {
|
|
3887
|
+
var _a2;
|
|
3888
|
+
(_a2 = FuSteps2.value) == null ? void 0 : _a2.next();
|
|
3873
3889
|
}
|
|
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
|
-
}
|
|
3890
|
+
function prev() {
|
|
3891
|
+
var _a2;
|
|
3892
|
+
(_a2 = FuSteps2.value) == null ? void 0 : _a2.prev();
|
|
3885
3893
|
}
|
|
3886
|
-
|
|
3887
|
-
|
|
3894
|
+
function active(index) {
|
|
3895
|
+
var _a2;
|
|
3896
|
+
(_a2 = FuSteps2.value) == null ? void 0 : _a2.active(index);
|
|
3897
|
+
}
|
|
3898
|
+
function handleChange({ id, title, index }) {
|
|
3899
|
+
emit("change", { id, title, index });
|
|
3900
|
+
}
|
|
3901
|
+
expose({
|
|
3902
|
+
next,
|
|
3903
|
+
prev,
|
|
3904
|
+
active
|
|
3888
3905
|
});
|
|
3906
|
+
if (direction === "vertical") {
|
|
3907
|
+
return () => h(FuVerticalSteps, __spreadValues({ ref: FuSteps2, onChange: handleChange }, attrs), slots);
|
|
3908
|
+
} else {
|
|
3909
|
+
return () => h(FuHorizontalSteps, __spreadValues({ ref: FuSteps2, onChange: handleChange }, attrs), slots);
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3912
|
+
});
|
|
3913
|
+
var FuSteps = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/steps/FuSteps.vue"]]);
|
|
3914
|
+
const _hoisted_1$3 = { class: "fu-step" };
|
|
3915
|
+
const __default__$7 = { name: "FuStep" };
|
|
3916
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$7), {
|
|
3917
|
+
setup(__props) {
|
|
3918
|
+
const stepper = inject("stepper");
|
|
3919
|
+
const loading = computed(() => stepper.isLoading || false);
|
|
3889
3920
|
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);
|
|
3921
|
+
const _directive_loading = resolveDirective("loading");
|
|
3922
|
+
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
3923
|
+
renderSlot(_ctx.$slots, "default")
|
|
3924
|
+
])), [
|
|
3925
|
+
[_directive_loading, unref(loading)]
|
|
3926
|
+
]);
|
|
3928
3927
|
};
|
|
3929
3928
|
}
|
|
3930
3929
|
}));
|
|
3931
|
-
var
|
|
3932
|
-
|
|
3933
|
-
app.component(
|
|
3930
|
+
var FuStep = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/steps/FuStep.vue"]]);
|
|
3931
|
+
FuSteps.install = (app) => {
|
|
3932
|
+
app.component(FuStep.name, FuStep);
|
|
3933
|
+
app.component(FuSteps.name, FuSteps);
|
|
3934
3934
|
};
|
|
3935
3935
|
var __glob_2_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3936
3936
|
__proto__: null,
|
|
3937
|
-
"default":
|
|
3937
|
+
"default": FuSteps
|
|
3938
3938
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3939
3939
|
function isFragment(node) {
|
|
3940
3940
|
return isVNode(node) && node.type === Fragment;
|
|
@@ -5047,7 +5047,7 @@ var __glob_2_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
5047
5047
|
"default": FuTabs
|
|
5048
5048
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5049
5049
|
const name = "fit2cloud-ui-plus";
|
|
5050
|
-
const version = "1.1.
|
|
5050
|
+
const version = "1.1.1";
|
|
5051
5051
|
const main = "./lib/fit2cloud-ui-plus.es.js";
|
|
5052
5052
|
const files = [
|
|
5053
5053
|
"lib",
|
|
@@ -5103,7 +5103,7 @@ var PackageJSON = {
|
|
|
5103
5103
|
dependencies,
|
|
5104
5104
|
devDependencies
|
|
5105
5105
|
};
|
|
5106
|
-
const components = { "./components/
|
|
5106
|
+
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
5107
|
const install = (app, config) => {
|
|
5108
5108
|
Object.keys(components).forEach((key) => {
|
|
5109
5109
|
let component = components[key].default;
|