bmp-layout 0.0.14 → 0.0.16
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/bmp-layout.es.js +1795 -1680
- package/bmp-layout.umd.js +3 -3
- package/package.json +1 -1
- package/style.css +1 -1
package/bmp-layout.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { openBlock, createBlock, unref, normalizeClass, nextTick, ref, computed, watch, withCtx, createElementBlock, createElementVNode, normalizeStyle, createVNode, Fragment, defineComponent, isVNode, Teleport, Transition, withModifiers, toDisplayString, renderList, createCommentVNode, resolveComponent, provide, resolveDynamicComponent, onMounted, TransitionGroup, createTextVNode, mergeProps, isRef, onUnmounted, withDirectives, resolveDirective, renderSlot,
|
|
1
|
+
import { openBlock, createBlock, unref, normalizeClass, nextTick, ref, computed, watch, withCtx, createElementBlock, createElementVNode, normalizeStyle, createVNode, Fragment, defineComponent, isVNode, Teleport, Transition, withModifiers, toDisplayString, renderList, createCommentVNode, resolveComponent, provide, resolveDynamicComponent, onMounted, TransitionGroup, createTextVNode, mergeProps, isRef, onUnmounted, withDirectives, resolveDirective, renderSlot, watchEffect, vShow, useSlots, useAttrs, createSlots, inject, onBeforeUnmount, reactive, onUpdated, render, useCssVars } from "vue";
|
|
2
2
|
import { createPinia, defineStore } from "pinia";
|
|
3
3
|
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
|
|
4
4
|
import { cloneDeep, omit } from "lodash-es";
|
|
5
|
-
import { ElBacktop, ElIcon, ElMenuItem, ElSubMenu, ElScrollbar, ElMenu, ElInput, ElBadge, ElDropdown, ElDropdownMenu, ElDropdownItem, ElAvatar, ElMessageBox, ElBreadcrumb, ElBreadcrumbItem, ElDrawer, ElMessage, ElConfigProvider, ElCard, ElImageViewer, ElNotification, ElUpload, ElLink, ElButton,
|
|
6
|
-
import { ElAffix as ElAffix2, ElAside, ElAutocomplete, ElAvatar as ElAvatar2, ElBreadcrumb as ElBreadcrumb2, ElBreadcrumbItem as ElBreadcrumbItem2, ElButton as ElButton2, ElButtonGroup, ElCalendar, ElCard as ElCard2, ElCarousel, ElCarouselItem, ElCascader, ElCascaderPanel, ElCheckTag, ElCheckbox, ElCheckboxButton, ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElCollapseTransition, ElColorPicker, ElConfigProvider as ElConfigProvider2, ElContainer, ElCountdown, ElDatePicker, ElDescriptions, ElDescriptionsItem, ElDivider, ElDrawer as ElDrawer2, ElDropdown as ElDropdown2, ElDropdownItem as ElDropdownItem2, ElDropdownMenu as ElDropdownMenu2, ElEmpty, ElFooter, ElForm, ElFormItem, ElHeader, ElImage, ElImageViewer as ElImageViewer2, ElInfiniteScroll, ElInput as ElInput2, ElInputNumber, ElInputTag, ElLink as ElLink2, ElLoading, ElMain, ElMention, ElMenu as ElMenu2, ElMenuItem as ElMenuItem2, ElMenuItemGroup, ElMessage as ElMessage2, ElMessageBox as ElMessageBox2, ElNotification as ElNotification2, ElOption, ElOptionGroup, ElOverlay, ElPageHeader, ElPopconfirm, ElPopover, ElPopper, ElProgress, ElRadio, ElRadioButton, ElRadioGroup, ElRate, ElResult, ElRow, ElScrollbar as ElScrollbar2, ElSegmented, ElSelect, ElSelectV2, ElSkeleton, ElSkeletonItem, ElSlider, ElSpace, ElSplitter, ElSplitterPanel, ElStatistic, ElSubMenu as ElSubMenu2, ElSwitch, ElTabPane, ElTable, ElTableColumn, ElTabs, ElTag, ElText, ElTimePicker, ElTimeSelect, ElTimeline, ElTimelineItem, ElTooltip, ElTour, ElTourStep, ElTransfer, ElTree, ElTreeSelect, ElTreeV2, ElUpload as ElUpload2, ElWatermark } from "element-plus";
|
|
5
|
+
import { ElBacktop, ElIcon, ElMenuItem, ElSubMenu, ElScrollbar, ElMenu, ElInput, ElBadge, ElDropdown, ElDropdownMenu, ElDropdownItem, ElAvatar, ElMessageBox, ElBreadcrumb, ElBreadcrumbItem, ElDrawer, ElMessage, ElConfigProvider, ElCard, ElPagination, ElDialog, ElAlert, ElAffix, ElImageViewer, ElNotification, ElUpload, ElLink, ElButton, ElAutocomplete, ElButtonGroup, ElCarousel, ElCarouselItem, ElCollapse, ElCollapseItem, ElCollapseTransition, ElDivider, ElEmpty, ElOverlay, ElPageHeader, ElProgress, ElResult, ElSkeleton, ElSkeletonItem, ElSpace, ElTag, ElText, ElCascader, ElCascaderPanel, ElCheckbox, ElCheckboxButton, ElCheckboxGroup, ElColorPicker, ElDatePicker, ElForm, ElFormItem, ElInputNumber, ElInputTag, ElRadio, ElRadioButton, ElRadioGroup, ElRate, ElSelect, ElOption, ElOptionGroup, ElSelectV2, ElSlider, ElSwitch, ElTimePicker, ElTimeSelect, ElTransfer, ElTreeSelect, ElMention, ElCalendar, ElCheckTag, ElCountdown, ElDescriptions, ElDescriptionsItem, ElImage, ElStatistic, ElTable, ElTableColumn, ElTimeline, ElTimelineItem, ElTree, ElTreeV2, ElMenuItemGroup, ElTabs, ElTabPane, ElPopover, ElPopconfirm, ElTooltip, ElContainer, ElAside, ElFooter, ElHeader, ElMain, ElRow, ElCol, ElSplitter, ElSplitterPanel, ElSegmented, ElTour, ElTourStep, ElWatermark, ElPopper } from "element-plus";
|
|
6
|
+
import { ElAffix as ElAffix2, ElAside as ElAside2, ElAutocomplete as ElAutocomplete2, ElAvatar as ElAvatar2, ElBreadcrumb as ElBreadcrumb2, ElBreadcrumbItem as ElBreadcrumbItem2, ElButton as ElButton2, ElButtonGroup as ElButtonGroup2, ElCalendar as ElCalendar2, ElCard as ElCard2, ElCarousel as ElCarousel2, ElCarouselItem as ElCarouselItem2, ElCascader as ElCascader2, ElCascaderPanel as ElCascaderPanel2, ElCheckTag as ElCheckTag2, ElCheckbox as ElCheckbox2, ElCheckboxButton as ElCheckboxButton2, ElCheckboxGroup as ElCheckboxGroup2, ElCol as ElCol2, ElCollapse as ElCollapse2, ElCollapseItem as ElCollapseItem2, ElCollapseTransition as ElCollapseTransition2, ElColorPicker as ElColorPicker2, ElConfigProvider as ElConfigProvider2, ElContainer as ElContainer2, ElCountdown as ElCountdown2, ElDatePicker as ElDatePicker2, ElDescriptions as ElDescriptions2, ElDescriptionsItem as ElDescriptionsItem2, ElDivider as ElDivider2, ElDrawer as ElDrawer2, ElDropdown as ElDropdown2, ElDropdownItem as ElDropdownItem2, ElDropdownMenu as ElDropdownMenu2, ElEmpty as ElEmpty2, ElFooter as ElFooter2, ElForm as ElForm2, ElFormItem as ElFormItem2, ElHeader as ElHeader2, ElImage as ElImage2, ElImageViewer as ElImageViewer2, ElInfiniteScroll, ElInput as ElInput2, ElInputNumber as ElInputNumber2, ElInputTag as ElInputTag2, ElLink as ElLink2, ElLoading, ElMain as ElMain2, ElMention as ElMention2, ElMenu as ElMenu2, ElMenuItem as ElMenuItem2, ElMenuItemGroup as ElMenuItemGroup2, ElMessage as ElMessage2, ElMessageBox as ElMessageBox2, ElNotification as ElNotification2, ElOption as ElOption2, ElOptionGroup as ElOptionGroup2, ElOverlay as ElOverlay2, ElPageHeader as ElPageHeader2, ElPopconfirm as ElPopconfirm2, ElPopover as ElPopover2, ElPopper as ElPopper2, ElProgress as ElProgress2, ElRadio as ElRadio2, ElRadioButton as ElRadioButton2, ElRadioGroup as ElRadioGroup2, ElRate as ElRate2, ElResult as ElResult2, ElRow as ElRow2, ElScrollbar as ElScrollbar2, ElSegmented as ElSegmented2, ElSelect as ElSelect2, ElSelectV2 as ElSelectV22, ElSkeleton as ElSkeleton2, ElSkeletonItem as ElSkeletonItem2, ElSlider as ElSlider2, ElSpace as ElSpace2, ElSplitter as ElSplitter2, ElSplitterPanel as ElSplitterPanel2, ElStatistic as ElStatistic2, ElSubMenu as ElSubMenu2, ElSwitch as ElSwitch2, ElTabPane as ElTabPane2, ElTable as ElTable2, ElTableColumn as ElTableColumn2, ElTabs as ElTabs2, ElTag as ElTag2, ElText as ElText2, ElTimePicker as ElTimePicker2, ElTimeSelect as ElTimeSelect2, ElTimeline as ElTimeline2, ElTimelineItem as ElTimelineItem2, ElTooltip as ElTooltip2, ElTour as ElTour2, ElTourStep as ElTourStep2, ElTransfer as ElTransfer2, ElTree as ElTree2, ElTreeSelect as ElTreeSelect2, ElTreeV2 as ElTreeV22, ElUpload as ElUpload2, ElWatermark as ElWatermark2 } from "element-plus";
|
|
7
7
|
import { createRouter, createWebHashHistory, useRoute, useRouter } from "vue-router";
|
|
8
8
|
import "vue-i18n";
|
|
9
9
|
import { useClipboard, useWindowSize } from "@vueuse/core";
|
|
@@ -9524,1763 +9524,1763 @@ const _sfc_main$b = /* @__PURE__ */ Object.assign({ name: "PageNavBar" }, {
|
|
|
9524
9524
|
}
|
|
9525
9525
|
});
|
|
9526
9526
|
const PageNavBar = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-0d587176"]]);
|
|
9527
|
-
const _sfc_main$a = /* @__PURE__ */ Object.assign({ name: "
|
|
9528
|
-
__name: "
|
|
9527
|
+
const _sfc_main$a = /* @__PURE__ */ Object.assign({ name: "Badge" }, {
|
|
9528
|
+
__name: "Badge",
|
|
9529
9529
|
props: {
|
|
9530
|
-
|
|
9531
|
-
type:
|
|
9532
|
-
default:
|
|
9533
|
-
},
|
|
9534
|
-
zIndex: {
|
|
9535
|
-
type: Number,
|
|
9536
|
-
default: 200
|
|
9530
|
+
value: {
|
|
9531
|
+
type: [String, Number],
|
|
9532
|
+
default: ""
|
|
9537
9533
|
},
|
|
9538
|
-
|
|
9534
|
+
max: {
|
|
9539
9535
|
type: Number,
|
|
9540
|
-
default:
|
|
9541
|
-
},
|
|
9542
|
-
infinite: {
|
|
9543
|
-
type: Boolean,
|
|
9544
|
-
default: true
|
|
9536
|
+
default: 99
|
|
9545
9537
|
},
|
|
9546
|
-
|
|
9538
|
+
isDot: {
|
|
9547
9539
|
type: Boolean,
|
|
9548
9540
|
default: false
|
|
9549
9541
|
},
|
|
9550
|
-
|
|
9542
|
+
hidden: {
|
|
9551
9543
|
type: Boolean,
|
|
9552
9544
|
default: false
|
|
9553
9545
|
},
|
|
9554
|
-
|
|
9555
|
-
type:
|
|
9556
|
-
default:
|
|
9546
|
+
type: {
|
|
9547
|
+
type: String,
|
|
9548
|
+
default: "danger",
|
|
9549
|
+
validator(value) {
|
|
9550
|
+
return ["primary", "success", "warning", "danger", "info"].includes(value);
|
|
9551
|
+
}
|
|
9557
9552
|
}
|
|
9558
9553
|
},
|
|
9559
9554
|
setup(__props) {
|
|
9560
9555
|
const props = __props;
|
|
9561
|
-
const
|
|
9562
|
-
|
|
9563
|
-
delete propsData.show;
|
|
9564
|
-
return propsData;
|
|
9565
|
-
});
|
|
9566
|
-
const show = ref(props.show);
|
|
9567
|
-
const close = () => {
|
|
9568
|
-
show.value = false;
|
|
9569
|
-
};
|
|
9556
|
+
const { getPrefixCls: getPrefixCls2 } = useDesign();
|
|
9557
|
+
const prefixCls2 = getPrefixCls2("badge");
|
|
9570
9558
|
return (_ctx, _cache) => {
|
|
9571
|
-
return
|
|
9559
|
+
return openBlock(), createBlock(unref(ElBadge), mergeProps(props, { class: unref(prefixCls2) }), {
|
|
9560
|
+
default: withCtx(() => [
|
|
9561
|
+
renderSlot(_ctx.$slots, "default")
|
|
9562
|
+
]),
|
|
9563
|
+
_: 3
|
|
9564
|
+
}, 16, ["class"]);
|
|
9572
9565
|
};
|
|
9573
9566
|
}
|
|
9574
9567
|
});
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
infinite = true,
|
|
9583
|
-
hideOnClickModal = false,
|
|
9584
|
-
teleported = false,
|
|
9585
|
-
zIndex = 2e3,
|
|
9586
|
-
show = true
|
|
9587
|
-
} = options;
|
|
9588
|
-
const propsData = {};
|
|
9589
|
-
const container = document.createElement("div");
|
|
9590
|
-
propsData.urlList = urlList;
|
|
9591
|
-
propsData.initialIndex = initialIndex;
|
|
9592
|
-
propsData.infinite = infinite;
|
|
9593
|
-
propsData.hideOnClickModal = hideOnClickModal;
|
|
9594
|
-
propsData.teleported = teleported;
|
|
9595
|
-
propsData.zIndex = zIndex;
|
|
9596
|
-
propsData.show = show;
|
|
9597
|
-
document.body.appendChild(container);
|
|
9598
|
-
instance = createVNode(_sfc_main$a, propsData);
|
|
9599
|
-
render(instance, container);
|
|
9600
|
-
}
|
|
9601
|
-
const useMessage = () => {
|
|
9602
|
-
const { t: t2 } = useI18n("layout");
|
|
9603
|
-
const scssVariables = variables$1;
|
|
9604
|
-
return {
|
|
9605
|
-
// 消息提示
|
|
9606
|
-
info(content) {
|
|
9607
|
-
ElMessage.info(content);
|
|
9608
|
-
},
|
|
9609
|
-
// 错误消息
|
|
9610
|
-
error(content) {
|
|
9611
|
-
ElMessage.error(content);
|
|
9612
|
-
},
|
|
9613
|
-
// 成功消息
|
|
9614
|
-
success(content) {
|
|
9615
|
-
ElMessage.success(content);
|
|
9616
|
-
},
|
|
9617
|
-
// 警告消息
|
|
9618
|
-
warning(content) {
|
|
9619
|
-
ElMessage.warning(content);
|
|
9568
|
+
const _sfc_main$9 = /* @__PURE__ */ Object.assign({ name: "Pagination" }, {
|
|
9569
|
+
__name: "Pagination",
|
|
9570
|
+
props: {
|
|
9571
|
+
// 总条目数
|
|
9572
|
+
total: {
|
|
9573
|
+
required: true,
|
|
9574
|
+
type: Number
|
|
9620
9575
|
},
|
|
9621
|
-
//
|
|
9622
|
-
|
|
9623
|
-
|
|
9576
|
+
// 当前页数:pageNo
|
|
9577
|
+
page: {
|
|
9578
|
+
type: Number,
|
|
9579
|
+
default: 1
|
|
9624
9580
|
},
|
|
9625
|
-
//
|
|
9626
|
-
|
|
9627
|
-
|
|
9581
|
+
// 每页显示条目个数:pageSize
|
|
9582
|
+
limit: {
|
|
9583
|
+
type: Number,
|
|
9584
|
+
default: 20
|
|
9628
9585
|
},
|
|
9629
|
-
//
|
|
9630
|
-
|
|
9631
|
-
|
|
9586
|
+
// 设置最大页码按钮数。 页码按钮的数量,当总页数超过该值时会折叠
|
|
9587
|
+
// 移动端页码按钮的数量端默认值 5
|
|
9588
|
+
pagerCount: {
|
|
9589
|
+
type: Number,
|
|
9590
|
+
default: document.body.clientWidth < 992 ? 5 : 7
|
|
9591
|
+
}
|
|
9592
|
+
},
|
|
9593
|
+
emits: ["update:page", "update:limit", "pagination"],
|
|
9594
|
+
setup(__props, { emit: __emit }) {
|
|
9595
|
+
const appStore = useAppStore();
|
|
9596
|
+
const layoutCurrentSize = computed(() => appStore.currentSize);
|
|
9597
|
+
const isSmall = ref(layoutCurrentSize.value === "small");
|
|
9598
|
+
watchEffect(() => {
|
|
9599
|
+
isSmall.value = layoutCurrentSize.value === "small";
|
|
9600
|
+
});
|
|
9601
|
+
const props = __props;
|
|
9602
|
+
const emit = __emit;
|
|
9603
|
+
const currentPage = computed({
|
|
9604
|
+
get() {
|
|
9605
|
+
return props.page;
|
|
9606
|
+
},
|
|
9607
|
+
set(val) {
|
|
9608
|
+
emit("update:page", val);
|
|
9609
|
+
}
|
|
9610
|
+
});
|
|
9611
|
+
const pageSize = computed({
|
|
9612
|
+
get() {
|
|
9613
|
+
return props.limit;
|
|
9614
|
+
},
|
|
9615
|
+
set(val) {
|
|
9616
|
+
emit("update:limit", val);
|
|
9617
|
+
}
|
|
9618
|
+
});
|
|
9619
|
+
const handleSizeChange = (val) => {
|
|
9620
|
+
if (currentPage.value * val > props.total) {
|
|
9621
|
+
currentPage.value = 1;
|
|
9622
|
+
}
|
|
9623
|
+
emit("pagination", { page: currentPage.value, limit: val });
|
|
9624
|
+
};
|
|
9625
|
+
const handleCurrentChange = (val) => {
|
|
9626
|
+
emit("pagination", { page: val, limit: pageSize.value });
|
|
9627
|
+
};
|
|
9628
|
+
return (_ctx, _cache) => {
|
|
9629
|
+
return withDirectives((openBlock(), createBlock(unref(ElPagination), {
|
|
9630
|
+
"current-page": currentPage.value,
|
|
9631
|
+
"onUpdate:currentPage": _cache[0] || (_cache[0] = ($event) => currentPage.value = $event),
|
|
9632
|
+
"page-size": pageSize.value,
|
|
9633
|
+
"onUpdate:pageSize": _cache[1] || (_cache[1] = ($event) => pageSize.value = $event),
|
|
9634
|
+
"pager-count": __props.pagerCount,
|
|
9635
|
+
total: __props.total,
|
|
9636
|
+
small: unref(isSmall),
|
|
9637
|
+
class: "m-t-16px",
|
|
9638
|
+
layout: "prev, pager, next, sizes",
|
|
9639
|
+
onSizeChange: handleSizeChange,
|
|
9640
|
+
onCurrentChange: handleCurrentChange
|
|
9641
|
+
}, null, 8, ["current-page", "page-size", "pager-count", "total", "small"])), [
|
|
9642
|
+
[vShow, __props.total > 0]
|
|
9643
|
+
]);
|
|
9644
|
+
};
|
|
9645
|
+
}
|
|
9646
|
+
});
|
|
9647
|
+
const _hoisted_1$4 = { class: "title" };
|
|
9648
|
+
const _hoisted_2$4 = { class: "absolute right-17px top-[50%] h-54px flex translate-y-[-50%] items-center justify-between" };
|
|
9649
|
+
const _hoisted_3$4 = { class: "p-20px" };
|
|
9650
|
+
const _hoisted_4$4 = {
|
|
9651
|
+
key: 1,
|
|
9652
|
+
class: "pt-16px p-l-20px p-r-20px"
|
|
9653
|
+
};
|
|
9654
|
+
const _sfc_main$8 = /* @__PURE__ */ Object.assign({ name: "Dialog" }, {
|
|
9655
|
+
__name: "Dialog",
|
|
9656
|
+
props: {
|
|
9657
|
+
modelValue: {
|
|
9658
|
+
type: Boolean,
|
|
9659
|
+
default: false
|
|
9632
9660
|
},
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9661
|
+
title: {
|
|
9662
|
+
type: String,
|
|
9663
|
+
default: "Dialog"
|
|
9636
9664
|
},
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9665
|
+
fullscreen: {
|
|
9666
|
+
type: Boolean,
|
|
9667
|
+
default: false
|
|
9640
9668
|
},
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
ElNotification.error(content);
|
|
9669
|
+
width: {
|
|
9670
|
+
type: [String, Number]
|
|
9644
9671
|
},
|
|
9645
|
-
//
|
|
9646
|
-
|
|
9647
|
-
|
|
9672
|
+
// 是否开启滚动条。如果是的话,按照 maxHeight 设置最大高度
|
|
9673
|
+
scroll: {
|
|
9674
|
+
type: Boolean,
|
|
9675
|
+
default: false
|
|
9648
9676
|
},
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9677
|
+
maxHeight: {
|
|
9678
|
+
type: [String, Number],
|
|
9679
|
+
default: "60vh"
|
|
9652
9680
|
},
|
|
9653
|
-
//
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
buttonSize: "default",
|
|
9661
|
-
center: true
|
|
9662
|
-
});
|
|
9681
|
+
// width有值时优先使用width
|
|
9682
|
+
size: {
|
|
9683
|
+
type: String,
|
|
9684
|
+
default: "default",
|
|
9685
|
+
validate(value) {
|
|
9686
|
+
return ["large", "default", "small"].includes(value);
|
|
9687
|
+
}
|
|
9663
9688
|
},
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
content ? content : t2("common.delMessage"),
|
|
9668
|
-
tip ? tip : t2("common.confirmTitle"),
|
|
9669
|
-
{
|
|
9670
|
-
customClass: `${scssVariables.namespace}-message-box`,
|
|
9671
|
-
confirmButtonText: t2("common.ok"),
|
|
9672
|
-
cancelButtonText: t2("common.cancel"),
|
|
9673
|
-
buttonSize: "default",
|
|
9674
|
-
center: true,
|
|
9675
|
-
type: "warning"
|
|
9676
|
-
}
|
|
9677
|
-
);
|
|
9689
|
+
top: {
|
|
9690
|
+
type: String,
|
|
9691
|
+
default: "0"
|
|
9678
9692
|
},
|
|
9679
|
-
|
|
9680
|
-
exportConfirm(content, tip) {
|
|
9681
|
-
return ElMessageBox.confirm(
|
|
9682
|
-
content ? content : t2("common.exportMessage"),
|
|
9683
|
-
tip ? tip : t2("common.confirmTitle"),
|
|
9684
|
-
{
|
|
9685
|
-
confirmButtonText: t2("common.ok"),
|
|
9686
|
-
cancelButtonText: t2("common.cancel"),
|
|
9687
|
-
type: "warning"
|
|
9688
|
-
}
|
|
9689
|
-
);
|
|
9690
|
-
},
|
|
9691
|
-
// 提交内容
|
|
9692
|
-
prompt(content, tip, options = {}) {
|
|
9693
|
-
return ElMessageBox.prompt(content, tip, {
|
|
9694
|
-
confirmButtonText: t2("common.ok"),
|
|
9695
|
-
cancelButtonText: t2("common.cancel"),
|
|
9696
|
-
...options
|
|
9697
|
-
});
|
|
9698
|
-
}
|
|
9699
|
-
};
|
|
9700
|
-
};
|
|
9701
|
-
const _hoisted_1$4 = { class: "upload-box" };
|
|
9702
|
-
const _hoisted_2$4 = ["src"];
|
|
9703
|
-
const _hoisted_3$4 = { key: 0 };
|
|
9704
|
-
const _hoisted_4$4 = { key: 0 };
|
|
9705
|
-
const _hoisted_5$3 = {
|
|
9706
|
-
key: 1,
|
|
9707
|
-
class: "upload-empty"
|
|
9708
|
-
};
|
|
9709
|
-
const _hoisted_6$2 = { class: "el-upload__tip" };
|
|
9710
|
-
const _sfc_main$9 = /* @__PURE__ */ Object.assign({ name: "UploadImg", inheritAttrs: false }, {
|
|
9711
|
-
__name: "UploadImg",
|
|
9712
|
-
props: {
|
|
9713
|
-
modelValue: {
|
|
9714
|
-
type: String,
|
|
9715
|
-
default: ""
|
|
9716
|
-
},
|
|
9717
|
-
// 是否支持拖拽上传 ==> 非必传(默认为 true)
|
|
9718
|
-
drag: {
|
|
9719
|
-
type: Boolean,
|
|
9720
|
-
default: true
|
|
9721
|
-
},
|
|
9722
|
-
// 是否禁用上传组件 ==> 非必传(默认为 false)
|
|
9723
|
-
disabled: {
|
|
9724
|
-
type: Boolean,
|
|
9725
|
-
default: false
|
|
9726
|
-
},
|
|
9727
|
-
// 图片大小限制 ==> 非必传(默认为 5M)
|
|
9728
|
-
fileSize: {
|
|
9729
|
-
type: Number,
|
|
9730
|
-
default: 5
|
|
9731
|
-
},
|
|
9732
|
-
// 图片类型限制 ==> 非必传(默认为 ["image/jpeg", "image/png", "image/gif"])
|
|
9733
|
-
fileType: {
|
|
9734
|
-
type: Array,
|
|
9735
|
-
default: () => ["image/jpeg", "image/png", "image/gif"]
|
|
9736
|
-
},
|
|
9737
|
-
// 组件高度 ==> 非必传(默认为 150px)
|
|
9738
|
-
height: {
|
|
9739
|
-
type: String,
|
|
9740
|
-
default: "100px"
|
|
9741
|
-
},
|
|
9742
|
-
// 组件宽度 ==> 非必传(默认为 150px)
|
|
9743
|
-
width: {
|
|
9744
|
-
type: String,
|
|
9745
|
-
default: "100px"
|
|
9746
|
-
},
|
|
9747
|
-
// 组件边框圆角 ==> 非必传(默认为 8px)
|
|
9748
|
-
borderradius: {
|
|
9749
|
-
type: String,
|
|
9750
|
-
default: "4px"
|
|
9751
|
-
},
|
|
9752
|
-
// 是否显示删除按钮
|
|
9753
|
-
showDelete: {
|
|
9693
|
+
scrollbarAlways: {
|
|
9754
9694
|
type: Boolean,
|
|
9755
9695
|
default: true
|
|
9756
|
-
},
|
|
9757
|
-
// 是否显示按钮文字
|
|
9758
|
-
showBtnText: {
|
|
9759
|
-
type: Boolean,
|
|
9760
|
-
default: false
|
|
9761
|
-
},
|
|
9762
|
-
// 上传目录 ==> 非必传(默认为 undefined)
|
|
9763
|
-
directory: {
|
|
9764
|
-
type: String,
|
|
9765
|
-
default: void 0
|
|
9766
|
-
},
|
|
9767
|
-
// 自定义上传函数(必填)==> 必传
|
|
9768
|
-
customUpload: {
|
|
9769
|
-
type: Function,
|
|
9770
|
-
required: true
|
|
9771
|
-
},
|
|
9772
|
-
// 自定义从上传结果中提取 URL 的函数 ==> 非必传(默认为提取 res.data)
|
|
9773
|
-
getUploadUrl: {
|
|
9774
|
-
type: Function,
|
|
9775
|
-
default: (res) => res.data
|
|
9776
9696
|
}
|
|
9777
9697
|
},
|
|
9778
|
-
emits: ["update:modelValue"],
|
|
9698
|
+
emits: ["update:modelValue", "close"],
|
|
9779
9699
|
setup(__props, { emit: __emit }) {
|
|
9780
|
-
|
|
9781
|
-
"3d8ea9da": __props.width,
|
|
9782
|
-
"2c0dbd7a": __props.height,
|
|
9783
|
-
"00ef71d1": __props.borderradius
|
|
9784
|
-
}));
|
|
9700
|
+
const slots = useSlots();
|
|
9785
9701
|
const props = __props;
|
|
9786
|
-
const { t: t2 } = useI18n("layout");
|
|
9787
|
-
const message = useMessage();
|
|
9788
|
-
const uuid = ref("id-" + generateUUID());
|
|
9789
|
-
const imagePreview = (imgUrl) => {
|
|
9790
|
-
createImageViewer({
|
|
9791
|
-
zIndex: 9999999,
|
|
9792
|
-
urlList: [imgUrl]
|
|
9793
|
-
});
|
|
9794
|
-
};
|
|
9795
9702
|
const emit = __emit;
|
|
9796
|
-
const
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
};
|
|
9813
|
-
const
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
message.notifyError("图片上传失败,请您重新上传!");
|
|
9703
|
+
const getBindValue = computed(() => {
|
|
9704
|
+
const delArr = ["fullscreen", "title", "maxHeight", "appendToBody"];
|
|
9705
|
+
const attrs = useAttrs();
|
|
9706
|
+
const obj = { ...attrs, ...props };
|
|
9707
|
+
for (const key in obj) {
|
|
9708
|
+
if (delArr.indexOf(key) !== -1) {
|
|
9709
|
+
delete obj[key];
|
|
9710
|
+
}
|
|
9711
|
+
}
|
|
9712
|
+
return obj;
|
|
9713
|
+
});
|
|
9714
|
+
const dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight);
|
|
9715
|
+
const dialogStyle = computed(() => {
|
|
9716
|
+
return {
|
|
9717
|
+
height: unref(dialogHeight)
|
|
9718
|
+
};
|
|
9719
|
+
});
|
|
9720
|
+
const dialogWidth = computed(() => {
|
|
9721
|
+
return props.width ?? (props.size === "default" ? "40%" : props.size === "large" ? "60%" : "30%");
|
|
9722
|
+
});
|
|
9723
|
+
const dialogClose = () => {
|
|
9724
|
+
emit("update:modelValue", false);
|
|
9725
|
+
emit("close");
|
|
9820
9726
|
};
|
|
9821
9727
|
return (_ctx, _cache) => {
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
|
|
9830
|
-
|
|
9831
|
-
|
|
9832
|
-
|
|
9833
|
-
|
|
9834
|
-
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
|
|
9842
|
-
|
|
9843
|
-
class: "
|
|
9844
|
-
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
|
|
9849
|
-
|
|
9850
|
-
|
|
9851
|
-
|
|
9852
|
-
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
])) : createCommentVNode("", true)
|
|
9728
|
+
const _component_Icon = resolveComponent("Icon");
|
|
9729
|
+
return openBlock(), createBlock(unref(ElDialog), mergeProps(unref(getBindValue), {
|
|
9730
|
+
"close-on-click-modal": true,
|
|
9731
|
+
fullscreen: __props.fullscreen,
|
|
9732
|
+
width: unref(dialogWidth),
|
|
9733
|
+
top: __props.top,
|
|
9734
|
+
"destroy-on-close": "",
|
|
9735
|
+
"lock-scroll": "",
|
|
9736
|
+
class: "com-dialog",
|
|
9737
|
+
"modal-class": "com-modal-dialog",
|
|
9738
|
+
"footer-class": __props.scroll ? "footer-shadow" : "",
|
|
9739
|
+
"show-close": false,
|
|
9740
|
+
onClose: dialogClose
|
|
9741
|
+
}), createSlots({
|
|
9742
|
+
header: withCtx(({ close }) => [
|
|
9743
|
+
createElementVNode("div", _hoisted_1$4, [
|
|
9744
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
9745
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
9746
|
+
]),
|
|
9747
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
9748
|
+
createVNode(_component_Icon, {
|
|
9749
|
+
class: "is-hover cursor-pointer",
|
|
9750
|
+
icon: "ep:close",
|
|
9751
|
+
"hover-color": "var(--el-color-primary)",
|
|
9752
|
+
color: "var(--el-color-info)",
|
|
9753
|
+
onClick: withModifiers(close, ["stop"])
|
|
9754
|
+
}, null, 8, ["onClick"])
|
|
9755
|
+
])
|
|
9756
|
+
])
|
|
9757
|
+
]),
|
|
9758
|
+
default: withCtx(() => [
|
|
9759
|
+
__props.scroll ? (openBlock(), createBlock(unref(ElScrollbar), {
|
|
9760
|
+
key: 0,
|
|
9761
|
+
style: normalizeStyle(unref(dialogStyle)),
|
|
9762
|
+
always: __props.scrollbarAlways
|
|
9763
|
+
}, {
|
|
9764
|
+
default: withCtx(() => [
|
|
9765
|
+
createElementVNode("div", _hoisted_3$4, [
|
|
9766
|
+
renderSlot(_ctx.$slots, "default")
|
|
9862
9767
|
])
|
|
9863
|
-
]
|
|
9864
|
-
|
|
9865
|
-
|
|
9866
|
-
|
|
9867
|
-
|
|
9868
|
-
|
|
9869
|
-
|
|
9870
|
-
|
|
9871
|
-
|
|
9768
|
+
]),
|
|
9769
|
+
_: 3
|
|
9770
|
+
}, 8, ["style", "always"])) : (openBlock(), createElementBlock("div", _hoisted_4$4, [
|
|
9771
|
+
renderSlot(_ctx.$slots, "default")
|
|
9772
|
+
]))
|
|
9773
|
+
]),
|
|
9774
|
+
_: 2
|
|
9775
|
+
}, [
|
|
9776
|
+
unref(slots).footer ? {
|
|
9777
|
+
name: "footer",
|
|
9778
|
+
fn: withCtx(() => [
|
|
9779
|
+
renderSlot(_ctx.$slots, "footer")
|
|
9872
9780
|
]),
|
|
9873
|
-
|
|
9874
|
-
}
|
|
9875
|
-
|
|
9876
|
-
renderSlot(_ctx.$slots, "tip", {}, void 0, true)
|
|
9877
|
-
])
|
|
9878
|
-
]);
|
|
9781
|
+
key: "0"
|
|
9782
|
+
} : void 0
|
|
9783
|
+
]), 1040, ["fullscreen", "width", "top", "footer-class"]);
|
|
9879
9784
|
};
|
|
9880
9785
|
}
|
|
9881
9786
|
});
|
|
9882
|
-
const
|
|
9883
|
-
|
|
9884
|
-
const _hoisted_2$3 = { class: "upload-empty" };
|
|
9885
|
-
const _hoisted_3$3 = ["src"];
|
|
9886
|
-
const _hoisted_4$3 = ["onClick"];
|
|
9887
|
-
const _hoisted_5$2 = { key: 0 };
|
|
9888
|
-
const _hoisted_6$1 = ["onClick"];
|
|
9889
|
-
const _hoisted_7 = { key: 0 };
|
|
9890
|
-
const _hoisted_8 = { class: "el-upload__tip" };
|
|
9891
|
-
const _sfc_main$8 = /* @__PURE__ */ Object.assign({ name: "UploadImgs", inheritAttrs: false }, {
|
|
9892
|
-
__name: "UploadImgs",
|
|
9787
|
+
const _sfc_main$7 = /* @__PURE__ */ Object.assign({ name: "Alert" }, {
|
|
9788
|
+
__name: "Alert",
|
|
9893
9789
|
props: {
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
default: true
|
|
9790
|
+
title: String,
|
|
9791
|
+
type: {
|
|
9792
|
+
type: String,
|
|
9793
|
+
default: "info",
|
|
9794
|
+
validator(value) {
|
|
9795
|
+
return ["success", "warning", "info", "error"].includes(value);
|
|
9796
|
+
}
|
|
9902
9797
|
},
|
|
9903
|
-
|
|
9904
|
-
|
|
9798
|
+
description: String,
|
|
9799
|
+
closable: {
|
|
9905
9800
|
type: Boolean,
|
|
9906
9801
|
default: false
|
|
9907
9802
|
},
|
|
9908
|
-
|
|
9909
|
-
limit: {
|
|
9910
|
-
type: Number,
|
|
9911
|
-
default: 5
|
|
9912
|
-
},
|
|
9913
|
-
// 图片大小限制 ==> 非必传(默认为 5M)
|
|
9914
|
-
fileSize: {
|
|
9915
|
-
type: Number,
|
|
9916
|
-
default: 5
|
|
9917
|
-
},
|
|
9918
|
-
// 图片类型限制 ==> 非必传(默认为 ["image/jpeg", "image/png", "image/gif"])
|
|
9919
|
-
fileType: {
|
|
9920
|
-
type: Array,
|
|
9921
|
-
default: () => ["image/jpeg", "image/png", "image/gif"]
|
|
9922
|
-
},
|
|
9923
|
-
// 组件高度 ==> 非必传(默认为 150px)
|
|
9924
|
-
height: {
|
|
9925
|
-
type: String,
|
|
9926
|
-
default: "100px"
|
|
9927
|
-
},
|
|
9928
|
-
// 组件宽度 ==> 非必传(默认为 150px)
|
|
9929
|
-
width: {
|
|
9930
|
-
type: String,
|
|
9931
|
-
default: "100px"
|
|
9932
|
-
},
|
|
9933
|
-
// 组件边框圆角 ==> 非必传(默认为 8px)
|
|
9934
|
-
borderradius: {
|
|
9935
|
-
type: String,
|
|
9936
|
-
default: "4px"
|
|
9937
|
-
},
|
|
9938
|
-
// 是否显示按钮文字
|
|
9939
|
-
showBtnText: {
|
|
9803
|
+
center: {
|
|
9940
9804
|
type: Boolean,
|
|
9941
9805
|
default: false
|
|
9942
9806
|
},
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
type:
|
|
9946
|
-
default:
|
|
9947
|
-
},
|
|
9948
|
-
// 自定义上传函数(必填)==> 必传
|
|
9949
|
-
customUpload: {
|
|
9950
|
-
type: Function,
|
|
9951
|
-
required: true
|
|
9952
|
-
},
|
|
9953
|
-
// 自定义从上传结果中提取 URL 的函数 ==> 非必传(默认为提取 res.data)
|
|
9954
|
-
getUploadUrl: {
|
|
9955
|
-
type: Function,
|
|
9956
|
-
default: (res) => res.data
|
|
9807
|
+
closeText: String,
|
|
9808
|
+
showIcon: {
|
|
9809
|
+
type: Boolean,
|
|
9810
|
+
default: false
|
|
9957
9811
|
}
|
|
9958
9812
|
},
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
"1238a60c": __props.borderradius,
|
|
9963
|
-
"c60c1990": __props.width,
|
|
9964
|
-
"2f150c16": __props.height
|
|
9965
|
-
}));
|
|
9966
|
-
const message = useMessage();
|
|
9967
|
-
const imagePreview = (imgUrl) => {
|
|
9968
|
-
createImageViewer({
|
|
9969
|
-
zIndex: 9999999,
|
|
9970
|
-
urlList: [imgUrl]
|
|
9971
|
-
});
|
|
9972
|
-
};
|
|
9813
|
+
setup(__props) {
|
|
9814
|
+
const { getPrefixCls: getPrefixCls2 } = useDesign();
|
|
9815
|
+
const prefixCls2 = getPrefixCls2("alert");
|
|
9973
9816
|
const props = __props;
|
|
9974
|
-
const httpRequest = async (options) => {
|
|
9975
|
-
return await props.customUpload(options.file, {
|
|
9976
|
-
directory: props.directory
|
|
9977
|
-
});
|
|
9978
|
-
};
|
|
9979
|
-
const fileList = ref([]);
|
|
9980
|
-
const uploadNumber = ref(0);
|
|
9981
|
-
const uploadList = ref([]);
|
|
9982
|
-
const beforeUpload = (rawFile) => {
|
|
9983
|
-
const imgSize = rawFile.size / 1024 / 1024 < props.fileSize;
|
|
9984
|
-
const imgType = props.fileType;
|
|
9985
|
-
if (!imgType.includes(rawFile.type))
|
|
9986
|
-
ElNotification({
|
|
9987
|
-
title: "温馨提示",
|
|
9988
|
-
message: "上传图片不符合所需的格式!",
|
|
9989
|
-
type: "warning"
|
|
9990
|
-
});
|
|
9991
|
-
if (!imgSize)
|
|
9992
|
-
ElNotification({
|
|
9993
|
-
title: "温馨提示",
|
|
9994
|
-
message: `上传图片大小不能超过 ${props.fileSize}M!`,
|
|
9995
|
-
type: "warning"
|
|
9996
|
-
});
|
|
9997
|
-
uploadNumber.value++;
|
|
9998
|
-
return imgType.includes(rawFile.type) && imgSize;
|
|
9999
|
-
};
|
|
10000
|
-
const emit = __emit;
|
|
10001
|
-
const uploadSuccess = (res) => {
|
|
10002
|
-
message.success("上传成功");
|
|
10003
|
-
const fileUrl = props.getUploadUrl(res);
|
|
10004
|
-
const index = fileList.value.findIndex((item) => {
|
|
10005
|
-
var _a2;
|
|
10006
|
-
return ((_a2 = item.response) == null ? void 0 : _a2.data) === fileUrl;
|
|
10007
|
-
});
|
|
10008
|
-
fileList.value.splice(index, 1);
|
|
10009
|
-
uploadList.value.push({ name: fileUrl, url: fileUrl });
|
|
10010
|
-
if (uploadList.value.length == uploadNumber.value) {
|
|
10011
|
-
fileList.value.push(...uploadList.value);
|
|
10012
|
-
uploadList.value = [];
|
|
10013
|
-
uploadNumber.value = 0;
|
|
10014
|
-
emitUpdateModelValue();
|
|
10015
|
-
}
|
|
10016
|
-
};
|
|
10017
|
-
watch(
|
|
10018
|
-
() => props.modelValue,
|
|
10019
|
-
(val) => {
|
|
10020
|
-
if (!val) {
|
|
10021
|
-
fileList.value = [];
|
|
10022
|
-
return;
|
|
10023
|
-
}
|
|
10024
|
-
fileList.value = [];
|
|
10025
|
-
fileList.value.push(
|
|
10026
|
-
...val.map((url) => ({ name: url.substring(url.lastIndexOf("/") + 1), url }))
|
|
10027
|
-
);
|
|
10028
|
-
},
|
|
10029
|
-
{ immediate: true, deep: true }
|
|
10030
|
-
);
|
|
10031
|
-
const emitUpdateModelValue = () => {
|
|
10032
|
-
let result = fileList.value.map((file) => file.url);
|
|
10033
|
-
emit("update:modelValue", result);
|
|
10034
|
-
};
|
|
10035
|
-
const handleRemove = (uploadFile) => {
|
|
10036
|
-
fileList.value = fileList.value.filter(
|
|
10037
|
-
(item) => item.url !== uploadFile.url || item.name !== uploadFile.name
|
|
10038
|
-
);
|
|
10039
|
-
emit(
|
|
10040
|
-
"update:modelValue",
|
|
10041
|
-
fileList.value.map((file) => file.url)
|
|
10042
|
-
);
|
|
10043
|
-
};
|
|
10044
|
-
const uploadError = () => {
|
|
10045
|
-
ElNotification({
|
|
10046
|
-
title: "温馨提示",
|
|
10047
|
-
message: "图片上传失败,请您重新上传!",
|
|
10048
|
-
type: "error"
|
|
10049
|
-
});
|
|
10050
|
-
};
|
|
10051
|
-
const handleExceed = () => {
|
|
10052
|
-
ElNotification({
|
|
10053
|
-
title: "温馨提示",
|
|
10054
|
-
message: `当前最多只能上传 ${props.limit} 张图片,请移除后上传!`,
|
|
10055
|
-
type: "warning"
|
|
10056
|
-
});
|
|
10057
|
-
};
|
|
10058
9817
|
return (_ctx, _cache) => {
|
|
10059
|
-
return openBlock(),
|
|
10060
|
-
createVNode(unref(ElUpload), {
|
|
10061
|
-
"file-list": unref(fileList),
|
|
10062
|
-
"onUpdate:fileList": _cache[1] || (_cache[1] = ($event) => isRef(fileList) ? fileList.value = $event : null),
|
|
10063
|
-
accept: __props.fileType.join(","),
|
|
10064
|
-
"before-upload": beforeUpload,
|
|
10065
|
-
class: normalizeClass(["upload", __props.drag ? "no-border" : ""]),
|
|
10066
|
-
disabled: __props.disabled,
|
|
10067
|
-
drag: __props.drag,
|
|
10068
|
-
"http-request": httpRequest,
|
|
10069
|
-
limit: __props.limit,
|
|
10070
|
-
multiple: true,
|
|
10071
|
-
"on-error": uploadError,
|
|
10072
|
-
"on-exceed": handleExceed,
|
|
10073
|
-
"on-success": uploadSuccess,
|
|
10074
|
-
"list-type": "picture-card"
|
|
10075
|
-
}, {
|
|
10076
|
-
file: withCtx(({ file }) => [
|
|
10077
|
-
createElementVNode("img", {
|
|
10078
|
-
src: file.url,
|
|
10079
|
-
class: "upload-image"
|
|
10080
|
-
}, null, 8, _hoisted_3$3),
|
|
10081
|
-
createElementVNode("div", {
|
|
10082
|
-
class: "upload-handle",
|
|
10083
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
10084
|
-
}, ["stop"]))
|
|
10085
|
-
}, [
|
|
10086
|
-
createElementVNode("div", {
|
|
10087
|
-
class: "handle-icon",
|
|
10088
|
-
onClick: ($event) => imagePreview(file.url)
|
|
10089
|
-
}, [
|
|
10090
|
-
createVNode(unref(_sfc_main$v), { icon: "ant-design:zoom-in-outlined" }),
|
|
10091
|
-
__props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_5$2, "查看")) : createCommentVNode("", true)
|
|
10092
|
-
], 8, _hoisted_4$3),
|
|
10093
|
-
!__props.disabled ? (openBlock(), createElementBlock("div", {
|
|
10094
|
-
key: 0,
|
|
10095
|
-
class: "handle-icon",
|
|
10096
|
-
onClick: ($event) => handleRemove(file)
|
|
10097
|
-
}, [
|
|
10098
|
-
createVNode(unref(_sfc_main$v), { icon: "ant-design:delete-outlined" }),
|
|
10099
|
-
__props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_7, "删除")) : createCommentVNode("", true)
|
|
10100
|
-
], 8, _hoisted_6$1)) : createCommentVNode("", true)
|
|
10101
|
-
])
|
|
10102
|
-
]),
|
|
10103
|
-
default: withCtx(() => [
|
|
10104
|
-
createElementVNode("div", _hoisted_2$3, [
|
|
10105
|
-
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
10106
|
-
createVNode(unref(_sfc_main$v), {
|
|
10107
|
-
icon: "ep:plus",
|
|
10108
|
-
size: 20
|
|
10109
|
-
}),
|
|
10110
|
-
_cache[2] || (_cache[2] = createElementVNode("span", { class: "empty-text" }, "点击上传", -1))
|
|
10111
|
-
], true)
|
|
10112
|
-
])
|
|
10113
|
-
]),
|
|
10114
|
-
_: 3
|
|
10115
|
-
}, 8, ["file-list", "accept", "class", "disabled", "drag", "limit"]),
|
|
10116
|
-
createElementVNode("div", _hoisted_8, [
|
|
10117
|
-
renderSlot(_ctx.$slots, "tip", {}, void 0, true)
|
|
10118
|
-
])
|
|
10119
|
-
]);
|
|
9818
|
+
return openBlock(), createBlock(unref(ElAlert), mergeProps(props, { class: unref(prefixCls2) }), null, 16, ["class"]);
|
|
10120
9819
|
};
|
|
10121
9820
|
}
|
|
10122
9821
|
});
|
|
10123
|
-
const
|
|
10124
|
-
|
|
10125
|
-
const
|
|
10126
|
-
|
|
10127
|
-
const
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
|
|
10139
|
-
|
|
10140
|
-
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
// 拖拽上传
|
|
10157
|
-
drag: {
|
|
10158
|
-
type: Boolean,
|
|
10159
|
-
default: false
|
|
10160
|
-
},
|
|
10161
|
-
// 是否显示提示
|
|
10162
|
-
isShowTip: {
|
|
10163
|
-
type: Boolean,
|
|
10164
|
-
default: true
|
|
10165
|
-
},
|
|
10166
|
-
// 是否禁用上传组件 ==> 非必传(默认为 false)
|
|
10167
|
-
disabled: {
|
|
10168
|
-
type: Boolean,
|
|
10169
|
-
default: false
|
|
10170
|
-
},
|
|
10171
|
-
// 上传目录 ==> 非必传(默认为 undefined)
|
|
10172
|
-
directory: {
|
|
10173
|
-
type: String,
|
|
10174
|
-
default: void 0
|
|
10175
|
-
},
|
|
10176
|
-
// 自定义上传函数(必填)==> 必传
|
|
10177
|
-
customUpload: {
|
|
10178
|
-
type: Function,
|
|
10179
|
-
required: true
|
|
10180
|
-
},
|
|
10181
|
-
// 自定义从上传结果中提取 URL 的函数 ==> 非必传(默认为提取 res.data)
|
|
10182
|
-
getUploadUrl: {
|
|
10183
|
-
type: Function,
|
|
10184
|
-
default: (res) => res.data
|
|
9822
|
+
const t = (t2) => "object" == typeof t2 && null != t2 && 1 === t2.nodeType, e$1 = (t2, e2) => (!e2 || "hidden" !== t2) && ("visible" !== t2 && "clip" !== t2), n = (t2, n2) => {
|
|
9823
|
+
if (t2.clientHeight < t2.scrollHeight || t2.clientWidth < t2.scrollWidth) {
|
|
9824
|
+
const o2 = getComputedStyle(t2, null);
|
|
9825
|
+
return e$1(o2.overflowY, n2) || e$1(o2.overflowX, n2) || ((t3) => {
|
|
9826
|
+
const e2 = ((t4) => {
|
|
9827
|
+
if (!t4.ownerDocument || !t4.ownerDocument.defaultView)
|
|
9828
|
+
return null;
|
|
9829
|
+
try {
|
|
9830
|
+
return t4.ownerDocument.defaultView.frameElement;
|
|
9831
|
+
} catch (t5) {
|
|
9832
|
+
return null;
|
|
9833
|
+
}
|
|
9834
|
+
})(t3);
|
|
9835
|
+
return !!e2 && (e2.clientHeight < t3.scrollHeight || e2.clientWidth < t3.scrollWidth);
|
|
9836
|
+
})(t2);
|
|
9837
|
+
}
|
|
9838
|
+
return false;
|
|
9839
|
+
}, o$1 = (t2, e2, n2, o2, l2, r2, i, s) => r2 < t2 && i > e2 || r2 > t2 && i < e2 ? 0 : r2 <= t2 && s <= n2 || i >= e2 && s >= n2 ? r2 - t2 - o2 : i > e2 && s < n2 || r2 < t2 && s > n2 ? i - e2 + l2 : 0, l = (t2) => {
|
|
9840
|
+
const e2 = t2.parentElement;
|
|
9841
|
+
return null == e2 ? t2.getRootNode().host || null : e2;
|
|
9842
|
+
}, r = (e2, r2) => {
|
|
9843
|
+
var i, s, d, h;
|
|
9844
|
+
if ("undefined" == typeof document)
|
|
9845
|
+
return [];
|
|
9846
|
+
const { scrollMode: c, block: f, inline: u, boundary: a, skipOverflowHiddenElements: g } = r2, p = "function" == typeof a ? a : (t2) => t2 !== a;
|
|
9847
|
+
if (!t(e2))
|
|
9848
|
+
throw new TypeError("Invalid target");
|
|
9849
|
+
const m = document.scrollingElement || document.documentElement, w = [];
|
|
9850
|
+
let W = e2;
|
|
9851
|
+
for (; t(W) && p(W); ) {
|
|
9852
|
+
if (W = l(W), W === m) {
|
|
9853
|
+
w.push(W);
|
|
9854
|
+
break;
|
|
10185
9855
|
}
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
const
|
|
10190
|
-
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
const
|
|
10196
|
-
|
|
10197
|
-
return
|
|
10198
|
-
|
|
9856
|
+
null != W && W === document.body && n(W) && !n(document.documentElement) || null != W && n(W, g) && w.push(W);
|
|
9857
|
+
}
|
|
9858
|
+
const b = null != (s = null == (i = window.visualViewport) ? void 0 : i.width) ? s : innerWidth, H = null != (h = null == (d = window.visualViewport) ? void 0 : d.height) ? h : innerHeight, { scrollX: y, scrollY: M } = window, { height: v, width: E, top: x, right: C, bottom: I, left: R } = e2.getBoundingClientRect(), { top: T, right: B, bottom: F, left: V } = ((t2) => {
|
|
9859
|
+
const e3 = window.getComputedStyle(t2);
|
|
9860
|
+
return { top: parseFloat(e3.scrollMarginTop) || 0, right: parseFloat(e3.scrollMarginRight) || 0, bottom: parseFloat(e3.scrollMarginBottom) || 0, left: parseFloat(e3.scrollMarginLeft) || 0 };
|
|
9861
|
+
})(e2);
|
|
9862
|
+
let k = "start" === f || "nearest" === f ? x - T : "end" === f ? I + F : x + v / 2 - T + F, D = "center" === u ? R + E / 2 - V + B : "end" === u ? C + B : R - V;
|
|
9863
|
+
const L = [];
|
|
9864
|
+
for (let t2 = 0; t2 < w.length; t2++) {
|
|
9865
|
+
const e3 = w[t2], { height: l2, width: r3, top: i2, right: s2, bottom: d2, left: h2 } = e3.getBoundingClientRect();
|
|
9866
|
+
if ("if-needed" === c && x >= 0 && R >= 0 && I <= H && C <= b && (e3 === m && !n(e3) || x >= i2 && I <= d2 && R >= h2 && C <= s2))
|
|
9867
|
+
return L;
|
|
9868
|
+
const a2 = getComputedStyle(e3), g2 = parseInt(a2.borderLeftWidth, 10), p2 = parseInt(a2.borderTopWidth, 10), W2 = parseInt(a2.borderRightWidth, 10), T2 = parseInt(a2.borderBottomWidth, 10);
|
|
9869
|
+
let B2 = 0, F2 = 0;
|
|
9870
|
+
const V2 = "offsetWidth" in e3 ? e3.offsetWidth - e3.clientWidth - g2 - W2 : 0, S = "offsetHeight" in e3 ? e3.offsetHeight - e3.clientHeight - p2 - T2 : 0, X = "offsetWidth" in e3 ? 0 === e3.offsetWidth ? 0 : r3 / e3.offsetWidth : 0, Y = "offsetHeight" in e3 ? 0 === e3.offsetHeight ? 0 : l2 / e3.offsetHeight : 0;
|
|
9871
|
+
if (m === e3)
|
|
9872
|
+
B2 = "start" === f ? k : "end" === f ? k - H : "nearest" === f ? o$1(M, M + H, H, p2, T2, M + k, M + k + v, v) : k - H / 2, F2 = "start" === u ? D : "center" === u ? D - b / 2 : "end" === u ? D - b : o$1(y, y + b, b, g2, W2, y + D, y + D + E, E), B2 = Math.max(0, B2 + M), F2 = Math.max(0, F2 + y);
|
|
9873
|
+
else {
|
|
9874
|
+
B2 = "start" === f ? k - i2 - p2 : "end" === f ? k - d2 + T2 + S : "nearest" === f ? o$1(i2, d2, l2, p2, T2 + S, k, k + v, v) : k - (i2 + l2 / 2) + S / 2, F2 = "start" === u ? D - h2 - g2 : "center" === u ? D - (h2 + r3 / 2) + V2 / 2 : "end" === u ? D - s2 + W2 + V2 : o$1(h2, s2, r3, g2, W2 + V2, D, D + E, E);
|
|
9875
|
+
const { scrollLeft: t3, scrollTop: n2 } = e3;
|
|
9876
|
+
B2 = 0 === Y ? 0 : Math.max(0, Math.min(n2 + B2 / Y, e3.scrollHeight - l2 / Y + S)), F2 = 0 === X ? 0 : Math.max(0, Math.min(t3 + F2 / X, e3.scrollWidth - r3 / X + V2)), k += n2 - B2, D += t3 - F2;
|
|
9877
|
+
}
|
|
9878
|
+
L.push({ el: e3, top: B2, left: F2 });
|
|
9879
|
+
}
|
|
9880
|
+
return L;
|
|
9881
|
+
};
|
|
9882
|
+
const o = (t2) => false === t2 ? { block: "end", inline: "nearest" } : ((t3) => t3 === Object(t3) && 0 !== Object.keys(t3).length)(t2) ? t2 : { block: "start", inline: "nearest" };
|
|
9883
|
+
function e(e2, r$1) {
|
|
9884
|
+
if (!e2.isConnected || !((t2) => {
|
|
9885
|
+
let o2 = t2;
|
|
9886
|
+
for (; o2 && o2.parentNode; ) {
|
|
9887
|
+
if (o2.parentNode === document)
|
|
9888
|
+
return true;
|
|
9889
|
+
o2 = o2.parentNode instanceof ShadowRoot ? o2.parentNode.host : o2.parentNode;
|
|
9890
|
+
}
|
|
9891
|
+
return false;
|
|
9892
|
+
})(e2))
|
|
9893
|
+
return;
|
|
9894
|
+
const n2 = ((t2) => {
|
|
9895
|
+
const o2 = window.getComputedStyle(t2);
|
|
9896
|
+
return { top: parseFloat(o2.scrollMarginTop) || 0, right: parseFloat(o2.scrollMarginRight) || 0, bottom: parseFloat(o2.scrollMarginBottom) || 0, left: parseFloat(o2.scrollMarginLeft) || 0 };
|
|
9897
|
+
})(e2);
|
|
9898
|
+
if (((t2) => "object" == typeof t2 && "function" == typeof t2.behavior)(r$1))
|
|
9899
|
+
return r$1.behavior(r(e2, r$1));
|
|
9900
|
+
const l2 = "boolean" == typeof r$1 || null == r$1 ? void 0 : r$1.behavior;
|
|
9901
|
+
for (const { el: a, top: i, left: s } of r(e2, o(r$1))) {
|
|
9902
|
+
const t2 = i - n2.top + n2.bottom, o2 = s - n2.left + n2.right;
|
|
9903
|
+
a.scroll({ top: t2, left: o2, behavior: l2 });
|
|
9904
|
+
}
|
|
9905
|
+
}
|
|
9906
|
+
let raf = (callback2) => setTimeout(callback2, 16);
|
|
9907
|
+
let caf = (num) => clearTimeout(num);
|
|
9908
|
+
if (typeof window !== "undefined" && "requestAnimationFrame" in window) {
|
|
9909
|
+
raf = (callback2) => window.requestAnimationFrame(callback2);
|
|
9910
|
+
caf = (handle) => window.cancelAnimationFrame(handle);
|
|
9911
|
+
}
|
|
9912
|
+
let rafUUID = 0;
|
|
9913
|
+
const rafIds = /* @__PURE__ */ new Map();
|
|
9914
|
+
function cleanup(id) {
|
|
9915
|
+
rafIds.delete(id);
|
|
9916
|
+
}
|
|
9917
|
+
function wrapperRaf(callback2, times = 1) {
|
|
9918
|
+
rafUUID += 1;
|
|
9919
|
+
const id = rafUUID;
|
|
9920
|
+
function callRef(leftTimes) {
|
|
9921
|
+
if (leftTimes === 0) {
|
|
9922
|
+
cleanup(id);
|
|
9923
|
+
callback2();
|
|
9924
|
+
} else {
|
|
9925
|
+
const realId = raf(() => {
|
|
9926
|
+
callRef(leftTimes - 1);
|
|
10199
9927
|
});
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
9928
|
+
rafIds.set(id, realId);
|
|
9929
|
+
}
|
|
9930
|
+
}
|
|
9931
|
+
callRef(times);
|
|
9932
|
+
return id;
|
|
9933
|
+
}
|
|
9934
|
+
wrapperRaf.cancel = (id) => {
|
|
9935
|
+
const realId = rafIds.get(id);
|
|
9936
|
+
cleanup(realId);
|
|
9937
|
+
return caf(realId);
|
|
9938
|
+
};
|
|
9939
|
+
const sharpMatcherRegx = /#([\S ]+)$/;
|
|
9940
|
+
const getDefaultContainer = () => {
|
|
9941
|
+
return window;
|
|
9942
|
+
};
|
|
9943
|
+
const getOffsetTop = (element, container) => {
|
|
9944
|
+
if (!element.getClientRects().length) {
|
|
9945
|
+
return 0;
|
|
9946
|
+
}
|
|
9947
|
+
const ele = element.getBoundingClientRect();
|
|
9948
|
+
if (ele.width || ele.height) {
|
|
9949
|
+
if (container === window) {
|
|
9950
|
+
container = element.ownerDocument.documentElement;
|
|
9951
|
+
return ele.top - container.clientTop;
|
|
9952
|
+
}
|
|
9953
|
+
return ele.top - container.getBoundingClientRect().top;
|
|
9954
|
+
}
|
|
9955
|
+
return ele.top;
|
|
9956
|
+
};
|
|
9957
|
+
const isWindow = (obj) => {
|
|
9958
|
+
return obj !== null && obj !== void 0 && obj === obj.window;
|
|
9959
|
+
};
|
|
9960
|
+
const getScroll = (target, top) => {
|
|
9961
|
+
var _a2;
|
|
9962
|
+
if (typeof window === "undefined") {
|
|
9963
|
+
return 0;
|
|
9964
|
+
}
|
|
9965
|
+
const method = "scrollTop";
|
|
9966
|
+
let result = 0;
|
|
9967
|
+
if (isWindow(target)) {
|
|
9968
|
+
result = target["scrollY"];
|
|
9969
|
+
} else if (target instanceof Document) {
|
|
9970
|
+
result = target.documentElement[method];
|
|
9971
|
+
} else if (target instanceof HTMLElement) {
|
|
9972
|
+
result = target[method];
|
|
9973
|
+
} else if (target) {
|
|
9974
|
+
result = target[method];
|
|
9975
|
+
}
|
|
9976
|
+
if (target && !isWindow(target) && typeof result !== "number") {
|
|
9977
|
+
result = (_a2 = (target.ownerDocument ?? target).documentElement) == null ? void 0 : _a2[method];
|
|
9978
|
+
}
|
|
9979
|
+
return result;
|
|
9980
|
+
};
|
|
9981
|
+
const easeInOutCubic = (t2, b, c, d) => {
|
|
9982
|
+
const cc = c - b;
|
|
9983
|
+
t2 /= d / 2;
|
|
9984
|
+
if (t2 < 1) {
|
|
9985
|
+
return cc / 2 * t2 * t2 * t2 + b;
|
|
9986
|
+
}
|
|
9987
|
+
return cc / 2 * ((t2 -= 2) * t2 * t2 + 2) + b;
|
|
9988
|
+
};
|
|
9989
|
+
const scrollTo = (y, options = {}) => {
|
|
9990
|
+
const { getContainer = () => window, callback: callback2, duration = 450 } = options;
|
|
9991
|
+
const container = getContainer();
|
|
9992
|
+
const scrollTop = getScroll(container);
|
|
9993
|
+
const startTime = Date.now();
|
|
9994
|
+
const frameFunc = () => {
|
|
9995
|
+
const timestamp = Date.now();
|
|
9996
|
+
const time = timestamp - startTime;
|
|
9997
|
+
const nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);
|
|
9998
|
+
if (isWindow(container)) {
|
|
9999
|
+
container.scrollTo(window.scrollX, nextScrollTop);
|
|
10000
|
+
} else if (container instanceof Document) {
|
|
10001
|
+
container.documentElement.scrollTop = nextScrollTop;
|
|
10002
|
+
} else {
|
|
10003
|
+
container.scrollTop = nextScrollTop;
|
|
10004
|
+
}
|
|
10005
|
+
if (time < duration) {
|
|
10006
|
+
wrapperRaf(frameFunc);
|
|
10007
|
+
} else if (typeof callback2 === "function") {
|
|
10008
|
+
callback2();
|
|
10009
|
+
}
|
|
10010
|
+
};
|
|
10011
|
+
wrapperRaf(frameFunc);
|
|
10012
|
+
};
|
|
10013
|
+
const addEventListener = (target, eventType, cb, option) => {
|
|
10014
|
+
if (target && target.addEventListener) {
|
|
10015
|
+
target.addEventListener(eventType, cb, option);
|
|
10016
|
+
}
|
|
10017
|
+
return {
|
|
10018
|
+
remove: () => {
|
|
10019
|
+
if (target && target.removeEventListener) {
|
|
10020
|
+
target.removeEventListener(eventType, cb);
|
|
10205
10021
|
}
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10022
|
+
}
|
|
10023
|
+
};
|
|
10024
|
+
};
|
|
10025
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
10026
|
+
name: "AnchorLink",
|
|
10027
|
+
props: {
|
|
10028
|
+
prefixCls: String,
|
|
10029
|
+
href: String,
|
|
10030
|
+
title: String,
|
|
10031
|
+
target: String,
|
|
10032
|
+
customTitleProps: {
|
|
10033
|
+
type: Object,
|
|
10034
|
+
default: () => {
|
|
10209
10035
|
}
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10036
|
+
}
|
|
10037
|
+
},
|
|
10038
|
+
setup(props, {
|
|
10039
|
+
slots,
|
|
10040
|
+
attrs
|
|
10041
|
+
}) {
|
|
10042
|
+
let mergedTitle = null;
|
|
10043
|
+
const {
|
|
10044
|
+
handleClick: contextHandleClick,
|
|
10045
|
+
scrollTo: scrollTo2,
|
|
10046
|
+
unregisterLink,
|
|
10047
|
+
registerLink,
|
|
10048
|
+
activeLink
|
|
10049
|
+
} = inject("useAnchor");
|
|
10050
|
+
const handleClick = (e2) => {
|
|
10051
|
+
const {
|
|
10052
|
+
href
|
|
10053
|
+
} = props;
|
|
10054
|
+
contextHandleClick(e2, {
|
|
10055
|
+
title: mergedTitle,
|
|
10056
|
+
href
|
|
10214
10057
|
});
|
|
10215
|
-
|
|
10216
|
-
if (!isImg) {
|
|
10217
|
-
message.error(`文件格式不正确, 请上传${props.fileType.join("、")}格式!`);
|
|
10218
|
-
return false;
|
|
10219
|
-
}
|
|
10220
|
-
if (!isLimit) {
|
|
10221
|
-
message.error(`上传文件大小不能超过${props.fileSize}MB!`);
|
|
10222
|
-
return false;
|
|
10223
|
-
}
|
|
10224
|
-
message.success("正在上传文件,请稍候...");
|
|
10225
|
-
uploadNumber.value++;
|
|
10058
|
+
scrollTo2(href);
|
|
10226
10059
|
};
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
var _a2;
|
|
10232
|
-
return ((_a2 = item.response) == null ? void 0 : _a2.data) === fileUrl;
|
|
10060
|
+
watch(() => props.href, (val, oldVal) => {
|
|
10061
|
+
nextTick(() => {
|
|
10062
|
+
unregisterLink(oldVal);
|
|
10063
|
+
registerLink(val);
|
|
10233
10064
|
});
|
|
10234
|
-
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
}
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
if (isString(val)) {
|
|
10268
|
-
fileList.value.push(
|
|
10269
|
-
...val.split(",").map((url) => ({ name: url.substring(url.lastIndexOf("/") + 1), url }))
|
|
10270
|
-
);
|
|
10271
|
-
return;
|
|
10272
|
-
}
|
|
10273
|
-
fileList.value.push(
|
|
10274
|
-
...val.map((url) => ({ name: url.substring(url.lastIndexOf("/") + 1), url }))
|
|
10275
|
-
);
|
|
10276
|
-
},
|
|
10277
|
-
{ immediate: true, deep: true }
|
|
10278
|
-
);
|
|
10279
|
-
const emitUpdateModelValue = () => {
|
|
10280
|
-
let result = fileList.value.map((file) => file.url);
|
|
10281
|
-
if (props.limit === 1 || isString(props.modelValue)) {
|
|
10282
|
-
result = result.join(",");
|
|
10283
|
-
}
|
|
10284
|
-
emit("update:modelValue", result);
|
|
10285
|
-
};
|
|
10286
|
-
return (_ctx, _cache) => {
|
|
10287
|
-
return openBlock(), createElementBlock("div", {
|
|
10288
|
-
class: normalizeClass(["upload-file", _ctx.$attrs.class])
|
|
10289
|
-
}, [
|
|
10290
|
-
!__props.disabled ? (openBlock(), createBlock(unref(ElUpload), {
|
|
10291
|
-
key: 0,
|
|
10292
|
-
ref_key: "uploadRef",
|
|
10293
|
-
ref: uploadRef,
|
|
10294
|
-
"file-list": unref(fileList),
|
|
10295
|
-
"onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => isRef(fileList) ? fileList.value = $event : null),
|
|
10296
|
-
"auto-upload": __props.autoUpload,
|
|
10297
|
-
"before-upload": beforeUpload,
|
|
10298
|
-
disabled: __props.disabled,
|
|
10299
|
-
drag: __props.drag,
|
|
10300
|
-
"http-request": httpRequest,
|
|
10301
|
-
limit: props.limit,
|
|
10302
|
-
multiple: props.limit > 1,
|
|
10303
|
-
"on-error": excelUploadError,
|
|
10304
|
-
"on-exceed": handleExceed,
|
|
10305
|
-
"on-preview": handlePreview,
|
|
10306
|
-
"on-remove": handleRemove,
|
|
10307
|
-
"on-success": handleFileSuccess,
|
|
10308
|
-
"show-file-list": true,
|
|
10309
|
-
class: "upload-file-uploader",
|
|
10310
|
-
name: "file"
|
|
10311
|
-
}, createSlots({
|
|
10312
|
-
file: withCtx((row) => [
|
|
10313
|
-
createElementVNode("div", _hoisted_2$2, [
|
|
10314
|
-
createElementVNode("span", null, toDisplayString(row.file.name), 1),
|
|
10315
|
-
createElementVNode("div", _hoisted_3$2, [
|
|
10316
|
-
createVNode(unref(ElLink), {
|
|
10317
|
-
href: row.file.url,
|
|
10318
|
-
underline: "never",
|
|
10319
|
-
download: "",
|
|
10320
|
-
target: "_blank",
|
|
10321
|
-
type: "primary"
|
|
10322
|
-
}, {
|
|
10323
|
-
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
10324
|
-
createTextVNode(" 下载 ", -1)
|
|
10325
|
-
])),
|
|
10326
|
-
_: 2,
|
|
10327
|
-
__: [2]
|
|
10328
|
-
}, 1032, ["href"])
|
|
10329
|
-
]),
|
|
10330
|
-
createElementVNode("div", _hoisted_4$2, [
|
|
10331
|
-
createVNode(unref(ElLink), {
|
|
10332
|
-
type: "danger",
|
|
10333
|
-
onClick: ($event) => handleRemove(row.file)
|
|
10334
|
-
}, {
|
|
10335
|
-
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
10336
|
-
createTextVNode(" 删除", -1)
|
|
10337
|
-
])),
|
|
10338
|
-
_: 2,
|
|
10339
|
-
__: [3]
|
|
10340
|
-
}, 1032, ["onClick"])
|
|
10341
|
-
])
|
|
10342
|
-
])
|
|
10343
|
-
]),
|
|
10344
|
-
default: withCtx(() => [
|
|
10345
|
-
createVNode(unref(ElButton), { type: "primary" }, {
|
|
10346
|
-
default: withCtx(() => [
|
|
10347
|
-
createVNode(unref(_sfc_main$v), { icon: "ant-design:upload-outlined" }),
|
|
10348
|
-
_cache[1] || (_cache[1] = createTextVNode(" 选取文件 ", -1))
|
|
10349
|
-
]),
|
|
10350
|
-
_: 1,
|
|
10351
|
-
__: [1]
|
|
10352
|
-
})
|
|
10353
|
-
]),
|
|
10354
|
-
_: 2
|
|
10355
|
-
}, [
|
|
10356
|
-
__props.isShowTip ? {
|
|
10357
|
-
name: "tip",
|
|
10358
|
-
fn: withCtx(() => [
|
|
10359
|
-
createElementVNode("div", _hoisted_1$2, [
|
|
10360
|
-
createElementVNode("span", null, "格式为:" + toDisplayString(__props.fileType.join("、")) + ",", 1),
|
|
10361
|
-
createElementVNode("span", null, "大小不超过" + toDisplayString(__props.fileSize) + "MB。", 1)
|
|
10362
|
-
])
|
|
10363
|
-
]),
|
|
10364
|
-
key: "0"
|
|
10365
|
-
} : void 0
|
|
10366
|
-
]), 1032, ["file-list", "auto-upload", "disabled", "drag", "limit", "multiple"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(fileList), (file, index) => {
|
|
10367
|
-
return openBlock(), createElementBlock("div", {
|
|
10368
|
-
key: index,
|
|
10369
|
-
class: "flex items-center file-list-item"
|
|
10370
|
-
}, [
|
|
10371
|
-
createElementVNode("span", null, toDisplayString(file.name), 1),
|
|
10372
|
-
createElementVNode("div", _hoisted_5$1, [
|
|
10373
|
-
createVNode(unref(ElLink), {
|
|
10374
|
-
href: file.url,
|
|
10375
|
-
underline: "never",
|
|
10376
|
-
download: "",
|
|
10377
|
-
target: "_blank",
|
|
10378
|
-
type: "primary"
|
|
10379
|
-
}, {
|
|
10380
|
-
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
10381
|
-
createTextVNode(" 下载 ", -1)
|
|
10382
|
-
])),
|
|
10383
|
-
_: 2,
|
|
10384
|
-
__: [4]
|
|
10385
|
-
}, 1032, ["href"])
|
|
10386
|
-
])
|
|
10387
|
-
]);
|
|
10388
|
-
}), 128))
|
|
10389
|
-
], 2);
|
|
10065
|
+
});
|
|
10066
|
+
onMounted(() => {
|
|
10067
|
+
registerLink(props.href);
|
|
10068
|
+
});
|
|
10069
|
+
onBeforeUnmount(() => {
|
|
10070
|
+
unregisterLink(props.href);
|
|
10071
|
+
});
|
|
10072
|
+
return () => {
|
|
10073
|
+
var _a2;
|
|
10074
|
+
const {
|
|
10075
|
+
prefixCls: prefixCls2,
|
|
10076
|
+
href,
|
|
10077
|
+
target,
|
|
10078
|
+
title = slots.title,
|
|
10079
|
+
customTitleProps = {}
|
|
10080
|
+
} = props;
|
|
10081
|
+
mergedTitle = typeof title === "function" ? title(customTitleProps) : title;
|
|
10082
|
+
const active = activeLink.value === href;
|
|
10083
|
+
const wrapperClassName = [`${prefixCls2}-link`, {
|
|
10084
|
+
[`${prefixCls2}-link-active`]: active
|
|
10085
|
+
}, attrs.class];
|
|
10086
|
+
const titleClassName = [`${prefixCls2}-link-title`, {
|
|
10087
|
+
[`${prefixCls2}-link-title-active`]: active
|
|
10088
|
+
}];
|
|
10089
|
+
return createVNode("div", mergeProps(attrs, {
|
|
10090
|
+
"class": wrapperClassName
|
|
10091
|
+
}), [createVNode("a", {
|
|
10092
|
+
"class": titleClassName,
|
|
10093
|
+
"href": href,
|
|
10094
|
+
"title": typeof mergedTitle === "string" ? mergedTitle : "",
|
|
10095
|
+
"target": target,
|
|
10096
|
+
"onClick": handleClick
|
|
10097
|
+
}, [slots.customTitle ? slots.customTitle(customTitleProps) : mergedTitle]), (_a2 = slots.default) == null ? void 0 : _a2.call(slots)]);
|
|
10390
10098
|
};
|
|
10391
|
-
}
|
|
10392
|
-
});
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
type: Number,
|
|
10403
|
-
default: 99
|
|
10404
|
-
},
|
|
10405
|
-
isDot: {
|
|
10099
|
+
}
|
|
10100
|
+
});
|
|
10101
|
+
function _isSlot(s) {
|
|
10102
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
10103
|
+
}
|
|
10104
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
10105
|
+
name: "Anchor",
|
|
10106
|
+
props: {
|
|
10107
|
+
offsetTop: Number,
|
|
10108
|
+
bounds: Number,
|
|
10109
|
+
affix: {
|
|
10406
10110
|
type: Boolean,
|
|
10407
|
-
default:
|
|
10111
|
+
default: true
|
|
10408
10112
|
},
|
|
10409
|
-
|
|
10113
|
+
showInkInFixed: {
|
|
10410
10114
|
type: Boolean,
|
|
10411
10115
|
default: false
|
|
10412
10116
|
},
|
|
10413
|
-
|
|
10117
|
+
getContainer: Function,
|
|
10118
|
+
wrapperClass: String,
|
|
10119
|
+
wrapperStyle: {
|
|
10120
|
+
type: Object,
|
|
10121
|
+
default: void 0
|
|
10122
|
+
},
|
|
10123
|
+
// getCurrentAnchor: Function,
|
|
10124
|
+
targetOffset: Number,
|
|
10125
|
+
items: {
|
|
10126
|
+
type: Array,
|
|
10127
|
+
default: () => []
|
|
10128
|
+
},
|
|
10129
|
+
direction: {
|
|
10414
10130
|
type: String,
|
|
10415
|
-
default: "
|
|
10131
|
+
default: "vertical",
|
|
10416
10132
|
validator(value) {
|
|
10417
|
-
return ["
|
|
10133
|
+
return ["vertical", "horizontal"].includes(value);
|
|
10418
10134
|
}
|
|
10419
10135
|
}
|
|
10420
10136
|
},
|
|
10421
|
-
setup(
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10137
|
+
setup(props, {
|
|
10138
|
+
attrs,
|
|
10139
|
+
emit,
|
|
10140
|
+
slots,
|
|
10141
|
+
expose
|
|
10142
|
+
}) {
|
|
10143
|
+
const {
|
|
10144
|
+
getPrefixCls: getPrefixCls2
|
|
10145
|
+
} = useDesign();
|
|
10146
|
+
const prefixCls2 = getPrefixCls2("anchor");
|
|
10147
|
+
const anchorDirection = computed(() => props.direction ?? "vertical");
|
|
10148
|
+
const spanLinkNode = ref(null);
|
|
10149
|
+
const anchorRef = ref();
|
|
10150
|
+
const state = reactive({
|
|
10151
|
+
links: [],
|
|
10152
|
+
scrollContainer: null,
|
|
10153
|
+
scrollEvent: null,
|
|
10154
|
+
animating: false
|
|
10155
|
+
});
|
|
10156
|
+
const activeLink = ref(null);
|
|
10157
|
+
const getContainer = computed(() => {
|
|
10158
|
+
const {
|
|
10159
|
+
getContainer: getContainer2
|
|
10160
|
+
} = props;
|
|
10161
|
+
return getContainer2 || getDefaultContainer;
|
|
10162
|
+
});
|
|
10163
|
+
const getCurrentAnchor = (offsetTop = 0, bounds = 5) => {
|
|
10164
|
+
const linkSections = [];
|
|
10165
|
+
const container = getContainer.value();
|
|
10166
|
+
state.links.forEach((link) => {
|
|
10167
|
+
const sharpLinkMatch = sharpMatcherRegx.exec(link.toString());
|
|
10168
|
+
if (!sharpLinkMatch) {
|
|
10169
|
+
return;
|
|
10170
|
+
}
|
|
10171
|
+
const target = document.getElementById(sharpLinkMatch[1]);
|
|
10172
|
+
if (target) {
|
|
10173
|
+
const top = getOffsetTop(target, container);
|
|
10174
|
+
if (top < offsetTop + bounds) {
|
|
10175
|
+
linkSections.push({
|
|
10176
|
+
link,
|
|
10177
|
+
top
|
|
10178
|
+
});
|
|
10179
|
+
}
|
|
10180
|
+
}
|
|
10181
|
+
});
|
|
10182
|
+
if (linkSections.length) {
|
|
10183
|
+
const maxSection = linkSections.reduce((prev, curr) => curr.top > prev.top ? curr : prev);
|
|
10184
|
+
return maxSection.link;
|
|
10185
|
+
}
|
|
10186
|
+
return "";
|
|
10187
|
+
};
|
|
10188
|
+
const setCurrentActiveLink = (link) => {
|
|
10189
|
+
const {
|
|
10190
|
+
getCurrentAnchor: getCurrentAnchor2
|
|
10191
|
+
} = props;
|
|
10192
|
+
if (activeLink.value === link) {
|
|
10193
|
+
return;
|
|
10194
|
+
}
|
|
10195
|
+
activeLink.value = typeof getCurrentAnchor2 === "function" ? getCurrentAnchor2(link) : link;
|
|
10196
|
+
emit("change", link);
|
|
10197
|
+
};
|
|
10198
|
+
const handleScrollTo = (link) => {
|
|
10199
|
+
const {
|
|
10200
|
+
offsetTop,
|
|
10201
|
+
targetOffset
|
|
10202
|
+
} = props;
|
|
10203
|
+
setCurrentActiveLink(link);
|
|
10204
|
+
const sharpLinkMatch = sharpMatcherRegx.exec(link);
|
|
10205
|
+
if (!sharpLinkMatch) {
|
|
10206
|
+
return;
|
|
10207
|
+
}
|
|
10208
|
+
const targetElement = document.getElementById(sharpLinkMatch[1]);
|
|
10209
|
+
if (!targetElement) {
|
|
10210
|
+
return;
|
|
10211
|
+
}
|
|
10212
|
+
const container = getContainer.value();
|
|
10213
|
+
const scrollTop = getScroll(container);
|
|
10214
|
+
const eleOffsetTop = getOffsetTop(targetElement, container);
|
|
10215
|
+
let y = scrollTop + eleOffsetTop;
|
|
10216
|
+
y -= targetOffset !== void 0 ? targetOffset : offsetTop || 0;
|
|
10217
|
+
state.animating = true;
|
|
10218
|
+
scrollTo(y, {
|
|
10219
|
+
callback: () => {
|
|
10220
|
+
state.animating = false;
|
|
10221
|
+
},
|
|
10222
|
+
getContainer: getContainer.value
|
|
10223
|
+
});
|
|
10224
|
+
};
|
|
10225
|
+
expose({
|
|
10226
|
+
scrollTo: handleScrollTo
|
|
10227
|
+
});
|
|
10228
|
+
const handleScroll = () => {
|
|
10229
|
+
if (state.animating) {
|
|
10230
|
+
return;
|
|
10231
|
+
}
|
|
10232
|
+
const {
|
|
10233
|
+
offsetTop,
|
|
10234
|
+
bounds,
|
|
10235
|
+
targetOffset
|
|
10236
|
+
} = props;
|
|
10237
|
+
const currentActiveLink = getCurrentAnchor(targetOffset !== void 0 ? targetOffset : offsetTop || 0, bounds);
|
|
10238
|
+
setCurrentActiveLink(currentActiveLink);
|
|
10239
|
+
};
|
|
10240
|
+
const updateInk = () => {
|
|
10241
|
+
const linkNode = anchorRef.value.querySelector(`.${prefixCls2}-link-title-active`);
|
|
10242
|
+
if (linkNode && spanLinkNode.value) {
|
|
10243
|
+
const horizontalAnchor = anchorDirection.value === "horizontal";
|
|
10244
|
+
spanLinkNode.value.style.top = horizontalAnchor ? "" : `${linkNode.offsetTop + linkNode.clientHeight / 2}px`;
|
|
10245
|
+
spanLinkNode.value.style.height = horizontalAnchor ? "" : `${linkNode.clientHeight}px`;
|
|
10246
|
+
spanLinkNode.value.style.left = horizontalAnchor ? `${linkNode.offsetLeft}px` : "";
|
|
10247
|
+
spanLinkNode.value.style.width = horizontalAnchor ? `${linkNode.clientWidth}px` : "";
|
|
10248
|
+
if (horizontalAnchor) {
|
|
10249
|
+
e(linkNode, {
|
|
10250
|
+
scrollMode: "if-needed",
|
|
10251
|
+
block: "nearest"
|
|
10252
|
+
});
|
|
10253
|
+
}
|
|
10254
|
+
}
|
|
10255
|
+
};
|
|
10256
|
+
provide("useAnchor", {
|
|
10257
|
+
registerLink: (link) => {
|
|
10258
|
+
if (!state.links.includes(link)) {
|
|
10259
|
+
state.links.push(link);
|
|
10260
|
+
}
|
|
10261
|
+
},
|
|
10262
|
+
unregisterLink: (link) => {
|
|
10263
|
+
const index = state.links.indexOf(link);
|
|
10264
|
+
if (index !== -1) {
|
|
10265
|
+
state.links.splice(index, 1);
|
|
10266
|
+
}
|
|
10267
|
+
},
|
|
10268
|
+
activeLink,
|
|
10269
|
+
scrollTo: handleScrollTo,
|
|
10270
|
+
handleClick: (e2, info) => {
|
|
10271
|
+
emit("click", e2, info);
|
|
10272
|
+
},
|
|
10273
|
+
direction: anchorDirection
|
|
10274
|
+
});
|
|
10275
|
+
onMounted(() => {
|
|
10276
|
+
nextTick(() => {
|
|
10277
|
+
const container = getContainer.value();
|
|
10278
|
+
state.scrollContainer = container;
|
|
10279
|
+
state.scrollEvent = addEventListener(state.scrollContainer, "scroll", handleScroll);
|
|
10280
|
+
handleScroll();
|
|
10281
|
+
});
|
|
10282
|
+
});
|
|
10283
|
+
onBeforeUnmount(() => {
|
|
10284
|
+
if (state.scrollEvent) {
|
|
10285
|
+
state.scrollEvent.remove();
|
|
10286
|
+
}
|
|
10287
|
+
});
|
|
10288
|
+
onUpdated(() => {
|
|
10289
|
+
if (state.scrollEvent) {
|
|
10290
|
+
const currentContainer = getContainer.value();
|
|
10291
|
+
if (state.scrollContainer !== currentContainer) {
|
|
10292
|
+
state.scrollContainer = currentContainer;
|
|
10293
|
+
state.scrollEvent.remove();
|
|
10294
|
+
state.scrollEvent = addEventListener(state.scrollContainer, "scroll", handleScroll);
|
|
10295
|
+
handleScroll();
|
|
10296
|
+
}
|
|
10297
|
+
}
|
|
10298
|
+
updateInk();
|
|
10299
|
+
});
|
|
10300
|
+
const createNestedLink = (options) => Array.isArray(options) ? options.map((option) => {
|
|
10301
|
+
const {
|
|
10302
|
+
children,
|
|
10303
|
+
key,
|
|
10304
|
+
href,
|
|
10305
|
+
target,
|
|
10306
|
+
class: cls,
|
|
10307
|
+
style,
|
|
10308
|
+
title
|
|
10309
|
+
} = option;
|
|
10310
|
+
return createVNode(_sfc_main$6, {
|
|
10311
|
+
"key": key,
|
|
10312
|
+
"href": href,
|
|
10313
|
+
"target": target,
|
|
10314
|
+
"class": cls,
|
|
10315
|
+
"style": style,
|
|
10316
|
+
"title": title,
|
|
10317
|
+
"prefixCls": prefixCls2,
|
|
10318
|
+
"customTitleProps": option
|
|
10319
|
+
}, {
|
|
10320
|
+
default: () => [anchorDirection.value === "vertical" ? createNestedLink(children) : null],
|
|
10321
|
+
customTitle: slots.customTitle
|
|
10322
|
+
});
|
|
10323
|
+
}) : null;
|
|
10324
|
+
return () => {
|
|
10325
|
+
var _a2;
|
|
10326
|
+
const {
|
|
10327
|
+
offsetTop,
|
|
10328
|
+
affix,
|
|
10329
|
+
showInkInFixed
|
|
10330
|
+
} = props;
|
|
10331
|
+
const inkClass = [`${prefixCls2}-ink`, {
|
|
10332
|
+
[`${prefixCls2}-ink-visible`]: activeLink.value
|
|
10333
|
+
}];
|
|
10334
|
+
const wrapperClass = [props.wrapperClass, `${prefixCls2}-wrapper`, {
|
|
10335
|
+
[`${prefixCls2}-wrapper-horizontal`]: anchorDirection.value === "horizontal"
|
|
10336
|
+
}];
|
|
10337
|
+
const anchorClass = [prefixCls2, {
|
|
10338
|
+
[`${prefixCls2}-fixed`]: !affix && !showInkInFixed
|
|
10339
|
+
}];
|
|
10340
|
+
const wrapperStyle = {
|
|
10341
|
+
maxHeight: offsetTop ? `calc(100vh - ${offsetTop}px)` : "100vh",
|
|
10342
|
+
...props.wrapperStyle
|
|
10343
|
+
};
|
|
10344
|
+
const anchorContent = createVNode("div", {
|
|
10345
|
+
"class": wrapperClass,
|
|
10346
|
+
"style": wrapperStyle,
|
|
10347
|
+
"ref": anchorRef
|
|
10348
|
+
}, [createVNode("div", {
|
|
10349
|
+
"class": anchorClass
|
|
10350
|
+
}, [createVNode("span", {
|
|
10351
|
+
"class": inkClass,
|
|
10352
|
+
"ref": spanLinkNode
|
|
10353
|
+
}, null), Array.isArray(props.items) ? createNestedLink(props.items) : (_a2 = slots.default) == null ? void 0 : _a2.call(slots)])]);
|
|
10354
|
+
return !affix ? anchorContent : createVNode(ElAffix, mergeProps(attrs, {
|
|
10355
|
+
"offset": offsetTop
|
|
10356
|
+
}), _isSlot(anchorContent) ? anchorContent : {
|
|
10357
|
+
default: () => [anchorContent]
|
|
10358
|
+
});
|
|
10432
10359
|
};
|
|
10433
10360
|
}
|
|
10434
10361
|
});
|
|
10435
|
-
const
|
|
10436
|
-
|
|
10362
|
+
const _hoisted_1$3 = { class: "com-steps" };
|
|
10363
|
+
const _hoisted_2$3 = { class: "steps-item-container" };
|
|
10364
|
+
const _hoisted_3$3 = { class: "steps-item-icon" };
|
|
10365
|
+
const _hoisted_4$3 = { class: "steps-icon" };
|
|
10366
|
+
const _hoisted_5$3 = { class: "steps-item-content" };
|
|
10367
|
+
const _hoisted_6$2 = { class: "steps-item-title" };
|
|
10368
|
+
const _sfc_main$4 = /* @__PURE__ */ Object.assign({ name: "Steps" }, {
|
|
10369
|
+
__name: "Steps",
|
|
10437
10370
|
props: {
|
|
10438
|
-
//
|
|
10439
|
-
|
|
10440
|
-
required: true,
|
|
10441
|
-
type: Number
|
|
10442
|
-
},
|
|
10443
|
-
// 当前页数:pageNo
|
|
10444
|
-
page: {
|
|
10445
|
-
type: Number,
|
|
10446
|
-
default: 1
|
|
10447
|
-
},
|
|
10448
|
-
// 每页显示条目个数:pageSize
|
|
10449
|
-
limit: {
|
|
10371
|
+
// 设置当前激活步骤
|
|
10372
|
+
active: {
|
|
10450
10373
|
type: Number,
|
|
10451
|
-
default:
|
|
10374
|
+
default: 0
|
|
10452
10375
|
},
|
|
10453
|
-
//
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
default: document.body.clientWidth < 992 ? 5 : 7
|
|
10376
|
+
// 配置选项卡内容
|
|
10377
|
+
items: {
|
|
10378
|
+
type: Array,
|
|
10379
|
+
default: () => []
|
|
10458
10380
|
}
|
|
10459
10381
|
},
|
|
10460
|
-
|
|
10461
|
-
setup(__props, { emit: __emit }) {
|
|
10462
|
-
const appStore = useAppStore();
|
|
10463
|
-
const layoutCurrentSize = computed(() => appStore.currentSize);
|
|
10464
|
-
const isSmall = ref(layoutCurrentSize.value === "small");
|
|
10465
|
-
watchEffect(() => {
|
|
10466
|
-
isSmall.value = layoutCurrentSize.value === "small";
|
|
10467
|
-
});
|
|
10468
|
-
const props = __props;
|
|
10469
|
-
const emit = __emit;
|
|
10470
|
-
const currentPage = computed({
|
|
10471
|
-
get() {
|
|
10472
|
-
return props.page;
|
|
10473
|
-
},
|
|
10474
|
-
set(val) {
|
|
10475
|
-
emit("update:page", val);
|
|
10476
|
-
}
|
|
10477
|
-
});
|
|
10478
|
-
const pageSize = computed({
|
|
10479
|
-
get() {
|
|
10480
|
-
return props.limit;
|
|
10481
|
-
},
|
|
10482
|
-
set(val) {
|
|
10483
|
-
emit("update:limit", val);
|
|
10484
|
-
}
|
|
10485
|
-
});
|
|
10486
|
-
const handleSizeChange = (val) => {
|
|
10487
|
-
if (currentPage.value * val > props.total) {
|
|
10488
|
-
currentPage.value = 1;
|
|
10489
|
-
}
|
|
10490
|
-
emit("pagination", { page: currentPage.value, limit: val });
|
|
10491
|
-
};
|
|
10492
|
-
const handleCurrentChange = (val) => {
|
|
10493
|
-
emit("pagination", { page: val, limit: pageSize.value });
|
|
10494
|
-
};
|
|
10382
|
+
setup(__props) {
|
|
10495
10383
|
return (_ctx, _cache) => {
|
|
10496
|
-
return
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10384
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
10385
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
|
|
10386
|
+
return openBlock(), createElementBlock("div", {
|
|
10387
|
+
key: index,
|
|
10388
|
+
class: normalizeClass(["steps-item", {
|
|
10389
|
+
"steps-item-finish": __props.active > index,
|
|
10390
|
+
"steps-item-process": __props.active == index,
|
|
10391
|
+
"steps-item-wait": __props.active < index
|
|
10392
|
+
}])
|
|
10393
|
+
}, [
|
|
10394
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
10395
|
+
createElementVNode("div", _hoisted_3$3, [
|
|
10396
|
+
createElementVNode("div", _hoisted_4$3, [
|
|
10397
|
+
__props.active > index ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
10398
|
+
key: 0,
|
|
10399
|
+
icon: "ant-design:check-outlined",
|
|
10400
|
+
color: "#fff"
|
|
10401
|
+
})) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
10402
|
+
createTextVNode(toDisplayString(index + 1), 1)
|
|
10403
|
+
], 64))
|
|
10404
|
+
])
|
|
10405
|
+
]),
|
|
10406
|
+
createElementVNode("div", _hoisted_5$3, [
|
|
10407
|
+
createElementVNode("div", _hoisted_6$2, toDisplayString(item.title), 1)
|
|
10408
|
+
])
|
|
10409
|
+
])
|
|
10410
|
+
], 2);
|
|
10411
|
+
}), 128))
|
|
10510
10412
|
]);
|
|
10511
10413
|
};
|
|
10512
10414
|
}
|
|
10513
10415
|
});
|
|
10514
|
-
const
|
|
10515
|
-
const
|
|
10516
|
-
|
|
10517
|
-
const _hoisted_4$1 = {
|
|
10518
|
-
key: 1,
|
|
10519
|
-
class: "pt-16px p-l-20px p-r-20px"
|
|
10520
|
-
};
|
|
10521
|
-
const _sfc_main$4 = /* @__PURE__ */ Object.assign({ name: "Dialog" }, {
|
|
10522
|
-
__name: "Dialog",
|
|
10416
|
+
const Steps = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-eb3cf40f"]]);
|
|
10417
|
+
const _sfc_main$3 = /* @__PURE__ */ Object.assign({ name: "ImageViewer" }, {
|
|
10418
|
+
__name: "ImageViewer",
|
|
10523
10419
|
props: {
|
|
10524
|
-
|
|
10525
|
-
type:
|
|
10526
|
-
default:
|
|
10527
|
-
},
|
|
10528
|
-
title: {
|
|
10529
|
-
type: String,
|
|
10530
|
-
default: "Dialog"
|
|
10531
|
-
},
|
|
10532
|
-
fullscreen: {
|
|
10533
|
-
type: Boolean,
|
|
10534
|
-
default: false
|
|
10535
|
-
},
|
|
10536
|
-
width: {
|
|
10537
|
-
type: [String, Number]
|
|
10538
|
-
},
|
|
10539
|
-
// 是否开启滚动条。如果是的话,按照 maxHeight 设置最大高度
|
|
10540
|
-
scroll: {
|
|
10541
|
-
type: Boolean,
|
|
10542
|
-
default: false
|
|
10543
|
-
},
|
|
10544
|
-
maxHeight: {
|
|
10545
|
-
type: [String, Number],
|
|
10546
|
-
default: "60vh"
|
|
10420
|
+
urlList: {
|
|
10421
|
+
type: Array,
|
|
10422
|
+
default: () => []
|
|
10547
10423
|
},
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
default: "default",
|
|
10552
|
-
validate(value) {
|
|
10553
|
-
return ["large", "default", "small"].includes(value);
|
|
10554
|
-
}
|
|
10424
|
+
zIndex: {
|
|
10425
|
+
type: Number,
|
|
10426
|
+
default: 200
|
|
10555
10427
|
},
|
|
10556
|
-
|
|
10557
|
-
type:
|
|
10558
|
-
default:
|
|
10428
|
+
initialIndex: {
|
|
10429
|
+
type: Number,
|
|
10430
|
+
default: 0
|
|
10559
10431
|
},
|
|
10560
|
-
|
|
10432
|
+
infinite: {
|
|
10561
10433
|
type: Boolean,
|
|
10562
|
-
default: true
|
|
10563
|
-
}
|
|
10564
|
-
},
|
|
10565
|
-
emits: ["update:modelValue", "close"],
|
|
10566
|
-
setup(__props, { emit: __emit }) {
|
|
10567
|
-
const slots = useSlots();
|
|
10568
|
-
const props = __props;
|
|
10569
|
-
const emit = __emit;
|
|
10570
|
-
const getBindValue = computed(() => {
|
|
10571
|
-
const delArr = ["fullscreen", "title", "maxHeight", "appendToBody"];
|
|
10572
|
-
const attrs = useAttrs();
|
|
10573
|
-
const obj = { ...attrs, ...props };
|
|
10574
|
-
for (const key in obj) {
|
|
10575
|
-
if (delArr.indexOf(key) !== -1) {
|
|
10576
|
-
delete obj[key];
|
|
10577
|
-
}
|
|
10578
|
-
}
|
|
10579
|
-
return obj;
|
|
10580
|
-
});
|
|
10581
|
-
const dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight);
|
|
10582
|
-
const dialogStyle = computed(() => {
|
|
10583
|
-
return {
|
|
10584
|
-
height: unref(dialogHeight)
|
|
10585
|
-
};
|
|
10586
|
-
});
|
|
10587
|
-
const dialogWidth = computed(() => {
|
|
10588
|
-
return props.width ?? (props.size === "default" ? "40%" : props.size === "large" ? "60%" : "30%");
|
|
10589
|
-
});
|
|
10590
|
-
const dialogClose = () => {
|
|
10591
|
-
emit("update:modelValue", false);
|
|
10592
|
-
emit("close");
|
|
10593
|
-
};
|
|
10594
|
-
return (_ctx, _cache) => {
|
|
10595
|
-
const _component_Icon = resolveComponent("Icon");
|
|
10596
|
-
return openBlock(), createBlock(unref(ElDialog), mergeProps(unref(getBindValue), {
|
|
10597
|
-
"close-on-click-modal": true,
|
|
10598
|
-
fullscreen: __props.fullscreen,
|
|
10599
|
-
width: unref(dialogWidth),
|
|
10600
|
-
top: __props.top,
|
|
10601
|
-
"destroy-on-close": "",
|
|
10602
|
-
"lock-scroll": "",
|
|
10603
|
-
class: "com-dialog",
|
|
10604
|
-
"modal-class": "com-modal-dialog",
|
|
10605
|
-
"footer-class": __props.scroll ? "footer-shadow" : "",
|
|
10606
|
-
"show-close": false,
|
|
10607
|
-
onClose: dialogClose
|
|
10608
|
-
}), createSlots({
|
|
10609
|
-
header: withCtx(({ close }) => [
|
|
10610
|
-
createElementVNode("div", _hoisted_1$1, [
|
|
10611
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
10612
|
-
createTextVNode(toDisplayString(__props.title), 1)
|
|
10613
|
-
]),
|
|
10614
|
-
createElementVNode("div", _hoisted_2$1, [
|
|
10615
|
-
createVNode(_component_Icon, {
|
|
10616
|
-
class: "is-hover cursor-pointer",
|
|
10617
|
-
icon: "ep:close",
|
|
10618
|
-
"hover-color": "var(--el-color-primary)",
|
|
10619
|
-
color: "var(--el-color-info)",
|
|
10620
|
-
onClick: withModifiers(close, ["stop"])
|
|
10621
|
-
}, null, 8, ["onClick"])
|
|
10622
|
-
])
|
|
10623
|
-
])
|
|
10624
|
-
]),
|
|
10625
|
-
default: withCtx(() => [
|
|
10626
|
-
__props.scroll ? (openBlock(), createBlock(unref(ElScrollbar), {
|
|
10627
|
-
key: 0,
|
|
10628
|
-
style: normalizeStyle(unref(dialogStyle)),
|
|
10629
|
-
always: __props.scrollbarAlways
|
|
10630
|
-
}, {
|
|
10631
|
-
default: withCtx(() => [
|
|
10632
|
-
createElementVNode("div", _hoisted_3$1, [
|
|
10633
|
-
renderSlot(_ctx.$slots, "default")
|
|
10634
|
-
])
|
|
10635
|
-
]),
|
|
10636
|
-
_: 3
|
|
10637
|
-
}, 8, ["style", "always"])) : (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
10638
|
-
renderSlot(_ctx.$slots, "default")
|
|
10639
|
-
]))
|
|
10640
|
-
]),
|
|
10641
|
-
_: 2
|
|
10642
|
-
}, [
|
|
10643
|
-
unref(slots).footer ? {
|
|
10644
|
-
name: "footer",
|
|
10645
|
-
fn: withCtx(() => [
|
|
10646
|
-
renderSlot(_ctx.$slots, "footer")
|
|
10647
|
-
]),
|
|
10648
|
-
key: "0"
|
|
10649
|
-
} : void 0
|
|
10650
|
-
]), 1040, ["fullscreen", "width", "top", "footer-class"]);
|
|
10651
|
-
};
|
|
10652
|
-
}
|
|
10653
|
-
});
|
|
10654
|
-
const _sfc_main$3 = /* @__PURE__ */ Object.assign({ name: "Alert" }, {
|
|
10655
|
-
__name: "Alert",
|
|
10656
|
-
props: {
|
|
10657
|
-
title: String,
|
|
10658
|
-
type: {
|
|
10659
|
-
type: String,
|
|
10660
|
-
default: "info",
|
|
10661
|
-
validator(value) {
|
|
10662
|
-
return ["success", "warning", "info", "error"].includes(value);
|
|
10663
|
-
}
|
|
10434
|
+
default: true
|
|
10664
10435
|
},
|
|
10665
|
-
|
|
10666
|
-
closable: {
|
|
10436
|
+
hideOnClickModal: {
|
|
10667
10437
|
type: Boolean,
|
|
10668
10438
|
default: false
|
|
10669
10439
|
},
|
|
10670
|
-
|
|
10440
|
+
teleported: {
|
|
10671
10441
|
type: Boolean,
|
|
10672
10442
|
default: false
|
|
10673
10443
|
},
|
|
10674
|
-
|
|
10675
|
-
showIcon: {
|
|
10444
|
+
show: {
|
|
10676
10445
|
type: Boolean,
|
|
10677
10446
|
default: false
|
|
10678
10447
|
}
|
|
10679
10448
|
},
|
|
10680
10449
|
setup(__props) {
|
|
10681
|
-
const { getPrefixCls: getPrefixCls2 } = useDesign();
|
|
10682
|
-
const prefixCls2 = getPrefixCls2("alert");
|
|
10683
10450
|
const props = __props;
|
|
10451
|
+
const getBindValue = computed(() => {
|
|
10452
|
+
const propsData = { ...props };
|
|
10453
|
+
delete propsData.show;
|
|
10454
|
+
return propsData;
|
|
10455
|
+
});
|
|
10456
|
+
const show = ref(props.show);
|
|
10457
|
+
const close = () => {
|
|
10458
|
+
show.value = false;
|
|
10459
|
+
};
|
|
10684
10460
|
return (_ctx, _cache) => {
|
|
10685
|
-
return openBlock(), createBlock(unref(
|
|
10461
|
+
return unref(show) ? (openBlock(), createBlock(unref(ElImageViewer), mergeProps({ key: 0 }, unref(getBindValue), { onClose: close }), null, 16)) : createCommentVNode("", true);
|
|
10686
10462
|
};
|
|
10687
10463
|
}
|
|
10688
10464
|
});
|
|
10689
|
-
|
|
10690
|
-
|
|
10691
|
-
|
|
10692
|
-
return e$1(o2.overflowY, n2) || e$1(o2.overflowX, n2) || ((t3) => {
|
|
10693
|
-
const e2 = ((t4) => {
|
|
10694
|
-
if (!t4.ownerDocument || !t4.ownerDocument.defaultView)
|
|
10695
|
-
return null;
|
|
10696
|
-
try {
|
|
10697
|
-
return t4.ownerDocument.defaultView.frameElement;
|
|
10698
|
-
} catch (t5) {
|
|
10699
|
-
return null;
|
|
10700
|
-
}
|
|
10701
|
-
})(t3);
|
|
10702
|
-
return !!e2 && (e2.clientHeight < t3.scrollHeight || e2.clientWidth < t3.scrollWidth);
|
|
10703
|
-
})(t2);
|
|
10704
|
-
}
|
|
10705
|
-
return false;
|
|
10706
|
-
}, o$1 = (t2, e2, n2, o2, l2, r2, i, s) => r2 < t2 && i > e2 || r2 > t2 && i < e2 ? 0 : r2 <= t2 && s <= n2 || i >= e2 && s >= n2 ? r2 - t2 - o2 : i > e2 && s < n2 || r2 < t2 && s > n2 ? i - e2 + l2 : 0, l = (t2) => {
|
|
10707
|
-
const e2 = t2.parentElement;
|
|
10708
|
-
return null == e2 ? t2.getRootNode().host || null : e2;
|
|
10709
|
-
}, r = (e2, r2) => {
|
|
10710
|
-
var i, s, d, h;
|
|
10711
|
-
if ("undefined" == typeof document)
|
|
10712
|
-
return [];
|
|
10713
|
-
const { scrollMode: c, block: f, inline: u, boundary: a, skipOverflowHiddenElements: g } = r2, p = "function" == typeof a ? a : (t2) => t2 !== a;
|
|
10714
|
-
if (!t(e2))
|
|
10715
|
-
throw new TypeError("Invalid target");
|
|
10716
|
-
const m = document.scrollingElement || document.documentElement, w = [];
|
|
10717
|
-
let W = e2;
|
|
10718
|
-
for (; t(W) && p(W); ) {
|
|
10719
|
-
if (W = l(W), W === m) {
|
|
10720
|
-
w.push(W);
|
|
10721
|
-
break;
|
|
10722
|
-
}
|
|
10723
|
-
null != W && W === document.body && n(W) && !n(document.documentElement) || null != W && n(W, g) && w.push(W);
|
|
10724
|
-
}
|
|
10725
|
-
const b = null != (s = null == (i = window.visualViewport) ? void 0 : i.width) ? s : innerWidth, H = null != (h = null == (d = window.visualViewport) ? void 0 : d.height) ? h : innerHeight, { scrollX: y, scrollY: M } = window, { height: v, width: E, top: x, right: C, bottom: I, left: R } = e2.getBoundingClientRect(), { top: T, right: B, bottom: F, left: V } = ((t2) => {
|
|
10726
|
-
const e3 = window.getComputedStyle(t2);
|
|
10727
|
-
return { top: parseFloat(e3.scrollMarginTop) || 0, right: parseFloat(e3.scrollMarginRight) || 0, bottom: parseFloat(e3.scrollMarginBottom) || 0, left: parseFloat(e3.scrollMarginLeft) || 0 };
|
|
10728
|
-
})(e2);
|
|
10729
|
-
let k = "start" === f || "nearest" === f ? x - T : "end" === f ? I + F : x + v / 2 - T + F, D = "center" === u ? R + E / 2 - V + B : "end" === u ? C + B : R - V;
|
|
10730
|
-
const L = [];
|
|
10731
|
-
for (let t2 = 0; t2 < w.length; t2++) {
|
|
10732
|
-
const e3 = w[t2], { height: l2, width: r3, top: i2, right: s2, bottom: d2, left: h2 } = e3.getBoundingClientRect();
|
|
10733
|
-
if ("if-needed" === c && x >= 0 && R >= 0 && I <= H && C <= b && (e3 === m && !n(e3) || x >= i2 && I <= d2 && R >= h2 && C <= s2))
|
|
10734
|
-
return L;
|
|
10735
|
-
const a2 = getComputedStyle(e3), g2 = parseInt(a2.borderLeftWidth, 10), p2 = parseInt(a2.borderTopWidth, 10), W2 = parseInt(a2.borderRightWidth, 10), T2 = parseInt(a2.borderBottomWidth, 10);
|
|
10736
|
-
let B2 = 0, F2 = 0;
|
|
10737
|
-
const V2 = "offsetWidth" in e3 ? e3.offsetWidth - e3.clientWidth - g2 - W2 : 0, S = "offsetHeight" in e3 ? e3.offsetHeight - e3.clientHeight - p2 - T2 : 0, X = "offsetWidth" in e3 ? 0 === e3.offsetWidth ? 0 : r3 / e3.offsetWidth : 0, Y = "offsetHeight" in e3 ? 0 === e3.offsetHeight ? 0 : l2 / e3.offsetHeight : 0;
|
|
10738
|
-
if (m === e3)
|
|
10739
|
-
B2 = "start" === f ? k : "end" === f ? k - H : "nearest" === f ? o$1(M, M + H, H, p2, T2, M + k, M + k + v, v) : k - H / 2, F2 = "start" === u ? D : "center" === u ? D - b / 2 : "end" === u ? D - b : o$1(y, y + b, b, g2, W2, y + D, y + D + E, E), B2 = Math.max(0, B2 + M), F2 = Math.max(0, F2 + y);
|
|
10740
|
-
else {
|
|
10741
|
-
B2 = "start" === f ? k - i2 - p2 : "end" === f ? k - d2 + T2 + S : "nearest" === f ? o$1(i2, d2, l2, p2, T2 + S, k, k + v, v) : k - (i2 + l2 / 2) + S / 2, F2 = "start" === u ? D - h2 - g2 : "center" === u ? D - (h2 + r3 / 2) + V2 / 2 : "end" === u ? D - s2 + W2 + V2 : o$1(h2, s2, r3, g2, W2 + V2, D, D + E, E);
|
|
10742
|
-
const { scrollLeft: t3, scrollTop: n2 } = e3;
|
|
10743
|
-
B2 = 0 === Y ? 0 : Math.max(0, Math.min(n2 + B2 / Y, e3.scrollHeight - l2 / Y + S)), F2 = 0 === X ? 0 : Math.max(0, Math.min(t3 + F2 / X, e3.scrollWidth - r3 / X + V2)), k += n2 - B2, D += t3 - F2;
|
|
10744
|
-
}
|
|
10745
|
-
L.push({ el: e3, top: B2, left: F2 });
|
|
10746
|
-
}
|
|
10747
|
-
return L;
|
|
10748
|
-
};
|
|
10749
|
-
const o = (t2) => false === t2 ? { block: "end", inline: "nearest" } : ((t3) => t3 === Object(t3) && 0 !== Object.keys(t3).length)(t2) ? t2 : { block: "start", inline: "nearest" };
|
|
10750
|
-
function e(e2, r$1) {
|
|
10751
|
-
if (!e2.isConnected || !((t2) => {
|
|
10752
|
-
let o2 = t2;
|
|
10753
|
-
for (; o2 && o2.parentNode; ) {
|
|
10754
|
-
if (o2.parentNode === document)
|
|
10755
|
-
return true;
|
|
10756
|
-
o2 = o2.parentNode instanceof ShadowRoot ? o2.parentNode.host : o2.parentNode;
|
|
10757
|
-
}
|
|
10758
|
-
return false;
|
|
10759
|
-
})(e2))
|
|
10465
|
+
let instance = null;
|
|
10466
|
+
function createImageViewer(options) {
|
|
10467
|
+
if (!isClient)
|
|
10760
10468
|
return;
|
|
10761
|
-
const
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
rafIds.delete(id);
|
|
10783
|
-
}
|
|
10784
|
-
function wrapperRaf(callback2, times = 1) {
|
|
10785
|
-
rafUUID += 1;
|
|
10786
|
-
const id = rafUUID;
|
|
10787
|
-
function callRef(leftTimes) {
|
|
10788
|
-
if (leftTimes === 0) {
|
|
10789
|
-
cleanup(id);
|
|
10790
|
-
callback2();
|
|
10791
|
-
} else {
|
|
10792
|
-
const realId = raf(() => {
|
|
10793
|
-
callRef(leftTimes - 1);
|
|
10794
|
-
});
|
|
10795
|
-
rafIds.set(id, realId);
|
|
10796
|
-
}
|
|
10797
|
-
}
|
|
10798
|
-
callRef(times);
|
|
10799
|
-
return id;
|
|
10469
|
+
const {
|
|
10470
|
+
urlList,
|
|
10471
|
+
initialIndex = 0,
|
|
10472
|
+
infinite = true,
|
|
10473
|
+
hideOnClickModal = false,
|
|
10474
|
+
teleported = false,
|
|
10475
|
+
zIndex = 2e3,
|
|
10476
|
+
show = true
|
|
10477
|
+
} = options;
|
|
10478
|
+
const propsData = {};
|
|
10479
|
+
const container = document.createElement("div");
|
|
10480
|
+
propsData.urlList = urlList;
|
|
10481
|
+
propsData.initialIndex = initialIndex;
|
|
10482
|
+
propsData.infinite = infinite;
|
|
10483
|
+
propsData.hideOnClickModal = hideOnClickModal;
|
|
10484
|
+
propsData.teleported = teleported;
|
|
10485
|
+
propsData.zIndex = zIndex;
|
|
10486
|
+
propsData.show = show;
|
|
10487
|
+
document.body.appendChild(container);
|
|
10488
|
+
instance = createVNode(_sfc_main$3, propsData);
|
|
10489
|
+
render(instance, container);
|
|
10800
10490
|
}
|
|
10801
|
-
|
|
10802
|
-
const
|
|
10803
|
-
|
|
10804
|
-
return
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10491
|
+
const useMessage = () => {
|
|
10492
|
+
const { t: t2 } = useI18n("layout");
|
|
10493
|
+
const scssVariables = variables$1;
|
|
10494
|
+
return {
|
|
10495
|
+
// 消息提示
|
|
10496
|
+
info(content) {
|
|
10497
|
+
ElMessage.info(content);
|
|
10498
|
+
},
|
|
10499
|
+
// 错误消息
|
|
10500
|
+
error(content) {
|
|
10501
|
+
ElMessage.error(content);
|
|
10502
|
+
},
|
|
10503
|
+
// 成功消息
|
|
10504
|
+
success(content) {
|
|
10505
|
+
ElMessage.success(content);
|
|
10506
|
+
},
|
|
10507
|
+
// 警告消息
|
|
10508
|
+
warning(content) {
|
|
10509
|
+
ElMessage.warning(content);
|
|
10510
|
+
},
|
|
10511
|
+
// 弹出提示
|
|
10512
|
+
alert(content) {
|
|
10513
|
+
ElMessageBox.alert(content, t2("common.confirmTitle"));
|
|
10514
|
+
},
|
|
10515
|
+
// 错误提示
|
|
10516
|
+
alertError(content) {
|
|
10517
|
+
ElMessageBox.alert(content, t2("common.confirmTitle"), { type: "error" });
|
|
10518
|
+
},
|
|
10519
|
+
// 成功提示
|
|
10520
|
+
alertSuccess(content) {
|
|
10521
|
+
ElMessageBox.alert(content, t2("common.confirmTitle"), { type: "success" });
|
|
10522
|
+
},
|
|
10523
|
+
// 警告提示
|
|
10524
|
+
alertWarning(content) {
|
|
10525
|
+
ElMessageBox.alert(content, t2("common.confirmTitle"), { type: "warning" });
|
|
10526
|
+
},
|
|
10527
|
+
// 通知提示
|
|
10528
|
+
notify(content) {
|
|
10529
|
+
ElNotification.info(content);
|
|
10530
|
+
},
|
|
10531
|
+
// 错误通知
|
|
10532
|
+
notifyError(content) {
|
|
10533
|
+
ElNotification.error(content);
|
|
10534
|
+
},
|
|
10535
|
+
// 成功通知
|
|
10536
|
+
notifySuccess(content) {
|
|
10537
|
+
ElNotification.success(content);
|
|
10538
|
+
},
|
|
10539
|
+
// 警告通知
|
|
10540
|
+
notifyWarning(content) {
|
|
10541
|
+
ElNotification.warning(content);
|
|
10542
|
+
},
|
|
10543
|
+
// 确认窗体
|
|
10544
|
+
confirm(content, tip, options = {}) {
|
|
10545
|
+
return ElMessageBox.confirm(content, tip ? tip : t2("common.confirmTitle"), {
|
|
10546
|
+
...options,
|
|
10547
|
+
customClass: `${options.customClass} ${scssVariables.namespace}-message-box`,
|
|
10548
|
+
confirmButtonText: options.confirmButtonText ?? t2("common.ok"),
|
|
10549
|
+
cancelButtonText: options.cancelButtonText ?? t2("common.cancel"),
|
|
10550
|
+
buttonSize: "default",
|
|
10551
|
+
center: true
|
|
10552
|
+
});
|
|
10553
|
+
},
|
|
10554
|
+
// 删除窗体
|
|
10555
|
+
delConfirm(content, tip) {
|
|
10556
|
+
return ElMessageBox.confirm(
|
|
10557
|
+
content ? content : t2("common.delMessage"),
|
|
10558
|
+
tip ? tip : t2("common.confirmTitle"),
|
|
10559
|
+
{
|
|
10560
|
+
customClass: `${scssVariables.namespace}-message-box`,
|
|
10561
|
+
confirmButtonText: t2("common.ok"),
|
|
10562
|
+
cancelButtonText: t2("common.cancel"),
|
|
10563
|
+
buttonSize: "default",
|
|
10564
|
+
center: true,
|
|
10565
|
+
type: "warning"
|
|
10566
|
+
}
|
|
10567
|
+
);
|
|
10568
|
+
},
|
|
10569
|
+
// 导出窗体
|
|
10570
|
+
exportConfirm(content, tip) {
|
|
10571
|
+
return ElMessageBox.confirm(
|
|
10572
|
+
content ? content : t2("common.exportMessage"),
|
|
10573
|
+
tip ? tip : t2("common.confirmTitle"),
|
|
10574
|
+
{
|
|
10575
|
+
confirmButtonText: t2("common.ok"),
|
|
10576
|
+
cancelButtonText: t2("common.cancel"),
|
|
10577
|
+
type: "warning"
|
|
10578
|
+
}
|
|
10579
|
+
);
|
|
10580
|
+
},
|
|
10581
|
+
// 提交内容
|
|
10582
|
+
prompt(content, tip, options = {}) {
|
|
10583
|
+
return ElMessageBox.prompt(content, tip, {
|
|
10584
|
+
confirmButtonText: t2("common.ok"),
|
|
10585
|
+
cancelButtonText: t2("common.cancel"),
|
|
10586
|
+
...options
|
|
10587
|
+
});
|
|
10876
10588
|
}
|
|
10877
10589
|
};
|
|
10878
|
-
wrapperRaf(frameFunc);
|
|
10879
10590
|
};
|
|
10880
|
-
const
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
target.removeEventListener(eventType, cb);
|
|
10888
|
-
}
|
|
10889
|
-
}
|
|
10890
|
-
};
|
|
10591
|
+
const _hoisted_1$2 = { class: "upload-box" };
|
|
10592
|
+
const _hoisted_2$2 = ["src"];
|
|
10593
|
+
const _hoisted_3$2 = { key: 0 };
|
|
10594
|
+
const _hoisted_4$2 = { key: 0 };
|
|
10595
|
+
const _hoisted_5$2 = {
|
|
10596
|
+
key: 1,
|
|
10597
|
+
class: "upload-empty"
|
|
10891
10598
|
};
|
|
10892
|
-
const
|
|
10893
|
-
|
|
10599
|
+
const _hoisted_6$1 = { class: "el-upload__tip" };
|
|
10600
|
+
const _sfc_main$2 = /* @__PURE__ */ Object.assign({ name: "UploadImg", inheritAttrs: false }, {
|
|
10601
|
+
__name: "UploadImg",
|
|
10894
10602
|
props: {
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10603
|
+
modelValue: {
|
|
10604
|
+
type: String,
|
|
10605
|
+
default: ""
|
|
10606
|
+
},
|
|
10607
|
+
// 是否支持拖拽上传 ==> 非必传(默认为 true)
|
|
10608
|
+
drag: {
|
|
10609
|
+
type: Boolean,
|
|
10610
|
+
default: true
|
|
10611
|
+
},
|
|
10612
|
+
// 是否禁用上传组件 ==> 非必传(默认为 false)
|
|
10613
|
+
disabled: {
|
|
10614
|
+
type: Boolean,
|
|
10615
|
+
default: false
|
|
10616
|
+
},
|
|
10617
|
+
// 图片大小限制 ==> 非必传(默认为 5M)
|
|
10618
|
+
fileSize: {
|
|
10619
|
+
type: Number,
|
|
10620
|
+
default: 5
|
|
10621
|
+
},
|
|
10622
|
+
// 图片类型限制 ==> 非必传(默认为 ["image/jpeg", "image/png", "image/gif"])
|
|
10623
|
+
fileType: {
|
|
10624
|
+
type: Array,
|
|
10625
|
+
default: () => ["image/jpeg", "image/png", "image/gif"]
|
|
10626
|
+
},
|
|
10627
|
+
// 组件高度 ==> 非必传(默认为 150px)
|
|
10628
|
+
height: {
|
|
10629
|
+
type: String,
|
|
10630
|
+
default: "100px"
|
|
10631
|
+
},
|
|
10632
|
+
// 组件宽度 ==> 非必传(默认为 150px)
|
|
10633
|
+
width: {
|
|
10634
|
+
type: String,
|
|
10635
|
+
default: "100px"
|
|
10636
|
+
},
|
|
10637
|
+
// 组件边框圆角 ==> 非必传(默认为 8px)
|
|
10638
|
+
borderradius: {
|
|
10639
|
+
type: String,
|
|
10640
|
+
default: "4px"
|
|
10641
|
+
},
|
|
10642
|
+
// 是否显示删除按钮
|
|
10643
|
+
showDelete: {
|
|
10644
|
+
type: Boolean,
|
|
10645
|
+
default: true
|
|
10646
|
+
},
|
|
10647
|
+
// 是否显示按钮文字
|
|
10648
|
+
showBtnText: {
|
|
10649
|
+
type: Boolean,
|
|
10650
|
+
default: false
|
|
10651
|
+
},
|
|
10652
|
+
// 上传目录 ==> 非必传(默认为 undefined)
|
|
10653
|
+
directory: {
|
|
10654
|
+
type: String,
|
|
10655
|
+
default: void 0
|
|
10656
|
+
},
|
|
10657
|
+
// 自定义上传函数(必填)==> 必传
|
|
10658
|
+
customUpload: {
|
|
10659
|
+
type: Function,
|
|
10660
|
+
required: true
|
|
10661
|
+
},
|
|
10662
|
+
// 自定义从上传结果中提取 URL 的函数 ==> 非必传(默认为提取 res.data)
|
|
10663
|
+
getUploadUrl: {
|
|
10664
|
+
type: Function,
|
|
10665
|
+
default: (res) => res.data
|
|
10666
|
+
}
|
|
10667
|
+
},
|
|
10668
|
+
emits: ["update:modelValue"],
|
|
10669
|
+
setup(__props, { emit: __emit }) {
|
|
10670
|
+
useCssVars((_ctx) => ({
|
|
10671
|
+
"3d8ea9da": __props.width,
|
|
10672
|
+
"2c0dbd7a": __props.height,
|
|
10673
|
+
"00ef71d1": __props.borderradius
|
|
10674
|
+
}));
|
|
10675
|
+
const props = __props;
|
|
10676
|
+
const { t: t2 } = useI18n("layout");
|
|
10677
|
+
const message = useMessage();
|
|
10678
|
+
const uuid = ref("id-" + generateUUID());
|
|
10679
|
+
const imagePreview = (imgUrl) => {
|
|
10680
|
+
createImageViewer({
|
|
10681
|
+
zIndex: 9999999,
|
|
10682
|
+
urlList: [imgUrl]
|
|
10683
|
+
});
|
|
10684
|
+
};
|
|
10685
|
+
const emit = __emit;
|
|
10686
|
+
const deleteImg = () => {
|
|
10687
|
+
emit("update:modelValue", "");
|
|
10688
|
+
};
|
|
10689
|
+
const httpRequest = async (options) => {
|
|
10690
|
+
return await props.customUpload(options.file, {
|
|
10691
|
+
directory: props.directory
|
|
10692
|
+
});
|
|
10693
|
+
};
|
|
10694
|
+
const beforeUpload = (rawFile) => {
|
|
10695
|
+
const imgSize = rawFile.size / 1024 / 1024 < props.fileSize;
|
|
10696
|
+
const imgType = props.fileType;
|
|
10697
|
+
if (!imgType.includes(rawFile.type))
|
|
10698
|
+
message.notifyWarning("上传图片不符合所需的格式!");
|
|
10699
|
+
if (!imgSize)
|
|
10700
|
+
message.notifyWarning(`上传图片大小不能超过 ${props.fileSize}M!`);
|
|
10701
|
+
return imgType.includes(rawFile.type) && imgSize;
|
|
10702
|
+
};
|
|
10703
|
+
const uploadSuccess = (res) => {
|
|
10704
|
+
message.success("上传成功");
|
|
10705
|
+
const fileUrl = props.getUploadUrl(res);
|
|
10706
|
+
emit("update:modelValue", fileUrl);
|
|
10707
|
+
};
|
|
10708
|
+
const uploadError = () => {
|
|
10709
|
+
message.notifyError("图片上传失败,请您重新上传!");
|
|
10710
|
+
};
|
|
10711
|
+
return (_ctx, _cache) => {
|
|
10712
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
10713
|
+
createVNode(unref(ElUpload), {
|
|
10714
|
+
id: unref(uuid),
|
|
10715
|
+
accept: __props.fileType.join(","),
|
|
10716
|
+
"before-upload": beforeUpload,
|
|
10717
|
+
class: normalizeClass(["upload", __props.drag ? "no-border" : ""]),
|
|
10718
|
+
disabled: __props.disabled,
|
|
10719
|
+
drag: __props.drag,
|
|
10720
|
+
"http-request": httpRequest,
|
|
10721
|
+
multiple: false,
|
|
10722
|
+
"on-error": uploadError,
|
|
10723
|
+
"on-success": uploadSuccess,
|
|
10724
|
+
"show-file-list": false
|
|
10725
|
+
}, {
|
|
10726
|
+
default: withCtx(() => [
|
|
10727
|
+
__props.modelValue ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
10728
|
+
createElementVNode("img", {
|
|
10729
|
+
src: __props.modelValue,
|
|
10730
|
+
class: "upload-image"
|
|
10731
|
+
}, null, 8, _hoisted_2$2),
|
|
10732
|
+
createElementVNode("div", {
|
|
10733
|
+
class: "upload-handle",
|
|
10734
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
10735
|
+
}, ["stop"]))
|
|
10736
|
+
}, [
|
|
10737
|
+
createElementVNode("div", {
|
|
10738
|
+
class: "handle-icon",
|
|
10739
|
+
onClick: _cache[0] || (_cache[0] = ($event) => imagePreview(__props.modelValue))
|
|
10740
|
+
}, [
|
|
10741
|
+
createVNode(unref(_sfc_main$v), { icon: "ant-design:zoom-in-outlined" }),
|
|
10742
|
+
__props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_3$2, toDisplayString(unref(t2)("action.detail")), 1)) : createCommentVNode("", true)
|
|
10743
|
+
]),
|
|
10744
|
+
__props.showDelete && !__props.disabled ? (openBlock(), createElementBlock("div", {
|
|
10745
|
+
key: 0,
|
|
10746
|
+
class: "handle-icon",
|
|
10747
|
+
onClick: deleteImg
|
|
10748
|
+
}, [
|
|
10749
|
+
createVNode(unref(_sfc_main$v), { icon: "ant-design:delete-outlined" }),
|
|
10750
|
+
__props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_4$2, toDisplayString(unref(t2)("action.del")), 1)) : createCommentVNode("", true)
|
|
10751
|
+
])) : createCommentVNode("", true)
|
|
10752
|
+
])
|
|
10753
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_5$2, [
|
|
10754
|
+
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
10755
|
+
createVNode(unref(_sfc_main$v), {
|
|
10756
|
+
icon: "ep:plus",
|
|
10757
|
+
size: 20
|
|
10758
|
+
}),
|
|
10759
|
+
_cache[2] || (_cache[2] = createElementVNode("span", { class: "empty-text" }, "点击上传", -1))
|
|
10760
|
+
], true)
|
|
10761
|
+
]))
|
|
10762
|
+
]),
|
|
10763
|
+
_: 3
|
|
10764
|
+
}, 8, ["id", "accept", "class", "disabled", "drag"]),
|
|
10765
|
+
createElementVNode("div", _hoisted_6$1, [
|
|
10766
|
+
renderSlot(_ctx.$slots, "tip", {}, void 0, true)
|
|
10767
|
+
])
|
|
10768
|
+
]);
|
|
10769
|
+
};
|
|
10770
|
+
}
|
|
10771
|
+
});
|
|
10772
|
+
const UploadImg = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-4a1df97a"]]);
|
|
10773
|
+
const _hoisted_1$1 = { class: "upload-box" };
|
|
10774
|
+
const _hoisted_2$1 = { class: "upload-empty" };
|
|
10775
|
+
const _hoisted_3$1 = ["src"];
|
|
10776
|
+
const _hoisted_4$1 = ["onClick"];
|
|
10777
|
+
const _hoisted_5$1 = { key: 0 };
|
|
10778
|
+
const _hoisted_6 = ["onClick"];
|
|
10779
|
+
const _hoisted_7 = { key: 0 };
|
|
10780
|
+
const _hoisted_8 = { class: "el-upload__tip" };
|
|
10781
|
+
const _sfc_main$1 = /* @__PURE__ */ Object.assign({ name: "UploadImgs", inheritAttrs: false }, {
|
|
10782
|
+
__name: "UploadImgs",
|
|
10783
|
+
props: {
|
|
10784
|
+
modelValue: {
|
|
10785
|
+
type: [String, Array],
|
|
10786
|
+
required: true
|
|
10787
|
+
},
|
|
10788
|
+
// 是否支持拖拽上传 ==> 非必传(默认为 true)
|
|
10789
|
+
drag: {
|
|
10790
|
+
type: Boolean,
|
|
10791
|
+
default: true
|
|
10792
|
+
},
|
|
10793
|
+
// 是否禁用上传组件 ==> 非必传(默认为 false)
|
|
10794
|
+
disabled: {
|
|
10795
|
+
type: Boolean,
|
|
10796
|
+
default: false
|
|
10797
|
+
},
|
|
10798
|
+
// 最大图片上传数 ==> 非必传(默认为 5张)
|
|
10799
|
+
limit: {
|
|
10800
|
+
type: Number,
|
|
10801
|
+
default: 5
|
|
10802
|
+
},
|
|
10803
|
+
// 图片大小限制 ==> 非必传(默认为 5M)
|
|
10804
|
+
fileSize: {
|
|
10805
|
+
type: Number,
|
|
10806
|
+
default: 5
|
|
10807
|
+
},
|
|
10808
|
+
// 图片类型限制 ==> 非必传(默认为 ["image/jpeg", "image/png", "image/gif"])
|
|
10809
|
+
fileType: {
|
|
10810
|
+
type: Array,
|
|
10811
|
+
default: () => ["image/jpeg", "image/png", "image/gif"]
|
|
10812
|
+
},
|
|
10813
|
+
// 组件高度 ==> 非必传(默认为 150px)
|
|
10814
|
+
height: {
|
|
10815
|
+
type: String,
|
|
10816
|
+
default: "100px"
|
|
10817
|
+
},
|
|
10818
|
+
// 组件宽度 ==> 非必传(默认为 150px)
|
|
10819
|
+
width: {
|
|
10820
|
+
type: String,
|
|
10821
|
+
default: "100px"
|
|
10822
|
+
},
|
|
10823
|
+
// 组件边框圆角 ==> 非必传(默认为 8px)
|
|
10824
|
+
borderradius: {
|
|
10825
|
+
type: String,
|
|
10826
|
+
default: "4px"
|
|
10827
|
+
},
|
|
10828
|
+
// 是否显示按钮文字
|
|
10829
|
+
showBtnText: {
|
|
10830
|
+
type: Boolean,
|
|
10831
|
+
default: false
|
|
10832
|
+
},
|
|
10833
|
+
// 上传目录 ==> 非必传(默认为 undefined)
|
|
10834
|
+
directory: {
|
|
10835
|
+
type: String,
|
|
10836
|
+
default: void 0
|
|
10837
|
+
},
|
|
10838
|
+
// 自定义上传函数(必填)==> 必传
|
|
10839
|
+
customUpload: {
|
|
10840
|
+
type: Function,
|
|
10841
|
+
required: true
|
|
10842
|
+
},
|
|
10843
|
+
// 自定义从上传结果中提取 URL 的函数 ==> 非必传(默认为提取 res.data)
|
|
10844
|
+
getUploadUrl: {
|
|
10845
|
+
type: Function,
|
|
10846
|
+
default: (res) => res.data
|
|
10903
10847
|
}
|
|
10904
10848
|
},
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
const handleClick = (e2) => {
|
|
10918
|
-
const {
|
|
10919
|
-
href
|
|
10920
|
-
} = props;
|
|
10921
|
-
contextHandleClick(e2, {
|
|
10922
|
-
title: mergedTitle,
|
|
10923
|
-
href
|
|
10849
|
+
emits: ["update:modelValue"],
|
|
10850
|
+
setup(__props, { emit: __emit }) {
|
|
10851
|
+
useCssVars((_ctx) => ({
|
|
10852
|
+
"1238a60c": __props.borderradius,
|
|
10853
|
+
"c60c1990": __props.width,
|
|
10854
|
+
"2f150c16": __props.height
|
|
10855
|
+
}));
|
|
10856
|
+
const message = useMessage();
|
|
10857
|
+
const imagePreview = (imgUrl) => {
|
|
10858
|
+
createImageViewer({
|
|
10859
|
+
zIndex: 9999999,
|
|
10860
|
+
urlList: [imgUrl]
|
|
10924
10861
|
});
|
|
10925
|
-
scrollTo2(href);
|
|
10926
10862
|
};
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
10930
|
-
|
|
10863
|
+
const props = __props;
|
|
10864
|
+
const httpRequest = async (options) => {
|
|
10865
|
+
return await props.customUpload(options.file, {
|
|
10866
|
+
directory: props.directory
|
|
10931
10867
|
});
|
|
10932
|
-
}
|
|
10933
|
-
|
|
10934
|
-
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10868
|
+
};
|
|
10869
|
+
const fileList = ref([]);
|
|
10870
|
+
const uploadNumber = ref(0);
|
|
10871
|
+
const uploadList = ref([]);
|
|
10872
|
+
const beforeUpload = (rawFile) => {
|
|
10873
|
+
const imgSize = rawFile.size / 1024 / 1024 < props.fileSize;
|
|
10874
|
+
const imgType = props.fileType;
|
|
10875
|
+
if (!imgType.includes(rawFile.type))
|
|
10876
|
+
ElNotification({
|
|
10877
|
+
title: "温馨提示",
|
|
10878
|
+
message: "上传图片不符合所需的格式!",
|
|
10879
|
+
type: "warning"
|
|
10880
|
+
});
|
|
10881
|
+
if (!imgSize)
|
|
10882
|
+
ElNotification({
|
|
10883
|
+
title: "温馨提示",
|
|
10884
|
+
message: `上传图片大小不能超过 ${props.fileSize}M!`,
|
|
10885
|
+
type: "warning"
|
|
10886
|
+
});
|
|
10887
|
+
uploadNumber.value++;
|
|
10888
|
+
return imgType.includes(rawFile.type) && imgSize;
|
|
10889
|
+
};
|
|
10890
|
+
const emit = __emit;
|
|
10891
|
+
const uploadSuccess = (res) => {
|
|
10892
|
+
message.success("上传成功");
|
|
10893
|
+
const fileUrl = props.getUploadUrl(res);
|
|
10894
|
+
const index = fileList.value.findIndex((item) => {
|
|
10895
|
+
var _a2;
|
|
10896
|
+
return ((_a2 = item.response) == null ? void 0 : _a2.data) === fileUrl;
|
|
10897
|
+
});
|
|
10898
|
+
fileList.value.splice(index, 1);
|
|
10899
|
+
uploadList.value.push({ name: fileUrl, url: fileUrl });
|
|
10900
|
+
if (uploadList.value.length == uploadNumber.value) {
|
|
10901
|
+
fileList.value.push(...uploadList.value);
|
|
10902
|
+
uploadList.value = [];
|
|
10903
|
+
uploadNumber.value = 0;
|
|
10904
|
+
emitUpdateModelValue();
|
|
10905
|
+
}
|
|
10906
|
+
};
|
|
10907
|
+
watch(
|
|
10908
|
+
() => props.modelValue,
|
|
10909
|
+
(val) => {
|
|
10910
|
+
if (!val) {
|
|
10911
|
+
fileList.value = [];
|
|
10912
|
+
return;
|
|
10913
|
+
}
|
|
10914
|
+
fileList.value = [];
|
|
10915
|
+
fileList.value.push(
|
|
10916
|
+
...val.map((url) => ({ name: url.substring(url.lastIndexOf("/") + 1), url }))
|
|
10917
|
+
);
|
|
10918
|
+
},
|
|
10919
|
+
{ immediate: true, deep: true }
|
|
10920
|
+
);
|
|
10921
|
+
const emitUpdateModelValue = () => {
|
|
10922
|
+
let result = fileList.value.map((file) => file.url);
|
|
10923
|
+
emit("update:modelValue", result);
|
|
10924
|
+
};
|
|
10925
|
+
const handleRemove = (uploadFile) => {
|
|
10926
|
+
fileList.value = fileList.value.filter(
|
|
10927
|
+
(item) => item.url !== uploadFile.url || item.name !== uploadFile.name
|
|
10928
|
+
);
|
|
10929
|
+
emit(
|
|
10930
|
+
"update:modelValue",
|
|
10931
|
+
fileList.value.map((file) => file.url)
|
|
10932
|
+
);
|
|
10933
|
+
};
|
|
10934
|
+
const uploadError = () => {
|
|
10935
|
+
ElNotification({
|
|
10936
|
+
title: "温馨提示",
|
|
10937
|
+
message: "图片上传失败,请您重新上传!",
|
|
10938
|
+
type: "error"
|
|
10939
|
+
});
|
|
10940
|
+
};
|
|
10941
|
+
const handleExceed = () => {
|
|
10942
|
+
ElNotification({
|
|
10943
|
+
title: "温馨提示",
|
|
10944
|
+
message: `当前最多只能上传 ${props.limit} 张图片,请移除后上传!`,
|
|
10945
|
+
type: "warning"
|
|
10946
|
+
});
|
|
10947
|
+
};
|
|
10948
|
+
return (_ctx, _cache) => {
|
|
10949
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
10950
|
+
createVNode(unref(ElUpload), {
|
|
10951
|
+
"file-list": unref(fileList),
|
|
10952
|
+
"onUpdate:fileList": _cache[1] || (_cache[1] = ($event) => isRef(fileList) ? fileList.value = $event : null),
|
|
10953
|
+
accept: __props.fileType.join(","),
|
|
10954
|
+
"before-upload": beforeUpload,
|
|
10955
|
+
class: normalizeClass(["upload", __props.drag ? "no-border" : ""]),
|
|
10956
|
+
disabled: __props.disabled,
|
|
10957
|
+
drag: __props.drag,
|
|
10958
|
+
"http-request": httpRequest,
|
|
10959
|
+
limit: __props.limit,
|
|
10960
|
+
multiple: true,
|
|
10961
|
+
"on-error": uploadError,
|
|
10962
|
+
"on-exceed": handleExceed,
|
|
10963
|
+
"on-success": uploadSuccess,
|
|
10964
|
+
"list-type": "picture-card"
|
|
10965
|
+
}, {
|
|
10966
|
+
file: withCtx(({ file }) => [
|
|
10967
|
+
createElementVNode("img", {
|
|
10968
|
+
src: file.url,
|
|
10969
|
+
class: "upload-image"
|
|
10970
|
+
}, null, 8, _hoisted_3$1),
|
|
10971
|
+
createElementVNode("div", {
|
|
10972
|
+
class: "upload-handle",
|
|
10973
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
10974
|
+
}, ["stop"]))
|
|
10975
|
+
}, [
|
|
10976
|
+
createElementVNode("div", {
|
|
10977
|
+
class: "handle-icon",
|
|
10978
|
+
onClick: ($event) => imagePreview(file.url)
|
|
10979
|
+
}, [
|
|
10980
|
+
createVNode(unref(_sfc_main$v), { icon: "ant-design:zoom-in-outlined" }),
|
|
10981
|
+
__props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_5$1, "查看")) : createCommentVNode("", true)
|
|
10982
|
+
], 8, _hoisted_4$1),
|
|
10983
|
+
!__props.disabled ? (openBlock(), createElementBlock("div", {
|
|
10984
|
+
key: 0,
|
|
10985
|
+
class: "handle-icon",
|
|
10986
|
+
onClick: ($event) => handleRemove(file)
|
|
10987
|
+
}, [
|
|
10988
|
+
createVNode(unref(_sfc_main$v), { icon: "ant-design:delete-outlined" }),
|
|
10989
|
+
__props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_7, "删除")) : createCommentVNode("", true)
|
|
10990
|
+
], 8, _hoisted_6)) : createCommentVNode("", true)
|
|
10991
|
+
])
|
|
10992
|
+
]),
|
|
10993
|
+
default: withCtx(() => [
|
|
10994
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
10995
|
+
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
10996
|
+
createVNode(unref(_sfc_main$v), {
|
|
10997
|
+
icon: "ep:plus",
|
|
10998
|
+
size: 20
|
|
10999
|
+
}),
|
|
11000
|
+
_cache[2] || (_cache[2] = createElementVNode("span", { class: "empty-text" }, "点击上传", -1))
|
|
11001
|
+
], true)
|
|
11002
|
+
])
|
|
11003
|
+
]),
|
|
11004
|
+
_: 3
|
|
11005
|
+
}, 8, ["file-list", "accept", "class", "disabled", "drag", "limit"]),
|
|
11006
|
+
createElementVNode("div", _hoisted_8, [
|
|
11007
|
+
renderSlot(_ctx.$slots, "tip", {}, void 0, true)
|
|
11008
|
+
])
|
|
11009
|
+
]);
|
|
10965
11010
|
};
|
|
10966
11011
|
}
|
|
10967
11012
|
});
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
}
|
|
10971
|
-
const
|
|
10972
|
-
|
|
11013
|
+
const UploadImgs = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-92b67a34"]]);
|
|
11014
|
+
const _hoisted_1 = { class: "mt-10px line-height-20px color-[var(--el-upload-tip-color)] text-12px" };
|
|
11015
|
+
const _hoisted_2 = { class: "flex items-center" };
|
|
11016
|
+
const _hoisted_3 = { class: "ml-10px" };
|
|
11017
|
+
const _hoisted_4 = { class: "ml-10px" };
|
|
11018
|
+
const _hoisted_5 = { class: "ml-10px" };
|
|
11019
|
+
const _sfc_main = /* @__PURE__ */ Object.assign({ name: "UploadFile", inheritAttrs: false }, {
|
|
11020
|
+
__name: "UploadFile",
|
|
10973
11021
|
props: {
|
|
10974
|
-
|
|
10975
|
-
|
|
10976
|
-
|
|
11022
|
+
modelValue: {
|
|
11023
|
+
type: [String, Array],
|
|
11024
|
+
required: true
|
|
11025
|
+
},
|
|
11026
|
+
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
|
11027
|
+
fileType: {
|
|
11028
|
+
type: Array,
|
|
11029
|
+
default: () => ["doc", "xls", "ppt", "txt", "pdf"]
|
|
11030
|
+
},
|
|
11031
|
+
// 大小限制(MB)
|
|
11032
|
+
fileSize: {
|
|
11033
|
+
type: Number,
|
|
11034
|
+
default: 5
|
|
11035
|
+
},
|
|
11036
|
+
// 数量限制
|
|
11037
|
+
limit: {
|
|
11038
|
+
type: Number,
|
|
11039
|
+
default: 5
|
|
11040
|
+
},
|
|
11041
|
+
// 自动上传
|
|
11042
|
+
autoUpload: {
|
|
10977
11043
|
type: Boolean,
|
|
10978
11044
|
default: true
|
|
10979
11045
|
},
|
|
10980
|
-
|
|
11046
|
+
// 拖拽上传
|
|
11047
|
+
drag: {
|
|
10981
11048
|
type: Boolean,
|
|
10982
11049
|
default: false
|
|
10983
11050
|
},
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
default: void 0
|
|
11051
|
+
// 是否显示提示
|
|
11052
|
+
isShowTip: {
|
|
11053
|
+
type: Boolean,
|
|
11054
|
+
default: true
|
|
10989
11055
|
},
|
|
10990
|
-
//
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
default: () => []
|
|
11056
|
+
// 是否禁用上传组件 ==> 非必传(默认为 false)
|
|
11057
|
+
disabled: {
|
|
11058
|
+
type: Boolean,
|
|
11059
|
+
default: false
|
|
10995
11060
|
},
|
|
10996
|
-
|
|
11061
|
+
// 上传目录 ==> 非必传(默认为 undefined)
|
|
11062
|
+
directory: {
|
|
10997
11063
|
type: String,
|
|
10998
|
-
default:
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11064
|
+
default: void 0
|
|
11065
|
+
},
|
|
11066
|
+
// 自定义上传函数(必填)==> 必传
|
|
11067
|
+
customUpload: {
|
|
11068
|
+
type: Function,
|
|
11069
|
+
required: true
|
|
11070
|
+
},
|
|
11071
|
+
// 自定义从上传结果中提取 URL 的函数 ==> 非必传(默认为提取 res.data)
|
|
11072
|
+
getUploadUrl: {
|
|
11073
|
+
type: Function,
|
|
11074
|
+
default: (res) => res.data
|
|
11002
11075
|
}
|
|
11003
11076
|
},
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
const
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
const
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
const anchorRef = ref();
|
|
11017
|
-
const state = reactive({
|
|
11018
|
-
links: [],
|
|
11019
|
-
scrollContainer: null,
|
|
11020
|
-
scrollEvent: null,
|
|
11021
|
-
animating: false
|
|
11022
|
-
});
|
|
11023
|
-
const activeLink = ref(null);
|
|
11024
|
-
const getContainer = computed(() => {
|
|
11025
|
-
const {
|
|
11026
|
-
getContainer: getContainer2
|
|
11027
|
-
} = props;
|
|
11028
|
-
return getContainer2 || getDefaultContainer;
|
|
11029
|
-
});
|
|
11030
|
-
const getCurrentAnchor = (offsetTop = 0, bounds = 5) => {
|
|
11031
|
-
const linkSections = [];
|
|
11032
|
-
const container = getContainer.value();
|
|
11033
|
-
state.links.forEach((link) => {
|
|
11034
|
-
const sharpLinkMatch = sharpMatcherRegx.exec(link.toString());
|
|
11035
|
-
if (!sharpLinkMatch) {
|
|
11036
|
-
return;
|
|
11037
|
-
}
|
|
11038
|
-
const target = document.getElementById(sharpLinkMatch[1]);
|
|
11039
|
-
if (target) {
|
|
11040
|
-
const top = getOffsetTop(target, container);
|
|
11041
|
-
if (top < offsetTop + bounds) {
|
|
11042
|
-
linkSections.push({
|
|
11043
|
-
link,
|
|
11044
|
-
top
|
|
11045
|
-
});
|
|
11046
|
-
}
|
|
11047
|
-
}
|
|
11077
|
+
emits: ["update:modelValue"],
|
|
11078
|
+
setup(__props, { emit: __emit }) {
|
|
11079
|
+
const message = useMessage();
|
|
11080
|
+
const emit = __emit;
|
|
11081
|
+
const props = __props;
|
|
11082
|
+
const uploadRef = ref();
|
|
11083
|
+
const uploadList = ref([]);
|
|
11084
|
+
const fileList = ref([]);
|
|
11085
|
+
const uploadNumber = ref(0);
|
|
11086
|
+
const httpRequest = async (options) => {
|
|
11087
|
+
return await props.customUpload(options.file, {
|
|
11088
|
+
directory: props.directory
|
|
11048
11089
|
});
|
|
11049
|
-
if (linkSections.length) {
|
|
11050
|
-
const maxSection = linkSections.reduce((prev, curr) => curr.top > prev.top ? curr : prev);
|
|
11051
|
-
return maxSection.link;
|
|
11052
|
-
}
|
|
11053
|
-
return "";
|
|
11054
|
-
};
|
|
11055
|
-
const setCurrentActiveLink = (link) => {
|
|
11056
|
-
const {
|
|
11057
|
-
getCurrentAnchor: getCurrentAnchor2
|
|
11058
|
-
} = props;
|
|
11059
|
-
if (activeLink.value === link) {
|
|
11060
|
-
return;
|
|
11061
|
-
}
|
|
11062
|
-
activeLink.value = typeof getCurrentAnchor2 === "function" ? getCurrentAnchor2(link) : link;
|
|
11063
|
-
emit("change", link);
|
|
11064
11090
|
};
|
|
11065
|
-
const
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
|
|
11069
|
-
} = props;
|
|
11070
|
-
setCurrentActiveLink(link);
|
|
11071
|
-
const sharpLinkMatch = sharpMatcherRegx.exec(link);
|
|
11072
|
-
if (!sharpLinkMatch) {
|
|
11073
|
-
return;
|
|
11091
|
+
const beforeUpload = (file) => {
|
|
11092
|
+
if (fileList.value.length >= props.limit) {
|
|
11093
|
+
message.error(`上传文件数量不能超过${props.limit}个!`);
|
|
11094
|
+
return false;
|
|
11074
11095
|
}
|
|
11075
|
-
|
|
11076
|
-
if (
|
|
11077
|
-
|
|
11096
|
+
let fileExtension = "";
|
|
11097
|
+
if (file.name.lastIndexOf(".") > -1) {
|
|
11098
|
+
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
|
|
11078
11099
|
}
|
|
11079
|
-
const
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
|
|
11083
|
-
y -= targetOffset !== void 0 ? targetOffset : offsetTop || 0;
|
|
11084
|
-
state.animating = true;
|
|
11085
|
-
scrollTo(y, {
|
|
11086
|
-
callback: () => {
|
|
11087
|
-
state.animating = false;
|
|
11088
|
-
},
|
|
11089
|
-
getContainer: getContainer.value
|
|
11100
|
+
const isImg = props.fileType.some((type) => {
|
|
11101
|
+
if (file.type.indexOf(type) > -1)
|
|
11102
|
+
return true;
|
|
11103
|
+
return !!(fileExtension && fileExtension.indexOf(type) > -1);
|
|
11090
11104
|
});
|
|
11105
|
+
const isLimit = file.size < props.fileSize * 1024 * 1024;
|
|
11106
|
+
if (!isImg) {
|
|
11107
|
+
message.error(`文件格式不正确, 请上传${props.fileType.join("、")}格式!`);
|
|
11108
|
+
return false;
|
|
11109
|
+
}
|
|
11110
|
+
if (!isLimit) {
|
|
11111
|
+
message.error(`上传文件大小不能超过${props.fileSize}MB!`);
|
|
11112
|
+
return false;
|
|
11113
|
+
}
|
|
11114
|
+
message.success("正在上传文件,请稍候...");
|
|
11115
|
+
uploadNumber.value++;
|
|
11091
11116
|
};
|
|
11092
|
-
|
|
11093
|
-
|
|
11094
|
-
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
return;
|
|
11117
|
+
const handleFileSuccess = (res) => {
|
|
11118
|
+
message.success("上传成功");
|
|
11119
|
+
const fileUrl = props.getUploadUrl(res);
|
|
11120
|
+
const index = fileList.value.findIndex((item) => {
|
|
11121
|
+
var _a2;
|
|
11122
|
+
return ((_a2 = item.response) == null ? void 0 : _a2.data) === fileUrl;
|
|
11123
|
+
});
|
|
11124
|
+
fileList.value.splice(index, 1);
|
|
11125
|
+
uploadList.value.push({ name: fileUrl, url: fileUrl });
|
|
11126
|
+
if (uploadList.value.length == uploadNumber.value) {
|
|
11127
|
+
fileList.value.push(...uploadList.value);
|
|
11128
|
+
uploadList.value = [];
|
|
11129
|
+
uploadNumber.value = 0;
|
|
11130
|
+
emitUpdateModelValue();
|
|
11098
11131
|
}
|
|
11099
|
-
const {
|
|
11100
|
-
offsetTop,
|
|
11101
|
-
bounds,
|
|
11102
|
-
targetOffset
|
|
11103
|
-
} = props;
|
|
11104
|
-
const currentActiveLink = getCurrentAnchor(targetOffset !== void 0 ? targetOffset : offsetTop || 0, bounds);
|
|
11105
|
-
setCurrentActiveLink(currentActiveLink);
|
|
11106
11132
|
};
|
|
11107
|
-
const
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
block: "nearest"
|
|
11119
|
-
});
|
|
11120
|
-
}
|
|
11133
|
+
const handleExceed = () => {
|
|
11134
|
+
message.error(`上传文件数量不能超过${props.limit}个!`);
|
|
11135
|
+
};
|
|
11136
|
+
const excelUploadError = () => {
|
|
11137
|
+
message.error("导入数据失败,请您重新上传!");
|
|
11138
|
+
};
|
|
11139
|
+
const handleRemove = (file) => {
|
|
11140
|
+
const index = fileList.value.map((f) => f.name).indexOf(file.name);
|
|
11141
|
+
if (index > -1) {
|
|
11142
|
+
fileList.value.splice(index, 1);
|
|
11143
|
+
emitUpdateModelValue();
|
|
11121
11144
|
}
|
|
11122
11145
|
};
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11146
|
+
const handlePreview = (uploadFile) => {
|
|
11147
|
+
console.log(uploadFile);
|
|
11148
|
+
};
|
|
11149
|
+
watch(
|
|
11150
|
+
() => props.modelValue,
|
|
11151
|
+
(val) => {
|
|
11152
|
+
if (!val) {
|
|
11153
|
+
fileList.value = [];
|
|
11154
|
+
return;
|
|
11127
11155
|
}
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11156
|
+
fileList.value = [];
|
|
11157
|
+
if (isString(val)) {
|
|
11158
|
+
fileList.value.push(
|
|
11159
|
+
...val.split(",").map((url) => ({ name: url.substring(url.lastIndexOf("/") + 1), url }))
|
|
11160
|
+
);
|
|
11161
|
+
return;
|
|
11133
11162
|
}
|
|
11163
|
+
fileList.value.push(
|
|
11164
|
+
...val.map((url) => ({ name: url.substring(url.lastIndexOf("/") + 1), url }))
|
|
11165
|
+
);
|
|
11134
11166
|
},
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
});
|
|
11142
|
-
onMounted(() => {
|
|
11143
|
-
nextTick(() => {
|
|
11144
|
-
const container = getContainer.value();
|
|
11145
|
-
state.scrollContainer = container;
|
|
11146
|
-
state.scrollEvent = addEventListener(state.scrollContainer, "scroll", handleScroll);
|
|
11147
|
-
handleScroll();
|
|
11148
|
-
});
|
|
11149
|
-
});
|
|
11150
|
-
onBeforeUnmount(() => {
|
|
11151
|
-
if (state.scrollEvent) {
|
|
11152
|
-
state.scrollEvent.remove();
|
|
11153
|
-
}
|
|
11154
|
-
});
|
|
11155
|
-
onUpdated(() => {
|
|
11156
|
-
if (state.scrollEvent) {
|
|
11157
|
-
const currentContainer = getContainer.value();
|
|
11158
|
-
if (state.scrollContainer !== currentContainer) {
|
|
11159
|
-
state.scrollContainer = currentContainer;
|
|
11160
|
-
state.scrollEvent.remove();
|
|
11161
|
-
state.scrollEvent = addEventListener(state.scrollContainer, "scroll", handleScroll);
|
|
11162
|
-
handleScroll();
|
|
11163
|
-
}
|
|
11167
|
+
{ immediate: true, deep: true }
|
|
11168
|
+
);
|
|
11169
|
+
const emitUpdateModelValue = () => {
|
|
11170
|
+
let result = fileList.value.map((file) => file.url);
|
|
11171
|
+
if (props.limit === 1 || isString(props.modelValue)) {
|
|
11172
|
+
result = result.join(",");
|
|
11164
11173
|
}
|
|
11165
|
-
|
|
11166
|
-
});
|
|
11167
|
-
const createNestedLink = (options) => Array.isArray(options) ? options.map((option) => {
|
|
11168
|
-
const {
|
|
11169
|
-
children,
|
|
11170
|
-
key,
|
|
11171
|
-
href,
|
|
11172
|
-
target,
|
|
11173
|
-
class: cls,
|
|
11174
|
-
style,
|
|
11175
|
-
title
|
|
11176
|
-
} = option;
|
|
11177
|
-
return createVNode(_sfc_main$2, {
|
|
11178
|
-
"key": key,
|
|
11179
|
-
"href": href,
|
|
11180
|
-
"target": target,
|
|
11181
|
-
"class": cls,
|
|
11182
|
-
"style": style,
|
|
11183
|
-
"title": title,
|
|
11184
|
-
"prefixCls": prefixCls2,
|
|
11185
|
-
"customTitleProps": option
|
|
11186
|
-
}, {
|
|
11187
|
-
default: () => [anchorDirection.value === "vertical" ? createNestedLink(children) : null],
|
|
11188
|
-
customTitle: slots.customTitle
|
|
11189
|
-
});
|
|
11190
|
-
}) : null;
|
|
11191
|
-
return () => {
|
|
11192
|
-
var _a2;
|
|
11193
|
-
const {
|
|
11194
|
-
offsetTop,
|
|
11195
|
-
affix,
|
|
11196
|
-
showInkInFixed
|
|
11197
|
-
} = props;
|
|
11198
|
-
const inkClass = [`${prefixCls2}-ink`, {
|
|
11199
|
-
[`${prefixCls2}-ink-visible`]: activeLink.value
|
|
11200
|
-
}];
|
|
11201
|
-
const wrapperClass = [props.wrapperClass, `${prefixCls2}-wrapper`, {
|
|
11202
|
-
[`${prefixCls2}-wrapper-horizontal`]: anchorDirection.value === "horizontal"
|
|
11203
|
-
}];
|
|
11204
|
-
const anchorClass = [prefixCls2, {
|
|
11205
|
-
[`${prefixCls2}-fixed`]: !affix && !showInkInFixed
|
|
11206
|
-
}];
|
|
11207
|
-
const wrapperStyle = {
|
|
11208
|
-
maxHeight: offsetTop ? `calc(100vh - ${offsetTop}px)` : "100vh",
|
|
11209
|
-
...props.wrapperStyle
|
|
11210
|
-
};
|
|
11211
|
-
const anchorContent = createVNode("div", {
|
|
11212
|
-
"class": wrapperClass,
|
|
11213
|
-
"style": wrapperStyle,
|
|
11214
|
-
"ref": anchorRef
|
|
11215
|
-
}, [createVNode("div", {
|
|
11216
|
-
"class": anchorClass
|
|
11217
|
-
}, [createVNode("span", {
|
|
11218
|
-
"class": inkClass,
|
|
11219
|
-
"ref": spanLinkNode
|
|
11220
|
-
}, null), Array.isArray(props.items) ? createNestedLink(props.items) : (_a2 = slots.default) == null ? void 0 : _a2.call(slots)])]);
|
|
11221
|
-
return !affix ? anchorContent : createVNode(ElAffix, mergeProps(attrs, {
|
|
11222
|
-
"offset": offsetTop
|
|
11223
|
-
}), _isSlot(anchorContent) ? anchorContent : {
|
|
11224
|
-
default: () => [anchorContent]
|
|
11225
|
-
});
|
|
11174
|
+
emit("update:modelValue", result);
|
|
11226
11175
|
};
|
|
11227
|
-
}
|
|
11228
|
-
});
|
|
11229
|
-
const _hoisted_1 = { class: "com-steps" };
|
|
11230
|
-
const _hoisted_2 = { class: "steps-item-container" };
|
|
11231
|
-
const _hoisted_3 = { class: "steps-item-icon" };
|
|
11232
|
-
const _hoisted_4 = { class: "steps-icon" };
|
|
11233
|
-
const _hoisted_5 = { class: "steps-item-content" };
|
|
11234
|
-
const _hoisted_6 = { class: "steps-item-title" };
|
|
11235
|
-
const _sfc_main = /* @__PURE__ */ Object.assign({ name: "Steps" }, {
|
|
11236
|
-
__name: "Steps",
|
|
11237
|
-
props: {
|
|
11238
|
-
// 设置当前激活步骤
|
|
11239
|
-
active: {
|
|
11240
|
-
type: Number,
|
|
11241
|
-
default: 0
|
|
11242
|
-
},
|
|
11243
|
-
// 配置选项卡内容
|
|
11244
|
-
items: {
|
|
11245
|
-
type: Array,
|
|
11246
|
-
default: () => []
|
|
11247
|
-
}
|
|
11248
|
-
},
|
|
11249
|
-
setup(__props) {
|
|
11250
11176
|
return (_ctx, _cache) => {
|
|
11251
|
-
return openBlock(), createElementBlock("div",
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11177
|
+
return openBlock(), createElementBlock("div", {
|
|
11178
|
+
class: normalizeClass(["upload-file", _ctx.$attrs.class])
|
|
11179
|
+
}, [
|
|
11180
|
+
!__props.disabled ? (openBlock(), createBlock(unref(ElUpload), {
|
|
11181
|
+
key: 0,
|
|
11182
|
+
ref_key: "uploadRef",
|
|
11183
|
+
ref: uploadRef,
|
|
11184
|
+
"file-list": unref(fileList),
|
|
11185
|
+
"onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => isRef(fileList) ? fileList.value = $event : null),
|
|
11186
|
+
"auto-upload": __props.autoUpload,
|
|
11187
|
+
"before-upload": beforeUpload,
|
|
11188
|
+
disabled: __props.disabled,
|
|
11189
|
+
drag: __props.drag,
|
|
11190
|
+
"http-request": httpRequest,
|
|
11191
|
+
limit: props.limit,
|
|
11192
|
+
multiple: props.limit > 1,
|
|
11193
|
+
"on-error": excelUploadError,
|
|
11194
|
+
"on-exceed": handleExceed,
|
|
11195
|
+
"on-preview": handlePreview,
|
|
11196
|
+
"on-remove": handleRemove,
|
|
11197
|
+
"on-success": handleFileSuccess,
|
|
11198
|
+
"show-file-list": true,
|
|
11199
|
+
class: "upload-file-uploader",
|
|
11200
|
+
name: "file"
|
|
11201
|
+
}, createSlots({
|
|
11202
|
+
file: withCtx((row) => [
|
|
11261
11203
|
createElementVNode("div", _hoisted_2, [
|
|
11204
|
+
createElementVNode("span", null, toDisplayString(row.file.name), 1),
|
|
11262
11205
|
createElementVNode("div", _hoisted_3, [
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
|
|
11270
|
-
]
|
|
11271
|
-
|
|
11206
|
+
createVNode(unref(ElLink), {
|
|
11207
|
+
href: row.file.url,
|
|
11208
|
+
underline: "never",
|
|
11209
|
+
download: "",
|
|
11210
|
+
target: "_blank",
|
|
11211
|
+
type: "primary"
|
|
11212
|
+
}, {
|
|
11213
|
+
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
11214
|
+
createTextVNode(" 下载 ", -1)
|
|
11215
|
+
])),
|
|
11216
|
+
_: 2,
|
|
11217
|
+
__: [2]
|
|
11218
|
+
}, 1032, ["href"])
|
|
11272
11219
|
]),
|
|
11273
|
-
createElementVNode("div",
|
|
11274
|
-
|
|
11220
|
+
createElementVNode("div", _hoisted_4, [
|
|
11221
|
+
createVNode(unref(ElLink), {
|
|
11222
|
+
type: "danger",
|
|
11223
|
+
onClick: ($event) => handleRemove(row.file)
|
|
11224
|
+
}, {
|
|
11225
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
11226
|
+
createTextVNode(" 删除", -1)
|
|
11227
|
+
])),
|
|
11228
|
+
_: 2,
|
|
11229
|
+
__: [3]
|
|
11230
|
+
}, 1032, ["onClick"])
|
|
11275
11231
|
])
|
|
11276
11232
|
])
|
|
11277
|
-
],
|
|
11233
|
+
]),
|
|
11234
|
+
default: withCtx(() => [
|
|
11235
|
+
createVNode(unref(ElButton), { type: "primary" }, {
|
|
11236
|
+
default: withCtx(() => [
|
|
11237
|
+
createVNode(unref(_sfc_main$v), { icon: "ant-design:upload-outlined" }),
|
|
11238
|
+
_cache[1] || (_cache[1] = createTextVNode(" 选取文件 ", -1))
|
|
11239
|
+
]),
|
|
11240
|
+
_: 1,
|
|
11241
|
+
__: [1]
|
|
11242
|
+
})
|
|
11243
|
+
]),
|
|
11244
|
+
_: 2
|
|
11245
|
+
}, [
|
|
11246
|
+
__props.isShowTip ? {
|
|
11247
|
+
name: "tip",
|
|
11248
|
+
fn: withCtx(() => [
|
|
11249
|
+
createElementVNode("div", _hoisted_1, [
|
|
11250
|
+
createElementVNode("span", null, "格式为:" + toDisplayString(__props.fileType.join("、")) + ",", 1),
|
|
11251
|
+
createElementVNode("span", null, "大小不超过" + toDisplayString(__props.fileSize) + "MB。", 1)
|
|
11252
|
+
])
|
|
11253
|
+
]),
|
|
11254
|
+
key: "0"
|
|
11255
|
+
} : void 0
|
|
11256
|
+
]), 1032, ["file-list", "auto-upload", "disabled", "drag", "limit", "multiple"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(fileList), (file, index) => {
|
|
11257
|
+
return openBlock(), createElementBlock("div", {
|
|
11258
|
+
key: index,
|
|
11259
|
+
class: "flex items-center file-list-item"
|
|
11260
|
+
}, [
|
|
11261
|
+
createElementVNode("span", null, toDisplayString(file.name), 1),
|
|
11262
|
+
createElementVNode("div", _hoisted_5, [
|
|
11263
|
+
createVNode(unref(ElLink), {
|
|
11264
|
+
href: file.url,
|
|
11265
|
+
underline: "never",
|
|
11266
|
+
download: "",
|
|
11267
|
+
target: "_blank",
|
|
11268
|
+
type: "primary"
|
|
11269
|
+
}, {
|
|
11270
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
11271
|
+
createTextVNode(" 下载 ", -1)
|
|
11272
|
+
])),
|
|
11273
|
+
_: 2,
|
|
11274
|
+
__: [4]
|
|
11275
|
+
}, 1032, ["href"])
|
|
11276
|
+
])
|
|
11277
|
+
]);
|
|
11278
11278
|
}), 128))
|
|
11279
|
-
]);
|
|
11279
|
+
], 2);
|
|
11280
11280
|
};
|
|
11281
11281
|
}
|
|
11282
11282
|
});
|
|
11283
|
-
const
|
|
11283
|
+
const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f625d304"]]);
|
|
11284
11284
|
function useLayout() {
|
|
11285
11285
|
const collapsed = ref(false);
|
|
11286
11286
|
const toggleCollapsed = () => {
|
|
@@ -11291,121 +11291,235 @@ function useLayout() {
|
|
|
11291
11291
|
toggleCollapsed
|
|
11292
11292
|
};
|
|
11293
11293
|
}
|
|
11294
|
+
const install = (app) => {
|
|
11295
|
+
app.component("BmpLayout", BmpLayout);
|
|
11296
|
+
app.component("BmpConfigGlobal", _sfc_main$d);
|
|
11297
|
+
app.component("BmpPageCard", PageCard);
|
|
11298
|
+
app.component("BmpPageNavBar", PageNavBar);
|
|
11299
|
+
app.component("BmpIcon", _sfc_main$v);
|
|
11300
|
+
app.component("BmpBadge", _sfc_main$a);
|
|
11301
|
+
app.component("BmpPagination", _sfc_main$9);
|
|
11302
|
+
app.component("BmpDialog", _sfc_main$8);
|
|
11303
|
+
app.component("BmpAlert", _sfc_main$7);
|
|
11304
|
+
app.component("BmpAnchor", _sfc_main$5);
|
|
11305
|
+
app.component("BmpSteps", Steps);
|
|
11306
|
+
app.component("BmpBacktop", _sfc_main$w);
|
|
11307
|
+
app.component("BmpUploadImg", UploadImg);
|
|
11308
|
+
app.component("BmpUploadImgs", UploadImgs);
|
|
11309
|
+
app.component("BmpUploadFile", UploadFile);
|
|
11310
|
+
app.component("BmpAffix", ElAffix);
|
|
11311
|
+
app.component("BmpAutocomplete", ElAutocomplete);
|
|
11312
|
+
app.component("BmpAvatar", ElAvatar);
|
|
11313
|
+
app.component("BmpBreadcrumb", ElBreadcrumb);
|
|
11314
|
+
app.component("BmpBreadcrumbItem", ElBreadcrumbItem);
|
|
11315
|
+
app.component("BmpButton", ElButton);
|
|
11316
|
+
app.component("BmpButtonGroup", ElButtonGroup);
|
|
11317
|
+
app.component("BmpCard", ElCard);
|
|
11318
|
+
app.component("BmpCarousel", ElCarousel);
|
|
11319
|
+
app.component("BmpCarouselItem", ElCarouselItem);
|
|
11320
|
+
app.component("BmpCollapse", ElCollapse);
|
|
11321
|
+
app.component("BmpCollapseItem", ElCollapseItem);
|
|
11322
|
+
app.component("BmpCollapseTransition", ElCollapseTransition);
|
|
11323
|
+
app.component("BmpDivider", ElDivider);
|
|
11324
|
+
app.component("BmpDrawer", ElDrawer);
|
|
11325
|
+
app.component("BmpEmpty", ElEmpty);
|
|
11326
|
+
app.component("BmpLink", ElLink);
|
|
11327
|
+
app.component("BmpOverlay", ElOverlay);
|
|
11328
|
+
app.component("BmpPageHeader", ElPageHeader);
|
|
11329
|
+
app.component("BmpProgress", ElProgress);
|
|
11330
|
+
app.component("BmpResult", ElResult);
|
|
11331
|
+
app.component("BmpScrollbar", ElScrollbar);
|
|
11332
|
+
app.component("BmpSkeleton", ElSkeleton);
|
|
11333
|
+
app.component("BmpSkeletonItem", ElSkeletonItem);
|
|
11334
|
+
app.component("BmpSpace", ElSpace);
|
|
11335
|
+
app.component("BmpTag", ElTag);
|
|
11336
|
+
app.component("BmpText", ElText);
|
|
11337
|
+
app.component("BmpCascader", ElCascader);
|
|
11338
|
+
app.component("BmpCascaderPanel", ElCascaderPanel);
|
|
11339
|
+
app.component("BmpCheckbox", ElCheckbox);
|
|
11340
|
+
app.component("BmpCheckboxButton", ElCheckboxButton);
|
|
11341
|
+
app.component("BmpCheckboxGroup", ElCheckboxGroup);
|
|
11342
|
+
app.component("BmpColorPicker", ElColorPicker);
|
|
11343
|
+
app.component("BmpDatePicker", ElDatePicker);
|
|
11344
|
+
app.component("BmpForm", ElForm);
|
|
11345
|
+
app.component("BmpFormItem", ElFormItem);
|
|
11346
|
+
app.component("BmpInput", ElInput);
|
|
11347
|
+
app.component("BmpInputNumber", ElInputNumber);
|
|
11348
|
+
app.component("BmpInputTag", ElInputTag);
|
|
11349
|
+
app.component("BmpRadio", ElRadio);
|
|
11350
|
+
app.component("BmpRadioButton", ElRadioButton);
|
|
11351
|
+
app.component("BmpRadioGroup", ElRadioGroup);
|
|
11352
|
+
app.component("BmpRate", ElRate);
|
|
11353
|
+
app.component("BmpSelect", ElSelect);
|
|
11354
|
+
app.component("BmpOption", ElOption);
|
|
11355
|
+
app.component("BmpOptionGroup", ElOptionGroup);
|
|
11356
|
+
app.component("BmpSelectV2", ElSelectV2);
|
|
11357
|
+
app.component("BmpSlider", ElSlider);
|
|
11358
|
+
app.component("BmpSwitch", ElSwitch);
|
|
11359
|
+
app.component("BmpTimePicker", ElTimePicker);
|
|
11360
|
+
app.component("BmpTimeSelect", ElTimeSelect);
|
|
11361
|
+
app.component("BmpTransfer", ElTransfer);
|
|
11362
|
+
app.component("BmpTreeSelect", ElTreeSelect);
|
|
11363
|
+
app.component("BmpMention", ElMention);
|
|
11364
|
+
app.component("BmpCalendar", ElCalendar);
|
|
11365
|
+
app.component("BmpCheckTag", ElCheckTag);
|
|
11366
|
+
app.component("BmpCountdown", ElCountdown);
|
|
11367
|
+
app.component("BmpDescriptions", ElDescriptions);
|
|
11368
|
+
app.component("BmpDescriptionsItem", ElDescriptionsItem);
|
|
11369
|
+
app.component("BmpImage", ElImage);
|
|
11370
|
+
app.component("BmpImageViewer", ElImageViewer);
|
|
11371
|
+
app.component("BmpStatistic", ElStatistic);
|
|
11372
|
+
app.component("BmpTable", ElTable);
|
|
11373
|
+
app.component("BmpTableColumn", ElTableColumn);
|
|
11374
|
+
app.component("BmpTimeline", ElTimeline);
|
|
11375
|
+
app.component("BmpTimelineItem", ElTimelineItem);
|
|
11376
|
+
app.component("BmpTree", ElTree);
|
|
11377
|
+
app.component("BmpTreeV2", ElTreeV2);
|
|
11378
|
+
app.component("BmpDropdown", ElDropdown);
|
|
11379
|
+
app.component("BmpDropdownItem", ElDropdownItem);
|
|
11380
|
+
app.component("BmpDropdownMenu", ElDropdownMenu);
|
|
11381
|
+
app.component("BmpMenu", ElMenu);
|
|
11382
|
+
app.component("BmpMenuItem", ElMenuItem);
|
|
11383
|
+
app.component("BmpMenuItemGroup", ElMenuItemGroup);
|
|
11384
|
+
app.component("BmpSubMenu", ElSubMenu);
|
|
11385
|
+
app.component("BmpTabs", ElTabs);
|
|
11386
|
+
app.component("BmpTabPane", ElTabPane);
|
|
11387
|
+
app.component("BmpPopover", ElPopover);
|
|
11388
|
+
app.component("BmpPopconfirm", ElPopconfirm);
|
|
11389
|
+
app.component("BmpTooltip", ElTooltip);
|
|
11390
|
+
app.component("BmpContainer", ElContainer);
|
|
11391
|
+
app.component("BmpAside", ElAside);
|
|
11392
|
+
app.component("BmpFooter", ElFooter);
|
|
11393
|
+
app.component("BmpHeader", ElHeader);
|
|
11394
|
+
app.component("BmpMain", ElMain);
|
|
11395
|
+
app.component("BmpRow", ElRow);
|
|
11396
|
+
app.component("BmpCol", ElCol);
|
|
11397
|
+
app.component("BmpSplitter", ElSplitter);
|
|
11398
|
+
app.component("BmpSplitterPanel", ElSplitterPanel);
|
|
11399
|
+
app.component("BmpConfigProvider", ElConfigProvider);
|
|
11400
|
+
app.component("BmpSegmented", ElSegmented);
|
|
11401
|
+
app.component("BmpTour", ElTour);
|
|
11402
|
+
app.component("BmpTourStep", ElTourStep);
|
|
11403
|
+
app.component("BmpUpload", ElUpload);
|
|
11404
|
+
app.component("BmpWatermark", ElWatermark);
|
|
11405
|
+
app.component("BmpPopper", ElPopper);
|
|
11406
|
+
};
|
|
11407
|
+
BmpLayout.install = install;
|
|
11294
11408
|
export {
|
|
11295
11409
|
ElAffix2 as BmpAffix,
|
|
11296
|
-
_sfc_main$
|
|
11297
|
-
_sfc_main$
|
|
11298
|
-
|
|
11299
|
-
|
|
11410
|
+
_sfc_main$7 as BmpAlert,
|
|
11411
|
+
_sfc_main$5 as BmpAnchor,
|
|
11412
|
+
ElAside2 as BmpAside,
|
|
11413
|
+
ElAutocomplete2 as BmpAutocomplete,
|
|
11300
11414
|
ElAvatar2 as BmpAvatar,
|
|
11301
11415
|
_sfc_main$w as BmpBacktop,
|
|
11302
|
-
_sfc_main$
|
|
11416
|
+
_sfc_main$a as BmpBadge,
|
|
11303
11417
|
ElBreadcrumb2 as BmpBreadcrumb,
|
|
11304
11418
|
ElBreadcrumbItem2 as BmpBreadcrumbItem,
|
|
11305
11419
|
ElButton2 as BmpButton,
|
|
11306
|
-
|
|
11307
|
-
|
|
11420
|
+
ElButtonGroup2 as BmpButtonGroup,
|
|
11421
|
+
ElCalendar2 as BmpCalendar,
|
|
11308
11422
|
ElCard2 as BmpCard,
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
|
|
11423
|
+
ElCarousel2 as BmpCarousel,
|
|
11424
|
+
ElCarouselItem2 as BmpCarouselItem,
|
|
11425
|
+
ElCascader2 as BmpCascader,
|
|
11426
|
+
ElCascaderPanel2 as BmpCascaderPanel,
|
|
11427
|
+
ElCheckTag2 as BmpCheckTag,
|
|
11428
|
+
ElCheckbox2 as BmpCheckbox,
|
|
11429
|
+
ElCheckboxButton2 as BmpCheckboxButton,
|
|
11430
|
+
ElCheckboxGroup2 as BmpCheckboxGroup,
|
|
11431
|
+
ElCol2 as BmpCol,
|
|
11432
|
+
ElCollapse2 as BmpCollapse,
|
|
11433
|
+
ElCollapseItem2 as BmpCollapseItem,
|
|
11434
|
+
ElCollapseTransition2 as BmpCollapseTransition,
|
|
11435
|
+
ElColorPicker2 as BmpColorPicker,
|
|
11322
11436
|
_sfc_main$d as BmpConfigGlobal,
|
|
11323
11437
|
ElConfigProvider2 as BmpConfigProvider,
|
|
11324
|
-
|
|
11325
|
-
|
|
11438
|
+
ElContainer2 as BmpContainer,
|
|
11439
|
+
ElCountdown2 as BmpCountdown,
|
|
11326
11440
|
createImageViewer as BmpCreateImageViewer,
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
_sfc_main$
|
|
11331
|
-
|
|
11441
|
+
ElDatePicker2 as BmpDatePicker,
|
|
11442
|
+
ElDescriptions2 as BmpDescriptions,
|
|
11443
|
+
ElDescriptionsItem2 as BmpDescriptionsItem,
|
|
11444
|
+
_sfc_main$8 as BmpDialog,
|
|
11445
|
+
ElDivider2 as BmpDivider,
|
|
11332
11446
|
ElDrawer2 as BmpDrawer,
|
|
11333
11447
|
ElDropdown2 as BmpDropdown,
|
|
11334
11448
|
ElDropdownItem2 as BmpDropdownItem,
|
|
11335
11449
|
ElDropdownMenu2 as BmpDropdownMenu,
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11450
|
+
ElEmpty2 as BmpEmpty,
|
|
11451
|
+
ElFooter2 as BmpFooter,
|
|
11452
|
+
ElForm2 as BmpForm,
|
|
11453
|
+
ElFormItem2 as BmpFormItem,
|
|
11454
|
+
ElHeader2 as BmpHeader,
|
|
11341
11455
|
_sfc_main$v as BmpIcon,
|
|
11342
|
-
|
|
11456
|
+
ElImage2 as BmpImage,
|
|
11343
11457
|
ElImageViewer2 as BmpImageViewer,
|
|
11344
11458
|
ElInfiniteScroll as BmpInfiniteScroll,
|
|
11345
11459
|
ElInput2 as BmpInput,
|
|
11346
|
-
|
|
11347
|
-
|
|
11460
|
+
ElInputNumber2 as BmpInputNumber,
|
|
11461
|
+
ElInputTag2 as BmpInputTag,
|
|
11348
11462
|
BmpLayout,
|
|
11349
11463
|
ElLink2 as BmpLink,
|
|
11350
11464
|
ElLoading as BmpLoading,
|
|
11351
|
-
|
|
11352
|
-
|
|
11465
|
+
ElMain2 as BmpMain,
|
|
11466
|
+
ElMention2 as BmpMention,
|
|
11353
11467
|
ElMenu2 as BmpMenu,
|
|
11354
11468
|
ElMenuItem2 as BmpMenuItem,
|
|
11355
|
-
|
|
11469
|
+
ElMenuItemGroup2 as BmpMenuItemGroup,
|
|
11356
11470
|
ElMessage2 as BmpMessage,
|
|
11357
11471
|
ElMessageBox2 as BmpMessageBox,
|
|
11358
11472
|
ElNotification2 as BmpNotification,
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11473
|
+
ElOption2 as BmpOption,
|
|
11474
|
+
ElOptionGroup2 as BmpOptionGroup,
|
|
11475
|
+
ElOverlay2 as BmpOverlay,
|
|
11362
11476
|
PageCard as BmpPageCard,
|
|
11363
|
-
|
|
11477
|
+
ElPageHeader2 as BmpPageHeader,
|
|
11364
11478
|
PageNavBar as BmpPageNavBar,
|
|
11365
|
-
_sfc_main$
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
|
|
11375
|
-
|
|
11479
|
+
_sfc_main$9 as BmpPagination,
|
|
11480
|
+
ElPopconfirm2 as BmpPopconfirm,
|
|
11481
|
+
ElPopover2 as BmpPopover,
|
|
11482
|
+
ElPopper2 as BmpPopper,
|
|
11483
|
+
ElProgress2 as BmpProgress,
|
|
11484
|
+
ElRadio2 as BmpRadio,
|
|
11485
|
+
ElRadioButton2 as BmpRadioButton,
|
|
11486
|
+
ElRadioGroup2 as BmpRadioGroup,
|
|
11487
|
+
ElRate2 as BmpRate,
|
|
11488
|
+
ElResult2 as BmpResult,
|
|
11489
|
+
ElRow2 as BmpRow,
|
|
11376
11490
|
ElScrollbar2 as BmpScrollbar,
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11491
|
+
ElSegmented2 as BmpSegmented,
|
|
11492
|
+
ElSelect2 as BmpSelect,
|
|
11493
|
+
ElSelectV22 as BmpSelectV2,
|
|
11380
11494
|
setI18n as BmpSetI18n,
|
|
11381
11495
|
setPinia as BmpSetPinia,
|
|
11382
|
-
|
|
11383
|
-
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
|
|
11387
|
-
|
|
11388
|
-
|
|
11496
|
+
ElSkeleton2 as BmpSkeleton,
|
|
11497
|
+
ElSkeletonItem2 as BmpSkeletonItem,
|
|
11498
|
+
ElSlider2 as BmpSlider,
|
|
11499
|
+
ElSpace2 as BmpSpace,
|
|
11500
|
+
ElSplitter2 as BmpSplitter,
|
|
11501
|
+
ElSplitterPanel2 as BmpSplitterPanel,
|
|
11502
|
+
ElStatistic2 as BmpStatistic,
|
|
11389
11503
|
Steps as BmpSteps,
|
|
11390
11504
|
ElSubMenu2 as BmpSubMenu,
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
|
|
11399
|
-
|
|
11400
|
-
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
|
|
11404
|
-
|
|
11405
|
-
|
|
11406
|
-
|
|
11407
|
-
|
|
11408
|
-
|
|
11505
|
+
ElSwitch2 as BmpSwitch,
|
|
11506
|
+
ElTabPane2 as BmpTabPane,
|
|
11507
|
+
ElTable2 as BmpTable,
|
|
11508
|
+
ElTableColumn2 as BmpTableColumn,
|
|
11509
|
+
ElTabs2 as BmpTabs,
|
|
11510
|
+
ElTag2 as BmpTag,
|
|
11511
|
+
ElText2 as BmpText,
|
|
11512
|
+
ElTimePicker2 as BmpTimePicker,
|
|
11513
|
+
ElTimeSelect2 as BmpTimeSelect,
|
|
11514
|
+
ElTimeline2 as BmpTimeline,
|
|
11515
|
+
ElTimelineItem2 as BmpTimelineItem,
|
|
11516
|
+
ElTooltip2 as BmpTooltip,
|
|
11517
|
+
ElTour2 as BmpTour,
|
|
11518
|
+
ElTourStep2 as BmpTourStep,
|
|
11519
|
+
ElTransfer2 as BmpTransfer,
|
|
11520
|
+
ElTree2 as BmpTree,
|
|
11521
|
+
ElTreeSelect2 as BmpTreeSelect,
|
|
11522
|
+
ElTreeV22 as BmpTreeV2,
|
|
11409
11523
|
ElUpload2 as BmpUpload,
|
|
11410
11524
|
UploadFile as BmpUploadFile,
|
|
11411
11525
|
UploadImg as BmpUploadImg,
|
|
@@ -11417,6 +11531,7 @@ export {
|
|
|
11417
11531
|
usePermissionStoreWithOut as BmpUsePermissionStoreWithOut,
|
|
11418
11532
|
useUserStore as BmpUseUserStore,
|
|
11419
11533
|
useUserStoreWithOut as BmpUseUserStoreWithOut,
|
|
11420
|
-
|
|
11421
|
-
BmpLayout as default
|
|
11534
|
+
ElWatermark2 as BmpWatermark,
|
|
11535
|
+
BmpLayout as default,
|
|
11536
|
+
install
|
|
11422
11537
|
};
|