fit2cloud-ui-plus 1.0.8 → 1.1.0
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 +553 -72
- package/lib/fit2cloud-ui-plus.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/ steps/FuHorizontalNavigation.vue +26 -0
- package/src/components/ steps/FuHorizontalSteps.vue +103 -0
- package/src/components/ steps/FuStep.vue +11 -0
- package/src/components/ steps/FuStepButton.vue +8 -0
- package/src/components/ steps/FuSteps.vue +43 -0
- package/src/components/ steps/FuStepsFooter.ts +75 -0
- package/src/components/ steps/FuVerticalNavigation.vue +41 -0
- package/src/components/ steps/FuVerticalSteps.vue +94 -0
- package/src/components/ steps/Stepper.ts +171 -0
- package/src/components/ steps/index.ts +10 -0
- package/src/components/ steps/types.ts +29 -0
- package/src/components/table/FuTable.vue +6 -0
- package/types/examples/pages/steps/attributes.d.ts +63 -0
- package/types/examples/pages/steps/demo/BaseSteps.vue.d.ts +2 -0
- package/types/examples/pages/steps/demo/CustomFooterDemo.vue.d.ts +2 -0
- package/types/examples/pages/steps/demo/SettingFooterDemo.vue.d.ts +2 -0
- package/types/examples/pages/steps/demo/StepsHooksDemo.vue.d.ts +2 -0
- package/types/examples/pages/steps/demo/VerticalSteps.vue.d.ts +2 -0
- package/types/examples/pages/steps/index.vue.d.ts +2 -0
- package/types/src/components/ steps/FuHorizontalNavigation.vue.d.ts +13 -0
- package/types/src/components/ steps/FuHorizontalSteps.vue.d.ts +6 -0
- package/types/src/components/ steps/FuStep.vue.d.ts +2 -0
- package/types/src/components/ steps/FuStepButton.vue.d.ts +2 -0
- package/types/src/components/ steps/FuSteps.vue.d.ts +12 -0
- package/types/src/components/ steps/FuStepsFooter.d.ts +6 -0
- package/types/src/components/ steps/FuVerticalNavigation.vue.d.ts +14 -0
- package/types/src/components/ steps/FuVerticalSteps.vue.d.ts +6 -0
- package/types/src/components/ steps/Stepper.d.ts +39 -0
- package/types/src/components/ steps/index.d.ts +2 -0
- package/types/src/components/ steps/types.d.ts +27 -0
|
@@ -17,9 +17,114 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
var __publicField = (obj, key, value) => {
|
|
21
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
|
+
return value;
|
|
23
|
+
};
|
|
24
|
+
import { defineComponent, computed, resolveComponent, openBlock, createBlock, mergeProps, unref, withCtx, createElementBlock, Fragment, renderList, normalizeProps, guardReactiveProps, renderSlot, inject, ref, h, getCurrentInstance, provide, isRef, watch, Transition, createElementVNode, toDisplayString, createVNode, normalizeStyle, createCommentVNode, resolveDirective, withDirectives, onMounted, onUpdated, nextTick, createTextVNode, vShow, resolveDynamicComponent, normalizeClass, withModifiers, vModelText, useSlots, isVNode, Comment } from "vue";
|
|
25
|
+
var _export_sfc = (sfc, props) => {
|
|
26
|
+
const target = sfc.__vccOpts || sfc;
|
|
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
|
+
});
|
|
23
128
|
const globalConfig = ref();
|
|
24
129
|
const globalConfigKey = Symbol("GlobalConfigKey");
|
|
25
130
|
function useGlobalConfig(key, defaultValue = void 0) {
|
|
@@ -490,6 +595,8 @@ const useLocale = () => {
|
|
|
490
595
|
const locale = useGlobalConfig("locale");
|
|
491
596
|
return buildLocaleContext(computed(() => locale.value || Chinese));
|
|
492
597
|
};
|
|
598
|
+
const COMPONENTS_SIZE = ["", "default", "small", "large"];
|
|
599
|
+
const validateSize = (val) => ["", ...COMPONENTS_SIZE].includes(val);
|
|
493
600
|
const useProp = (name2) => {
|
|
494
601
|
const vm = getCurrentInstance();
|
|
495
602
|
return computed(() => {
|
|
@@ -507,13 +614,381 @@ const useSizeProp = {
|
|
|
507
614
|
type: String,
|
|
508
615
|
validator: validateSize
|
|
509
616
|
};
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
617
|
+
const { t } = useLocale();
|
|
618
|
+
class Stepper {
|
|
619
|
+
constructor(options) {
|
|
620
|
+
__publicField(this, "steps");
|
|
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;
|
|
514
649
|
}
|
|
515
|
-
|
|
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
|
+
}
|
|
678
|
+
}
|
|
679
|
+
prev() {
|
|
680
|
+
if (!this.isFirst(this.index)) {
|
|
681
|
+
this.active(this.index - 1);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
getStep(index) {
|
|
685
|
+
if (this.steps && this.steps.length > index) {
|
|
686
|
+
return this.steps[index];
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
executeBeforeLeave(index, forward) {
|
|
690
|
+
const step = this.getStep(index);
|
|
691
|
+
if (step.beforeLeave) {
|
|
692
|
+
return step.beforeLeave(step, forward);
|
|
693
|
+
}
|
|
694
|
+
if (this.beforeLeave) {
|
|
695
|
+
return this.beforeLeave(step, forward);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
executeBeforeActive(index, forward) {
|
|
699
|
+
const step = this.getStep(index);
|
|
700
|
+
if (step.beforeActive) {
|
|
701
|
+
return step.beforeActive(step, forward);
|
|
702
|
+
}
|
|
703
|
+
if (this.beforeActive) {
|
|
704
|
+
return this.beforeActive(step, forward);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
class Step {
|
|
709
|
+
constructor(options) {
|
|
710
|
+
__publicField(this, "id");
|
|
711
|
+
__publicField(this, "index");
|
|
712
|
+
__publicField(this, "beforeActive");
|
|
713
|
+
__publicField(this, "beforeLeave");
|
|
714
|
+
__publicField(this, "title");
|
|
715
|
+
__publicField(this, "description");
|
|
716
|
+
__publicField(this, "icon");
|
|
717
|
+
__publicField(this, "status");
|
|
718
|
+
options = options || {};
|
|
719
|
+
this.id = options.id;
|
|
720
|
+
this.index = options.index;
|
|
721
|
+
this.beforeActive = options.beforeActive;
|
|
722
|
+
this.beforeLeave = options.beforeLeave;
|
|
723
|
+
this.title = options.title;
|
|
724
|
+
this.description = options.description;
|
|
725
|
+
this.icon = options.icon;
|
|
726
|
+
this.status = options.status;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
const _sfc_main$H = defineComponent({
|
|
730
|
+
name: "FuHorizontalSteps",
|
|
731
|
+
components: {
|
|
732
|
+
FuHorizontalNavigation,
|
|
733
|
+
FuStepsFooter
|
|
734
|
+
},
|
|
735
|
+
emits: ["change"],
|
|
736
|
+
setup(_, { attrs, slots, emit, expose }) {
|
|
737
|
+
var _a2;
|
|
738
|
+
const stepper = ref(new Stepper());
|
|
739
|
+
(_a2 = stepper.value) == null ? void 0 : _a2.activeSet.add(0);
|
|
740
|
+
watch(() => stepper.value.index, (value) => {
|
|
741
|
+
emit("change", stepper.value.steps[value]);
|
|
742
|
+
});
|
|
743
|
+
const heightStyle = computed(() => {
|
|
744
|
+
var _a3;
|
|
745
|
+
return { height: parseInt((_a3 = stepper.value) == null ? void 0 : _a3.height) + "px" || "auto" };
|
|
746
|
+
});
|
|
747
|
+
function active(index) {
|
|
748
|
+
var _a3;
|
|
749
|
+
(_a3 = stepper.value) == null ? void 0 : _a3.active(index);
|
|
750
|
+
}
|
|
751
|
+
function disable(index) {
|
|
752
|
+
var _a3;
|
|
753
|
+
return !((_a3 = stepper.value) == null ? void 0 : _a3.isActive(index));
|
|
754
|
+
}
|
|
755
|
+
function next() {
|
|
756
|
+
stepper.value.next();
|
|
757
|
+
}
|
|
758
|
+
function prev() {
|
|
759
|
+
stepper.value.prev();
|
|
760
|
+
}
|
|
761
|
+
function $func(name2) {
|
|
762
|
+
emit(name2);
|
|
763
|
+
}
|
|
764
|
+
provide("stepper", stepper.value);
|
|
765
|
+
expose({
|
|
766
|
+
next,
|
|
767
|
+
prev,
|
|
768
|
+
active
|
|
769
|
+
});
|
|
770
|
+
return () => {
|
|
771
|
+
var _a3, _b, _c;
|
|
772
|
+
let steps = [];
|
|
773
|
+
if ((_a3 = slots.default) == null ? void 0 : _a3.call(slots)) {
|
|
774
|
+
(_b = slots.default) == null ? void 0 : _b.call(slots).forEach((node, index) => {
|
|
775
|
+
const options = __spreadValues({
|
|
776
|
+
index
|
|
777
|
+
}, node.props);
|
|
778
|
+
const step = new Step(options);
|
|
779
|
+
steps.push(step);
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
stepper.value.steps = steps;
|
|
783
|
+
stepper.value = Object.assign(stepper.value, attrs);
|
|
784
|
+
return h("div", {
|
|
785
|
+
class: ["fu-steps", "fu-steps--horizontal"]
|
|
786
|
+
}, [
|
|
787
|
+
h(FuHorizontalNavigation, {
|
|
788
|
+
stepper: stepper.value,
|
|
789
|
+
steps,
|
|
790
|
+
disable,
|
|
791
|
+
onActive: active
|
|
792
|
+
}),
|
|
793
|
+
h("div", { class: "fu-steps__wrapper" }, h("div", { class: "fu-steps__container", style: heightStyle.value }, h(Transition, { name: "carousel", mode: "out-in", tag: "p" }, () => {
|
|
794
|
+
var _a4;
|
|
795
|
+
return (_a4 = slots.default) == null ? void 0 : _a4.call(slots).map((item, index) => {
|
|
796
|
+
item["key"] = index;
|
|
797
|
+
return stepper.value.index === index && item;
|
|
798
|
+
});
|
|
799
|
+
}))),
|
|
800
|
+
h("div", { class: "fu-steps__footer" }, ((_c = slots.footer) == null ? void 0 : _c.call(slots)) || h(FuStepsFooter, { onStepperFn: $func }))
|
|
801
|
+
]);
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
var FuHorizontalSteps = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/ steps/FuHorizontalSteps.vue"]]);
|
|
806
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
807
|
+
__name: "FuVerticalNavigation",
|
|
808
|
+
props: {
|
|
809
|
+
stepper: Object,
|
|
810
|
+
steps: Array,
|
|
811
|
+
disable: Function
|
|
812
|
+
},
|
|
813
|
+
emits: ["active"],
|
|
814
|
+
setup(__props, { emit }) {
|
|
815
|
+
const props = __props;
|
|
816
|
+
const active = computed(() => {
|
|
817
|
+
return props.stepper.index;
|
|
818
|
+
});
|
|
819
|
+
const heightStyle = computed(() => {
|
|
820
|
+
var _a2;
|
|
821
|
+
return {
|
|
822
|
+
height: parseInt((_a2 = props.stepper) == null ? void 0 : _a2.height) + "px" || "auto"
|
|
823
|
+
};
|
|
824
|
+
});
|
|
825
|
+
function click(index) {
|
|
826
|
+
!props.disable(index) && emit("active", index);
|
|
827
|
+
}
|
|
828
|
+
return (_ctx, _cache) => {
|
|
829
|
+
const _component_el_collapse_transition = resolveComponent("el-collapse-transition");
|
|
830
|
+
const _component_el_step = resolveComponent("el-step");
|
|
831
|
+
const _component_el_steps = resolveComponent("el-steps");
|
|
832
|
+
return openBlock(), createBlock(_component_el_steps, mergeProps({ active: unref(active) }, __props.stepper, { direction: "vertical" }), {
|
|
833
|
+
default: withCtx(() => [
|
|
834
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.steps, (step, i) => {
|
|
835
|
+
return openBlock(), createBlock(_component_el_step, mergeProps({ key: i }, step, {
|
|
836
|
+
onClick: ($event) => click(i),
|
|
837
|
+
class: __props.disable(i) && "fu-step--disable"
|
|
838
|
+
}), {
|
|
839
|
+
description: withCtx(() => [
|
|
840
|
+
createElementVNode("span", null, toDisplayString(step.description), 1),
|
|
841
|
+
createVNode(_component_el_collapse_transition, null, {
|
|
842
|
+
default: withCtx(() => [
|
|
843
|
+
i === unref(active) ? (openBlock(), createElementBlock("div", {
|
|
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)
|
|
853
|
+
]),
|
|
854
|
+
_: 2
|
|
855
|
+
}, 1040, ["onClick", "class"]);
|
|
856
|
+
}), 128))
|
|
857
|
+
]),
|
|
858
|
+
_: 3
|
|
859
|
+
}, 16, ["active"]);
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
});
|
|
863
|
+
var FuVerticalNavigation = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/ steps/FuVerticalNavigation.vue"]]);
|
|
864
|
+
const _sfc_main$F = defineComponent({
|
|
865
|
+
name: "FuVerticalSteps",
|
|
866
|
+
components: { FuVerticalNavigation, FuStepsFooter },
|
|
867
|
+
emits: ["change"],
|
|
868
|
+
setup(_, { attrs, slots, emit, expose }) {
|
|
869
|
+
const stepper = ref(new Stepper());
|
|
870
|
+
stepper.value.activeSet.add(0);
|
|
871
|
+
watch(() => stepper.value.index, (value) => {
|
|
872
|
+
emit("change", stepper.value.steps[value]);
|
|
873
|
+
});
|
|
874
|
+
function active(index) {
|
|
875
|
+
stepper.value.active(index);
|
|
876
|
+
}
|
|
877
|
+
function disable(index) {
|
|
878
|
+
return !stepper.value.isActive(index);
|
|
879
|
+
}
|
|
880
|
+
function next() {
|
|
881
|
+
stepper.value.next();
|
|
882
|
+
}
|
|
883
|
+
function prev() {
|
|
884
|
+
stepper.value.prev();
|
|
885
|
+
}
|
|
886
|
+
function $func(name2) {
|
|
887
|
+
emit(name2);
|
|
888
|
+
}
|
|
889
|
+
provide("stepper", stepper.value);
|
|
890
|
+
expose({
|
|
891
|
+
next,
|
|
892
|
+
prev,
|
|
893
|
+
active
|
|
894
|
+
});
|
|
895
|
+
return () => {
|
|
896
|
+
var _a2, _b;
|
|
897
|
+
let currentNode;
|
|
898
|
+
let steps = [];
|
|
899
|
+
if ((_a2 = slots.default) == null ? void 0 : _a2.call(slots)) {
|
|
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
|
+
}
|
|
909
|
+
});
|
|
910
|
+
}
|
|
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
|
+
}
|
|
943
|
+
function prev() {
|
|
944
|
+
var _a2;
|
|
945
|
+
(_a2 = FuSteps2.value) == null ? void 0 : _a2.prev();
|
|
946
|
+
}
|
|
947
|
+
function active(index) {
|
|
948
|
+
var _a2;
|
|
949
|
+
(_a2 = FuSteps2.value) == null ? void 0 : _a2.active(index);
|
|
950
|
+
}
|
|
951
|
+
function handleChange({ id, title, index }) {
|
|
952
|
+
emit("change", { id, title, index });
|
|
953
|
+
}
|
|
954
|
+
expose({
|
|
955
|
+
next,
|
|
956
|
+
prev,
|
|
957
|
+
active
|
|
958
|
+
});
|
|
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
|
+
return (_ctx, _cache) => {
|
|
974
|
+
const _directive_loading = resolveDirective("loading");
|
|
975
|
+
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
976
|
+
renderSlot(_ctx.$slots, "default")
|
|
977
|
+
])), [
|
|
978
|
+
[_directive_loading, unref(loading)]
|
|
979
|
+
]);
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
}));
|
|
983
|
+
var FuStep = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__file", "/Users/runner/work/fit2cloud-ui-plus/fit2cloud-ui-plus/src/components/ steps/FuStep.vue"]]);
|
|
984
|
+
FuSteps.install = (app) => {
|
|
985
|
+
app.component(FuStep.name, FuStep);
|
|
986
|
+
app.component(FuSteps.name, FuSteps);
|
|
516
987
|
};
|
|
988
|
+
var __glob_2_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
989
|
+
__proto__: null,
|
|
990
|
+
"default": FuSteps
|
|
991
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
517
992
|
const __default__$t = { name: "FuFilterInput" };
|
|
518
993
|
const _sfc_main$C = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$t), {
|
|
519
994
|
props: {
|
|
@@ -679,7 +1154,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
679
1154
|
emits: ["filter"],
|
|
680
1155
|
setup(__props, { expose, emit }) {
|
|
681
1156
|
const props = __props;
|
|
682
|
-
const { t } = useLocale();
|
|
1157
|
+
const { t: t2 } = useLocale();
|
|
683
1158
|
const filterRef = ref(null);
|
|
684
1159
|
const conditionsRef = ref(null);
|
|
685
1160
|
const configSize = useSize();
|
|
@@ -790,7 +1265,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
790
1265
|
}, [
|
|
791
1266
|
createElementVNode("div", _hoisted_1$m, [
|
|
792
1267
|
createTextVNode(toDisplayString(__props.count) + " ", 1),
|
|
793
|
-
createElementVNode("span", _hoisted_2$f, toDisplayString(unref(
|
|
1268
|
+
createElementVNode("span", _hoisted_2$f, toDisplayString(unref(t2)("fu.filter_bar.results")), 1)
|
|
794
1269
|
]),
|
|
795
1270
|
_hoisted_3$d,
|
|
796
1271
|
scroll.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -836,7 +1311,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
836
1311
|
]),
|
|
837
1312
|
_: 1
|
|
838
1313
|
}),
|
|
839
|
-
createTextVNode(" " + toDisplayString(unref(
|
|
1314
|
+
createTextVNode(" " + toDisplayString(unref(t2)("fu.filter_bar.clear")), 1)
|
|
840
1315
|
])) : createCommentVNode("v-if", true)
|
|
841
1316
|
], 512), [
|
|
842
1317
|
[vShow, unref(show)]
|
|
@@ -844,7 +1319,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
844
1319
|
createVNode(_component_el_drawer, {
|
|
845
1320
|
size: __props.drawerWidth,
|
|
846
1321
|
class: "fu-filter__drawer",
|
|
847
|
-
title: unref(
|
|
1322
|
+
title: unref(t2)("fu.filter_bar.drawer_title"),
|
|
848
1323
|
modelValue: drawer.value,
|
|
849
1324
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => drawer.value = $event),
|
|
850
1325
|
onOpen: initComponents
|
|
@@ -864,7 +1339,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
864
1339
|
onClick: _cache[0] || (_cache[0] = ($event) => drawer.value = false)
|
|
865
1340
|
}, {
|
|
866
1341
|
default: withCtx(() => [
|
|
867
|
-
createTextVNode(toDisplayString(unref(
|
|
1342
|
+
createTextVNode(toDisplayString(unref(t2)("fu.filter_bar.cancel")), 1)
|
|
868
1343
|
]),
|
|
869
1344
|
_: 1
|
|
870
1345
|
}, 8, ["size"]),
|
|
@@ -874,7 +1349,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
874
1349
|
onClick: filter
|
|
875
1350
|
}, {
|
|
876
1351
|
default: withCtx(() => [
|
|
877
|
-
createTextVNode(toDisplayString(unref(
|
|
1352
|
+
createTextVNode(toDisplayString(unref(t2)("fu.filter_bar.search")), 1)
|
|
878
1353
|
]),
|
|
879
1354
|
_: 1
|
|
880
1355
|
}, 8, ["size"])
|
|
@@ -911,7 +1386,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
911
1386
|
},
|
|
912
1387
|
emits: ["exec"],
|
|
913
1388
|
setup(__props, { expose, emit }) {
|
|
914
|
-
const { t } = useLocale();
|
|
1389
|
+
const { t: t2 } = useLocale();
|
|
915
1390
|
const configSize = useSize();
|
|
916
1391
|
const quick = ref("");
|
|
917
1392
|
const conditions = ref([]);
|
|
@@ -972,7 +1447,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
972
1447
|
size: unref(configSize)
|
|
973
1448
|
}, {
|
|
974
1449
|
default: withCtx(() => [
|
|
975
|
-
createTextVNode(toDisplayString(unref(
|
|
1450
|
+
createTextVNode(toDisplayString(unref(t2)("fu.filter_bar.filter")) + " ", 1),
|
|
976
1451
|
conditions.value.length > 0 ? (openBlock(), createElementBlock("span", _hoisted_5, "(" + toDisplayString(conditions.value.length) + ")", 1)) : createCommentVNode("v-if", true)
|
|
977
1452
|
]),
|
|
978
1453
|
_: 1
|
|
@@ -1104,7 +1579,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1104
1579
|
const showSelectAll = computed(() => {
|
|
1105
1580
|
return props.useSelectAll && props.multiple;
|
|
1106
1581
|
});
|
|
1107
|
-
const { t } = useLocale();
|
|
1582
|
+
const { t: t2 } = useLocale();
|
|
1108
1583
|
function change(v) {
|
|
1109
1584
|
if (showSelectAll.value && (v == null ? void 0 : v.includes("-$SELECT-ALL$-"))) {
|
|
1110
1585
|
selection.value = props.options.map((o) => o.value);
|
|
@@ -1187,7 +1662,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1187
1662
|
]),
|
|
1188
1663
|
_: 1
|
|
1189
1664
|
}),
|
|
1190
|
-
createTextVNode(" " + toDisplayString(unref(
|
|
1665
|
+
createTextVNode(" " + toDisplayString(unref(t2)("fu.filter_bar.more")), 1)
|
|
1191
1666
|
])
|
|
1192
1667
|
]),
|
|
1193
1668
|
default: withCtx(() => [
|
|
@@ -1199,7 +1674,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1199
1674
|
onChange: change,
|
|
1200
1675
|
teleported: false,
|
|
1201
1676
|
size: unref(configSize),
|
|
1202
|
-
placeholder: unref(
|
|
1677
|
+
placeholder: unref(t2)("fu.search_bar.please_select")
|
|
1203
1678
|
}), {
|
|
1204
1679
|
default: withCtx(() => [
|
|
1205
1680
|
unref(showSelectAll) ? (openBlock(), createBlock(_component_el_option, {
|
|
@@ -1207,7 +1682,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1207
1682
|
value: "-$SELECT-ALL$-"
|
|
1208
1683
|
}, {
|
|
1209
1684
|
default: withCtx(() => [
|
|
1210
|
-
createElementVNode("div", { onClick: selectAll }, toDisplayString(unref(
|
|
1685
|
+
createElementVNode("div", { onClick: selectAll }, toDisplayString(unref(t2)("fu.filter_bar.select_all")), 1)
|
|
1211
1686
|
]),
|
|
1212
1687
|
_: 1
|
|
1213
1688
|
})) : createCommentVNode("v-if", true),
|
|
@@ -1276,7 +1751,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1276
1751
|
const showSelectAll = computed(() => {
|
|
1277
1752
|
return props.useSelectAll && props.multiple;
|
|
1278
1753
|
});
|
|
1279
|
-
const { t } = useLocale();
|
|
1754
|
+
const { t: t2 } = useLocale();
|
|
1280
1755
|
function change(v) {
|
|
1281
1756
|
if (showSelectAll.value && (v == null ? void 0 : v.includes("-$SELECT-ALL$-"))) {
|
|
1282
1757
|
selection.value = props.options.map((o) => o.value);
|
|
@@ -1341,7 +1816,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1341
1816
|
onChange: change,
|
|
1342
1817
|
teleported: false,
|
|
1343
1818
|
size: unref(configSize),
|
|
1344
|
-
placeholder: unref(
|
|
1819
|
+
placeholder: unref(t2)("fu.search_bar.please_select"),
|
|
1345
1820
|
class: "fu-filter-select"
|
|
1346
1821
|
}), {
|
|
1347
1822
|
default: withCtx(() => [
|
|
@@ -1350,7 +1825,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1350
1825
|
value: "-$SELECT-ALL$-"
|
|
1351
1826
|
}, {
|
|
1352
1827
|
default: withCtx(() => [
|
|
1353
|
-
createElementVNode("div", { onClick: selectAll }, toDisplayString(unref(
|
|
1828
|
+
createElementVNode("div", { onClick: selectAll }, toDisplayString(unref(t2)("fu.filter_bar.select_all")), 1)
|
|
1354
1829
|
]),
|
|
1355
1830
|
_: 1
|
|
1356
1831
|
})) : createCommentVNode("v-if", true),
|
|
@@ -1426,7 +1901,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1426
1901
|
const valueLabel = computed(() => {
|
|
1427
1902
|
return dateFormat(value.value[0]) + " - " + dateFormat(value.value[1]);
|
|
1428
1903
|
});
|
|
1429
|
-
const { t } = useLocale();
|
|
1904
|
+
const { t: t2 } = useLocale();
|
|
1430
1905
|
function getCondition() {
|
|
1431
1906
|
if (!value.value || value.value.length === 0)
|
|
1432
1907
|
return;
|
|
@@ -1456,11 +1931,11 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1456
1931
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
1457
1932
|
}, _ctx.$attrs, {
|
|
1458
1933
|
size: unref(configSize),
|
|
1459
|
-
placeholder: unref(
|
|
1934
|
+
placeholder: unref(t2)("fu.search_bar.select_date"),
|
|
1460
1935
|
type: "daterange",
|
|
1461
1936
|
"value-format": __props.valueFormat,
|
|
1462
|
-
"start-placeholder": unref(
|
|
1463
|
-
"end-placeholder": unref(
|
|
1937
|
+
"start-placeholder": unref(t2)("fu.search_bar.start_date"),
|
|
1938
|
+
"end-placeholder": unref(t2)("fu.search_bar.end_date")
|
|
1464
1939
|
}), null, 16, ["modelValue", "size", "placeholder", "value-format", "start-placeholder", "end-placeholder"])
|
|
1465
1940
|
])
|
|
1466
1941
|
]);
|
|
@@ -1495,7 +1970,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1495
1970
|
const valueLabel = computed(() => {
|
|
1496
1971
|
return datetimeFormat(value.value[0]) + " - " + datetimeFormat(value.value[1]);
|
|
1497
1972
|
});
|
|
1498
|
-
const { t } = useLocale();
|
|
1973
|
+
const { t: t2 } = useLocale();
|
|
1499
1974
|
function getCondition() {
|
|
1500
1975
|
if (!value.value || value.value.length === 0)
|
|
1501
1976
|
return;
|
|
@@ -1525,11 +2000,11 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
1525
2000
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
1526
2001
|
}, _ctx.$attrs, {
|
|
1527
2002
|
size: unref(configSize),
|
|
1528
|
-
placeholder: unref(
|
|
2003
|
+
placeholder: unref(t2)("fu.search_bar.select_date_time"),
|
|
1529
2004
|
type: "datetimerange",
|
|
1530
2005
|
"value-format": __props.valueFormat,
|
|
1531
|
-
"start-placeholder": unref(
|
|
1532
|
-
"end-placeholder": unref(
|
|
2006
|
+
"start-placeholder": unref(t2)("fu.search_bar.start_date_time"),
|
|
2007
|
+
"end-placeholder": unref(t2)("fu.search_bar.end_date_time")
|
|
1533
2008
|
}), null, 16, ["modelValue", "size", "placeholder", "value-format", "start-placeholder", "end-placeholder"])
|
|
1534
2009
|
])
|
|
1535
2010
|
]);
|
|
@@ -1601,7 +2076,7 @@ FuFilterBar.install = (app) => {
|
|
|
1601
2076
|
app.component(FuFilterDateTime.name, FuFilterDateTime);
|
|
1602
2077
|
app.component(FuFilterInputText.name, FuFilterInputText);
|
|
1603
2078
|
};
|
|
1604
|
-
var
|
|
2079
|
+
var __glob_2_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1605
2080
|
__proto__: null,
|
|
1606
2081
|
"default": FuFilterBar
|
|
1607
2082
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -1674,7 +2149,7 @@ var FuIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "/Users/
|
|
|
1674
2149
|
FuIconButton.install = (app) => {
|
|
1675
2150
|
app.component(FuIconButton.name, FuIconButton);
|
|
1676
2151
|
};
|
|
1677
|
-
var
|
|
2152
|
+
var __glob_2_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1678
2153
|
__proto__: null,
|
|
1679
2154
|
"default": FuIconButton
|
|
1680
2155
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -1905,7 +2380,7 @@ FuReadWriteSwitch.install = (app) => {
|
|
|
1905
2380
|
app.component(FuInputRwSwitch.name, FuInputRwSwitch);
|
|
1906
2381
|
app.component(FuSelectRwSwitch.name, FuSelectRwSwitch);
|
|
1907
2382
|
};
|
|
1908
|
-
var
|
|
2383
|
+
var __glob_2_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1909
2384
|
__proto__: null,
|
|
1910
2385
|
"default": FuReadWriteSwitch
|
|
1911
2386
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -2000,7 +2475,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2000
2475
|
const showComplex = computed(() => {
|
|
2001
2476
|
return references ? references.value.length > 0 : false;
|
|
2002
2477
|
});
|
|
2003
|
-
const { t } = useLocale();
|
|
2478
|
+
const { t: t2 } = useLocale();
|
|
2004
2479
|
function hide() {
|
|
2005
2480
|
emit("close");
|
|
2006
2481
|
}
|
|
@@ -2085,7 +2560,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2085
2560
|
size: unref(configSize)
|
|
2086
2561
|
}, {
|
|
2087
2562
|
default: withCtx(() => [
|
|
2088
|
-
createTextVNode(toDisplayString(unref(
|
|
2563
|
+
createTextVNode(toDisplayString(unref(t2)("fu.search_bar.cancel")), 1)
|
|
2089
2564
|
]),
|
|
2090
2565
|
_: 1
|
|
2091
2566
|
}, 8, ["size"]),
|
|
@@ -2095,7 +2570,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2095
2570
|
size: unref(configSize)
|
|
2096
2571
|
}, {
|
|
2097
2572
|
default: withCtx(() => [
|
|
2098
|
-
createTextVNode(toDisplayString(unref(
|
|
2573
|
+
createTextVNode(toDisplayString(unref(t2)("fu.search_bar.ok")), 1)
|
|
2099
2574
|
]),
|
|
2100
2575
|
_: 1
|
|
2101
2576
|
}, 8, ["size"])
|
|
@@ -2224,7 +2699,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2224
2699
|
provide(referenceKey, references);
|
|
2225
2700
|
const configSize = useSize();
|
|
2226
2701
|
const placeholder = computed(() => {
|
|
2227
|
-
return props.quickPlaceholder ? props.quickPlaceholder :
|
|
2702
|
+
return props.quickPlaceholder ? props.quickPlaceholder : t2("fu.search_bar.search");
|
|
2228
2703
|
});
|
|
2229
2704
|
const showComplex = computed(() => {
|
|
2230
2705
|
return references.value.length > 0;
|
|
@@ -2249,7 +2724,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2249
2724
|
}
|
|
2250
2725
|
return obj;
|
|
2251
2726
|
});
|
|
2252
|
-
const { t } = useLocale();
|
|
2727
|
+
const { t: t2 } = useLocale();
|
|
2253
2728
|
function closePopover() {
|
|
2254
2729
|
emit("close");
|
|
2255
2730
|
}
|
|
@@ -2334,14 +2809,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2334
2809
|
icon: "Close",
|
|
2335
2810
|
onClick: clean,
|
|
2336
2811
|
size: unref(configSize),
|
|
2337
|
-
tooltip: unref(
|
|
2812
|
+
tooltip: unref(t2)("fu.search_bar.clean")
|
|
2338
2813
|
}, null, 8, ["size", "tooltip"])) : createCommentVNode("v-if", true),
|
|
2339
2814
|
unref(showRefresh) ? (openBlock(), createBlock(FuSearchBarButton, {
|
|
2340
2815
|
key: 1,
|
|
2341
2816
|
icon: "Refresh",
|
|
2342
2817
|
onClick: refresh,
|
|
2343
2818
|
size: unref(configSize),
|
|
2344
|
-
tooltip: unref(
|
|
2819
|
+
tooltip: unref(t2)("fu.search_bar.refresh")
|
|
2345
2820
|
}, null, 8, ["size", "tooltip"])) : createCommentVNode("v-if", true),
|
|
2346
2821
|
renderSlot(_ctx.$slots, "default")
|
|
2347
2822
|
])
|
|
@@ -2390,7 +2865,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2390
2865
|
}
|
|
2391
2866
|
return getValueLabel(selection.value);
|
|
2392
2867
|
});
|
|
2393
|
-
const { t } = useLocale();
|
|
2868
|
+
const { t: t2 } = useLocale();
|
|
2394
2869
|
function getValueLabel(value) {
|
|
2395
2870
|
for (let o of props.options) {
|
|
2396
2871
|
if (o.value === value) {
|
|
@@ -2425,7 +2900,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2425
2900
|
createElementVNode("div", _hoisted_3$3, [
|
|
2426
2901
|
createVNode(_component_el_select, mergeProps({
|
|
2427
2902
|
class: "fu-complex-select",
|
|
2428
|
-
placeholder: unref(
|
|
2903
|
+
placeholder: unref(t2)("fu.search_bar.please_select"),
|
|
2429
2904
|
modelValue: selection.value,
|
|
2430
2905
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selection.value = $event),
|
|
2431
2906
|
size: unref(configSize)
|
|
@@ -2467,7 +2942,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2467
2942
|
const props = __props;
|
|
2468
2943
|
const inputValue = ref("");
|
|
2469
2944
|
const configSize = useSize();
|
|
2470
|
-
const { t } = useLocale();
|
|
2945
|
+
const { t: t2 } = useLocale();
|
|
2471
2946
|
function getCondition() {
|
|
2472
2947
|
if (!inputValue.value)
|
|
2473
2948
|
return;
|
|
@@ -2495,7 +2970,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2495
2970
|
createVNode(_component_el_input, mergeProps({
|
|
2496
2971
|
modelValue: inputValue.value,
|
|
2497
2972
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
2498
|
-
placeholder: unref(
|
|
2973
|
+
placeholder: unref(t2)("fu.search_bar.please_input"),
|
|
2499
2974
|
size: unref(configSize)
|
|
2500
2975
|
}, _ctx.$attrs), null, 16, ["modelValue", "placeholder", "size"])
|
|
2501
2976
|
])
|
|
@@ -2530,7 +3005,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2530
3005
|
const valueLabel = computed(() => {
|
|
2531
3006
|
return dateFormat(value.value[0]) + " ~ " + dateFormat(value.value[1]);
|
|
2532
3007
|
});
|
|
2533
|
-
const { t } = useLocale();
|
|
3008
|
+
const { t: t2 } = useLocale();
|
|
2534
3009
|
const configSize = useSize();
|
|
2535
3010
|
function getCondition() {
|
|
2536
3011
|
if (!String(value.value))
|
|
@@ -2560,11 +3035,11 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2560
3035
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
2561
3036
|
}, _ctx.$attrs, {
|
|
2562
3037
|
size: unref(configSize),
|
|
2563
|
-
placeholder: unref(
|
|
3038
|
+
placeholder: unref(t2)("fu.search_bar.select_date"),
|
|
2564
3039
|
type: "daterange",
|
|
2565
3040
|
"value-format": __props.valueFormat,
|
|
2566
|
-
"start-placeholder": unref(
|
|
2567
|
-
"end-placeholder": unref(
|
|
3041
|
+
"start-placeholder": unref(t2)("fu.search_bar.start_date"),
|
|
3042
|
+
"end-placeholder": unref(t2)("fu.search_bar.end_date")
|
|
2568
3043
|
}), null, 16, ["modelValue", "size", "placeholder", "value-format", "start-placeholder", "end-placeholder"])
|
|
2569
3044
|
])
|
|
2570
3045
|
]);
|
|
@@ -2599,7 +3074,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2599
3074
|
const valueLabel = computed(() => {
|
|
2600
3075
|
return datetimeFormat(value.value[0]) + " ~ " + datetimeFormat(value.value[1]);
|
|
2601
3076
|
});
|
|
2602
|
-
const { t } = useLocale();
|
|
3077
|
+
const { t: t2 } = useLocale();
|
|
2603
3078
|
function getCondition() {
|
|
2604
3079
|
if (!String(value.value))
|
|
2605
3080
|
return;
|
|
@@ -2629,11 +3104,11 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
2629
3104
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
2630
3105
|
}, _ctx.$attrs, {
|
|
2631
3106
|
size: unref(configSize),
|
|
2632
|
-
placeholder: unref(
|
|
3107
|
+
placeholder: unref(t2)("fu.search_bar.select_date_time"),
|
|
2633
3108
|
type: "datetimerange",
|
|
2634
3109
|
"value-format": __props.valueFormat,
|
|
2635
|
-
"start-placeholder": unref(
|
|
2636
|
-
"end-placeholder": unref(
|
|
3110
|
+
"start-placeholder": unref(t2)("fu.search_bar.start_date_time"),
|
|
3111
|
+
"end-placeholder": unref(t2)("fu.search_bar.end_date_time")
|
|
2637
3112
|
}), null, 16, ["modelValue", "size", "placeholder", "value-format", "start-placeholder", "end-placeholder"])
|
|
2638
3113
|
])
|
|
2639
3114
|
]);
|
|
@@ -2650,7 +3125,7 @@ FuSearchBar.install = (app) => {
|
|
|
2650
3125
|
app.component(FuComplexDate.name, FuComplexDate);
|
|
2651
3126
|
app.component(FuComplexDateTime.name, FuComplexDateTime);
|
|
2652
3127
|
};
|
|
2653
|
-
var
|
|
3128
|
+
var __glob_2_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2654
3129
|
__proto__: null,
|
|
2655
3130
|
"default": FuSearchBar
|
|
2656
3131
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -3242,7 +3717,7 @@ FuSpeedDial.install = (app) => {
|
|
|
3242
3717
|
app.component(FuSpeedDial.name, FuSpeedDial);
|
|
3243
3718
|
app.component(FuSpeedDialItem.name, FuSpeedDialItem);
|
|
3244
3719
|
};
|
|
3245
|
-
var
|
|
3720
|
+
var __glob_2_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3246
3721
|
__proto__: null,
|
|
3247
3722
|
"default": FuSpeedDial
|
|
3248
3723
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -3457,7 +3932,7 @@ var FuSplitPane = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "/Users/r
|
|
|
3457
3932
|
FuSplitPane.install = (app) => {
|
|
3458
3933
|
app.component(FuSplitPane.name, FuSplitPane);
|
|
3459
3934
|
};
|
|
3460
|
-
var
|
|
3935
|
+
var __glob_2_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3461
3936
|
__proto__: null,
|
|
3462
3937
|
"default": FuSplitPane
|
|
3463
3938
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -3640,6 +4115,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
3640
4115
|
ref_key: "refElTable",
|
|
3641
4116
|
ref: refElTable
|
|
3642
4117
|
}), {
|
|
4118
|
+
append: withCtx(() => [
|
|
4119
|
+
renderSlot(_ctx.$slots, "append")
|
|
4120
|
+
]),
|
|
4121
|
+
empty: withCtx(() => [
|
|
4122
|
+
renderSlot(_ctx.$slots, "empty")
|
|
4123
|
+
]),
|
|
3643
4124
|
default: withCtx(() => [
|
|
3644
4125
|
createVNode(unref(FuTableBody), {
|
|
3645
4126
|
name: "table-body",
|
|
@@ -3740,7 +4221,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3740
4221
|
},
|
|
3741
4222
|
setup(__props) {
|
|
3742
4223
|
const props = __props;
|
|
3743
|
-
const { t } = useLocale();
|
|
4224
|
+
const { t: t2 } = useLocale();
|
|
3744
4225
|
const localKey = inject(LocalKey, void 0);
|
|
3745
4226
|
const {
|
|
3746
4227
|
columnsKey,
|
|
@@ -3761,7 +4242,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3761
4242
|
return ((_a2 = props.columns) == null ? void 0 : _a2.length) > 0 && !isFixAll.value;
|
|
3762
4243
|
});
|
|
3763
4244
|
const header = computed(() => {
|
|
3764
|
-
return props.title ||
|
|
4245
|
+
return props.title || t2("fu.table.custom_table_fields");
|
|
3765
4246
|
});
|
|
3766
4247
|
function reset() {
|
|
3767
4248
|
if (columnsKey) {
|
|
@@ -3786,7 +4267,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3786
4267
|
icon: __props.icon
|
|
3787
4268
|
}, {
|
|
3788
4269
|
default: withCtx(() => [
|
|
3789
|
-
createTextVNode(toDisplayString(unref(
|
|
4270
|
+
createTextVNode(toDisplayString(unref(t2)("fu.table.custom_table_rows")), 1)
|
|
3790
4271
|
]),
|
|
3791
4272
|
_: 1
|
|
3792
4273
|
}, 8, ["icon"])
|
|
@@ -3828,7 +4309,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3828
4309
|
onClick: reset
|
|
3829
4310
|
}, {
|
|
3830
4311
|
default: withCtx(() => [
|
|
3831
|
-
createTextVNode(toDisplayString(unref(
|
|
4312
|
+
createTextVNode(toDisplayString(unref(t2)("fu.table.reset")), 1)
|
|
3832
4313
|
]),
|
|
3833
4314
|
_: 1
|
|
3834
4315
|
})) : createCommentVNode("v-if", true)
|
|
@@ -3860,7 +4341,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3860
4341
|
setup(__props) {
|
|
3861
4342
|
const props = __props;
|
|
3862
4343
|
const localKey = inject(LocalKey, void 0);
|
|
3863
|
-
const { t } = useLocale();
|
|
4344
|
+
const { t: t2 } = useLocale();
|
|
3864
4345
|
const cloneColumn = (source, target) => {
|
|
3865
4346
|
source.forEach((col) => {
|
|
3866
4347
|
target.push(Object.assign({}, col));
|
|
@@ -3878,7 +4359,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3878
4359
|
const cloneColumns = ref([]);
|
|
3879
4360
|
const visible = ref(false);
|
|
3880
4361
|
const header = computed(() => {
|
|
3881
|
-
return props.title ||
|
|
4362
|
+
return props.title || t2("fu.table.custom_table_fields");
|
|
3882
4363
|
});
|
|
3883
4364
|
function open() {
|
|
3884
4365
|
cloneColumns.value = [];
|
|
@@ -3910,7 +4391,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3910
4391
|
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = true)
|
|
3911
4392
|
}, {
|
|
3912
4393
|
default: withCtx(() => [
|
|
3913
|
-
createTextVNode(toDisplayString(unref(
|
|
4394
|
+
createTextVNode(toDisplayString(unref(t2)("fu.table.custom_table_rows")), 1)
|
|
3914
4395
|
]),
|
|
3915
4396
|
_: 1
|
|
3916
4397
|
}, 8, ["icon"]),
|
|
@@ -3924,7 +4405,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3924
4405
|
header: withCtx(() => [
|
|
3925
4406
|
createElementVNode("h3", null, toDisplayString(unref(header)), 1),
|
|
3926
4407
|
createVNode(_component_el_alert, {
|
|
3927
|
-
title: unref(
|
|
4408
|
+
title: unref(t2)("fu.table.custom_table_fields_desc"),
|
|
3928
4409
|
type: "info",
|
|
3929
4410
|
closable: false
|
|
3930
4411
|
}, null, 8, ["title"])
|
|
@@ -3935,7 +4416,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3935
4416
|
onClick: reset
|
|
3936
4417
|
}, {
|
|
3937
4418
|
default: withCtx(() => [
|
|
3938
|
-
createTextVNode(toDisplayString(unref(
|
|
4419
|
+
createTextVNode(toDisplayString(unref(t2)("fu.table.reset")), 1)
|
|
3939
4420
|
]),
|
|
3940
4421
|
_: 1
|
|
3941
4422
|
})) : createCommentVNode("v-if", true),
|
|
@@ -3944,7 +4425,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3944
4425
|
onClick: ok
|
|
3945
4426
|
}, {
|
|
3946
4427
|
default: withCtx(() => [
|
|
3947
|
-
createTextVNode(toDisplayString(unref(
|
|
4428
|
+
createTextVNode(toDisplayString(unref(t2)("fu.table.ok")), 1)
|
|
3948
4429
|
]),
|
|
3949
4430
|
_: 1
|
|
3950
4431
|
})
|
|
@@ -4094,7 +4575,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
4094
4575
|
},
|
|
4095
4576
|
setup(__props) {
|
|
4096
4577
|
const props = __props;
|
|
4097
|
-
const { t } = useLocale();
|
|
4578
|
+
const { t: t2 } = useLocale();
|
|
4098
4579
|
const disabled = computed(() => {
|
|
4099
4580
|
return function(btn) {
|
|
4100
4581
|
return typeof btn.disabled === "function" ? btn.disabled(props.row) : btn.disabled;
|
|
@@ -4148,7 +4629,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
4148
4629
|
]),
|
|
4149
4630
|
_: 1
|
|
4150
4631
|
})) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4151
|
-
createTextVNode(toDisplayString(unref(
|
|
4632
|
+
createTextVNode(toDisplayString(unref(t2)("fu.table.more")), 1)
|
|
4152
4633
|
], 64))
|
|
4153
4634
|
]),
|
|
4154
4635
|
_: 1
|
|
@@ -4410,7 +4891,7 @@ FuTable.install = (app) => {
|
|
|
4410
4891
|
app.component(FuTableButton.name, FuTableButton);
|
|
4411
4892
|
app.component(FuTableMoreButton.name, FuTableMoreButton);
|
|
4412
4893
|
};
|
|
4413
|
-
var
|
|
4894
|
+
var __glob_2_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4414
4895
|
__proto__: null,
|
|
4415
4896
|
"default": FuTable
|
|
4416
4897
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -4561,12 +5042,12 @@ var FuTabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/runner/w
|
|
|
4561
5042
|
FuTabs.install = (app) => {
|
|
4562
5043
|
app.component(FuTabs.name, FuTabs);
|
|
4563
5044
|
};
|
|
4564
|
-
var
|
|
5045
|
+
var __glob_2_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4565
5046
|
__proto__: null,
|
|
4566
5047
|
"default": FuTabs
|
|
4567
5048
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4568
5049
|
const name = "fit2cloud-ui-plus";
|
|
4569
|
-
const version = "1.0
|
|
5050
|
+
const version = "1.1.0";
|
|
4570
5051
|
const main = "./lib/fit2cloud-ui-plus.es.js";
|
|
4571
5052
|
const files = [
|
|
4572
5053
|
"lib",
|
|
@@ -4622,7 +5103,7 @@ var PackageJSON = {
|
|
|
4622
5103
|
dependencies,
|
|
4623
5104
|
devDependencies
|
|
4624
5105
|
};
|
|
4625
|
-
const components = { "./components/filter-bar/index.ts":
|
|
5106
|
+
const components = { "./components/ steps/index.ts": __glob_2_0, "./components/filter-bar/index.ts": __glob_2_1, "./components/icon-button/index.ts": __glob_2_2, "./components/read-write-switch/index.ts": __glob_2_3, "./components/search-bar/index.ts": __glob_2_4, "./components/speed-dial/index.ts": __glob_2_5, "./components/split-pane/index.ts": __glob_2_6, "./components/table/index.ts": __glob_2_7, "./components/tabs/index.ts": __glob_2_8 };
|
|
4626
5107
|
const install = (app, config) => {
|
|
4627
5108
|
Object.keys(components).forEach((key) => {
|
|
4628
5109
|
let component = components[key].default;
|