3h1-ui 3.0.0-next.2 → 3.0.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +359 -105
- package/es/style.css +238 -24101
- package/lib/index.js +385 -109
- package/lib/style.css +8033 -0
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { h, nextTick, createVNode, defineComponent, ref, computed, unref, watchEffect, watch, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createSlots, renderSlot, normalizeProps, guardReactiveProps, createElementVNode, onMounted, normalizeClass, createCommentVNode, normalizeStyle, Transition, toHandlers, useSlots, withDirectives, vShow, getCurrentInstance, inject, onUnmounted, provide, onBeforeUnmount, resolveDynamicComponent, reactive, toRef, toRefs, TransitionGroup, getCurrentScope, onScopeDispose, readonly, isRef, shallowRef, isVNode, toRaw, useAttrs as useAttrs$2, shallowReactive, withKeys, withModifiers, render as render$1, resolveDirective, pushScopeId, popScopeId, useCssVars } from "vue";
|
|
2
|
-
import { Radio, Select, Tree, TreeSelect, Cascader, Transfer, Input, Tooltip, Skeleton, Popover, Pagination, Empty, Button as Button$1, Table as Table$1, Form, FormItem, DatePicker, InputNumber, Modal as Modal$2, Popconfirm, Menu, Dropdown, Divider as Divider$1, Image, Progress, Tag, Alert, Upload, Space, AutoComplete, Switch, Checkbox, Slider, Rate, TimePicker, Col, Row, MenuItem, MenuDivider, Spin, PageHeader, CheckboxGroup, Badge, FormItemRest, Drawer, Avatar, Descriptions, DescriptionsItem } from "ant-design-vue";
|
|
1
|
+
import { h, nextTick, createVNode, defineComponent, ref, computed, unref, watchEffect, watch, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createSlots, renderSlot, normalizeProps, guardReactiveProps, createElementVNode, onMounted, normalizeClass, createCommentVNode, normalizeStyle, Transition, toHandlers, useSlots, withDirectives, vShow, getCurrentInstance, inject, onUnmounted, provide, onBeforeUnmount, resolveDynamicComponent, reactive, toRef, toRefs, TransitionGroup, getCurrentScope, onScopeDispose, readonly, defineAsyncComponent, isRef, shallowRef, isVNode, toRaw, useAttrs as useAttrs$2, shallowReactive, withKeys, withModifiers, render as render$1, resolveDirective, pushScopeId, popScopeId, useCssVars } from "vue";
|
|
2
|
+
import { Radio, Select, Tree, TreeSelect, Cascader, Transfer, Input, Tooltip, Skeleton, Popover, Pagination, Empty, Button as Button$1, Table as Table$1, Form, FormItem, DatePicker, InputNumber, Modal as Modal$2, Popconfirm, Menu, Dropdown, Divider as Divider$1, Image, Progress, Tag, Alert, Upload, Space, AutoComplete, Switch, Checkbox, Slider, Rate, TimePicker, Col, Row, MenuItem, MenuDivider, Spin, PageHeader, CheckboxGroup, TableSummaryRow, TableSummaryCell, TableSummary, Badge, FormItemRest, Drawer, Avatar, Descriptions, DescriptionsItem } from "ant-design-vue";
|
|
3
3
|
import { isFunction as isFunction$4, isString as isString$3, isArray as isArray$3, getSlot as getSlot$1, addClass as addClass$1, removeClass as removeClass$1, getPopupContainer as getPopupContainer$1, triggerWindowResize, off, on, addResizeListener, removeResizeListener, withInstall as withInstall$5, extendSlots as extendSlots$1, isBoolean, isNumber as isNumber$2, isDef as isDef$1, buildUUID, warn as warn$1, downloadByUrl, isObject as isObject$3, isNull, dateUtil, isNullOrUnDef, error as error$1, deepMerge as deepMerge$1, getDynamicProps, buildProps, createBEM, forEach as forEach$1, isClient as isClient$1, filter, treeToList, eachTree, isEmpty, isServer, formatToDate, isMap as isMap$2, findNodeAll, getViewportOffset, isNullAndUnDef, dataURLtoBlob, deepMergeObjects } from "@shy-plugins/utils";
|
|
4
4
|
import { useAttrs as useAttrs$1, useRuleFormItem, useTimeoutFn as useTimeoutFn$2, useScrollTo as useScrollTo$1, useIntersectionObserver, useCopyToClipboard, useMessage, usePagination as usePagination$2, useI18n as useI18n$1, useDesign as useDesign$1, useSortable, createContext as createContext$1, useContext as useContext$2, useBreakpoint, useContentHeight, useWindowSizeFn as useWindowSizeFn$1, onMountedOrActivated, useEventListener as useEventListener$1 } from "@shy-plugins/use";
|
|
5
5
|
import { zxcvbn } from "@zxcvbn-ts/core";
|
|
6
6
|
import Iconify from "@purge-icons/generated";
|
|
7
|
-
import { Tinymce } from "@shy-plugins/tinymce";
|
|
8
7
|
import dayjs from "dayjs";
|
|
9
8
|
import Sortablejs from "sortablejs";
|
|
10
9
|
import "xe-utils";
|
|
@@ -12,7 +11,7 @@ import { VxeColgroup, VxeColumn, VxeTable } from "vxe-table";
|
|
|
12
11
|
const windiBase = "";
|
|
13
12
|
const windiComponents = "";
|
|
14
13
|
const windiUtilities = "";
|
|
15
|
-
const
|
|
14
|
+
const reset = "";
|
|
16
15
|
function bound01(n, max) {
|
|
17
16
|
if (isOnePointZero(n)) {
|
|
18
17
|
n = "100%";
|
|
@@ -7460,18 +7459,18 @@ function useCountdown(count) {
|
|
|
7460
7459
|
}
|
|
7461
7460
|
}, 1e3);
|
|
7462
7461
|
}
|
|
7463
|
-
function
|
|
7462
|
+
function reset3() {
|
|
7464
7463
|
currentCount.value = count;
|
|
7465
7464
|
stop();
|
|
7466
7465
|
}
|
|
7467
7466
|
function restart() {
|
|
7468
|
-
|
|
7467
|
+
reset3();
|
|
7469
7468
|
start();
|
|
7470
7469
|
}
|
|
7471
7470
|
tryOnUnmounted(() => {
|
|
7472
|
-
|
|
7471
|
+
reset3();
|
|
7473
7472
|
});
|
|
7474
|
-
return { start, reset:
|
|
7473
|
+
return { start, reset: reset3, restart, clear: clear2, stop, currentCount, isStart };
|
|
7475
7474
|
}
|
|
7476
7475
|
const props$9 = {
|
|
7477
7476
|
value: { type: [Object, Number, String, Array] },
|
|
@@ -7487,12 +7486,12 @@ const _sfc_main$18 = defineComponent({
|
|
|
7487
7486
|
props: props$9,
|
|
7488
7487
|
setup(props2) {
|
|
7489
7488
|
const loading = ref(false);
|
|
7490
|
-
const { currentCount, isStart, start, reset:
|
|
7489
|
+
const { currentCount, isStart, start, reset: reset3 } = useCountdown(props2.count);
|
|
7491
7490
|
const getButtonText = computed(() => {
|
|
7492
7491
|
return !unref(isStart) ? "获取验证码" : `${currentCount.value}秒后重新获取`;
|
|
7493
7492
|
});
|
|
7494
7493
|
watchEffect(() => {
|
|
7495
|
-
props2.value === void 0 &&
|
|
7494
|
+
props2.value === void 0 && reset3();
|
|
7496
7495
|
});
|
|
7497
7496
|
async function handleStart() {
|
|
7498
7497
|
const { beforeStartFunc } = props2;
|
|
@@ -7588,6 +7587,10 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
7588
7587
|
emits: ["change", "input"],
|
|
7589
7588
|
setup(__props) {
|
|
7590
7589
|
const props2 = __props;
|
|
7590
|
+
const Tinymce = defineAsyncComponent(async () => {
|
|
7591
|
+
const { Tinymce: Tinymce2 } = await import("@shy-plugins/tinymce");
|
|
7592
|
+
return Tinymce2;
|
|
7593
|
+
});
|
|
7591
7594
|
const [state] = useRuleFormItem(props2);
|
|
7592
7595
|
return (_ctx, _cache) => {
|
|
7593
7596
|
return openBlock(), createBlock(unref(Tinymce), {
|
|
@@ -7629,7 +7632,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7629
7632
|
default: () => true
|
|
7630
7633
|
}
|
|
7631
7634
|
},
|
|
7632
|
-
emits: ["update:value", "change"],
|
|
7635
|
+
emits: ["update:value", "change", "add", "remove"],
|
|
7633
7636
|
setup(__props, { expose, emit }) {
|
|
7634
7637
|
const props2 = __props;
|
|
7635
7638
|
const listFormRefs = ref([]);
|
|
@@ -7642,18 +7645,20 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7642
7645
|
customRender: ({ index: index2 }) => {
|
|
7643
7646
|
return `${index2 + 1}`;
|
|
7644
7647
|
},
|
|
7645
|
-
|
|
7648
|
+
width: 50,
|
|
7646
7649
|
align: "center"
|
|
7647
7650
|
};
|
|
7648
7651
|
return [indexColumn, ...props2.columns];
|
|
7649
7652
|
});
|
|
7650
7653
|
const plusClickEvent = () => {
|
|
7651
7654
|
state.value = [{}, ...state.value];
|
|
7655
|
+
emit("add", state.value);
|
|
7652
7656
|
};
|
|
7653
7657
|
const rowClickEvent = (index2) => {
|
|
7654
7658
|
state.value = unref(state).filter((item, i) => {
|
|
7655
7659
|
return index2 !== i;
|
|
7656
7660
|
});
|
|
7661
|
+
emit("remove", state.value, index2);
|
|
7657
7662
|
};
|
|
7658
7663
|
const loadKv = () => {
|
|
7659
7664
|
const columns = props2.columns;
|
|
@@ -7766,10 +7771,9 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7766
7771
|
};
|
|
7767
7772
|
}
|
|
7768
7773
|
});
|
|
7769
|
-
const
|
|
7770
|
-
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-
|
|
7774
|
+
const Table_vue_vue_type_style_index_0_scoped_cb71007d_lang = "";
|
|
7775
|
+
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-cb71007d"]]);
|
|
7771
7776
|
const modal = "";
|
|
7772
|
-
useI18n$1();
|
|
7773
7777
|
const modalProps = {
|
|
7774
7778
|
visible: { type: Boolean },
|
|
7775
7779
|
scrollTop: { type: Boolean, default: true },
|
|
@@ -8783,8 +8787,10 @@ const _sfc_main$Z = defineComponent({
|
|
|
8783
8787
|
watch(
|
|
8784
8788
|
() => unref(visibleRef),
|
|
8785
8789
|
(v) => {
|
|
8790
|
+
var _a2;
|
|
8786
8791
|
emit("visible-change", v);
|
|
8787
8792
|
emit("update:visible", v);
|
|
8793
|
+
instance && ((_a2 = modalMethods.emitVisible) == null ? void 0 : _a2.call(modalMethods, v, instance.uid));
|
|
8788
8794
|
nextTick(() => {
|
|
8789
8795
|
if (props2.scrollTop && v && unref(modalWrapperRef)) {
|
|
8790
8796
|
unref(modalWrapperRef).scrollTop();
|
|
@@ -10332,7 +10338,6 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
10332
10338
|
emits: ["change", "delete", "preview-delete", "update:value"],
|
|
10333
10339
|
setup(__props, { emit }) {
|
|
10334
10340
|
const props2 = __props;
|
|
10335
|
-
defineOptions({ name: "BasicUpload" });
|
|
10336
10341
|
const attrs = useAttrs$2();
|
|
10337
10342
|
const { t: t2 } = useI18n$1();
|
|
10338
10343
|
const [registerUploadModal, { openModal: openUploadModal }] = useModal();
|
|
@@ -10441,7 +10446,6 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
10441
10446
|
emits: ["change", "update:value", "delete"],
|
|
10442
10447
|
setup(__props, { emit }) {
|
|
10443
10448
|
const props2 = __props;
|
|
10444
|
-
defineOptions({ name: "ImageUpload" });
|
|
10445
10449
|
const { t: t2 } = useI18n$1();
|
|
10446
10450
|
const { createMessage } = useMessage();
|
|
10447
10451
|
const { accept, helpText, maxNumber, maxSize } = toRefs(props2);
|
|
@@ -10733,6 +10737,24 @@ function useItemLabelWidth(schemaItemRef, propsRef) {
|
|
|
10733
10737
|
};
|
|
10734
10738
|
});
|
|
10735
10739
|
}
|
|
10740
|
+
const globalConfig = {
|
|
10741
|
+
form: {},
|
|
10742
|
+
table: {},
|
|
10743
|
+
formInputNumber: {}
|
|
10744
|
+
};
|
|
10745
|
+
const registerGlobalConfig = (config) => {
|
|
10746
|
+
Object.keys(config).forEach((key2) => {
|
|
10747
|
+
const value = config[key2];
|
|
10748
|
+
globalConfig[key2] = value;
|
|
10749
|
+
});
|
|
10750
|
+
};
|
|
10751
|
+
const useGlobalConfig = (key2) => {
|
|
10752
|
+
const config = globalConfig[key2];
|
|
10753
|
+
const setConfig = (value) => {
|
|
10754
|
+
globalConfig[key2] = value;
|
|
10755
|
+
};
|
|
10756
|
+
return { config, setConfig };
|
|
10757
|
+
};
|
|
10736
10758
|
function _isSlot$2(s) {
|
|
10737
10759
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
10738
10760
|
}
|
|
@@ -10775,6 +10797,9 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
10775
10797
|
slots,
|
|
10776
10798
|
emit
|
|
10777
10799
|
}) {
|
|
10800
|
+
const {
|
|
10801
|
+
config
|
|
10802
|
+
} = useGlobalConfig("form");
|
|
10778
10803
|
const {
|
|
10779
10804
|
schema,
|
|
10780
10805
|
formProps
|
|
@@ -10851,10 +10876,14 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
10851
10876
|
showSearch: true,
|
|
10852
10877
|
filterOption: (input, option) => {
|
|
10853
10878
|
return option[label].toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10854
|
-
}
|
|
10879
|
+
},
|
|
10880
|
+
getPopupContainer: () => document.body
|
|
10855
10881
|
});
|
|
10856
10882
|
}
|
|
10857
|
-
return
|
|
10883
|
+
return {
|
|
10884
|
+
...config[schema2 == null ? void 0 : schema2.component] || {},
|
|
10885
|
+
...componentProps
|
|
10886
|
+
};
|
|
10858
10887
|
});
|
|
10859
10888
|
const getDisable = computed(() => {
|
|
10860
10889
|
const {
|
|
@@ -11593,7 +11622,9 @@ function useFormEvents({
|
|
|
11593
11622
|
if (typeof componentProps === "function") {
|
|
11594
11623
|
_props = _props({ formModel });
|
|
11595
11624
|
}
|
|
11596
|
-
|
|
11625
|
+
if (typeof value !== "string")
|
|
11626
|
+
value = dayjs(value);
|
|
11627
|
+
formModel[key2] = value ? (_props == null ? void 0 : _props.valueFormat) ? dayjs(value).format(_props == null ? void 0 : _props.valueFormat) : dateUtil(value) : null;
|
|
11597
11628
|
}
|
|
11598
11629
|
} else {
|
|
11599
11630
|
formModel[key2] = value;
|
|
@@ -11972,23 +12003,6 @@ const basicProps$4 = {
|
|
|
11972
12003
|
default: () => []
|
|
11973
12004
|
}
|
|
11974
12005
|
};
|
|
11975
|
-
const globalConfig = {
|
|
11976
|
-
form: {},
|
|
11977
|
-
table: {}
|
|
11978
|
-
};
|
|
11979
|
-
const registerGlobalConfig = (config) => {
|
|
11980
|
-
Object.keys(config).forEach((key2) => {
|
|
11981
|
-
const value = config[key2];
|
|
11982
|
-
globalConfig[key2] = value;
|
|
11983
|
-
});
|
|
11984
|
-
};
|
|
11985
|
-
const useGlobalConfig = (key2) => {
|
|
11986
|
-
const config = globalConfig[key2];
|
|
11987
|
-
const setConfig = (value) => {
|
|
11988
|
-
globalConfig[key2] = value;
|
|
11989
|
-
};
|
|
11990
|
-
return { config, setConfig };
|
|
11991
|
-
};
|
|
11992
12006
|
const _sfc_main$M = defineComponent({
|
|
11993
12007
|
name: "BasicForm",
|
|
11994
12008
|
components: { FormItem: _sfc_main$O, Form, Row, FormAction, DownOutlined: DownOutlined$1 },
|
|
@@ -14682,6 +14696,34 @@ function handleItem(item, ellipsis) {
|
|
|
14682
14696
|
handleChildren(children, !!ellipsis);
|
|
14683
14697
|
}
|
|
14684
14698
|
}
|
|
14699
|
+
function handleColumnResize(propsRef, columns, wrapRef) {
|
|
14700
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
14701
|
+
const tableWidth = ((_c = (_b = (_a2 = wrapRef.value) == null ? void 0 : _a2.querySelector) == null ? void 0 : _b.call(_a2, ".ant-table-body")) == null ? void 0 : _c.clientWidth) - 7 || ((_f = (_e = (_d = wrapRef.value) == null ? void 0 : _d.querySelector) == null ? void 0 : _e.call(_d, ".ant-table-content")) == null ? void 0 : _f.clientWidth);
|
|
14702
|
+
const selectWidth = propsRef.value.rowSelection ? 60 : 0;
|
|
14703
|
+
const [sumWidth, sumLength] = columns.reduce(
|
|
14704
|
+
([sumWidth2, length2], cur) => {
|
|
14705
|
+
if (typeof cur.width === "number") {
|
|
14706
|
+
return [sumWidth2 + cur.width, ++length2];
|
|
14707
|
+
}
|
|
14708
|
+
return [sumWidth2, length2];
|
|
14709
|
+
},
|
|
14710
|
+
[0, 0]
|
|
14711
|
+
);
|
|
14712
|
+
const length = columns.length;
|
|
14713
|
+
const colWidth = tableWidth ? (tableWidth - sumWidth - selectWidth) / (length - sumLength) : 100;
|
|
14714
|
+
columns.forEach((item) => {
|
|
14715
|
+
if (item.flag)
|
|
14716
|
+
return;
|
|
14717
|
+
if (propsRef.value.resizable) {
|
|
14718
|
+
item.width = item.width || colWidth;
|
|
14719
|
+
item.resizable = item.resizable === void 0 ? true : item.resizable;
|
|
14720
|
+
} else {
|
|
14721
|
+
if (item.resizable) {
|
|
14722
|
+
item.width = item.width || colWidth;
|
|
14723
|
+
}
|
|
14724
|
+
}
|
|
14725
|
+
});
|
|
14726
|
+
}
|
|
14685
14727
|
function handleChildren(children, ellipsis) {
|
|
14686
14728
|
if (!children)
|
|
14687
14729
|
return;
|
|
@@ -14746,13 +14788,14 @@ function handleActionColumn(propsRef, columns) {
|
|
|
14746
14788
|
});
|
|
14747
14789
|
}
|
|
14748
14790
|
}
|
|
14749
|
-
function useColumns$1(propsRef, getPaginationRef, tableAction) {
|
|
14791
|
+
function useColumns$1(propsRef, getPaginationRef, tableAction, wrapRef) {
|
|
14750
14792
|
const columnsRef = ref(unref(propsRef).columns);
|
|
14751
14793
|
let cacheColumns = unref(propsRef).columns;
|
|
14752
14794
|
const getColumnsRef = computed(() => {
|
|
14753
14795
|
const columns = cloneDeep(unref(columnsRef));
|
|
14754
14796
|
handleIndexColumn(propsRef, getPaginationRef, columns);
|
|
14755
14797
|
handleActionColumn(propsRef, columns);
|
|
14798
|
+
handleColumnResize(propsRef, columns, wrapRef);
|
|
14756
14799
|
if (!columns) {
|
|
14757
14800
|
return [];
|
|
14758
14801
|
}
|
|
@@ -14817,6 +14860,12 @@ function useColumns$1(propsRef, getPaginationRef, tableAction) {
|
|
|
14817
14860
|
return reactive(column);
|
|
14818
14861
|
});
|
|
14819
14862
|
});
|
|
14863
|
+
const getColumnsSummary = computed(() => {
|
|
14864
|
+
if (propsRef.value.rowSelection) {
|
|
14865
|
+
return [{ flag: "ROW_SELECTION" }, ...getViewColumns.value];
|
|
14866
|
+
}
|
|
14867
|
+
return getViewColumns.value;
|
|
14868
|
+
});
|
|
14820
14869
|
watch(
|
|
14821
14870
|
() => unref(propsRef).columns,
|
|
14822
14871
|
(columns) => {
|
|
@@ -14893,7 +14942,8 @@ function useColumns$1(propsRef, getPaginationRef, tableAction) {
|
|
|
14893
14942
|
getColumns,
|
|
14894
14943
|
setColumns,
|
|
14895
14944
|
getViewColumns,
|
|
14896
|
-
setCacheColumnsByField
|
|
14945
|
+
setCacheColumnsByField,
|
|
14946
|
+
getColumnsSummary
|
|
14897
14947
|
};
|
|
14898
14948
|
}
|
|
14899
14949
|
function sortFixedColumn(columns) {
|
|
@@ -14956,6 +15006,19 @@ function useDataSource(propsRef, {
|
|
|
14956
15006
|
watchEffect(() => {
|
|
14957
15007
|
tableData.value = unref(dataSourceRef);
|
|
14958
15008
|
});
|
|
15009
|
+
const summaryTotalData = computed(() => {
|
|
15010
|
+
const { summaryTotalFields } = unref(propsRef);
|
|
15011
|
+
if (!summaryTotalFields)
|
|
15012
|
+
return {};
|
|
15013
|
+
const obj = {};
|
|
15014
|
+
summaryTotalFields.forEach((field) => {
|
|
15015
|
+
const total = dataSourceRef.value.reduce((acc, cur) => {
|
|
15016
|
+
return acc + (cur[field] || 0);
|
|
15017
|
+
}, 0);
|
|
15018
|
+
obj[field] = Number.parseFloat(total.toFixed(2)).toLocaleString("en-US");
|
|
15019
|
+
});
|
|
15020
|
+
return obj;
|
|
15021
|
+
});
|
|
14959
15022
|
watch(
|
|
14960
15023
|
() => unref(propsRef).dataSource,
|
|
14961
15024
|
() => {
|
|
@@ -15239,7 +15302,8 @@ function useDataSource(propsRef, {
|
|
|
15239
15302
|
deleteTableDataRecord,
|
|
15240
15303
|
insertTableDataRecord,
|
|
15241
15304
|
findTableDataRecord,
|
|
15242
|
-
handleTableChange
|
|
15305
|
+
handleTableChange,
|
|
15306
|
+
summaryTotalData
|
|
15243
15307
|
};
|
|
15244
15308
|
}
|
|
15245
15309
|
function useLoading$1(props2) {
|
|
@@ -15269,7 +15333,9 @@ function useRowSelection(propsRef, tableData, emit) {
|
|
|
15269
15333
|
onChange: (selectedRowKeys) => {
|
|
15270
15334
|
setSelectedRowKeys(selectedRowKeys);
|
|
15271
15335
|
},
|
|
15272
|
-
...omit$1(rowSelection, ["onChange"])
|
|
15336
|
+
...omit$1(rowSelection, ["onChange"]),
|
|
15337
|
+
fixed: rowSelection.fixed ?? "left",
|
|
15338
|
+
columnWidth: rowSelection.columnWidth ?? 60
|
|
15273
15339
|
};
|
|
15274
15340
|
});
|
|
15275
15341
|
watch(
|
|
@@ -15769,7 +15835,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
15769
15835
|
}
|
|
15770
15836
|
let sortable;
|
|
15771
15837
|
let sortableOrder = [];
|
|
15772
|
-
function
|
|
15838
|
+
function reset3() {
|
|
15773
15839
|
state.checkedList = [...state.defaultCheckList];
|
|
15774
15840
|
state.checkAll = true;
|
|
15775
15841
|
plainOptions.value = unref(cachePlainOptions);
|
|
@@ -15911,7 +15977,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
15911
15977
|
createVNode(_component_a_button, {
|
|
15912
15978
|
size: "small",
|
|
15913
15979
|
type: "link",
|
|
15914
|
-
onClick:
|
|
15980
|
+
onClick: reset3
|
|
15915
15981
|
}, {
|
|
15916
15982
|
default: withCtx(() => [
|
|
15917
15983
|
createTextVNode(toDisplayString(unref(t2)("common.resetText")), 1)
|
|
@@ -17234,6 +17300,11 @@ const basicProps$3 = reactive({
|
|
|
17234
17300
|
type: Array,
|
|
17235
17301
|
default: null
|
|
17236
17302
|
},
|
|
17303
|
+
summaryTotalFields: {
|
|
17304
|
+
type: Array,
|
|
17305
|
+
default: null
|
|
17306
|
+
},
|
|
17307
|
+
showSummaryTotal: Boolean,
|
|
17237
17308
|
indentSize: {
|
|
17238
17309
|
type: Number,
|
|
17239
17310
|
default: 24
|
|
@@ -17307,6 +17378,7 @@ const basicProps$3 = reactive({
|
|
|
17307
17378
|
default: null
|
|
17308
17379
|
},
|
|
17309
17380
|
ellipsis: { type: Boolean, default: true },
|
|
17381
|
+
resizable: { type: Boolean, default: false },
|
|
17310
17382
|
isCanResizeParent: { type: Boolean, default: false },
|
|
17311
17383
|
canResize: { type: Boolean, default: true },
|
|
17312
17384
|
clearSelectOnPageChange: {
|
|
@@ -17639,7 +17711,10 @@ const _sfc_main$q = defineComponent({
|
|
|
17639
17711
|
BasicForm,
|
|
17640
17712
|
HeaderCell: _sfc_main$E,
|
|
17641
17713
|
Empty,
|
|
17642
|
-
TableGlobalSearch
|
|
17714
|
+
TableGlobalSearch,
|
|
17715
|
+
TableSummaryRow,
|
|
17716
|
+
TableSummaryCell,
|
|
17717
|
+
TableSummary
|
|
17643
17718
|
},
|
|
17644
17719
|
props: basicProps$3,
|
|
17645
17720
|
emits: [
|
|
@@ -17710,7 +17785,8 @@ const _sfc_main$q = defineComponent({
|
|
|
17710
17785
|
getRowKey,
|
|
17711
17786
|
reload,
|
|
17712
17787
|
getAutoCreateKey,
|
|
17713
|
-
updateTableData
|
|
17788
|
+
updateTableData,
|
|
17789
|
+
summaryTotalData
|
|
17714
17790
|
} = useDataSource(
|
|
17715
17791
|
getProps,
|
|
17716
17792
|
{
|
|
@@ -17737,8 +17813,9 @@ const _sfc_main$q = defineComponent({
|
|
|
17737
17813
|
setCacheColumnsByField,
|
|
17738
17814
|
setColumns,
|
|
17739
17815
|
getColumnsRef,
|
|
17740
|
-
getCacheColumns
|
|
17741
|
-
|
|
17816
|
+
getCacheColumns,
|
|
17817
|
+
getColumnsSummary
|
|
17818
|
+
} = useColumns$1(getProps, getPaginationInfo, tableActionRef, wrapRef);
|
|
17742
17819
|
const { getScrollRef, redoHeight } = useTableScroll(
|
|
17743
17820
|
getProps,
|
|
17744
17821
|
tableElRef,
|
|
@@ -17936,7 +18013,12 @@ const _sfc_main$q = defineComponent({
|
|
|
17936
18013
|
handleAdvancedEnsure,
|
|
17937
18014
|
isVisibleGlobalSearch,
|
|
17938
18015
|
schemasAdvancedSearchString,
|
|
17939
|
-
schemasAdvancedSearchGlobal
|
|
18016
|
+
schemasAdvancedSearchGlobal,
|
|
18017
|
+
getColumns,
|
|
18018
|
+
getColumnsRef,
|
|
18019
|
+
summaryTotalData,
|
|
18020
|
+
getProps,
|
|
18021
|
+
getColumnsSummary
|
|
17940
18022
|
};
|
|
17941
18023
|
}
|
|
17942
18024
|
});
|
|
@@ -17951,6 +18033,9 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
17951
18033
|
const _component_TableGlobalSearch = resolveComponent("TableGlobalSearch");
|
|
17952
18034
|
const _component_HeaderCell = resolveComponent("HeaderCell");
|
|
17953
18035
|
const _component_Empty = resolveComponent("Empty");
|
|
18036
|
+
const _component_TableSummaryCell = resolveComponent("TableSummaryCell");
|
|
18037
|
+
const _component_TableSummaryRow = resolveComponent("TableSummaryRow");
|
|
18038
|
+
const _component_TableSummary = resolveComponent("TableSummary");
|
|
17954
18039
|
const _component_Table = resolveComponent("Table");
|
|
17955
18040
|
return openBlock(), createElementBlock("div", {
|
|
17956
18041
|
ref: "wrapRef",
|
|
@@ -18016,7 +18101,45 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18016
18101
|
renderSlot(_ctx.$slots, item, normalizeProps(guardReactiveProps(data || {})))
|
|
18017
18102
|
])
|
|
18018
18103
|
};
|
|
18019
|
-
})
|
|
18104
|
+
}),
|
|
18105
|
+
_ctx.getProps.showSummaryTotal ? {
|
|
18106
|
+
name: "summary",
|
|
18107
|
+
fn: withCtx(() => [
|
|
18108
|
+
createVNode(_component_TableSummary, null, {
|
|
18109
|
+
default: withCtx(() => [
|
|
18110
|
+
createVNode(_component_TableSummaryRow, null, {
|
|
18111
|
+
default: withCtx(() => [
|
|
18112
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.getColumnsSummary, (item, index2) => {
|
|
18113
|
+
return openBlock(), createElementBlock(Fragment, { key: index2 }, [
|
|
18114
|
+
index2 === 0 ? (openBlock(), createBlock(_component_TableSummaryCell, {
|
|
18115
|
+
key: 0,
|
|
18116
|
+
align: "center",
|
|
18117
|
+
index: 0
|
|
18118
|
+
}, {
|
|
18119
|
+
default: withCtx(() => [
|
|
18120
|
+
createTextVNode(" 总计 ")
|
|
18121
|
+
]),
|
|
18122
|
+
_: 1
|
|
18123
|
+
})) : (openBlock(), createBlock(_component_TableSummaryCell, {
|
|
18124
|
+
key: 1,
|
|
18125
|
+
index: index2
|
|
18126
|
+
}, {
|
|
18127
|
+
default: withCtx(() => [
|
|
18128
|
+
createTextVNode(toDisplayString(_ctx.summaryTotalData[item.dataIndex] || ""), 1)
|
|
18129
|
+
]),
|
|
18130
|
+
_: 2
|
|
18131
|
+
}, 1032, ["index"]))
|
|
18132
|
+
], 64);
|
|
18133
|
+
}), 128))
|
|
18134
|
+
]),
|
|
18135
|
+
_: 1
|
|
18136
|
+
})
|
|
18137
|
+
]),
|
|
18138
|
+
_: 1
|
|
18139
|
+
})
|
|
18140
|
+
]),
|
|
18141
|
+
key: "0"
|
|
18142
|
+
} : void 0
|
|
18020
18143
|
]), 1040, ["rowClassName", "onChange", "onResizeColumn"]), [
|
|
18021
18144
|
[vShow, _ctx.getEmptyDataIsShowTable]
|
|
18022
18145
|
])
|
|
@@ -18591,14 +18714,13 @@ const ApiModalSelect_vue_vue_type_style_index_0_scoped_5427533c_lang = "";
|
|
|
18591
18714
|
const ApiModalSelect = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-5427533c"]]);
|
|
18592
18715
|
const Description$1 = "";
|
|
18593
18716
|
const basicColProps = 24;
|
|
18594
|
-
const basicProps$2 = {
|
|
18717
|
+
const basicProps$2 = reactive({
|
|
18595
18718
|
schema: {
|
|
18596
18719
|
type: Array,
|
|
18597
18720
|
default: () => []
|
|
18598
18721
|
},
|
|
18599
18722
|
labelAlign: {
|
|
18600
|
-
type: String
|
|
18601
|
-
default: () => "right"
|
|
18723
|
+
type: String
|
|
18602
18724
|
},
|
|
18603
18725
|
labelWidth: {
|
|
18604
18726
|
type: Number,
|
|
@@ -18612,11 +18734,15 @@ const basicProps$2 = {
|
|
|
18612
18734
|
type: Object,
|
|
18613
18735
|
default: () => ({})
|
|
18614
18736
|
},
|
|
18737
|
+
bordered: {
|
|
18738
|
+
type: Boolean,
|
|
18739
|
+
default: () => false
|
|
18740
|
+
},
|
|
18615
18741
|
customRender: {
|
|
18616
18742
|
type: Object,
|
|
18617
18743
|
default: () => null
|
|
18618
18744
|
}
|
|
18619
|
-
};
|
|
18745
|
+
});
|
|
18620
18746
|
const DescriptionGroup = /* @__PURE__ */ defineComponent({
|
|
18621
18747
|
props: {
|
|
18622
18748
|
label: {
|
|
@@ -18662,6 +18788,33 @@ const Description = /* @__PURE__ */ defineComponent({
|
|
|
18662
18788
|
createMessage.error("无法复制文本到剪贴板");
|
|
18663
18789
|
});
|
|
18664
18790
|
};
|
|
18791
|
+
const isBordered = computed(() => getProps.value.bordered);
|
|
18792
|
+
const labelAlignCss = computed(() => {
|
|
18793
|
+
switch (getProps.value.labelAlign) {
|
|
18794
|
+
case "left":
|
|
18795
|
+
return {
|
|
18796
|
+
justifyContent: "flex-start"
|
|
18797
|
+
};
|
|
18798
|
+
case "center":
|
|
18799
|
+
return {
|
|
18800
|
+
justifyContent: "center"
|
|
18801
|
+
};
|
|
18802
|
+
case "right":
|
|
18803
|
+
return {
|
|
18804
|
+
justifyContent: "flex-end"
|
|
18805
|
+
};
|
|
18806
|
+
default:
|
|
18807
|
+
if (getProps.value.bordered) {
|
|
18808
|
+
return {
|
|
18809
|
+
justifyContent: "center"
|
|
18810
|
+
};
|
|
18811
|
+
} else {
|
|
18812
|
+
return {
|
|
18813
|
+
justifyContent: "flex-end"
|
|
18814
|
+
};
|
|
18815
|
+
}
|
|
18816
|
+
}
|
|
18817
|
+
});
|
|
18665
18818
|
const rows = computed(() => {
|
|
18666
18819
|
let element = null;
|
|
18667
18820
|
return getProps.value.schema.map((item) => {
|
|
@@ -18685,7 +18838,8 @@ const Description = /* @__PURE__ */ defineComponent({
|
|
|
18685
18838
|
field: getProps.value.data[`${item.field}`]
|
|
18686
18839
|
}) : getProps.value.data[`${item.field}`];
|
|
18687
18840
|
}
|
|
18688
|
-
|
|
18841
|
+
const ifShow = isBoolean(item == null ? void 0 : item.ifShow) || isFunction$4(item == null ? void 0 : item.ifShow) ? isFunction$4(item.ifShow) ? item.ifShow(getProps.value.data) : item.ifShow : true;
|
|
18842
|
+
return ifShow ? createVNode("div", {
|
|
18689
18843
|
"class": `${prefixCls2}-row`,
|
|
18690
18844
|
"style": {
|
|
18691
18845
|
flex: `0 0 ${(((_b = item == null ? void 0 : item.colProps) == null ? void 0 : _b.span) || basicColProps) / 24 * 100}%`
|
|
@@ -18693,7 +18847,7 @@ const Description = /* @__PURE__ */ defineComponent({
|
|
|
18693
18847
|
}, [(slots == null ? void 0 : slots[`${item.field}Label`]) || item.label ? createVNode("span", {
|
|
18694
18848
|
"style": {
|
|
18695
18849
|
width: `${getProps.value.labelWidth}px`,
|
|
18696
|
-
|
|
18850
|
+
...labelAlignCss.value,
|
|
18697
18851
|
...((_c = getProps.value) == null ? void 0 : _c.labelStyle) ? (_d = getProps.value) == null ? void 0 : _d.labelStyle : {},
|
|
18698
18852
|
...(item == null ? void 0 : item.labelStyle) ? item == null ? void 0 : item.labelStyle : {}
|
|
18699
18853
|
},
|
|
@@ -18701,7 +18855,14 @@ const Description = /* @__PURE__ */ defineComponent({
|
|
|
18701
18855
|
}, [slots[`${item.field}Label`] ? (_e = slots[`${item.field}Label`]) == null ? void 0 : _e.call(slots, {
|
|
18702
18856
|
model: getProps.value.data,
|
|
18703
18857
|
field: item.label
|
|
18704
|
-
}) : item.label, (
|
|
18858
|
+
}) : item.label, (item == null ? void 0 : item.helpMessage) ? createVNode(_sfc_main$1g, {
|
|
18859
|
+
"style": {
|
|
18860
|
+
paddingTop: "5px"
|
|
18861
|
+
},
|
|
18862
|
+
"placement": "top",
|
|
18863
|
+
"class": "mx-1",
|
|
18864
|
+
"text": item == null ? void 0 : item.helpMessage
|
|
18865
|
+
}, null) : "", ((_f = getProps.value) == null ? void 0 : _f.isShowColon) ? ":" : ""]) : createVNode(Fragment, null, [createTextVNode(" ")]), createVNode("span", {
|
|
18705
18866
|
"class": `${prefixCls2}-value`,
|
|
18706
18867
|
"style": {
|
|
18707
18868
|
...((_g = getProps.value) == null ? void 0 : _g.contentStyle) ? (_h = getProps.value) == null ? void 0 : _h.contentStyle : {},
|
|
@@ -18715,7 +18876,7 @@ const Description = /* @__PURE__ */ defineComponent({
|
|
|
18715
18876
|
color: "#458ef9",
|
|
18716
18877
|
marginLeft: "5px"
|
|
18717
18878
|
}
|
|
18718
|
-
}, null)]) : null])]);
|
|
18879
|
+
}, null)]) : null])]) : null;
|
|
18719
18880
|
}
|
|
18720
18881
|
});
|
|
18721
18882
|
});
|
|
@@ -18723,31 +18884,36 @@ const Description = /* @__PURE__ */ defineComponent({
|
|
|
18723
18884
|
setDescProps
|
|
18724
18885
|
});
|
|
18725
18886
|
return () => createVNode("div", {
|
|
18726
|
-
"class": `${prefixCls2}-wrapper`
|
|
18887
|
+
"class": isBordered.value ? `${prefixCls2}-wrapper ${prefixCls2}-wrapper-bordered` : `${prefixCls2}-wrapper`
|
|
18727
18888
|
}, [rows.value]);
|
|
18728
18889
|
}
|
|
18729
18890
|
});
|
|
18730
18891
|
function useDescription(props2) {
|
|
18731
|
-
|
|
18732
|
-
throw new Error(
|
|
18733
|
-
"useDescription() can only be used inside setup() or functional components!"
|
|
18734
|
-
);
|
|
18735
|
-
}
|
|
18736
|
-
const desc = ref(null);
|
|
18892
|
+
const descRef = ref(null);
|
|
18737
18893
|
const loaded = ref(false);
|
|
18894
|
+
async function getDescription() {
|
|
18895
|
+
const desc = unref(descRef);
|
|
18896
|
+
if (!desc) {
|
|
18897
|
+
error$1(
|
|
18898
|
+
"useDescription() can only be used inside setup() or functional components!"
|
|
18899
|
+
);
|
|
18900
|
+
}
|
|
18901
|
+
await nextTick();
|
|
18902
|
+
return desc;
|
|
18903
|
+
}
|
|
18738
18904
|
function register(instance) {
|
|
18739
18905
|
onUnmounted(() => {
|
|
18740
|
-
|
|
18906
|
+
descRef.value = null;
|
|
18741
18907
|
loaded.value = false;
|
|
18742
18908
|
});
|
|
18743
|
-
if (unref(loaded) && instance === unref(
|
|
18909
|
+
if (unref(loaded) && instance === unref(descRef))
|
|
18744
18910
|
return;
|
|
18745
|
-
|
|
18911
|
+
descRef.value = instance;
|
|
18746
18912
|
loaded.value = true;
|
|
18747
18913
|
watch(
|
|
18748
18914
|
() => props2,
|
|
18749
18915
|
() => {
|
|
18750
|
-
props2 && instance.setDescProps(props2);
|
|
18916
|
+
props2 && instance.setDescProps(getDynamicProps(props2));
|
|
18751
18917
|
},
|
|
18752
18918
|
{
|
|
18753
18919
|
immediate: true,
|
|
@@ -18756,9 +18922,9 @@ function useDescription(props2) {
|
|
|
18756
18922
|
);
|
|
18757
18923
|
}
|
|
18758
18924
|
const methods2 = {
|
|
18759
|
-
setDescProps: (descProps) => {
|
|
18760
|
-
|
|
18761
|
-
|
|
18925
|
+
setDescProps: async (descProps) => {
|
|
18926
|
+
const desc = await getDescription();
|
|
18927
|
+
desc == null ? void 0 : desc.setDescProps(descProps);
|
|
18762
18928
|
}
|
|
18763
18929
|
};
|
|
18764
18930
|
return [register, methods2];
|
|
@@ -19013,7 +19179,9 @@ const _sfc_main$i = defineComponent({
|
|
|
19013
19179
|
() => visibleRef.value,
|
|
19014
19180
|
(visible) => {
|
|
19015
19181
|
nextTick(() => {
|
|
19182
|
+
var _a2;
|
|
19016
19183
|
emit("visible-change", visible);
|
|
19184
|
+
instance && ((_a2 = drawerInstance.emitVisible) == null ? void 0 : _a2.call(drawerInstance, visible, instance.uid));
|
|
19017
19185
|
});
|
|
19018
19186
|
}
|
|
19019
19187
|
);
|
|
@@ -21045,7 +21213,7 @@ var methods = {
|
|
|
21045
21213
|
return this;
|
|
21046
21214
|
},
|
|
21047
21215
|
// Reset the image and crop box to their initial states
|
|
21048
|
-
reset: function
|
|
21216
|
+
reset: function reset2() {
|
|
21049
21217
|
if (this.ready && !this.disabled) {
|
|
21050
21218
|
this.imageData = assign({}, this.initialImageData);
|
|
21051
21219
|
this.canvasData = assign({}, this.initialCanvasData);
|
|
@@ -22669,7 +22837,7 @@ const _sfc_main$e = defineComponent({
|
|
|
22669
22837
|
run();
|
|
22670
22838
|
source.value = props2.endVal;
|
|
22671
22839
|
}
|
|
22672
|
-
function
|
|
22840
|
+
function reset3() {
|
|
22673
22841
|
source.value = props2.startVal;
|
|
22674
22842
|
run();
|
|
22675
22843
|
}
|
|
@@ -22700,7 +22868,7 @@ const _sfc_main$e = defineComponent({
|
|
|
22700
22868
|
}
|
|
22701
22869
|
return prefix + x1 + x2 + suffix;
|
|
22702
22870
|
}
|
|
22703
|
-
return { value, start, reset:
|
|
22871
|
+
return { value, start, reset: reset3 };
|
|
22704
22872
|
}
|
|
22705
22873
|
});
|
|
22706
22874
|
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -23355,7 +23523,7 @@ const _sfc_main$8 = defineComponent({
|
|
|
23355
23523
|
);
|
|
23356
23524
|
let sortable;
|
|
23357
23525
|
let sortableOrder = [];
|
|
23358
|
-
function
|
|
23526
|
+
function reset3() {
|
|
23359
23527
|
sortable.sort(sortableOrder);
|
|
23360
23528
|
plainOptions.value = JSON.parse(JSON.stringify(cachePlainOptions.value));
|
|
23361
23529
|
plainSortOptions.value = JSON.parse(
|
|
@@ -23404,7 +23572,7 @@ const _sfc_main$8 = defineComponent({
|
|
|
23404
23572
|
...toRefs(state),
|
|
23405
23573
|
onCheckAllChange,
|
|
23406
23574
|
plainOptions,
|
|
23407
|
-
reset:
|
|
23575
|
+
reset: reset3,
|
|
23408
23576
|
prefixCls: prefixCls2,
|
|
23409
23577
|
columnListRef,
|
|
23410
23578
|
checkIndex,
|
|
@@ -24181,6 +24349,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
24181
24349
|
column,
|
|
24182
24350
|
onHandleSortChange: handleSortChange
|
|
24183
24351
|
}, null, 8, ["column"])) : (openBlock(), createBlock(unref(VxeColumn), mergeProps({ key: 1 }, column, {
|
|
24352
|
+
"show-overflow": "title",
|
|
24184
24353
|
"edit-render": (column == null ? void 0 : column.editRender) || void 0
|
|
24185
24354
|
}), {
|
|
24186
24355
|
default: withCtx((config) => [
|
|
@@ -24391,13 +24560,53 @@ const basicContainerProps = reactive({
|
|
|
24391
24560
|
title: {
|
|
24392
24561
|
type: String
|
|
24393
24562
|
},
|
|
24563
|
+
loading: {
|
|
24564
|
+
type: Boolean,
|
|
24565
|
+
default: false
|
|
24566
|
+
},
|
|
24567
|
+
isShowHeader: {
|
|
24568
|
+
type: Boolean,
|
|
24569
|
+
default: true
|
|
24570
|
+
},
|
|
24571
|
+
isShowFooter: {
|
|
24572
|
+
type: Boolean,
|
|
24573
|
+
default: true
|
|
24574
|
+
},
|
|
24575
|
+
isShowBtn: {
|
|
24576
|
+
type: Boolean,
|
|
24577
|
+
default: true
|
|
24578
|
+
},
|
|
24579
|
+
isShowSaveBtn: {
|
|
24580
|
+
type: Boolean,
|
|
24581
|
+
default: true
|
|
24582
|
+
},
|
|
24583
|
+
isShowSubmitBtn: {
|
|
24584
|
+
type: Boolean,
|
|
24585
|
+
default: true
|
|
24586
|
+
},
|
|
24587
|
+
isShowCancelBtn: {
|
|
24588
|
+
type: Boolean,
|
|
24589
|
+
default: true
|
|
24590
|
+
},
|
|
24591
|
+
saveBtnText: {
|
|
24592
|
+
type: String,
|
|
24593
|
+
default: "保存"
|
|
24594
|
+
},
|
|
24394
24595
|
submitBtnText: {
|
|
24395
24596
|
type: String,
|
|
24396
24597
|
default: "提交"
|
|
24397
24598
|
},
|
|
24398
24599
|
cancelBtnText: {
|
|
24399
24600
|
type: String,
|
|
24400
|
-
default: "
|
|
24601
|
+
default: "取消"
|
|
24602
|
+
},
|
|
24603
|
+
cancelAlign: {
|
|
24604
|
+
type: String,
|
|
24605
|
+
default: "left"
|
|
24606
|
+
},
|
|
24607
|
+
footerAlign: {
|
|
24608
|
+
type: String,
|
|
24609
|
+
default: "right"
|
|
24401
24610
|
}
|
|
24402
24611
|
});
|
|
24403
24612
|
const setDefaultConfig$1 = (config) => {
|
|
@@ -24406,13 +24615,22 @@ const setDefaultConfig$1 = (config) => {
|
|
|
24406
24615
|
const _sfc_main$1 = defineComponent({
|
|
24407
24616
|
components: {
|
|
24408
24617
|
Button: Button$1,
|
|
24409
|
-
ArrowLeftOutlined: ArrowLeftOutlined$1
|
|
24618
|
+
ArrowLeftOutlined: ArrowLeftOutlined$1,
|
|
24619
|
+
LoadingOutlined: LoadingOutlined$1
|
|
24410
24620
|
},
|
|
24411
24621
|
props: basicContainerProps,
|
|
24412
|
-
|
|
24622
|
+
emits: ["submit", "cancel", "save"],
|
|
24413
24623
|
setup(props2, { emit }) {
|
|
24414
24624
|
const { prefixCls: prefixCls2 } = useDesign$1("basic-container");
|
|
24625
|
+
const cancelAlignRef = computed(() => {
|
|
24626
|
+
return `${prefixCls2}-footer-cancel-${props2.cancelAlign}`;
|
|
24627
|
+
});
|
|
24628
|
+
const footerAlignRef = computed(() => {
|
|
24629
|
+
return `${prefixCls2}-footer-${props2.footerAlign}`;
|
|
24630
|
+
});
|
|
24415
24631
|
return {
|
|
24632
|
+
cancelAlignRef,
|
|
24633
|
+
footerAlignRef,
|
|
24416
24634
|
prefixCls: prefixCls2,
|
|
24417
24635
|
emit
|
|
24418
24636
|
};
|
|
@@ -24421,22 +24639,31 @@ const _sfc_main$1 = defineComponent({
|
|
|
24421
24639
|
const BasicContainer_vue_vue_type_style_index_0_lang = "";
|
|
24422
24640
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
24423
24641
|
const _component_ArrowLeftOutlined = resolveComponent("ArrowLeftOutlined");
|
|
24642
|
+
const _component_LoadingOutlined = resolveComponent("LoadingOutlined");
|
|
24424
24643
|
const _component_Button = resolveComponent("Button");
|
|
24425
24644
|
return openBlock(), createElementBlock("div", {
|
|
24426
24645
|
class: normalizeClass(_ctx.prefixCls)
|
|
24427
24646
|
}, [
|
|
24428
|
-
|
|
24647
|
+
_ctx.isShowHeader ? (openBlock(), createElementBlock("div", {
|
|
24648
|
+
key: 0,
|
|
24429
24649
|
class: normalizeClass(`${_ctx.prefixCls}-header`)
|
|
24430
24650
|
}, [
|
|
24431
24651
|
createElementVNode("div", {
|
|
24432
24652
|
class: normalizeClass(`${_ctx.prefixCls}-header-title`)
|
|
24433
24653
|
}, [
|
|
24434
|
-
|
|
24654
|
+
!_ctx.loading ? (openBlock(), createElementBlock("div", {
|
|
24655
|
+
key: 0,
|
|
24435
24656
|
class: normalizeClass(`${_ctx.prefixCls}-header-title-icon`),
|
|
24436
24657
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.emit("cancel"))
|
|
24437
24658
|
}, [
|
|
24438
|
-
createVNode(_component_ArrowLeftOutlined, { style: { fontSize: `
|
|
24439
|
-
], 2),
|
|
24659
|
+
createVNode(_component_ArrowLeftOutlined, { style: { fontSize: `16px` } })
|
|
24660
|
+
], 2)) : createCommentVNode("", true),
|
|
24661
|
+
_ctx.loading ? (openBlock(), createElementBlock("div", {
|
|
24662
|
+
key: 1,
|
|
24663
|
+
class: normalizeClass(`${_ctx.prefixCls}-header-title-loading-icon`)
|
|
24664
|
+
}, [
|
|
24665
|
+
createVNode(_component_LoadingOutlined, { style: { fontSize: `16px` } })
|
|
24666
|
+
], 2)) : createCommentVNode("", true),
|
|
24440
24667
|
createElementVNode("div", {
|
|
24441
24668
|
class: normalizeClass(`${_ctx.prefixCls}-header-title-text`)
|
|
24442
24669
|
}, toDisplayString(_ctx.title), 3)
|
|
@@ -24446,34 +24673,61 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
24446
24673
|
}, [
|
|
24447
24674
|
renderSlot(_ctx.$slots, "extra")
|
|
24448
24675
|
], 2)
|
|
24449
|
-
], 2),
|
|
24676
|
+
], 2)) : createCommentVNode("", true),
|
|
24450
24677
|
createElementVNode("div", {
|
|
24451
24678
|
class: normalizeClass(`${_ctx.prefixCls}-content`)
|
|
24452
24679
|
}, [
|
|
24453
24680
|
renderSlot(_ctx.$slots, "default")
|
|
24454
24681
|
], 2),
|
|
24455
|
-
|
|
24456
|
-
|
|
24682
|
+
_ctx.isShowFooter ? (openBlock(), createElementBlock("div", {
|
|
24683
|
+
key: 1,
|
|
24684
|
+
class: normalizeClass(`${_ctx.prefixCls}-footer ${_ctx.footerAlignRef}`)
|
|
24457
24685
|
}, [
|
|
24458
|
-
|
|
24459
|
-
|
|
24460
|
-
|
|
24461
|
-
|
|
24462
|
-
|
|
24463
|
-
|
|
24464
|
-
|
|
24465
|
-
|
|
24466
|
-
|
|
24467
|
-
|
|
24468
|
-
|
|
24469
|
-
|
|
24470
|
-
|
|
24471
|
-
|
|
24472
|
-
|
|
24473
|
-
|
|
24474
|
-
|
|
24475
|
-
|
|
24476
|
-
|
|
24686
|
+
_ctx.isShowBtn ? (openBlock(), createElementBlock("div", {
|
|
24687
|
+
key: 0,
|
|
24688
|
+
class: normalizeClass(`${_ctx.prefixCls}-footer-buttons ${_ctx.cancelAlignRef}`)
|
|
24689
|
+
}, [
|
|
24690
|
+
_ctx.isShowCancelBtn ? (openBlock(), createBlock(_component_Button, {
|
|
24691
|
+
key: 0,
|
|
24692
|
+
class: normalizeClass(`${_ctx.prefixCls}-footer-cancel-button`),
|
|
24693
|
+
loading: _ctx.loading,
|
|
24694
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.emit("cancel"))
|
|
24695
|
+
}, {
|
|
24696
|
+
default: withCtx(() => [
|
|
24697
|
+
createTextVNode(toDisplayString(_ctx.cancelBtnText), 1)
|
|
24698
|
+
]),
|
|
24699
|
+
_: 1
|
|
24700
|
+
}, 8, ["class", "loading"])) : createCommentVNode("", true),
|
|
24701
|
+
createElementVNode("div", {
|
|
24702
|
+
class: normalizeClass(`${_ctx.prefixCls}-footer-fn-buttons`)
|
|
24703
|
+
}, [
|
|
24704
|
+
_ctx.isShowSaveBtn ? (openBlock(), createBlock(_component_Button, {
|
|
24705
|
+
key: 0,
|
|
24706
|
+
type: "primary",
|
|
24707
|
+
loading: _ctx.loading,
|
|
24708
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.emit("save"))
|
|
24709
|
+
}, {
|
|
24710
|
+
default: withCtx(() => [
|
|
24711
|
+
createTextVNode(toDisplayString(_ctx.saveBtnText), 1)
|
|
24712
|
+
]),
|
|
24713
|
+
_: 1
|
|
24714
|
+
}, 8, ["loading"])) : createCommentVNode("", true),
|
|
24715
|
+
_ctx.isShowSubmitBtn ? (openBlock(), createBlock(_component_Button, {
|
|
24716
|
+
key: 1,
|
|
24717
|
+
type: "primary",
|
|
24718
|
+
loading: _ctx.loading,
|
|
24719
|
+
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.emit("submit"))
|
|
24720
|
+
}, {
|
|
24721
|
+
default: withCtx(() => [
|
|
24722
|
+
createTextVNode(toDisplayString(_ctx.submitBtnText), 1)
|
|
24723
|
+
]),
|
|
24724
|
+
_: 1
|
|
24725
|
+
}, 8, ["loading"])) : createCommentVNode("", true),
|
|
24726
|
+
renderSlot(_ctx.$slots, "buttons")
|
|
24727
|
+
], 2)
|
|
24728
|
+
], 2)) : createCommentVNode("", true),
|
|
24729
|
+
renderSlot(_ctx.$slots, "footer")
|
|
24730
|
+
], 2)) : createCommentVNode("", true)
|
|
24477
24731
|
], 2);
|
|
24478
24732
|
}
|
|
24479
24733
|
const BasicContainer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|