@farris/ui-vue 1.0.0-beta.4 → 1.0.0-beta.6
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/accordion/index.esm.js +2 -2
- package/accordion/package.json +1 -1
- package/avatar/index.esm.js +28 -1
- package/avatar/package.json +1 -1
- package/button/index.esm.js +111 -52
- package/button/index.umd.js +1 -1
- package/button/package.json +1 -1
- package/button-edit/index.esm.js +58 -4
- package/button-edit/index.umd.js +1 -1
- package/button-edit/package.json +1 -1
- package/checkbox/index.esm.js +38 -1
- package/checkbox/package.json +1 -1
- package/combo-list/index.esm.js +125 -5
- package/combo-list/package.json +1 -1
- package/data-grid/index.esm.js +235 -143
- package/data-grid/index.umd.js +1 -1
- package/data-grid/package.json +1 -1
- package/date-picker/index.esm.js +70 -13
- package/date-picker/index.umd.js +1 -1
- package/date-picker/package.json +1 -1
- package/farris.all.esm.js +1054 -534
- package/farris.all.umd.js +1 -1
- package/list-view/index.esm.js +3 -3
- package/list-view/index.umd.js +1 -1
- package/list-view/package.json +1 -1
- package/message-box/index.esm.js +35 -35
- package/message-box/index.umd.js +1 -1
- package/message-box/package.json +1 -1
- package/modal/index.esm.js +3 -3
- package/modal/index.umd.js +1 -1
- package/modal/package.json +1 -1
- package/notify/index.esm.js +2 -2
- package/notify/package.json +1 -1
- package/package.json +3 -2
- package/pagination/index.esm.js +4 -4
- package/pagination/index.umd.js +1 -1
- package/pagination/package.json +1 -1
- package/popover/index.esm.js +1 -1
- package/popover/package.json +1 -1
- package/radio-group/index.esm.js +28 -1
- package/radio-group/package.json +1 -1
- package/section/index.esm.js +1 -1
- package/section/package.json +1 -1
- package/style.css +11 -1
- package/switch/index.esm.js +4 -1
- package/switch/package.json +1 -1
- package/tabs/index.esm.js +6 -5
- package/tabs/index.umd.js +1 -1
- package/tabs/package.json +1 -1
- package/text/index.esm.js +4 -1
- package/text/package.json +1 -1
- package/tooltip/index.esm.js +1 -1
- package/tooltip/package.json +1 -1
- package/types/accordion/src/accordion.component.d.ts +4 -2
- package/types/accordion/src/components/accordion-item.component.d.ts +4 -2
- package/types/avatar/src/avatar.component.d.ts +4 -2
- package/types/button/index.d.ts +2 -1
- package/types/button/src/button-group.component.d.ts +4 -2
- package/types/button/src/button.component.d.ts +4 -2
- package/types/button-edit/src/button-edit.component.d.ts +141 -0
- package/types/checkbox/src/checkbox-group.component.d.ts +4 -2
- package/types/combo-list/src/combo-list.component.d.ts +232 -0
- package/types/combo-list/src/components/option.component.d.ts +4 -2
- package/types/combo-list/src/components/options.component.d.ts +4 -2
- package/types/combo-list/src/components/panel.component.d.ts +25 -0
- package/types/data-grid/src/components/editors/date-picker.component.d.ts +15 -0
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +4 -2
- package/types/date-picker/src/components/calendar-navbar/calendar-navbar.component.d.ts +4 -2
- package/types/date-picker/src/components/date-picker-container/date-picker-container.component.d.ts +4 -2
- package/types/date-picker/src/components/month/month.component.d.ts +4 -2
- package/types/date-picker/src/components/year/year.component.d.ts +4 -2
- package/types/date-picker/src/date-picker.component.d.ts +336 -0
- package/types/list-view/src/components/list-view-checkbox.component.d.ts +4 -2
- package/types/list-view/src/list-view.component.d.ts +60 -0
- package/types/message-box/src/message-box.component.d.ts +4 -2
- package/types/message-box/src/message-box.service.d.ts +20 -0
- package/types/modal/src/modal.component.d.ts +4 -2
- package/types/notify/src/components/toast.component.d.ts +4 -2
- package/types/notify/src/notify.component.d.ts +130 -0
- package/types/notify/src/notify.service.d.ts +4 -0
- package/types/number-range/src/number-range.component.d.ts +4 -2
- package/types/number-spinner/src/number-spinner.component.d.ts +4 -2
- package/types/overlay/src/overlay.component.d.ts +4 -2
- package/types/pagination/src/pagination.components.d.ts +4 -2
- package/types/popover/src/popover.component.d.ts +4 -2
- package/types/radio-group/src/radio-group.component.d.ts +4 -2
- package/types/section/src/section.component.d.ts +4 -2
- package/types/switch/src/switch.component.d.ts +4 -2
- package/types/tabs/src/components/tab-page.component.d.ts +4 -2
- package/types/tabs/src/tabs.component.d.ts +4 -2
- package/types/text/src/text.component.d.ts +4 -2
- package/types/tooltip/src/composition/use-adjust-position.d.ts +15 -0
- package/types/tooltip/src/tooltip.component.d.ts +4 -2
- package/types/tooltip/src/tooltip.directive.d.ts +5 -0
package/farris.all.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as X, computed as b, createVNode as a, ref as
|
|
1
|
+
import { defineComponent as X, computed as b, createVNode as a, ref as v, nextTick as ke, watch as le, Teleport as Xe, Fragment as be, mergeProps as Se, withDirectives as We, vShow as Ft, inject as De, withModifiers as Ht, vModelCheckbox as Et, toRefs as Rt, reactive as we, provide as Je, resolveComponent as Fe, createTextVNode as _e, onMounted as Ne, onUnmounted as He, createApp as et, shallowRef as ft, vModelText as pa, getCurrentInstance as ga } from "vue";
|
|
2
2
|
import { BigNumber as ie } from "bignumber.js";
|
|
3
3
|
const ma = {
|
|
4
4
|
customClass: { type: Array, default: [] },
|
|
@@ -7,7 +7,7 @@ const ma = {
|
|
|
7
7
|
enableFold: { type: Boolean, default: !0 },
|
|
8
8
|
expanded: { type: Boolean, default: !1 }
|
|
9
9
|
};
|
|
10
|
-
const vt = X({
|
|
10
|
+
const vt = /* @__PURE__ */ X({
|
|
11
11
|
name: "FAccordion",
|
|
12
12
|
props: ma,
|
|
13
13
|
emits: [],
|
|
@@ -33,16 +33,16 @@ const vt = X({
|
|
|
33
33
|
title: { type: String, default: "" },
|
|
34
34
|
disable: { type: Boolean, default: !1 }
|
|
35
35
|
};
|
|
36
|
-
const ht = X({
|
|
36
|
+
const ht = /* @__PURE__ */ X({
|
|
37
37
|
name: "FAccordionItem",
|
|
38
38
|
props: ya,
|
|
39
39
|
emits: [],
|
|
40
40
|
setup(e, n) {
|
|
41
|
-
const t =
|
|
41
|
+
const t = v(e.title), o = v(!1), l = v(!1);
|
|
42
42
|
function u() {
|
|
43
43
|
o.value = !o.value;
|
|
44
44
|
}
|
|
45
|
-
function s(
|
|
45
|
+
function s(h) {
|
|
46
46
|
u();
|
|
47
47
|
}
|
|
48
48
|
const r = b(() => ({
|
|
@@ -55,11 +55,11 @@ const ht = X({
|
|
|
55
55
|
"f-accordion-collapse": !o.value,
|
|
56
56
|
"f-accordion-expand": o.value
|
|
57
57
|
})), c = b(() => {
|
|
58
|
-
const
|
|
58
|
+
const h = {
|
|
59
59
|
transition: "height 0.36s ease 0s",
|
|
60
60
|
height: o.value ? `${e.height}px` : 0
|
|
61
61
|
};
|
|
62
|
-
return o.value || (
|
|
62
|
+
return o.value || (h.overflow = "hidden"), h;
|
|
63
63
|
});
|
|
64
64
|
return () => a("div", {
|
|
65
65
|
class: r.value
|
|
@@ -85,18 +85,45 @@ const ht = X({
|
|
|
85
85
|
e.component(vt.name, vt), e.component(ht.name, ht);
|
|
86
86
|
}
|
|
87
87
|
}, wa = {
|
|
88
|
+
/**
|
|
89
|
+
* 头像宽度
|
|
90
|
+
*/
|
|
88
91
|
avatarWidth: { type: Number, default: 100 },
|
|
92
|
+
/**
|
|
93
|
+
* 头像高度
|
|
94
|
+
*/
|
|
89
95
|
avatarHeight: { type: Number, default: 100 },
|
|
96
|
+
/**
|
|
97
|
+
* 组件标识
|
|
98
|
+
*/
|
|
90
99
|
cover: { type: String },
|
|
100
|
+
/**
|
|
101
|
+
* 只读
|
|
102
|
+
*/
|
|
91
103
|
readonly: { type: Boolean, default: !1 },
|
|
104
|
+
/**
|
|
105
|
+
* 头像形状
|
|
106
|
+
*/
|
|
92
107
|
shape: { type: String, default: "circle" },
|
|
108
|
+
/**
|
|
109
|
+
* 头像最大尺寸, 单位MB
|
|
110
|
+
*/
|
|
93
111
|
maxSize: { type: Number, default: 1 },
|
|
112
|
+
/**
|
|
113
|
+
* 组件值
|
|
114
|
+
*/
|
|
94
115
|
modelValue: { type: String, default: "" },
|
|
116
|
+
/**
|
|
117
|
+
* 头像标题
|
|
118
|
+
*/
|
|
95
119
|
tile: { type: String, default: "" },
|
|
120
|
+
/**
|
|
121
|
+
* 支持的头像类型
|
|
122
|
+
*/
|
|
96
123
|
type: { type: Array, default: [] }
|
|
97
124
|
};
|
|
98
125
|
function xa(e, n, t, o) {
|
|
99
|
-
const l = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAwICQoJBwwKCQoNDAwOER0TERAQESMZGxUdKiUsKyklKCguNEI4LjE/MigoOk46P0RHSktKLTdRV1FIVkJJSkf/2wBDAQwNDREPESITEyJHMCgwR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAEsASwDASIAAhEBAxEB/8QAGgABAQEBAQEBAAAAAAAAAAAAAAECAwQFB//EADMQAQEAAQEECAQGAgMBAAAAAAABAhEDITFBBBRRUmFxgaESkcHwEyIysdHhM3IjQvE0/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAXEQEBAQEAAAAAAAAAAAAAAAAAEQEh/9oADAMBAAIRAxEAPwD9BBYqCiyAGhougIqyGgEhIui6AyuixdATQ0WQA0BdA4houhoCaGgugMrouhoCaJoum80BNDRdDQGTRbEBNCxdDQGTRUBE0asQGRTQGTT71WxNPP5AugqyACyAC6dpIsgGgshoBISKAiroQDQ0OSyAgoBoaABoaABomigJTRQGV0XRATRGizUGRSwGdEsaqAljLQDOiNWJQZNJ4KffEFIRYAsFkAkFkAJFFkAkNCLIAAAC6AguhoCCl3TW2TzugIHx4S788Z6wmWN4ZY3ysoA1pu+qAgpYCAAaIoDIoCaJZvVAQ03LUBlGqWAzYmimn3vAaRYA1IkWASKKACgirIgAsgBoBdJNbZNN9t3aeIHNw2vSccbZhPxLN27dJ68/Rx222u1/LjbNn8vi/ieHPm58N03SKN5bfa58c7jOzHd78XOyXfd98bqoCaScp8jSdk+SgLjlljdccssfK12w6TlN2cmXjN1/iuAD34Z47Sa43XTjLus82nz5bjl8WNss4WPXsNtNpNLuzk3zlZ2wHUsBBF5CAFgAhouiUGRUBErSAyffFamgKqKCqkUBYcgBpADiuhoAKeYA8fStp8WX4WPCfq8b2eT1bXObPZZZ8bJrJ23lHz5rpvutu+3tvOqAAAAAAAACy3HKZY3Sy6yoA+hs85tMJlN2vGdlaeTomem0+C/9pu849SAKlARQERrkgJUWoCUVKDIqb/ugqxFBVRQFFBFABRAUAHn6bl+XDGc7bfT/ANeV26XddvJ2Yz3tcVAAAAAAAAAAFxy+HKZTjLq+l+z5j6Gzuuywt54z9jRoEQAARSoCCoCIqAIJQaCLzBZxCAKC8wIAChOIAADxdL/+i/6z6uTt0yabfXtxnta4qAAAAAAAAAAD37H/AAbP/WPBwfQ2c02WE7MYaNAIIoAhzCggHMEqaNIDNPviHoAsRqcAFSKC8iIoHNUAUAAAHl6ZPzbPLtln1ed7el467DXu2X0+68SgAAAAAAAAABpru7bo+npy7Po8HR8fi2+M46XW+Ue4ABAAAQAQUvAEvBL6BQS8U3feqpv7fcFnBUUBUUBScQFRUBQAAATKTLG43nLL6vnaWWy8ZdL5x9J4ulY/DtrZwymvrzUcgAAAAAAAANdwPT0LH9Wd8MZ+9elnY4fh7HHG8prfOtIAABQAQAKi1AE5KlBD09hPl7gKjUAVFBeYTiAqKgKAAAA5dKw+PY2ya5Y/mn19nVQfMG9th+HtbjOF3zyrCgAAAAAA6dHw+PbSWfln5r6Ob29Gw+DZS2fmy33y5T6g7cbreaAgAAAAgqAcgqfIBOapQSnr7lPS/IEaScAFVFgKIoKioCgAABgADj0nZ/HstZvyx3zxnN4+T6b52ePw7TLGcJbIoyAAAAADex2f4m1mN1+Gb75Tl9H0PbweboeOmGWXO3T0n/r0AAIAAAACKgHJFpyBEpyARFT74gKnNQVeaRQF5IoKTiigCKAAACZWY4/FlZMZxt3SAvnuna+dnlM8885wyts8nXb9I/Elw2e7G7rleN8J4ePNxUAAAAAAeroeUuFx7LrPKvQ+djlcMpljdLHs2W3x2k0/Tl2W8fLtB1C8ewQAAEUBDmt4oBeJeCAIUARFvBN3gByVAFUIChzWcAOSpGdpnjs5rnlMdeHbfKcwb58x5c+l23TZ7P1y3e0+rldvtcuO0snZjJFHvtmM1ysnjbpHHLpOyx3TK5eGM1eKyW63W3tt1UHfPpeV3YYTGduW+/JwyuWd1zyuVnDXhPKcgAAAAAAAAAAB0w2+0w3TKZTsy3+7tj0vG/rxyxvbN8eUB9DDa7PP9OeNvZrpfdu8OD5mkvGNY55Y/pzyx8ruIPePJj0nazj8OU8ZpfZ1w6Ts8rJlrhfHfPmg7FKgAF4AgVARPW/NanoAsZaBVlZUFVF4g57fbfhY7pLld0l/e+EeO23K5ZW5ZXjb97o1tcvj22WXHS/DPKMqAAAAAAAAAAAAAAAAAAAAAAOux212d0ttwvGdnjHr3ceMfPevo2XxbLTu3T0B1TmHJAZVOYF4p98xPviBFScQGlRZxBdS3TG3slvsibS/8WX+t/YHhx/TPGaqk4TyVQAAAAAAAAAAAAAAAAAAAAAAd+iX82c7ZL9/Nwdui/5b/rfoD00vARAQqAhfvcVNfL3A1WMqDSxmVQVNr/iz4/pv7LDOXLDLGcbNPDeDxTh6DtOjZaafFju816tlf+2Puo4Dv1bPvY+51bLvY+5RwHfq2Xex9zquXex9yjgO/Vcu9j7nVc+9j7lHAd+q597H3Oq597H3BwHfqufex9zqufex9yjgO/Vc+9j7nVc+9j7lHAd+q597H3Oq597H3KOA79Vz72PudVz72PuUcB36rl3sfc6rn3sfco4DvejZd7H3OrZd7H3KOA79Wy72PudWz72PuDg7dG/y3/W/Q6tl3sfdvY7K7PO25S6yzSdoOqWlEBmhaBamt+6J6AnmqaqDQy0CxYyoNCKC6m/VAGhPJdQBOSgKi6+QGu41QBRAF1LUABbUABNdAVOYUC0tE13gIWloCcTXeloFQLQTmffMtT74gixOa6gqysrzBVSVQVdWdQGpRNV1BV10SUlBYIvIF1E1Ne0F5iAKIAohaCmqWgBaapqC2ohqC6pqWoC2paa70tAqCACACa+F+RanyAWJ/a8vkAuqT6fVf7AVOz0X+AXVYh2egNSifx9T+wVWefyX+PqCyrqn807PQFEn0+p/YKH9H37gAc/kC6onL0P5BRP6OV8vqC2of2l/gAOSAuqan9J/AKmon9AUtL9PqnP1oCWl5ehfv5gh635nP1qWg//Z", u =
|
|
126
|
+
const l = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAwICQoJBwwKCQoNDAwOER0TERAQESMZGxUdKiUsKyklKCguNEI4LjE/MigoOk46P0RHSktKLTdRV1FIVkJJSkf/2wBDAQwNDREPESITEyJHMCgwR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAEsASwDASIAAhEBAxEB/8QAGgABAQEBAQEBAAAAAAAAAAAAAAECAwQFB//EADMQAQEAAQEECAQGAgMBAAAAAAABAhEDITFBBBRRUmFxgaESkcHwEyIysdHhM3IjQvE0/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAXEQEBAQEAAAAAAAAAAAAAAAAAEQEh/9oADAMBAAIRAxEAPwD9BBYqCiyAGhougIqyGgEhIui6AyuixdATQ0WQA0BdA4houhoCaGgugMrouhoCaJoum80BNDRdDQGTRbEBNCxdDQGTRUBE0asQGRTQGTT71WxNPP5AugqyACyAC6dpIsgGgshoBISKAiroQDQ0OSyAgoBoaABoaABomigJTRQGV0XRATRGizUGRSwGdEsaqAljLQDOiNWJQZNJ4KffEFIRYAsFkAkFkAJFFkAkNCLIAAAC6AguhoCCl3TW2TzugIHx4S788Z6wmWN4ZY3ysoA1pu+qAgpYCAAaIoDIoCaJZvVAQ03LUBlGqWAzYmimn3vAaRYA1IkWASKKACgirIgAsgBoBdJNbZNN9t3aeIHNw2vSccbZhPxLN27dJ68/Rx222u1/LjbNn8vi/ieHPm58N03SKN5bfa58c7jOzHd78XOyXfd98bqoCaScp8jSdk+SgLjlljdccssfK12w6TlN2cmXjN1/iuAD34Z47Sa43XTjLus82nz5bjl8WNss4WPXsNtNpNLuzk3zlZ2wHUsBBF5CAFgAhouiUGRUBErSAyffFamgKqKCqkUBYcgBpADiuhoAKeYA8fStp8WX4WPCfq8b2eT1bXObPZZZ8bJrJ23lHz5rpvutu+3tvOqAAAAAAAACy3HKZY3Sy6yoA+hs85tMJlN2vGdlaeTomem0+C/9pu849SAKlARQERrkgJUWoCUVKDIqb/ugqxFBVRQFFBFABRAUAHn6bl+XDGc7bfT/ANeV26XddvJ2Yz3tcVAAAAAAAAAAFxy+HKZTjLq+l+z5j6Gzuuywt54z9jRoEQAARSoCCoCIqAIJQaCLzBZxCAKC8wIAChOIAADxdL/+i/6z6uTt0yabfXtxnta4qAAAAAAAAAAD37H/AAbP/WPBwfQ2c02WE7MYaNAIIoAhzCggHMEqaNIDNPviHoAsRqcAFSKC8iIoHNUAUAAAHl6ZPzbPLtln1ed7el467DXu2X0+68SgAAAAAAAAABpru7bo+npy7Po8HR8fi2+M46XW+Ue4ABAAAQAQUvAEvBL6BQS8U3feqpv7fcFnBUUBUUBScQFRUBQAAATKTLG43nLL6vnaWWy8ZdL5x9J4ulY/DtrZwymvrzUcgAAAAAAAANdwPT0LH9Wd8MZ+9elnY4fh7HHG8prfOtIAABQAQAKi1AE5KlBD09hPl7gKjUAVFBeYTiAqKgKAAAA5dKw+PY2ya5Y/mn19nVQfMG9th+HtbjOF3zyrCgAAAAAA6dHw+PbSWfln5r6Ob29Gw+DZS2fmy33y5T6g7cbreaAgAAAAgqAcgqfIBOapQSnr7lPS/IEaScAFVFgKIoKioCgAABgADj0nZ/HstZvyx3zxnN4+T6b52ePw7TLGcJbIoyAAAAADex2f4m1mN1+Gb75Tl9H0PbweboeOmGWXO3T0n/r0AAIAAAACKgHJFpyBEpyARFT74gKnNQVeaRQF5IoKTiigCKAAACZWY4/FlZMZxt3SAvnuna+dnlM8885wyts8nXb9I/Elw2e7G7rleN8J4ePNxUAAAAAAeroeUuFx7LrPKvQ+djlcMpljdLHs2W3x2k0/Tl2W8fLtB1C8ewQAAEUBDmt4oBeJeCAIUARFvBN3gByVAFUIChzWcAOSpGdpnjs5rnlMdeHbfKcwb58x5c+l23TZ7P1y3e0+rldvtcuO0snZjJFHvtmM1ysnjbpHHLpOyx3TK5eGM1eKyW63W3tt1UHfPpeV3YYTGduW+/JwyuWd1zyuVnDXhPKcgAAAAAAAAAAB0w2+0w3TKZTsy3+7tj0vG/rxyxvbN8eUB9DDa7PP9OeNvZrpfdu8OD5mkvGNY55Y/pzyx8ruIPePJj0nazj8OU8ZpfZ1w6Ts8rJlrhfHfPmg7FKgAF4AgVARPW/NanoAsZaBVlZUFVF4g57fbfhY7pLld0l/e+EeO23K5ZW5ZXjb97o1tcvj22WXHS/DPKMqAAAAAAAAAAAAAAAAAAAAAAOux212d0ttwvGdnjHr3ceMfPevo2XxbLTu3T0B1TmHJAZVOYF4p98xPviBFScQGlRZxBdS3TG3slvsibS/8WX+t/YHhx/TPGaqk4TyVQAAAAAAAAAAAAAAAAAAAAAAd+iX82c7ZL9/Nwdui/5b/rfoD00vARAQqAhfvcVNfL3A1WMqDSxmVQVNr/iz4/pv7LDOXLDLGcbNPDeDxTh6DtOjZaafFju816tlf+2Puo4Dv1bPvY+51bLvY+5RwHfq2Xex9zquXex9yjgO/Vcu9j7nVc+9j7lHAd+q597H3Oq597H3BwHfqufex9zqufex9yjgO/Vc+9j7nVc+9j7lHAd+q597H3Oq597H3KOA79Vz72PudVz72PuUcB36rl3sfc6rn3sfco4DvejZd7H3OrZd7H3KOA79Wy72PudWz72PuDg7dG/y3/W/Q6tl3sfdvY7K7PO25S6yzSdoOqWlEBmhaBamt+6J6AnmqaqDQy0CxYyoNCKC6m/VAGhPJdQBOSgKi6+QGu41QBRAF1LUABbUABNdAVOYUC0tE13gIWloCcTXeloFQLQTmffMtT74gixOa6gqysrzBVSVQVdWdQGpRNV1BV10SUlBYIvIF1E1Ne0F5iAKIAohaCmqWgBaapqC2ohqC6pqWoC2paa70tAqCACACa+F+RanyAWJ/a8vkAuqT6fVf7AVOz0X+AXVYh2egNSifx9T+wVWefyX+PqCyrqn807PQFEn0+p/YKH9H37gAc/kC6onL0P5BRP6OV8vqC2of2l/gAOSAuqan9J/AKmon9AUtL9PqnP1oCWl5ehfv5gh635nP1qWg//Z", u = v(e.readonly);
|
|
100
127
|
function s(i) {
|
|
101
128
|
return i.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/) != null;
|
|
102
129
|
}
|
|
@@ -115,12 +142,12 @@ function xa(e, n, t, o) {
|
|
|
115
142
|
const i = o.value || e.cover || l;
|
|
116
143
|
return s(i) || r(i) ? i : d(i);
|
|
117
144
|
}), c = b(() => u.value ? "" : e.tile);
|
|
118
|
-
function
|
|
145
|
+
function h() {
|
|
119
146
|
u.value || t && t.value && t.value.click();
|
|
120
147
|
}
|
|
121
|
-
return { acceptTypes: f, imageSource: p, imageTitle: c, onClickImage:
|
|
148
|
+
return { acceptTypes: f, imageSource: p, imageTitle: c, onClickImage: h };
|
|
122
149
|
}
|
|
123
|
-
const pt = X({
|
|
150
|
+
const pt = /* @__PURE__ */ X({
|
|
124
151
|
name: "FAvatar",
|
|
125
152
|
props: wa,
|
|
126
153
|
emits: ["change", "update:modelValue"],
|
|
@@ -130,7 +157,7 @@ const pt = X({
|
|
|
130
157
|
"f-avatar-readonly": e.readonly,
|
|
131
158
|
"f-avatar-circle": e.shape === "circle",
|
|
132
159
|
"f-avatar-square": e.shape === "square"
|
|
133
|
-
})), o =
|
|
160
|
+
})), o = v(e.modelValue), l = b(() => ({
|
|
134
161
|
width: e.avatarWidth + "px",
|
|
135
162
|
height: e.avatarHeight + "px"
|
|
136
163
|
})), u = !1;
|
|
@@ -139,7 +166,7 @@ const pt = X({
|
|
|
139
166
|
}
|
|
140
167
|
function r() {
|
|
141
168
|
}
|
|
142
|
-
const d =
|
|
169
|
+
const d = v(null), {
|
|
143
170
|
acceptTypes: f,
|
|
144
171
|
imageSource: p,
|
|
145
172
|
onClickImage: c
|
|
@@ -172,9 +199,21 @@ const pt = X({
|
|
|
172
199
|
e.component(pt.name, pt);
|
|
173
200
|
}
|
|
174
201
|
}, ka = {
|
|
202
|
+
/**
|
|
203
|
+
* 组件标识
|
|
204
|
+
*/
|
|
175
205
|
id: String,
|
|
206
|
+
/**
|
|
207
|
+
* 设置按钮类型
|
|
208
|
+
*/
|
|
176
209
|
type: { type: String, default: "primary" },
|
|
210
|
+
/**
|
|
211
|
+
* 是否禁用
|
|
212
|
+
*/
|
|
177
213
|
disabled: { type: Boolean, default: !1 },
|
|
214
|
+
/**
|
|
215
|
+
* 按钮尺寸
|
|
216
|
+
*/
|
|
178
217
|
size: { type: String, default: "small" }
|
|
179
218
|
};
|
|
180
219
|
function Sa(e, n) {
|
|
@@ -185,39 +224,85 @@ function Sa(e, n) {
|
|
|
185
224
|
onClickButton: t
|
|
186
225
|
};
|
|
187
226
|
}
|
|
188
|
-
const gt = X({
|
|
227
|
+
const gt = /* @__PURE__ */ X({
|
|
189
228
|
name: "FButton",
|
|
190
229
|
props: ka,
|
|
191
230
|
emits: ["click"],
|
|
192
231
|
setup(e, n) {
|
|
193
232
|
const {
|
|
194
233
|
onClickButton: t
|
|
195
|
-
} = Sa(e, n)
|
|
234
|
+
} = Sa(e, n), o = v(e.size), l = v(e.type), u = v(e.disabled), s = b(() => {
|
|
235
|
+
const r = {
|
|
236
|
+
btn: !0,
|
|
237
|
+
"btn-lg": o.value === "large",
|
|
238
|
+
"btn-sm": o.value !== "large"
|
|
239
|
+
};
|
|
240
|
+
return l.value && (r[`btn-${l.value}`] = !0), r;
|
|
241
|
+
});
|
|
196
242
|
return () => a("button", {
|
|
197
|
-
class:
|
|
198
|
-
disabled:
|
|
199
|
-
onClick: (
|
|
243
|
+
class: s.value,
|
|
244
|
+
disabled: u.value,
|
|
245
|
+
onClick: (r) => t(r)
|
|
200
246
|
}, [n.slots.default && n.slots.default()]);
|
|
201
247
|
}
|
|
202
248
|
}), _a = {
|
|
249
|
+
/**
|
|
250
|
+
* 组件标识
|
|
251
|
+
*/
|
|
203
252
|
id: String,
|
|
253
|
+
/**
|
|
254
|
+
* 横向纠正的参照
|
|
255
|
+
*/
|
|
204
256
|
rectifyReferenceH: { type: Object },
|
|
257
|
+
/**
|
|
258
|
+
* 纵向纠正的参照
|
|
259
|
+
*/
|
|
205
260
|
rectifyReferenceV: { type: Object },
|
|
261
|
+
/**
|
|
262
|
+
* 是否自动纠正位置
|
|
263
|
+
*/
|
|
206
264
|
autoRectify: { type: Boolean, default: !1 },
|
|
265
|
+
/**
|
|
266
|
+
* 计算方向的真正placement
|
|
267
|
+
*/
|
|
207
268
|
realPlacement: { type: String, default: "bottom-right" },
|
|
269
|
+
/**
|
|
270
|
+
* 重新计算后的placement
|
|
271
|
+
*/
|
|
208
272
|
rectifyPlacement: { type: String, default: "bottom-right" },
|
|
273
|
+
/**
|
|
274
|
+
* 按钮信息
|
|
275
|
+
*/
|
|
209
276
|
data: { type: Array },
|
|
277
|
+
/**
|
|
278
|
+
* 显示的按钮数量 默认为2
|
|
279
|
+
*/
|
|
210
280
|
count: { type: Number, default: 2 },
|
|
281
|
+
/**
|
|
282
|
+
* 按钮大小
|
|
283
|
+
*/
|
|
211
284
|
size: { type: String, default: "small" },
|
|
285
|
+
/**
|
|
286
|
+
* 按钮样式
|
|
287
|
+
*/
|
|
212
288
|
type: { type: String, default: "primary" },
|
|
289
|
+
/**
|
|
290
|
+
* 按钮展示位置
|
|
291
|
+
*/
|
|
213
292
|
placement: { type: String, default: "bottom" },
|
|
293
|
+
/**
|
|
294
|
+
* 下拉面板显示
|
|
295
|
+
*/
|
|
214
296
|
showPanel: { type: Boolean, default: !1 },
|
|
297
|
+
/**
|
|
298
|
+
* 下拉面板显示标志
|
|
299
|
+
*/
|
|
215
300
|
dpFlag: { type: Boolean, default: !1 }
|
|
216
301
|
};
|
|
217
302
|
function Aa(e, n, t, o) {
|
|
218
303
|
let l = 0, u = 0;
|
|
219
|
-
const s =
|
|
220
|
-
let
|
|
304
|
+
const s = v(e.showPanel), r = v(e.realPlacement);
|
|
305
|
+
let d = !1;
|
|
221
306
|
function f() {
|
|
222
307
|
t.value && document.body.appendChild(t.value);
|
|
223
308
|
}
|
|
@@ -227,7 +312,7 @@ function Aa(e, n, t, o) {
|
|
|
227
312
|
function c() {
|
|
228
313
|
s.value = !1;
|
|
229
314
|
}
|
|
230
|
-
function
|
|
315
|
+
function h() {
|
|
231
316
|
s.value && !d && setTimeout(() => {
|
|
232
317
|
s.value && !d && (c(), d = !1);
|
|
233
318
|
}, 1e3);
|
|
@@ -259,7 +344,7 @@ function Aa(e, n, t, o) {
|
|
|
259
344
|
if (!e.autoRectify)
|
|
260
345
|
return;
|
|
261
346
|
const _ = w(), C = r;
|
|
262
|
-
C.value.indexOf("bottom") > -1 ? u > _.bottom - T.bottom && (C.value = C.value.replace("bottom", "top")) : C.value.indexOf("top") > -1 && u > T.top - _.top && (C.value = C.value.replace("top", "bottom")), C.value.indexOf("left") > -1 ? l > T.left - _.left && (C.value = C.value.replace("left", "right")) : C.value.indexOf("right") > -1 && l > _.right - T.right && (C.value = C.value.replace("right", "left")), r = C;
|
|
347
|
+
C.value.indexOf("bottom") > -1 ? u > _.bottom - T.bottom && (C.value = C.value.replace("bottom", "top")) : C.value.indexOf("top") > -1 && u > T.top - _.top && (C.value = C.value.replace("top", "bottom")), C.value.indexOf("left") > -1 ? l > T.left - _.left && (C.value = C.value.replace("left", "right")) : C.value.indexOf("right") > -1 && l > _.right - T.right && (C.value = C.value.replace("right", "left")), r.value = C.value;
|
|
263
348
|
}
|
|
264
349
|
function k(T) {
|
|
265
350
|
let _ = "";
|
|
@@ -304,23 +389,23 @@ function Aa(e, n, t, o) {
|
|
|
304
389
|
toggle: x,
|
|
305
390
|
getRealPlacement: P,
|
|
306
391
|
bindMenuMouseenter: m,
|
|
307
|
-
unbindMenuMouseleave:
|
|
392
|
+
unbindMenuMouseleave: h,
|
|
308
393
|
bindMenuMouseleave: A
|
|
309
394
|
};
|
|
310
395
|
}
|
|
311
|
-
const mt = X({
|
|
396
|
+
const mt = /* @__PURE__ */ X({
|
|
312
397
|
name: "FButtonGroup",
|
|
313
398
|
props: _a,
|
|
314
399
|
emits: ["click", "changeState", "change", "clickMenuOut"],
|
|
315
400
|
setup(e, n) {
|
|
316
|
-
const t = e.data && e.data.slice(0, e.count) || [], o = e.data && e.data.slice(e.count) || [], l =
|
|
401
|
+
const t = e.data && e.data.slice(0, e.count) || [], o = e.data && e.data.slice(e.count) || [], l = v(), u = v(), {
|
|
317
402
|
showPanel: s,
|
|
318
403
|
clickEvent: r,
|
|
319
404
|
toggle: d,
|
|
320
405
|
getRealPlacement: f,
|
|
321
406
|
bindMenuMouseenter: p,
|
|
322
407
|
unbindMenuMouseleave: c,
|
|
323
|
-
bindMenuMouseleave:
|
|
408
|
+
bindMenuMouseleave: h
|
|
324
409
|
} = Aa(e, n, l, u);
|
|
325
410
|
return f(e.placement), () => a("div", {
|
|
326
411
|
class: "f-btn-group"
|
|
@@ -333,7 +418,7 @@ const mt = X({
|
|
|
333
418
|
class: "btn btn-link btn-icontext" + (i.disabled ? " disabled" : ""),
|
|
334
419
|
onClick: (m) => d(m, i)
|
|
335
420
|
}, [a("i", {
|
|
336
|
-
class:
|
|
421
|
+
class: `f-icon ${i.icon ? i.icon : ""}`
|
|
337
422
|
}, null)]), !i.icon && a("button", {
|
|
338
423
|
id: i.id,
|
|
339
424
|
class: "btn " + (i.type ? "btn-" + i.type : "btn-link") + " " + (i.type && i.type !== "link" ? "f-btn-ml" : "") + (i.disabled ? " disabled" : ""),
|
|
@@ -354,11 +439,11 @@ const mt = X({
|
|
|
354
439
|
class: "dropdown-menu f-btn-group-dropdown-menu" + (s.value ? " show" : ""),
|
|
355
440
|
style: "position:fixed;",
|
|
356
441
|
onMouseenter: (i) => p(),
|
|
357
|
-
onMouseleave: (i) =>
|
|
442
|
+
onMouseleave: (i) => h()
|
|
358
443
|
}, [o.map((i) => a("div", null, [a("div", null, [i.divider && a("div", {
|
|
359
444
|
class: "dropdown-divider"
|
|
360
445
|
}, null), a("li", {
|
|
361
|
-
id:
|
|
446
|
+
id: i.id,
|
|
362
447
|
class: "dropdown-item" + (i.disabled ? " disabled" : ""),
|
|
363
448
|
onClick: (m) => d(m, i)
|
|
364
449
|
}, [i.icon && a("i", {
|
|
@@ -370,23 +455,77 @@ const mt = X({
|
|
|
370
455
|
e.component(gt.name, gt), e.component(mt.name, mt);
|
|
371
456
|
}
|
|
372
457
|
}, Pa = {
|
|
458
|
+
/**
|
|
459
|
+
* 组件标识
|
|
460
|
+
*/
|
|
373
461
|
id: String,
|
|
462
|
+
/**
|
|
463
|
+
* 扩展按钮显示内容,这是一段现在扩展按钮中的html标签
|
|
464
|
+
*/
|
|
374
465
|
buttonContent: { type: String, default: '<i class="f-icon f-icon-lookup"></i>' },
|
|
466
|
+
/**
|
|
467
|
+
* 启用输入框自动完成功能
|
|
468
|
+
*/
|
|
375
469
|
autoComplete: { type: Boolean, default: !1 },
|
|
470
|
+
/**
|
|
471
|
+
* 组件自定义样式
|
|
472
|
+
*/
|
|
376
473
|
customClass: { type: String, default: "" },
|
|
474
|
+
/**
|
|
475
|
+
* 禁用组件,既不允许在输入框中录入,也不允许点击扩展按钮。
|
|
476
|
+
*/
|
|
377
477
|
disable: { type: Boolean, default: !1 },
|
|
478
|
+
/**
|
|
479
|
+
* 允许在输入框中录入文本。
|
|
480
|
+
*/
|
|
378
481
|
editable: { type: Boolean, default: !0 },
|
|
482
|
+
/**
|
|
483
|
+
* 显示清空文本按钮
|
|
484
|
+
*/
|
|
379
485
|
enableClear: { type: Boolean, default: !1 },
|
|
486
|
+
/**
|
|
487
|
+
* 组件值
|
|
488
|
+
*/
|
|
380
489
|
modelValue: { type: String, default: "" },
|
|
490
|
+
/**
|
|
491
|
+
* 将组件设置为只读,既不允许在输入框中录入,也不允许点击扩展按钮,但是允许复制输入框中的内容。
|
|
492
|
+
*/
|
|
381
493
|
readonly: { type: Boolean, default: !1 },
|
|
494
|
+
/**
|
|
495
|
+
* 文本对齐方式
|
|
496
|
+
*/
|
|
382
497
|
textAlign: { type: String, default: "left" },
|
|
498
|
+
/**
|
|
499
|
+
* 禁用组件时,是否显示扩展按钮
|
|
500
|
+
*/
|
|
383
501
|
showButtonWhenDisabled: { type: Boolean, default: !1 },
|
|
502
|
+
/**
|
|
503
|
+
* 显示输入框的标签
|
|
504
|
+
*/
|
|
384
505
|
enableTitle: { type: Boolean, default: !1 },
|
|
506
|
+
/**
|
|
507
|
+
* 输入框类型
|
|
508
|
+
*/
|
|
385
509
|
inputType: { type: String, default: "text" },
|
|
510
|
+
/**
|
|
511
|
+
* 显示输入框提示信息
|
|
512
|
+
*/
|
|
386
513
|
forcePlaceholder: { type: Boolean, default: !1 },
|
|
514
|
+
/**
|
|
515
|
+
* 输入框提示文本
|
|
516
|
+
*/
|
|
387
517
|
placeholder: { type: String, default: "" },
|
|
518
|
+
/**
|
|
519
|
+
* 输入框最小长度
|
|
520
|
+
*/
|
|
388
521
|
minLength: Number,
|
|
522
|
+
/**
|
|
523
|
+
* 输入框最大长度
|
|
524
|
+
*/
|
|
389
525
|
maxLength: Number,
|
|
526
|
+
/**
|
|
527
|
+
* 输入框Tab键索引
|
|
528
|
+
*/
|
|
390
529
|
tabIndex: Number
|
|
391
530
|
};
|
|
392
531
|
function Ba(e, n, t) {
|
|
@@ -436,7 +575,7 @@ function Vt(e, n, t, o) {
|
|
|
436
575
|
function c(S) {
|
|
437
576
|
r = !1, n.emit("blur", S), S.stopPropagation();
|
|
438
577
|
}
|
|
439
|
-
function
|
|
578
|
+
function h(S) {
|
|
440
579
|
n.emit("click", S);
|
|
441
580
|
}
|
|
442
581
|
function i(S) {
|
|
@@ -472,7 +611,7 @@ function Vt(e, n, t, o) {
|
|
|
472
611
|
textBoxTitle: l,
|
|
473
612
|
changeTextBoxValue: p,
|
|
474
613
|
onBlurTextBox: c,
|
|
475
|
-
onClickTextBox:
|
|
614
|
+
onClickTextBox: h,
|
|
476
615
|
onFocusTextBox: i,
|
|
477
616
|
onInput: m,
|
|
478
617
|
onKeyDownTextBox: w,
|
|
@@ -482,19 +621,19 @@ function Vt(e, n, t, o) {
|
|
|
482
621
|
};
|
|
483
622
|
}
|
|
484
623
|
function Ma(e, n, t, o, l) {
|
|
485
|
-
const u =
|
|
486
|
-
function d(
|
|
487
|
-
u.value =
|
|
624
|
+
const u = v(!1), s = b(() => e.enableClear && !e.readonly && !e.disable), { changeTextBoxValue: r } = Vt(e, n, t, l);
|
|
625
|
+
function d(h) {
|
|
626
|
+
u.value = h;
|
|
488
627
|
}
|
|
489
628
|
le(l, () => {
|
|
490
629
|
o.value ? d(!!l.value) : d(!1);
|
|
491
630
|
});
|
|
492
|
-
function f(
|
|
631
|
+
function f(h) {
|
|
493
632
|
const i = !e.readonly && !e.disable && e.editable, m = !e.editable;
|
|
494
|
-
|
|
633
|
+
h.stopPropagation(), (i || m) && (r("", !1), d(!u.value), n.emit("clear"));
|
|
495
634
|
}
|
|
496
|
-
function p(
|
|
497
|
-
if (
|
|
635
|
+
function p(h) {
|
|
636
|
+
if (s.value) {
|
|
498
637
|
if (!t.value) {
|
|
499
638
|
d(!1);
|
|
500
639
|
return;
|
|
@@ -502,8 +641,8 @@ function Ma(e, n, t, o, l) {
|
|
|
502
641
|
(!e.editable || !e.readonly) && !e.disable && d(!0);
|
|
503
642
|
}
|
|
504
643
|
}
|
|
505
|
-
function c(
|
|
506
|
-
|
|
644
|
+
function c(h) {
|
|
645
|
+
s.value && d(!1);
|
|
507
646
|
}
|
|
508
647
|
return {
|
|
509
648
|
enableClearButton: s,
|
|
@@ -515,12 +654,12 @@ function Ma(e, n, t, o, l) {
|
|
|
515
654
|
}
|
|
516
655
|
const Oa = {
|
|
517
656
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } }
|
|
518
|
-
}, $t = X({
|
|
657
|
+
}, $t = /* @__PURE__ */ X({
|
|
519
658
|
name: "FOverlay",
|
|
520
659
|
props: Oa,
|
|
521
660
|
emits: ["click"],
|
|
522
661
|
setup(e, n) {
|
|
523
|
-
const t =
|
|
662
|
+
const t = v(e.popupContentPosition);
|
|
524
663
|
function o(u) {
|
|
525
664
|
n.emit("click"), u.preventDefault(), u.stopPropagation();
|
|
526
665
|
}
|
|
@@ -544,20 +683,20 @@ const Oa = {
|
|
|
544
683
|
}
|
|
545
684
|
});
|
|
546
685
|
}
|
|
547
|
-
}), Ie = X({
|
|
686
|
+
}), Ie = /* @__PURE__ */ X({
|
|
548
687
|
name: "FButtonEdit",
|
|
549
688
|
props: Pa,
|
|
550
689
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
551
690
|
setup(e, n) {
|
|
552
|
-
const t =
|
|
691
|
+
const t = v(), o = v(e.modelValue), l = v(!1), {
|
|
553
692
|
buttonClass: u,
|
|
554
693
|
onClickButton: s,
|
|
555
694
|
onMouseEnterButton: r,
|
|
556
695
|
onMouseLeaveButton: d
|
|
557
|
-
} = Ba(e, n, l), f =
|
|
696
|
+
} = Ba(e, n, l), f = v(""), {
|
|
558
697
|
hasFocusedTextBox: p,
|
|
559
698
|
isTextBoxReadonly: c,
|
|
560
|
-
textBoxClass:
|
|
699
|
+
textBoxClass: h,
|
|
561
700
|
textBoxPlaceholder: i,
|
|
562
701
|
textBoxTitle: m,
|
|
563
702
|
onBlurTextBox: A,
|
|
@@ -584,7 +723,7 @@ const Oa = {
|
|
|
584
723
|
function D() {
|
|
585
724
|
l.value = !1;
|
|
586
725
|
}
|
|
587
|
-
const
|
|
726
|
+
const H = b(() => l.value), E = () => {
|
|
588
727
|
if (t.value) {
|
|
589
728
|
const M = t.value.getBoundingClientRect(), {
|
|
590
729
|
left: F,
|
|
@@ -617,7 +756,7 @@ const Oa = {
|
|
|
617
756
|
}, [a("input", {
|
|
618
757
|
name: "input-group-value",
|
|
619
758
|
autocomplete: "" + e.autoComplete,
|
|
620
|
-
class:
|
|
759
|
+
class: h.value,
|
|
621
760
|
disabled: e.disable,
|
|
622
761
|
maxlength: e.maxLength,
|
|
623
762
|
minlength: e.minLength,
|
|
@@ -648,8 +787,8 @@ const Oa = {
|
|
|
648
787
|
onMouseenter: r,
|
|
649
788
|
onMouseleave: d,
|
|
650
789
|
innerHTML: e.buttonContent
|
|
651
|
-
}, null)])])]),
|
|
652
|
-
"popup-content-position":
|
|
790
|
+
}, null)])])]), H.value && a($t, {
|
|
791
|
+
"popup-content-position": E(),
|
|
653
792
|
onClick: D
|
|
654
793
|
}, {
|
|
655
794
|
default: () => {
|
|
@@ -663,21 +802,58 @@ const Oa = {
|
|
|
663
802
|
e.component(Ie.name, Ie);
|
|
664
803
|
}
|
|
665
804
|
}, Da = {
|
|
805
|
+
/**
|
|
806
|
+
* 组件标识
|
|
807
|
+
*/
|
|
666
808
|
id: String,
|
|
809
|
+
/**
|
|
810
|
+
* 组件名称
|
|
811
|
+
*/
|
|
667
812
|
name: { type: String, default: "" },
|
|
813
|
+
/**
|
|
814
|
+
* 单选组枚举数组
|
|
815
|
+
*/
|
|
668
816
|
enumData: { type: Array, default: [] },
|
|
817
|
+
/**
|
|
818
|
+
* 枚举数组中展示文本的key值。
|
|
819
|
+
*/
|
|
669
820
|
textField: { type: String, default: "name" },
|
|
821
|
+
/**
|
|
822
|
+
* 枚举数组中枚举值的key值。
|
|
823
|
+
*/
|
|
670
824
|
valueField: { type: String, default: "value" },
|
|
825
|
+
/**
|
|
826
|
+
* 组件是否水平排列
|
|
827
|
+
*/
|
|
671
828
|
horizontal: { type: Boolean, default: !1 },
|
|
829
|
+
/**
|
|
830
|
+
* 禁用组件,不允许切换单选值
|
|
831
|
+
*/
|
|
672
832
|
disable: { type: Boolean, default: !1 },
|
|
833
|
+
/**
|
|
834
|
+
* 组件值,字符串或者数组
|
|
835
|
+
*/
|
|
673
836
|
modelValue: [String, Array],
|
|
837
|
+
/**
|
|
838
|
+
* 输入框Tab键索引
|
|
839
|
+
*/
|
|
674
840
|
tabIndex: { type: Number, default: 0 },
|
|
841
|
+
/**
|
|
842
|
+
* 分隔符,默认逗号
|
|
843
|
+
*/
|
|
675
844
|
separator: { type: String, default: "," },
|
|
845
|
+
/**
|
|
846
|
+
* 值类型是否为字符串
|
|
847
|
+
*/
|
|
676
848
|
isStringValue: { type: Boolean, default: !0 },
|
|
849
|
+
/**
|
|
850
|
+
* 异步获取枚举数组方法
|
|
851
|
+
*/
|
|
852
|
+
// loadData: () => Observable < { data: Array<Checkbox> } >
|
|
677
853
|
loadData: { type: Function }
|
|
678
854
|
};
|
|
679
855
|
function ja(e, n, t) {
|
|
680
|
-
const o = b(() => !e.disable), l =
|
|
856
|
+
const o = b(() => !e.disable), l = v(e.enumData);
|
|
681
857
|
function u(c) {
|
|
682
858
|
return c[e.valueField];
|
|
683
859
|
}
|
|
@@ -692,16 +868,16 @@ function ja(e, n, t) {
|
|
|
692
868
|
return e.isStringValue ? i.join(e.separator) : i;
|
|
693
869
|
}
|
|
694
870
|
function f(c) {
|
|
695
|
-
const
|
|
696
|
-
return r(t.value).some((m) => m ===
|
|
871
|
+
const h = String(u(c));
|
|
872
|
+
return r(t.value).some((m) => m === h);
|
|
697
873
|
}
|
|
698
|
-
function p(c,
|
|
874
|
+
function p(c, h) {
|
|
699
875
|
if (o.value) {
|
|
700
876
|
let i = r(t.value) || [];
|
|
701
877
|
const m = String(u(c));
|
|
702
878
|
!i || !i.length ? i.push(m) : i.some((A) => A === m) ? i = i.filter((A) => A !== m) : i.push(m), t.value = d(i), n.emit("changeValue", t.value), n.emit("update:modelValue", t.value);
|
|
703
879
|
}
|
|
704
|
-
|
|
880
|
+
h.stopPropagation();
|
|
705
881
|
}
|
|
706
882
|
return {
|
|
707
883
|
enumData: l,
|
|
@@ -711,12 +887,12 @@ function ja(e, n, t) {
|
|
|
711
887
|
onClickCheckbox: p
|
|
712
888
|
};
|
|
713
889
|
}
|
|
714
|
-
const yt = X({
|
|
890
|
+
const yt = /* @__PURE__ */ X({
|
|
715
891
|
name: "FCheckboxGroup",
|
|
716
892
|
props: Da,
|
|
717
893
|
emits: ["changeValue", "update:modelValue"],
|
|
718
894
|
setup(e, n) {
|
|
719
|
-
const t =
|
|
895
|
+
const t = v(e.modelValue), {
|
|
720
896
|
enumData: o,
|
|
721
897
|
onClickCheckbox: l,
|
|
722
898
|
getValue: u,
|
|
@@ -740,7 +916,7 @@ const yt = X({
|
|
|
740
916
|
checked: r(f),
|
|
741
917
|
disabled: e.disable,
|
|
742
918
|
tabindex: e.tabIndex,
|
|
743
|
-
onClick: (
|
|
919
|
+
onClick: (h) => l(f, h)
|
|
744
920
|
}, null), a("label", {
|
|
745
921
|
class: "custom-control-label",
|
|
746
922
|
for: c,
|
|
@@ -755,40 +931,160 @@ const yt = X({
|
|
|
755
931
|
};
|
|
756
932
|
var It = /* @__PURE__ */ ((e) => (e.Text = "text", e.Tag = "tag", e))(It || {}), Ae = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.auto = "auto", e))(Ae || {});
|
|
757
933
|
const Fa = {
|
|
934
|
+
/**
|
|
935
|
+
* 组件标识
|
|
936
|
+
*/
|
|
758
937
|
id: { type: String },
|
|
938
|
+
/**
|
|
939
|
+
* 可选,是否可编辑
|
|
940
|
+
* 默认`false`
|
|
941
|
+
*/
|
|
759
942
|
editable: { default: !1, type: Boolean },
|
|
943
|
+
/**
|
|
944
|
+
* 可选,是否禁用
|
|
945
|
+
* 默认为`false`
|
|
946
|
+
*/
|
|
760
947
|
disabled: { default: !1, type: Boolean },
|
|
948
|
+
/**
|
|
949
|
+
* 可选,是否只读
|
|
950
|
+
* 默认为`false`
|
|
951
|
+
*/
|
|
761
952
|
readonly: { default: !1, type: Boolean },
|
|
953
|
+
/**
|
|
954
|
+
* 最大输入长度
|
|
955
|
+
*/
|
|
762
956
|
maxLength: { type: Number },
|
|
957
|
+
/**
|
|
958
|
+
* 占位符
|
|
959
|
+
*/
|
|
763
960
|
placeholder: { type: String },
|
|
961
|
+
/**
|
|
962
|
+
* 可选,强制显示占位符
|
|
963
|
+
* 默认`false`
|
|
964
|
+
*/
|
|
764
965
|
forcePlaceholder: { default: !1, type: Boolean },
|
|
966
|
+
/**
|
|
967
|
+
* 可选,是否启用清空
|
|
968
|
+
* 默认启用
|
|
969
|
+
*/
|
|
765
970
|
enableClear: { default: !0, type: Boolean },
|
|
971
|
+
/**
|
|
972
|
+
* 可选,鼠标悬停时是否显示控件值
|
|
973
|
+
* 默认显示
|
|
974
|
+
*/
|
|
766
975
|
enableTitle: { default: !0, type: Boolean },
|
|
976
|
+
/**
|
|
977
|
+
* 可选,下拉列表值展示方式
|
|
978
|
+
* 支持text | tag,即文本或标签,默认为`ViewType.Text`,即文本方式`text`
|
|
979
|
+
*/
|
|
767
980
|
viewType: { default: It.Text, type: String },
|
|
981
|
+
/**
|
|
982
|
+
* 可选,字段映射
|
|
983
|
+
*/
|
|
768
984
|
mapFields: { type: Object },
|
|
985
|
+
/**
|
|
986
|
+
* 下拉数据源
|
|
987
|
+
*/
|
|
769
988
|
data: { type: Array },
|
|
989
|
+
/**
|
|
990
|
+
* 可选,数据源id字段
|
|
991
|
+
* 默认为`id`
|
|
992
|
+
*/
|
|
770
993
|
idField: { default: "id", type: String },
|
|
994
|
+
/**
|
|
995
|
+
* 可选,数据源值字段
|
|
996
|
+
* 默认为`id`
|
|
997
|
+
*/
|
|
771
998
|
valueField: { default: "id", type: String },
|
|
999
|
+
/**
|
|
1000
|
+
* 可选,数据源显示字段
|
|
1001
|
+
* 默认为`label`
|
|
1002
|
+
*/
|
|
772
1003
|
textField: { default: "label", type: String },
|
|
1004
|
+
/**
|
|
1005
|
+
* 可选,是否支持多选
|
|
1006
|
+
* 默认`false`
|
|
1007
|
+
*/
|
|
773
1008
|
multiSelect: { default: !1, type: Boolean },
|
|
1009
|
+
/**
|
|
1010
|
+
* 远端数据源信息
|
|
1011
|
+
*/
|
|
774
1012
|
remote: { default: null, type: Object },
|
|
1013
|
+
/**
|
|
1014
|
+
* 可选,最大高度
|
|
1015
|
+
* 默认`350`
|
|
1016
|
+
*/
|
|
775
1017
|
maxHeight: { default: 350, type: Number },
|
|
1018
|
+
/**
|
|
1019
|
+
* 可选,是否支持远端过滤
|
|
1020
|
+
* 默认`false`
|
|
1021
|
+
*/
|
|
776
1022
|
remoteSearch: { default: !1, type: Boolean },
|
|
1023
|
+
/**
|
|
1024
|
+
* 可选,清空值时隐藏面板
|
|
1025
|
+
* 默认`true`
|
|
1026
|
+
*/
|
|
777
1027
|
hidePanelOnClear: { default: !0, type: Boolean },
|
|
1028
|
+
/**
|
|
1029
|
+
* 可选,分隔符
|
|
1030
|
+
* 默认`,`
|
|
1031
|
+
*/
|
|
778
1032
|
separator: { default: ",", type: String },
|
|
1033
|
+
/**
|
|
1034
|
+
* 可选,展示文本
|
|
1035
|
+
* 默认为空字符串
|
|
1036
|
+
*/
|
|
779
1037
|
displayText: { type: String, default: "" },
|
|
1038
|
+
/**
|
|
1039
|
+
* 绑定值
|
|
1040
|
+
*/
|
|
780
1041
|
modelValue: { type: [String, Number] },
|
|
1042
|
+
/**
|
|
1043
|
+
* 可选,下拉图标
|
|
1044
|
+
* 默认为'<span class="f-icon f-icon-arrow-60-down"></span>'
|
|
1045
|
+
*/
|
|
781
1046
|
dropDownIcon: { type: String, default: '<span class="f-icon f-icon-arrow-60-down"></span>' },
|
|
1047
|
+
/**
|
|
1048
|
+
* tabIndex
|
|
1049
|
+
*/
|
|
782
1050
|
tabIndex: { type: Number, default: -1 },
|
|
1051
|
+
/**
|
|
1052
|
+
* 可选,启用搜索
|
|
1053
|
+
* 默认为`false`
|
|
1054
|
+
*/
|
|
783
1055
|
enableSearch: { type: Boolean, default: !1 },
|
|
1056
|
+
/**
|
|
1057
|
+
* 可选,下拉面板展示位置
|
|
1058
|
+
* 默认为`auto`
|
|
1059
|
+
*/
|
|
784
1060
|
placement: { type: String, default: Ae.auto }
|
|
785
|
-
},
|
|
1061
|
+
}, Ha = {
|
|
1062
|
+
/**
|
|
1063
|
+
* 必须,值
|
|
1064
|
+
*/
|
|
786
1065
|
value: { required: !0, type: [String, Number] },
|
|
1066
|
+
/**
|
|
1067
|
+
* 必须,名称
|
|
1068
|
+
*/
|
|
787
1069
|
name: { required: !0, type: [String, Number] },
|
|
1070
|
+
/**
|
|
1071
|
+
* 可选,是否禁用
|
|
1072
|
+
* 默认`false`
|
|
1073
|
+
*/
|
|
788
1074
|
disabled: { default: !1, type: Boolean },
|
|
1075
|
+
/**
|
|
1076
|
+
* 是否已经勾选
|
|
1077
|
+
*/
|
|
789
1078
|
checked: { default: !1, type: Boolean }
|
|
790
|
-
},
|
|
1079
|
+
}, Ea = {
|
|
1080
|
+
/**
|
|
1081
|
+
* 下拉面板是否可见
|
|
1082
|
+
*/
|
|
791
1083
|
isPanelVisible: { type: Boolean, default: !1 },
|
|
1084
|
+
/**
|
|
1085
|
+
* 可选,下拉列表展示位置
|
|
1086
|
+
* 默认为`bottom`
|
|
1087
|
+
*/
|
|
792
1088
|
position: { type: String, default: Ae.bottom }
|
|
793
1089
|
}, Ra = {
|
|
794
1090
|
options: {
|
|
@@ -797,7 +1093,7 @@ const Fa = {
|
|
|
797
1093
|
}, Re = Symbol("fComboList"), Gt = Symbol("fComboListPanel");
|
|
798
1094
|
var je = /* @__PURE__ */ ((e) => (e.clear = "clear", e.update = "update:modelValue", e))(je || {}), Oe = /* @__PURE__ */ ((e) => (e.panelShow = "panelShow", e.panelHidden = "panelHidden", e))(Oe || {});
|
|
799
1095
|
function Va(e, n) {
|
|
800
|
-
const t =
|
|
1096
|
+
const t = v(""), o = v(e.modelValue), l = v(!1), u = v();
|
|
801
1097
|
if (le([u], ([r]) => {
|
|
802
1098
|
if (e.modelValue) {
|
|
803
1099
|
const d = r.find((f) => f[e.valueField] === e.modelValue);
|
|
@@ -805,14 +1101,14 @@ function Va(e, n) {
|
|
|
805
1101
|
}
|
|
806
1102
|
}), e.remote) {
|
|
807
1103
|
const { url: r, method: d = "GET", headers: f = {}, body: p = null } = e.remote;
|
|
808
|
-
fetch(r, { method: d, headers: f, body: p }).then((
|
|
809
|
-
if (
|
|
810
|
-
return
|
|
811
|
-
throw new Error(
|
|
812
|
-
}).then((
|
|
813
|
-
u.value =
|
|
814
|
-
}).catch((
|
|
815
|
-
console.error(
|
|
1104
|
+
fetch(r, { method: d, headers: f, body: p }).then((h) => {
|
|
1105
|
+
if (h.status === 200)
|
|
1106
|
+
return h.json();
|
|
1107
|
+
throw new Error(h.statusText);
|
|
1108
|
+
}).then((h) => {
|
|
1109
|
+
u.value = h;
|
|
1110
|
+
}).catch((h) => {
|
|
1111
|
+
console.error(h);
|
|
816
1112
|
});
|
|
817
1113
|
} else
|
|
818
1114
|
u.value = e.data;
|
|
@@ -864,10 +1160,10 @@ function Ia() {
|
|
|
864
1160
|
};
|
|
865
1161
|
}
|
|
866
1162
|
function Ga(e, n) {
|
|
867
|
-
const t = De(Re, null), o = De(Gt, null), l =
|
|
1163
|
+
const t = De(Re, null), o = De(Gt, null), l = v(t == null ? void 0 : t.dataSource), u = (t == null ? void 0 : t.comboListProps.valueField) || "id", s = (t == null ? void 0 : t.comboListProps.textField) || "label", r = (t == null ? void 0 : t.comboListProps.separator) || ",", d = b(() => {
|
|
868
1164
|
var w;
|
|
869
1165
|
return t != null && t.modelValue ? e.value !== void 0 && ((w = t == null ? void 0 : t.modelValue) == null ? void 0 : w.toString().split(r).includes(e.value.toString())) : !1;
|
|
870
|
-
}), f = b(() => (t == null ? void 0 : t.comboListProps.multiSelect) || !1), p = b(() => e.name || e.value), c = t == null ? void 0 : t.defaultOptionSlot,
|
|
1166
|
+
}), f = b(() => (t == null ? void 0 : t.comboListProps.multiSelect) || !1), p = b(() => e.name || e.value), c = t == null ? void 0 : t.defaultOptionSlot, h = (w) => {
|
|
871
1167
|
var y, k;
|
|
872
1168
|
if (!e.disabled && e.value !== void 0)
|
|
873
1169
|
if (f.value) {
|
|
@@ -896,13 +1192,13 @@ function Ga(e, n) {
|
|
|
896
1192
|
isChecked: d,
|
|
897
1193
|
rowStyle: A,
|
|
898
1194
|
multiSelect: f,
|
|
899
|
-
onOptionClick:
|
|
1195
|
+
onOptionClick: h,
|
|
900
1196
|
defaultOptionSlot: c
|
|
901
1197
|
};
|
|
902
1198
|
}
|
|
903
|
-
const La = X({
|
|
1199
|
+
const La = /* @__PURE__ */ X({
|
|
904
1200
|
name: "FOption",
|
|
905
|
-
props:
|
|
1201
|
+
props: Ha,
|
|
906
1202
|
emits: [],
|
|
907
1203
|
setup(e, n) {
|
|
908
1204
|
const {
|
|
@@ -917,7 +1213,7 @@ const La = X({
|
|
|
917
1213
|
return () => a("li", {
|
|
918
1214
|
style: l.value,
|
|
919
1215
|
class: o.value,
|
|
920
|
-
onClick:
|
|
1216
|
+
onClick: Ht(s, ["prevent", "stop"])
|
|
921
1217
|
}, [u.value && a("div", {
|
|
922
1218
|
class: "custom-control custom-checkbox custom-control-inline",
|
|
923
1219
|
style: "margin:0;padding-right:0;float:none;vertical-align: top;"
|
|
@@ -927,7 +1223,7 @@ const La = X({
|
|
|
927
1223
|
title: "custom-input",
|
|
928
1224
|
disabled: e.disabled,
|
|
929
1225
|
"onUpdate:modelValue": (f) => r.value = f
|
|
930
|
-
}, null), [[
|
|
1226
|
+
}, null), [[Et, r.value]]), a("label", {
|
|
931
1227
|
class: "custom-control-label"
|
|
932
1228
|
}, null)]), a("span", {
|
|
933
1229
|
class: "f-datalist-item-text"
|
|
@@ -935,7 +1231,7 @@ const La = X({
|
|
|
935
1231
|
name: t.value
|
|
936
1232
|
}) : t.value])]);
|
|
937
1233
|
}
|
|
938
|
-
}), za = X({
|
|
1234
|
+
}), za = /* @__PURE__ */ X({
|
|
939
1235
|
name: "FOptions",
|
|
940
1236
|
props: Ra,
|
|
941
1237
|
emits: [],
|
|
@@ -957,13 +1253,13 @@ const La = X({
|
|
|
957
1253
|
}
|
|
958
1254
|
});
|
|
959
1255
|
function Ya(e) {
|
|
960
|
-
const { isPanelVisible: n, panelRef: t, context: o } = e, l = De(Re, null), u =
|
|
1256
|
+
const { isPanelVisible: n, panelRef: t, context: o } = e, l = De(Re, null), u = v((l == null ? void 0 : l.comboListProps.maxHeight) || 350), s = (l == null ? void 0 : l.comboListProps.valueField) || "id", r = (l == null ? void 0 : l.comboListProps.textField) || "label", d = (l == null ? void 0 : l.comboListProps.placement) || Ae.bottom, f = v(l == null ? void 0 : l.dataSource), p = v(l == null ? void 0 : l.dataSource), c = v(""), h = b(() => (l == null ? void 0 : l.comboListProps.enableSearch) || !1), i = b(() => ({
|
|
961
1257
|
"z-index": 99999,
|
|
962
1258
|
position: "absolute",
|
|
963
1259
|
background: "#fff",
|
|
964
1260
|
border: "solid 1px #ededed"
|
|
965
1261
|
})), m = b(() => ({
|
|
966
|
-
"max-height":
|
|
1262
|
+
"max-height": h.value ? u.value - 36 + "px" : u.value + "px",
|
|
967
1263
|
overflow: "auto",
|
|
968
1264
|
border: "none"
|
|
969
1265
|
})), A = b(() => ({
|
|
@@ -986,7 +1282,7 @@ function Ya(e) {
|
|
|
986
1282
|
var S, g;
|
|
987
1283
|
if (k && y) {
|
|
988
1284
|
const x = l == null ? void 0 : l.comboListRef, P = (g = (S = x == null ? void 0 : x.$el) == null ? void 0 : S.parentNode) == null ? void 0 : g.querySelector(".input-group");
|
|
989
|
-
if (
|
|
1285
|
+
if (h.value) {
|
|
990
1286
|
const _ = y.querySelector("input");
|
|
991
1287
|
_ && _.focus();
|
|
992
1288
|
}
|
|
@@ -1009,7 +1305,7 @@ function Ya(e) {
|
|
|
1009
1305
|
panelStyle: i,
|
|
1010
1306
|
panelClass: A,
|
|
1011
1307
|
cardStyle: m,
|
|
1012
|
-
enableSearch:
|
|
1308
|
+
enableSearch: h,
|
|
1013
1309
|
keyword: c,
|
|
1014
1310
|
items: f
|
|
1015
1311
|
};
|
|
@@ -1041,12 +1337,12 @@ function qa(e, n = 300) {
|
|
|
1041
1337
|
}, n);
|
|
1042
1338
|
};
|
|
1043
1339
|
}
|
|
1044
|
-
const Ua = X({
|
|
1340
|
+
const Ua = /* @__PURE__ */ X({
|
|
1045
1341
|
name: "FPanel",
|
|
1046
|
-
props:
|
|
1342
|
+
props: Ea,
|
|
1047
1343
|
emits: [Oe.panelHidden, Oe.panelShow],
|
|
1048
1344
|
setup(e, n) {
|
|
1049
|
-
const t =
|
|
1345
|
+
const t = v(), {
|
|
1050
1346
|
isPanelVisible: o
|
|
1051
1347
|
} = Rt(e), {
|
|
1052
1348
|
panelStyle: l,
|
|
@@ -1063,7 +1359,7 @@ const Ua = X({
|
|
|
1063
1359
|
}), {
|
|
1064
1360
|
onPanelContainerClick: p,
|
|
1065
1361
|
onPanelItemClick: c,
|
|
1066
|
-
onSearchClick:
|
|
1362
|
+
onSearchClick: h,
|
|
1067
1363
|
onPanelClick: i
|
|
1068
1364
|
} = Ka({
|
|
1069
1365
|
panelRef: t,
|
|
@@ -1079,14 +1375,14 @@ const Ua = X({
|
|
|
1079
1375
|
class: u.value,
|
|
1080
1376
|
ref: t,
|
|
1081
1377
|
style: l.value,
|
|
1082
|
-
onClick:
|
|
1378
|
+
onClick: Ht(i, ["prevent", "stop"])
|
|
1083
1379
|
}, [r.value && a(Fe("f-button-edit"), {
|
|
1084
1380
|
enableClear: !0,
|
|
1085
1381
|
style: "padding:5px 10px",
|
|
1086
1382
|
buttonContent: "<i class='f-icon f-icon-search'></i>",
|
|
1087
1383
|
modelValue: d.value,
|
|
1088
1384
|
"onUpdate:modelValue": (A) => d.value = A,
|
|
1089
|
-
onClickButton:
|
|
1385
|
+
onClickButton: h
|
|
1090
1386
|
}, null), a("div", {
|
|
1091
1387
|
style: "position: relative;",
|
|
1092
1388
|
class: "f-datalist"
|
|
@@ -1098,12 +1394,12 @@ const Ua = X({
|
|
|
1098
1394
|
}, null)])])])]
|
|
1099
1395
|
});
|
|
1100
1396
|
}
|
|
1101
|
-
}), bt = X({
|
|
1397
|
+
}), bt = /* @__PURE__ */ X({
|
|
1102
1398
|
name: "FComboList",
|
|
1103
1399
|
props: Fa,
|
|
1104
1400
|
emits: [je.clear, je.update],
|
|
1105
1401
|
setup(e, n) {
|
|
1106
|
-
const t =
|
|
1402
|
+
const t = v(), {
|
|
1107
1403
|
onValueChange: o,
|
|
1108
1404
|
displayText: l,
|
|
1109
1405
|
modelValue: u,
|
|
@@ -1119,7 +1415,7 @@ const Ua = X({
|
|
|
1119
1415
|
context: n,
|
|
1120
1416
|
isPanelVisible: s,
|
|
1121
1417
|
modelValue: u
|
|
1122
|
-
}),
|
|
1418
|
+
}), h = we({
|
|
1123
1419
|
comboListRef: t,
|
|
1124
1420
|
isPanelVisible: s,
|
|
1125
1421
|
comboListProps: e,
|
|
@@ -1128,7 +1424,7 @@ const Ua = X({
|
|
|
1128
1424
|
dataSource: r,
|
|
1129
1425
|
defaultOptionSlot: n.slots.default
|
|
1130
1426
|
});
|
|
1131
|
-
return Je(Re,
|
|
1427
|
+
return Je(Re, h), () => a(be, null, [a(Fe("f-button-edit"), Se({
|
|
1132
1428
|
ref: t,
|
|
1133
1429
|
id: e.id,
|
|
1134
1430
|
class: {
|
|
@@ -1161,39 +1457,67 @@ const Ua = X({
|
|
|
1161
1457
|
e.component(bt.name, bt);
|
|
1162
1458
|
}
|
|
1163
1459
|
}, Za = {
|
|
1460
|
+
/** 列集合 */
|
|
1164
1461
|
columns: { type: Array, default: [] },
|
|
1462
|
+
/** 列配置 */
|
|
1165
1463
|
columnOption: { type: Object },
|
|
1464
|
+
/** 被绑定数据 */
|
|
1166
1465
|
data: { type: Array, default: [] },
|
|
1466
|
+
/** 禁用组件 */
|
|
1167
1467
|
disable: { type: Boolean, default: !1 },
|
|
1468
|
+
/** 允许编辑 */
|
|
1168
1469
|
editable: { type: Boolean, default: !1 },
|
|
1470
|
+
/** 编辑配置 */
|
|
1169
1471
|
editOption: { type: Object },
|
|
1472
|
+
/** 筛选配置 */
|
|
1170
1473
|
filter: { type: Object },
|
|
1474
|
+
/** 适配父组件尺寸 */
|
|
1171
1475
|
fit: { type: Boolean, default: !1 },
|
|
1476
|
+
/** 分组配置 */
|
|
1172
1477
|
group: { type: Object },
|
|
1478
|
+
/** 列标题配置 */
|
|
1173
1479
|
header: { type: Object },
|
|
1480
|
+
/** 高度 */
|
|
1174
1481
|
height: { type: Number, default: 300 },
|
|
1482
|
+
/** DataGrid组件唯一标识 */
|
|
1175
1483
|
id: { type: String, default: "" },
|
|
1484
|
+
/** 被绑定数据的标识字段 */
|
|
1176
1485
|
idField: { type: String, default: "id", require: !0 },
|
|
1486
|
+
/** 纵向合并具有相同值的单元格 */
|
|
1177
1487
|
mergeCell: { type: Boolean, default: !1 },
|
|
1488
|
+
/** 分页配置 */
|
|
1178
1489
|
pagination: { type: Object },
|
|
1490
|
+
/** 行号配置 */
|
|
1179
1491
|
rowNumber: { type: Object },
|
|
1492
|
+
/** 行配置 */
|
|
1180
1493
|
rowOption: { type: Object },
|
|
1494
|
+
/** 选择配置 */
|
|
1181
1495
|
selection: { type: Object },
|
|
1496
|
+
/** 显示边框 */
|
|
1182
1497
|
showBorder: { type: Boolean, default: !1 },
|
|
1498
|
+
/** 显示底部面板 */
|
|
1183
1499
|
showFooter: { type: Boolean, default: !1 },
|
|
1500
|
+
/** 显示顶部面板 */
|
|
1184
1501
|
showHeader: { type: Boolean, default: !0 },
|
|
1502
|
+
/** 显示配置按钮 */
|
|
1185
1503
|
showOptions: { type: Boolean, default: !1 },
|
|
1504
|
+
/** 显示滚动条 */
|
|
1186
1505
|
showScrollBar: { type: String, default: "auto" },
|
|
1506
|
+
/** 显示条纹 */
|
|
1187
1507
|
showStripe: { type: Boolean, default: !0 },
|
|
1508
|
+
/** 排序配置 */
|
|
1188
1509
|
sort: { type: Object },
|
|
1510
|
+
/** 合计配置 */
|
|
1189
1511
|
summary: { type: Object },
|
|
1512
|
+
/** 启用虚拟渲染 */
|
|
1190
1513
|
virtualized: { type: Boolean, default: !1 },
|
|
1514
|
+
/** 宽度 */
|
|
1191
1515
|
width: { type: Number, default: 800 }
|
|
1192
1516
|
};
|
|
1193
1517
|
var ye = /* @__PURE__ */ ((e) => (e[e.readonly = 0] = "readonly", e[e.editable = 1] = "editable", e[e.editing = 2] = "editing", e))(ye || {}), Be = /* @__PURE__ */ ((e) => (e[e.data = 0] = "data", e[e.group = 1] = "group", e[e.summary = 2] = "summary", e))(Be || {});
|
|
1194
1518
|
function Xa(e, n, t, o, l, u, s) {
|
|
1195
1519
|
var y, k;
|
|
1196
|
-
const r =
|
|
1520
|
+
const r = v(e.mergeCell), d = v(e.rowOption), f = ((y = d.value) == null ? void 0 : y.height) || 28, p = ((k = d.value) == null ? void 0 : k.wrapContent) || !1, c = v(l - 1 + u), h = v(0);
|
|
1197
1521
|
function i(S, g, x) {
|
|
1198
1522
|
const P = g && g.data[x];
|
|
1199
1523
|
if (P && P.data === S.data) {
|
|
@@ -1231,22 +1555,22 @@ function Xa(e, n, t, o, l, u, s) {
|
|
|
1231
1555
|
mode: O.readonly ? ye.readonly : ye.editable,
|
|
1232
1556
|
data: S[O.field],
|
|
1233
1557
|
parent: B,
|
|
1234
|
-
getEditor(
|
|
1235
|
-
return s.getEditor(
|
|
1558
|
+
getEditor(H) {
|
|
1559
|
+
return s.getEditor(H, O);
|
|
1236
1560
|
},
|
|
1237
|
-
setRef: (
|
|
1238
|
-
if (p &&
|
|
1239
|
-
const
|
|
1240
|
-
D.cellHeight !==
|
|
1241
|
-
const W =
|
|
1561
|
+
setRef: (H) => {
|
|
1562
|
+
if (p && H) {
|
|
1563
|
+
const E = D.parent;
|
|
1564
|
+
D.cellHeight !== H.offsetHeight && (D.cellHeight = H.offsetHeight), D.cellHeight && D.cellHeight > (E.height || 0) && (E.height = D.cellHeight, S.__fv_data_height__ = E.height);
|
|
1565
|
+
const W = E.pre;
|
|
1242
1566
|
if (W) {
|
|
1243
1567
|
const M = (W.__fv_data_position__ || 0) + (W.__fv_data_height__ || 0);
|
|
1244
|
-
|
|
1568
|
+
E.top = M, S.__fv_data_position__ = M;
|
|
1245
1569
|
}
|
|
1246
1570
|
}
|
|
1247
1571
|
},
|
|
1248
|
-
update: (
|
|
1249
|
-
|
|
1572
|
+
update: (H) => {
|
|
1573
|
+
H !== void 0 && (S[O.field] = H, D.data = S[O.field]);
|
|
1250
1574
|
}
|
|
1251
1575
|
};
|
|
1252
1576
|
r.value && i(D, x, O.field), B.data[O.field] = D;
|
|
@@ -1255,10 +1579,10 @@ function Xa(e, n, t, o, l, u, s) {
|
|
|
1255
1579
|
function A(S, g, x, P) {
|
|
1256
1580
|
const { dataView: T } = o, _ = [], C = P ? Date.now().toString() : "";
|
|
1257
1581
|
for (let B = S, O = 0; B < g; B++, O++) {
|
|
1258
|
-
const N = T.value[B], D = T.value[B - 1] || x,
|
|
1582
|
+
const N = T.value[B], D = T.value[B - 1] || x, H = _[O - 1], E = D ? (D.__fv_data_position__ || 0) + (D.__fv_data_height__ || 0) : 0, W = N.__fv_data_grid_group_row__ ? t.renderGroupRow(N, D, B, E, n.value) : N.__fv_data_grid_group_summary__ ? t.renderSummaryRow(N, D, B, E, n.value) : m(N, D, H, B, E, n.value);
|
|
1259
1583
|
W.refreshKey = C, _.push(W);
|
|
1260
1584
|
}
|
|
1261
|
-
return
|
|
1585
|
+
return h.value = _[0].index, c.value = _[_.length - 1].index, _;
|
|
1262
1586
|
}
|
|
1263
1587
|
function w(S, g, x) {
|
|
1264
1588
|
const P = g.groupField || "", { groupValue: T } = g;
|
|
@@ -1266,11 +1590,11 @@ function Xa(e, n, t, o, l, u, s) {
|
|
|
1266
1590
|
const { dataView: _ } = o, C = x[0].index, B = Math.min(C + l + u + 1, _.value.length);
|
|
1267
1591
|
return A(C, B);
|
|
1268
1592
|
}
|
|
1269
|
-
return { getVisualData: A, maxVisibleRowIndex: c, minVisibleRowIndex:
|
|
1593
|
+
return { getVisualData: A, maxVisibleRowIndex: c, minVisibleRowIndex: h, toggleGroupRow: w };
|
|
1270
1594
|
}
|
|
1271
1595
|
function Ja(e, n) {
|
|
1272
|
-
var
|
|
1273
|
-
const t = ((
|
|
1596
|
+
var h;
|
|
1597
|
+
const t = ((h = e.rowOption) == null ? void 0 : h.height) || 28, o = v(n.value.primaryColumnsWidth);
|
|
1274
1598
|
function l(i) {
|
|
1275
1599
|
const m = {};
|
|
1276
1600
|
return i.reduce(
|
|
@@ -1314,6 +1638,8 @@ function Ja(e, n) {
|
|
|
1314
1638
|
width: `${A[m.field].width}px`,
|
|
1315
1639
|
height: `${y}px`,
|
|
1316
1640
|
padding: `calc(${y / 2}px - 1rem) 0`
|
|
1641
|
+
// height: `calc(${rowHeight}px * ${cell.rowSpan})`,
|
|
1642
|
+
// padding: `calc(${rowHeight * cell.rowSpan / 2}px - 1rem) 0`
|
|
1317
1643
|
};
|
|
1318
1644
|
}
|
|
1319
1645
|
function f(i, m) {
|
|
@@ -1345,14 +1671,14 @@ function Ja(e, n) {
|
|
|
1345
1671
|
}
|
|
1346
1672
|
function en(e, n, t, o, l, u, s, r) {
|
|
1347
1673
|
var ve;
|
|
1348
|
-
const { dataView: d } = n, { getVisualData: f, maxVisibleRowIndex: p, minVisibleRowIndex: c } = l,
|
|
1674
|
+
const { dataView: d } = n, { getVisualData: f, maxVisibleRowIndex: p, minVisibleRowIndex: c } = l, h = v(o.value.primaryColumnsWidth), i = v(o.value.leftColumnsWidth), m = v(o.value.rightColumnsWidth), A = ((ve = e.rowOption) == null ? void 0 : ve.height) || 28, w = v(0), y = v(0);
|
|
1349
1675
|
let k = 0, S = u - 1;
|
|
1350
|
-
const g =
|
|
1351
|
-
function
|
|
1676
|
+
const g = v(0), x = v(0), P = v(0), T = A * u, _ = b(() => d.value.length * A), C = b(() => d.value.length > u + s ? Math.floor((u + s) / d.value.length * x.value) : x.value), B = b(() => Math.floor(P.value / h.value * g.value)), O = 0, N = 0, D = b(() => g.value - (i.value + h.value + m.value + r.value));
|
|
1677
|
+
function H() {
|
|
1352
1678
|
const L = p.value < d.value.length ? d.value[p.value] : d.value[d.value.length - 1];
|
|
1353
1679
|
return (L.__fv_data_position__ || 0) + (L.__fv_data_height__ || 0) + Math.max(d.value.length - 1 - p.value, 0) * A;
|
|
1354
1680
|
}
|
|
1355
|
-
function
|
|
1681
|
+
function E(L) {
|
|
1356
1682
|
const Z = d.value.find((de) => de.__fv_data_position__ > L);
|
|
1357
1683
|
return Z ? Z.__fv_index__ - 1 : 0;
|
|
1358
1684
|
}
|
|
@@ -1363,8 +1689,8 @@ function en(e, n, t, o, l, u, s, r) {
|
|
|
1363
1689
|
function M(L) {
|
|
1364
1690
|
let Z = w.value + L;
|
|
1365
1691
|
Z > O && (Z = O);
|
|
1366
|
-
const de = Z > O, ge =
|
|
1367
|
-
Te && Z < x.value - ge && (Z = x.value - ge), (!Te || de) && (Z = O), w.value !== Z && (w.value = Z, k =
|
|
1692
|
+
const de = Z > O, ge = H(), Te = ge > x.value;
|
|
1693
|
+
Te && Z < x.value - ge && (Z = x.value - ge), (!Te || de) && (Z = O), w.value !== Z && (w.value = Z, k = E(Math.abs(w.value)), S = k + u, (k < c.value || S > p.value - s / 2) && W());
|
|
1368
1694
|
}
|
|
1369
1695
|
function F(L) {
|
|
1370
1696
|
let Z = y.value + L;
|
|
@@ -1373,7 +1699,7 @@ function en(e, n, t, o, l, u, s, r) {
|
|
|
1373
1699
|
le(P, () => {
|
|
1374
1700
|
F(0);
|
|
1375
1701
|
}), le(o, () => {
|
|
1376
|
-
|
|
1702
|
+
h.value = o.value.primaryColumnsWidth, i.value = o.value.leftColumnsWidth, m.value = o.value.rightColumnsWidth;
|
|
1377
1703
|
});
|
|
1378
1704
|
function R(L) {
|
|
1379
1705
|
L.preventDefault(), L.stopPropagation();
|
|
@@ -1388,7 +1714,7 @@ function en(e, n, t, o, l, u, s, r) {
|
|
|
1388
1714
|
transform: `translateY(${w.value}px)`
|
|
1389
1715
|
})), ee = b(() => ({
|
|
1390
1716
|
height: `${d.value.length * A}px`,
|
|
1391
|
-
width: `${
|
|
1717
|
+
width: `${h.value}px`,
|
|
1392
1718
|
transform: `translate(${y.value}px, ${w.value}px)`
|
|
1393
1719
|
})), te = b(() => ({
|
|
1394
1720
|
transform: `translate(${y.value}px, ${w.value}px)`
|
|
@@ -1405,11 +1731,12 @@ function en(e, n, t, o, l, u, s, r) {
|
|
|
1405
1731
|
})), z = b(() => ({
|
|
1406
1732
|
width: `${i.value}px`
|
|
1407
1733
|
})), J = b(() => ({
|
|
1734
|
+
// width: `${visibleGridViewWidth}px`,
|
|
1408
1735
|
transform: `translateX(${y.value}px)`
|
|
1409
1736
|
})), ae = b(() => ({
|
|
1410
1737
|
width: `${m.value}px`
|
|
1411
1738
|
})), ne = b(() => {
|
|
1412
|
-
const L =
|
|
1739
|
+
const L = H();
|
|
1413
1740
|
return w.value / (x.value - L) * (x.value - C.value);
|
|
1414
1741
|
}), oe = b(() => ({
|
|
1415
1742
|
height: `${C.value}px`,
|
|
@@ -1417,13 +1744,13 @@ function en(e, n, t, o, l, u, s, r) {
|
|
|
1417
1744
|
})), re = b(() => y.value / D.value * (g.value - B.value)), ce = b(() => ({
|
|
1418
1745
|
width: `${B.value}px`,
|
|
1419
1746
|
left: `${re.value}px`
|
|
1420
|
-
})), U =
|
|
1747
|
+
})), U = v(!1), G = v(-1), pe = v(-1);
|
|
1421
1748
|
let xe;
|
|
1422
1749
|
function j(L) {
|
|
1423
1750
|
if (U.value && pe.value !== -1) {
|
|
1424
1751
|
const Z = pe.value - L.pageX, de = g.value - B.value;
|
|
1425
1752
|
if (Math.abs(Z) <= de) {
|
|
1426
|
-
const ge = Z / (P.value - B.value) * (
|
|
1753
|
+
const ge = Z / (P.value - B.value) * (h.value - P.value);
|
|
1427
1754
|
F(ge), pe.value = L.pageX;
|
|
1428
1755
|
}
|
|
1429
1756
|
}
|
|
@@ -1467,7 +1794,7 @@ function en(e, n, t, o, l, u, s, r) {
|
|
|
1467
1794
|
};
|
|
1468
1795
|
}
|
|
1469
1796
|
function tn(e) {
|
|
1470
|
-
const n =
|
|
1797
|
+
const n = v(e.idField), t = v(-1), o = v("");
|
|
1471
1798
|
function l(d) {
|
|
1472
1799
|
return {
|
|
1473
1800
|
"fv-grid-row": d.type === Be.data,
|
|
@@ -1497,7 +1824,7 @@ function tn(e) {
|
|
|
1497
1824
|
return { gridRowClass: l, onClickRow: u, onMouseoverRow: s, sidebarRowClass: r };
|
|
1498
1825
|
}
|
|
1499
1826
|
function an(e) {
|
|
1500
|
-
const t =
|
|
1827
|
+
const t = v({
|
|
1501
1828
|
defaultColumnWidth: 120,
|
|
1502
1829
|
headerDepth: 1,
|
|
1503
1830
|
leftColumns: [],
|
|
@@ -1510,7 +1837,7 @@ function an(e) {
|
|
|
1510
1837
|
rightColumnsWidth: 0,
|
|
1511
1838
|
rightHeaderColumns: [],
|
|
1512
1839
|
summaryColumns: []
|
|
1513
|
-
}), o =
|
|
1840
|
+
}), o = v(e.summary), l = b(() => {
|
|
1514
1841
|
const d = o.value;
|
|
1515
1842
|
return (d == null ? void 0 : d.groupFields) || [];
|
|
1516
1843
|
});
|
|
@@ -1524,8 +1851,8 @@ function an(e) {
|
|
|
1524
1851
|
}
|
|
1525
1852
|
function nn(e, n) {
|
|
1526
1853
|
var f;
|
|
1527
|
-
const t =
|
|
1528
|
-
function o(p, c,
|
|
1854
|
+
const t = v((f = e.columnOption) == null ? void 0 : f.groups);
|
|
1855
|
+
function o(p, c, h, i, m) {
|
|
1529
1856
|
const A = {
|
|
1530
1857
|
actualWidth: 0,
|
|
1531
1858
|
children: [],
|
|
@@ -1533,7 +1860,7 @@ function nn(e, n) {
|
|
|
1533
1860
|
field: p.field,
|
|
1534
1861
|
layer: 1,
|
|
1535
1862
|
left: 0,
|
|
1536
|
-
parent:
|
|
1863
|
+
parent: h,
|
|
1537
1864
|
resizable: !1,
|
|
1538
1865
|
title: p.title || ""
|
|
1539
1866
|
}, w = i || A;
|
|
@@ -1557,9 +1884,9 @@ function nn(e, n) {
|
|
|
1557
1884
|
groupedCells: /* @__PURE__ */ new Map(),
|
|
1558
1885
|
fieldToRootMap: /* @__PURE__ */ new Map()
|
|
1559
1886
|
};
|
|
1560
|
-
return t.value && t.value.reduce((
|
|
1887
|
+
return t.value && t.value.reduce((h, i) => {
|
|
1561
1888
|
const m = o(i, p, null, null, c);
|
|
1562
|
-
return
|
|
1889
|
+
return h.groupedCells.set(i.field, m), h;
|
|
1563
1890
|
}, c), c;
|
|
1564
1891
|
}
|
|
1565
1892
|
function u(p) {
|
|
@@ -1569,33 +1896,33 @@ function nn(e, n) {
|
|
|
1569
1896
|
return c.children && c.children.length > 0 && (c.left = u(c.children)), c.left;
|
|
1570
1897
|
}
|
|
1571
1898
|
function s(p, c) {
|
|
1572
|
-
const
|
|
1899
|
+
const h = n.value.headerDepth;
|
|
1573
1900
|
p.forEach((i) => {
|
|
1574
1901
|
i.layer = c ? c.layer + 1 : 1;
|
|
1575
1902
|
const m = i.children && i.children.length === 0;
|
|
1576
|
-
i.depth = m ?
|
|
1903
|
+
i.depth = m ? h - (i.layer - 1) : 1, i.left = m ? i.left : u(i.children), i.children && s(i.children, i);
|
|
1577
1904
|
});
|
|
1578
1905
|
}
|
|
1579
1906
|
function r(p, c) {
|
|
1580
|
-
const
|
|
1907
|
+
const h = /* @__PURE__ */ new Map();
|
|
1581
1908
|
return p.forEach((i) => {
|
|
1582
1909
|
const m = c.fieldToRootMap.get(i.field), A = m != null;
|
|
1583
|
-
A && !
|
|
1584
|
-
}), s(Array.from(
|
|
1910
|
+
A && !h.has(m.field) && h.set(m.field, m), A || h.set(i.field, i);
|
|
1911
|
+
}), s(Array.from(h.values())), h;
|
|
1585
1912
|
}
|
|
1586
1913
|
function d(p) {
|
|
1587
|
-
let c = /* @__PURE__ */ new Map(),
|
|
1914
|
+
let c = /* @__PURE__ */ new Map(), h = 0;
|
|
1588
1915
|
if (p.reduce((i, m) => (i.set(m.field, {
|
|
1589
1916
|
actualWidth: m.actualWidth || 0,
|
|
1590
1917
|
children: [],
|
|
1591
1918
|
depth: 1,
|
|
1592
1919
|
layer: 1,
|
|
1593
|
-
left:
|
|
1920
|
+
left: h,
|
|
1594
1921
|
field: m.field,
|
|
1595
1922
|
parent: null,
|
|
1596
1923
|
resizable: m.resizable || !1,
|
|
1597
1924
|
title: m.title
|
|
1598
|
-
}),
|
|
1925
|
+
}), h += m.actualWidth || 0, i), c), t.value) {
|
|
1599
1926
|
const i = l(c);
|
|
1600
1927
|
c = r(c, i);
|
|
1601
1928
|
}
|
|
@@ -1605,9 +1932,9 @@ function nn(e, n) {
|
|
|
1605
1932
|
}
|
|
1606
1933
|
function ln(e, n) {
|
|
1607
1934
|
var g, x, P, T, _;
|
|
1608
|
-
const { getGridHeaderCells: t } = nn(e, n), o = 120, l = 32, u =
|
|
1935
|
+
const { getGridHeaderCells: t } = nn(e, n), o = 120, l = 32, u = v(((g = e.rowNumber) == null ? void 0 : g.enable) || !1), s = v(((x = e.selection) == null ? void 0 : x.multiSelect) || !1), r = v(
|
|
1609
1936
|
0 + (u.value && ((P = e.rowNumber) == null ? void 0 : P.width) || 0) + (s.value ? l : 0)
|
|
1610
|
-
), d =
|
|
1937
|
+
), d = v(((T = e.columnOption) == null ? void 0 : T.fitColumns) || !1), f = v(d.value && ((_ = e.columnOption) == null ? void 0 : _.fitMode) || "none");
|
|
1611
1938
|
function p(C, B, O) {
|
|
1612
1939
|
const N = parseInt(C.width, 10) / 100;
|
|
1613
1940
|
return O * N;
|
|
@@ -1615,20 +1942,20 @@ function ln(e, n) {
|
|
|
1615
1942
|
function c(C, B, O) {
|
|
1616
1943
|
return typeof C.width == "string" ? p(C, B, O) : C.width || o;
|
|
1617
1944
|
}
|
|
1618
|
-
function
|
|
1945
|
+
function h(C, B) {
|
|
1619
1946
|
const O = [], N = [];
|
|
1620
1947
|
let D = 0;
|
|
1621
1948
|
C.value.primaryColumns.forEach((W) => {
|
|
1622
1949
|
typeof W.width == "string" ? N.push(W) : (W.width = W.width || o, D += W.width, O.push(W));
|
|
1623
1950
|
});
|
|
1624
|
-
const
|
|
1951
|
+
const H = B * (O.length / C.value.primaryColumns.length);
|
|
1625
1952
|
O.forEach((W) => {
|
|
1626
|
-
const M =
|
|
1953
|
+
const M = H * (W.width / D);
|
|
1627
1954
|
W.actualWidth = M, C.value.primaryColumnsWidth += W.actualWidth;
|
|
1628
1955
|
});
|
|
1629
|
-
const
|
|
1956
|
+
const E = B - H;
|
|
1630
1957
|
N.forEach((W) => {
|
|
1631
|
-
const M = p(W, C.value,
|
|
1958
|
+
const M = p(W, C.value, E);
|
|
1632
1959
|
W.actualWidth = M, C.value.primaryColumnsWidth += W.actualWidth;
|
|
1633
1960
|
});
|
|
1634
1961
|
}
|
|
@@ -1640,22 +1967,22 @@ function ln(e, n) {
|
|
|
1640
1967
|
}
|
|
1641
1968
|
function m(C, B) {
|
|
1642
1969
|
const O = [], N = [], D = /* @__PURE__ */ new WeakMap();
|
|
1643
|
-
let
|
|
1970
|
+
let H = 0, E = 0;
|
|
1644
1971
|
if (C.value.primaryColumns.forEach((M) => {
|
|
1645
1972
|
if (typeof M.width == "string") {
|
|
1646
1973
|
const F = p(M, C.value, B);
|
|
1647
|
-
D.set(M, F),
|
|
1974
|
+
D.set(M, F), H += F, N.push(M);
|
|
1648
1975
|
} else
|
|
1649
|
-
M.width = M.width || o,
|
|
1650
|
-
}), B -
|
|
1651
|
-
const M = B -
|
|
1976
|
+
M.width = M.width || o, E += M.width, O.push(M);
|
|
1977
|
+
}), B - H > E) {
|
|
1978
|
+
const M = B - H;
|
|
1652
1979
|
N.forEach((F) => {
|
|
1653
1980
|
F.actualWidth = D.get(F) || o, C.value.primaryColumnsWidth += F.actualWidth;
|
|
1654
1981
|
}), O.forEach((F) => {
|
|
1655
|
-
F.actualWidth = M * (F.width /
|
|
1982
|
+
F.actualWidth = M * (F.width / E), C.value.primaryColumnsWidth += F.actualWidth;
|
|
1656
1983
|
});
|
|
1657
1984
|
} else
|
|
1658
|
-
|
|
1985
|
+
h(C, B);
|
|
1659
1986
|
}
|
|
1660
1987
|
function A(C, B) {
|
|
1661
1988
|
C.value.primaryColumns.forEach((O) => {
|
|
@@ -1666,7 +1993,7 @@ function ln(e, n) {
|
|
|
1666
1993
|
average: i,
|
|
1667
1994
|
expand: m,
|
|
1668
1995
|
none: A,
|
|
1669
|
-
percentage:
|
|
1996
|
+
percentage: h
|
|
1670
1997
|
};
|
|
1671
1998
|
function y(C) {
|
|
1672
1999
|
C.value.leftHeaderColumns = Array.from(t(C.value.leftColumns).values()), C.value.primaryHeaderColumns = Array.from(t(C.value.primaryColumns).values()), C.value.rightHeaderColumns = Array.from(t(C.value.rightColumns).values());
|
|
@@ -1684,25 +2011,25 @@ function ln(e, n) {
|
|
|
1684
2011
|
if (B) {
|
|
1685
2012
|
C.value.leftColumnsWidth = 0, C.value.primaryColumnsWidth = 0, C.value.rightColumnsWidth = 0;
|
|
1686
2013
|
const N = B.clientWidth - r.value;
|
|
1687
|
-
C.value.leftColumns.forEach((
|
|
1688
|
-
|
|
1689
|
-
}), C.value.rightColumns.forEach((
|
|
1690
|
-
|
|
2014
|
+
C.value.leftColumns.forEach((E) => {
|
|
2015
|
+
E.actualWidth = c(E, C.value, N), C.value.leftColumnsWidth += E.actualWidth;
|
|
2016
|
+
}), C.value.rightColumns.forEach((E) => {
|
|
2017
|
+
E.actualWidth = c(E, C.value, N), C.value.rightColumnsWidth += E.actualWidth;
|
|
1691
2018
|
});
|
|
1692
|
-
const D = N - C.value.leftColumnsWidth - C.value.rightColumnsWidth,
|
|
1693
|
-
|
|
2019
|
+
const D = N - C.value.leftColumnsWidth - C.value.rightColumnsWidth, H = w[f.value];
|
|
2020
|
+
H && H(C, D), O.value = D, y(C), C.value = Object.assign({}, C.value);
|
|
1694
2021
|
}
|
|
1695
2022
|
}
|
|
1696
2023
|
return { calculateColumnHeaders: y, calculateColumnsSize: S, calculateColumnsWidth: k };
|
|
1697
2024
|
}
|
|
1698
2025
|
function on(e) {
|
|
1699
2026
|
var f, p, c;
|
|
1700
|
-
const t =
|
|
1701
|
-
function r(
|
|
2027
|
+
const t = v(((f = e.rowNumber) == null ? void 0 : f.enable) || !1), o = v(((p = e.selection) == null ? void 0 : p.showCheckbox) || !1), l = v(t.value && ((c = e.rowNumber) == null ? void 0 : c.width) || 0), u = v(o.value ? 50 : 0), s = b(() => u.value + l.value);
|
|
2028
|
+
function r(h) {
|
|
1702
2029
|
return {
|
|
1703
|
-
top: `${
|
|
2030
|
+
top: `${h.top}px`,
|
|
1704
2031
|
width: `${s.value}px`,
|
|
1705
|
-
height: `${
|
|
2032
|
+
height: `${h.height || ""}px`
|
|
1706
2033
|
};
|
|
1707
2034
|
}
|
|
1708
2035
|
const d = b(() => ({
|
|
@@ -1711,7 +2038,7 @@ function on(e) {
|
|
|
1711
2038
|
return { showRowCheckbox: o, showRowNumer: t, sidebarCellPosition: r, sidebarCornerCellStyle: d, sidebarWidth: s };
|
|
1712
2039
|
}
|
|
1713
2040
|
function Lt(e) {
|
|
1714
|
-
const n =
|
|
2041
|
+
const n = v(e.idField), t = v(e.summary), o = v(e.group), l = b(() => {
|
|
1715
2042
|
const w = t.value;
|
|
1716
2043
|
return (w == null ? void 0 : w.groupFields) || [];
|
|
1717
2044
|
}), u = b(() => {
|
|
@@ -1774,7 +2101,7 @@ function Lt(e) {
|
|
|
1774
2101
|
k.__fv_data_index__ = S;
|
|
1775
2102
|
}), y;
|
|
1776
2103
|
}
|
|
1777
|
-
function
|
|
2104
|
+
function h(w, y) {
|
|
1778
2105
|
if (!w || w.length === 0)
|
|
1779
2106
|
return y;
|
|
1780
2107
|
const k = w.join(",");
|
|
@@ -1806,12 +2133,12 @@ function Lt(e) {
|
|
|
1806
2133
|
getEditor: (D) => D.data,
|
|
1807
2134
|
setRef: (D) => {
|
|
1808
2135
|
if (D) {
|
|
1809
|
-
const
|
|
1810
|
-
O.cellHeight !== D.offsetHeight && (O.cellHeight = D.offsetHeight), O.cellHeight && O.cellHeight > (
|
|
1811
|
-
const
|
|
1812
|
-
if (
|
|
1813
|
-
const W = (
|
|
1814
|
-
|
|
2136
|
+
const H = O.parent;
|
|
2137
|
+
O.cellHeight !== D.offsetHeight && (O.cellHeight = D.offsetHeight), O.cellHeight && O.cellHeight > (H.height || 0) && (H.height = O.cellHeight, w.__fv_data_height__ = H.height);
|
|
2138
|
+
const E = H.pre;
|
|
2139
|
+
if (E) {
|
|
2140
|
+
const W = (E.__fv_data_position__ || 0) + (E.__fv_data_height__ || 0);
|
|
2141
|
+
H.top = W, w.__fv_data_position__ = W;
|
|
1815
2142
|
}
|
|
1816
2143
|
}
|
|
1817
2144
|
},
|
|
@@ -1830,12 +2157,12 @@ function Lt(e) {
|
|
|
1830
2157
|
getEditor: (D) => D.data,
|
|
1831
2158
|
setRef: (D) => {
|
|
1832
2159
|
if (D) {
|
|
1833
|
-
const
|
|
1834
|
-
N.cellHeight !== D.offsetHeight && (N.cellHeight = D.offsetHeight), N.cellHeight && N.cellHeight > (
|
|
1835
|
-
const
|
|
1836
|
-
if (
|
|
1837
|
-
const W = (
|
|
1838
|
-
|
|
2160
|
+
const H = N.parent;
|
|
2161
|
+
N.cellHeight !== D.offsetHeight && (N.cellHeight = D.offsetHeight), N.cellHeight && N.cellHeight > (H.height || 0) && (H.height = N.cellHeight, w.__fv_data_height__ = H.height);
|
|
2162
|
+
const E = H.pre;
|
|
2163
|
+
if (E) {
|
|
2164
|
+
const W = (E.__fv_data_position__ || 0) + (E.__fv_data_height__ || 0);
|
|
2165
|
+
H.top = W, w.__fv_data_position__ = W;
|
|
1839
2166
|
}
|
|
1840
2167
|
}
|
|
1841
2168
|
},
|
|
@@ -1844,9 +2171,9 @@ function Lt(e) {
|
|
|
1844
2171
|
};
|
|
1845
2172
|
if (B.data[P] = N, u.value) {
|
|
1846
2173
|
let D = N.colSpan;
|
|
1847
|
-
const
|
|
1848
|
-
g.reduce((
|
|
1849
|
-
if (
|
|
2174
|
+
const H = l.value.reduce((E, W) => (E.set(W, !0), E), /* @__PURE__ */ new Map());
|
|
2175
|
+
g.reduce((E, W, M) => {
|
|
2176
|
+
if (H.has(W.field)) {
|
|
1850
2177
|
const F = {
|
|
1851
2178
|
colSpan: 1,
|
|
1852
2179
|
rowSpan: 1,
|
|
@@ -1872,7 +2199,7 @@ function Lt(e) {
|
|
|
1872
2199
|
};
|
|
1873
2200
|
B.data[W.field] = F, D - 1 > M && (D = M);
|
|
1874
2201
|
}
|
|
1875
|
-
return
|
|
2202
|
+
return E;
|
|
1876
2203
|
}, B), N.colSpan = D;
|
|
1877
2204
|
}
|
|
1878
2205
|
return B;
|
|
@@ -1906,8 +2233,8 @@ function Lt(e) {
|
|
|
1906
2233
|
C.cellHeight !== O.offsetHeight && (C.cellHeight = O.offsetHeight), C.cellHeight && C.cellHeight > (N.height || 0) && (N.height = C.cellHeight, w.__fv_data_height__ = N.height);
|
|
1907
2234
|
const D = N.pre;
|
|
1908
2235
|
if (D) {
|
|
1909
|
-
const
|
|
1910
|
-
N.top =
|
|
2236
|
+
const H = (D.__fv_data_position__ || 0) + (D.__fv_data_height__ || 0);
|
|
2237
|
+
N.top = H, w.__fv_data_position__ = H;
|
|
1911
2238
|
}
|
|
1912
2239
|
}
|
|
1913
2240
|
},
|
|
@@ -1930,8 +2257,8 @@ function Lt(e) {
|
|
|
1930
2257
|
B.cellHeight !== O.offsetHeight && (B.cellHeight = O.offsetHeight), B.cellHeight && B.cellHeight > (N.height || 0) && (N.height = B.cellHeight, w.__fv_data_height__ = N.height);
|
|
1931
2258
|
const D = N.pre;
|
|
1932
2259
|
if (D) {
|
|
1933
|
-
const
|
|
1934
|
-
N.top =
|
|
2260
|
+
const H = (D.__fv_data_position__ || 0) + (D.__fv_data_height__ || 0);
|
|
2261
|
+
N.top = H, w.__fv_data_position__ = H;
|
|
1935
2262
|
}
|
|
1936
2263
|
}
|
|
1937
2264
|
},
|
|
@@ -1947,33 +2274,33 @@ function Lt(e) {
|
|
|
1947
2274
|
"fv-grid-group-row-icon-collapse": w.collapse
|
|
1948
2275
|
};
|
|
1949
2276
|
}
|
|
1950
|
-
return { collpaseGroupIconClass: A, renderGroupedData:
|
|
2277
|
+
return { collpaseGroupIconClass: A, renderGroupedData: h, renderGroupRow: i, renderSummaryRow: m };
|
|
1951
2278
|
}
|
|
1952
2279
|
function sn(e) {
|
|
1953
2280
|
var x, P;
|
|
1954
|
-
const n = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), o =
|
|
2281
|
+
const n = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), o = v(((x = e.group) == null ? void 0 : x.groupFields) || []), l = v(((P = e.group) == null ? void 0 : P.enable) || !1), u = v(e.data), s = Lt(e), r = v(e.summary), d = b(() => {
|
|
1955
2282
|
const T = r.value;
|
|
1956
2283
|
return (T == null ? void 0 : T.groupFields) || [];
|
|
1957
|
-
}), f = d.value.reduce((T, _) => (T.set(_, 0), T), /* @__PURE__ */ new Map()), p = b(() => u.value.length), c =
|
|
2284
|
+
}), f = d.value.reduce((T, _) => (T.set(_, 0), T), /* @__PURE__ */ new Map()), p = b(() => u.value.length), c = v(e.pagination), h = b(() => {
|
|
1958
2285
|
var T;
|
|
1959
2286
|
return ((T = c.value) == null ? void 0 : T.size) || u.value.length;
|
|
1960
|
-
}), i =
|
|
2287
|
+
}), i = v(1);
|
|
1961
2288
|
function m() {
|
|
1962
2289
|
let T = u.value;
|
|
1963
2290
|
l.value && (T = s.renderGroupedData(o.value, u.value));
|
|
1964
|
-
const _ = (i.value - 1) *
|
|
2291
|
+
const _ = (i.value - 1) * h.value, C = Math.min(_ + h.value, p.value);
|
|
1965
2292
|
let B = 0;
|
|
1966
2293
|
const O = [];
|
|
1967
2294
|
for (let N = _; N < C; N++) {
|
|
1968
2295
|
const D = T[N];
|
|
1969
|
-
D.__fv_data_grid_group_row__ ? (B = 0, D.__fv_data_index__ = "") : D.__fv_data_grid_group_summary__ ? D.__fv_data_index__ = "" : (B++, D.__fv_data_index__ = B), D.__fv_index__ = N, d.value.forEach((
|
|
1970
|
-
const
|
|
1971
|
-
f.set(
|
|
2296
|
+
D.__fv_data_grid_group_row__ ? (B = 0, D.__fv_data_index__ = "") : D.__fv_data_grid_group_summary__ ? D.__fv_data_index__ = "" : (B++, D.__fv_data_index__ = B), D.__fv_index__ = N, d.value.forEach((H) => {
|
|
2297
|
+
const E = f.get(H) || 0;
|
|
2298
|
+
f.set(H, E + D[H]);
|
|
1972
2299
|
}), O.push(D);
|
|
1973
2300
|
}
|
|
1974
2301
|
return O;
|
|
1975
2302
|
}
|
|
1976
|
-
const A =
|
|
2303
|
+
const A = v(m());
|
|
1977
2304
|
function w(T, _ = !1) {
|
|
1978
2305
|
const C = _ ? m() : A.value;
|
|
1979
2306
|
return A.value = C.filter((B, O) => T.reduce((N, D) => N && D(B), !0)).map((B, O) => {
|
|
@@ -1995,10 +2322,10 @@ function sn(e) {
|
|
|
1995
2322
|
return n.set(C, !1), t.delete(`collapse_${T}_${_}`), w(Array.from(t.values()), !0);
|
|
1996
2323
|
}
|
|
1997
2324
|
function S(T, _, C) {
|
|
1998
|
-
return (T && T.length ? A.value.filter((O, N) => T.reduce((D,
|
|
2325
|
+
return (T && T.length ? A.value.filter((O, N) => T.reduce((D, H) => D && H(O), !0)) : A.value).slice(_, C);
|
|
1999
2326
|
}
|
|
2000
2327
|
function g(T) {
|
|
2001
|
-
if (T *
|
|
2328
|
+
if (T * h.value < p.value) {
|
|
2002
2329
|
i.value = T;
|
|
2003
2330
|
const C = m();
|
|
2004
2331
|
A.value = C;
|
|
@@ -2044,7 +2371,7 @@ function wt(e) {
|
|
|
2044
2371
|
}
|
|
2045
2372
|
function cn(e) {
|
|
2046
2373
|
var p;
|
|
2047
|
-
const n =
|
|
2374
|
+
const n = v(e.editable), t = v(((p = e.rowOption) == null ? void 0 : p.wrapContent) || !1);
|
|
2048
2375
|
le(
|
|
2049
2376
|
() => e.editable,
|
|
2050
2377
|
() => {
|
|
@@ -2070,12 +2397,12 @@ function cn(e) {
|
|
|
2070
2397
|
function r(c) {
|
|
2071
2398
|
c.mode = ye.editable;
|
|
2072
2399
|
}
|
|
2073
|
-
function d(c,
|
|
2074
|
-
n.value &&
|
|
2400
|
+
function d(c, h) {
|
|
2401
|
+
n.value && h.mode === ye.editable && u !== h && (u && r(u), s(h));
|
|
2075
2402
|
}
|
|
2076
|
-
function f(c,
|
|
2077
|
-
const i =
|
|
2078
|
-
let m =
|
|
2403
|
+
function f(c, h) {
|
|
2404
|
+
const i = h.dataType;
|
|
2405
|
+
let m = h.editor || o.get(i) || "text-editor";
|
|
2079
2406
|
!t.value && m === "text-area" && (m = "text-editor");
|
|
2080
2407
|
const A = l.get(m);
|
|
2081
2408
|
return A ? A(c) : c.data;
|
|
@@ -2086,7 +2413,7 @@ function dn(e, n, t, o, l, u, s, r, d, f) {
|
|
|
2086
2413
|
const {
|
|
2087
2414
|
calculateCellPositionInRow: p,
|
|
2088
2415
|
cellKey: c,
|
|
2089
|
-
cellPosition:
|
|
2416
|
+
cellPosition: h,
|
|
2090
2417
|
rowKey: i,
|
|
2091
2418
|
rowPosition: m,
|
|
2092
2419
|
rowSpanCellPosition: A,
|
|
@@ -2110,8 +2437,8 @@ function dn(e, n, t, o, l, u, s, r, d, f) {
|
|
|
2110
2437
|
onMouseDownScrollThumb: O,
|
|
2111
2438
|
onWheel: N,
|
|
2112
2439
|
dataGridWidth: D,
|
|
2113
|
-
gridDataStyle:
|
|
2114
|
-
gridMergedDataStyle:
|
|
2440
|
+
gridDataStyle: H,
|
|
2441
|
+
gridMergedDataStyle: E,
|
|
2115
2442
|
gridSideStyle: W,
|
|
2116
2443
|
viewPortHeight: M,
|
|
2117
2444
|
viewPortWidth: F,
|
|
@@ -2146,7 +2473,7 @@ function dn(e, n, t, o, l, u, s, r, d, f) {
|
|
|
2146
2473
|
ref: ve.setRef,
|
|
2147
2474
|
key: c(j, ve.index),
|
|
2148
2475
|
class: "fv-grid-cell",
|
|
2149
|
-
style:
|
|
2476
|
+
style: h(ve, Q)
|
|
2150
2477
|
}, [ve.data]));
|
|
2151
2478
|
});
|
|
2152
2479
|
}
|
|
@@ -2197,7 +2524,7 @@ function dn(e, n, t, o, l, u, s, r, d, f) {
|
|
|
2197
2524
|
ref: Y.setRef,
|
|
2198
2525
|
key: c(j, Y.index),
|
|
2199
2526
|
class: "fv-grid-cell",
|
|
2200
|
-
style:
|
|
2527
|
+
style: h(Y, Q),
|
|
2201
2528
|
onClick: (se) => P(se, Y)
|
|
2202
2529
|
}, [Y.mode === ye.editing ? Y.getEditor(Y) : Y.data]))]);
|
|
2203
2530
|
}
|
|
@@ -2231,10 +2558,10 @@ function dn(e, n, t, o, l, u, s, r, d, f) {
|
|
|
2231
2558
|
class: "fv-grid-content-primary"
|
|
2232
2559
|
}, [a("div", {
|
|
2233
2560
|
class: "fv-grid-data",
|
|
2234
|
-
style:
|
|
2561
|
+
style: H.value
|
|
2235
2562
|
}, [re(_.value.primaryColumns)]), a("div", {
|
|
2236
2563
|
class: "fv-grid-merge-date",
|
|
2237
|
-
style:
|
|
2564
|
+
style: E.value
|
|
2238
2565
|
}, [ce(_.value.primaryColumns)])]);
|
|
2239
2566
|
}
|
|
2240
2567
|
function pe() {
|
|
@@ -2257,7 +2584,7 @@ function dn(e, n, t, o, l, u, s, r, d, f) {
|
|
|
2257
2584
|
};
|
|
2258
2585
|
}
|
|
2259
2586
|
function fn(e, n, t, o) {
|
|
2260
|
-
const l =
|
|
2587
|
+
const l = v(-1), u = v(0), s = v(!1);
|
|
2261
2588
|
let r = "";
|
|
2262
2589
|
const d = b(() => ({
|
|
2263
2590
|
display: s.value ? "block" : "none",
|
|
@@ -2276,12 +2603,12 @@ function fn(e, n, t, o) {
|
|
|
2276
2603
|
}
|
|
2277
2604
|
u.value = 0, s.value = !1, o.reCalculateVisualDataRows(), document.removeEventListener("mousemove", p), document.body.style.userSelect = "", r = "";
|
|
2278
2605
|
}
|
|
2279
|
-
function
|
|
2606
|
+
function h(i, m) {
|
|
2280
2607
|
r = m, s.value = !0;
|
|
2281
2608
|
const A = i.path.find((w) => w.className.split(" ")[0] === "fv-grid");
|
|
2282
2609
|
u.value = i.clientX - A.offsetLeft, l.value = i.clientX - A.offsetLeft, document.addEventListener("mousemove", p), document.addEventListener("mouseup", c), document.body.style.userSelect = "none";
|
|
2283
2610
|
}
|
|
2284
|
-
return { onClickColumnResizeBar:
|
|
2611
|
+
return { onClickColumnResizeBar: h, resizeHandleStyle: d, resizeOverlayStyle: f };
|
|
2285
2612
|
}
|
|
2286
2613
|
function vn(e, n, t, o, l, u, s) {
|
|
2287
2614
|
const {
|
|
@@ -2291,7 +2618,7 @@ function vn(e, n, t, o, l, u, s) {
|
|
|
2291
2618
|
} = l, {
|
|
2292
2619
|
columnContext: p,
|
|
2293
2620
|
hasLeftFixedColumn: c,
|
|
2294
|
-
hasRightFixedColumn:
|
|
2621
|
+
hasRightFixedColumn: h
|
|
2295
2622
|
} = t, {
|
|
2296
2623
|
onClickColumnResizeBar: i,
|
|
2297
2624
|
resizeHandleStyle: m,
|
|
@@ -2368,7 +2695,7 @@ function vn(e, n, t, o, l, u, s) {
|
|
|
2368
2695
|
for: "sidebar_checkall"
|
|
2369
2696
|
}, null)]), d.value && ((W = e.rowNumber) == null ? void 0 : W.heading)]);
|
|
2370
2697
|
}
|
|
2371
|
-
function
|
|
2698
|
+
function H() {
|
|
2372
2699
|
return a("div", {
|
|
2373
2700
|
class: T.value,
|
|
2374
2701
|
style: _.value
|
|
@@ -2377,9 +2704,9 @@ function vn(e, n, t, o, l, u, s) {
|
|
|
2377
2704
|
}, [a("div", {
|
|
2378
2705
|
class: "fv-grid-header-columns",
|
|
2379
2706
|
style: w.value
|
|
2380
|
-
}, [B(p.value.primaryHeaderColumns)])]),
|
|
2707
|
+
}, [B(p.value.primaryHeaderColumns)])]), h.value && N()]);
|
|
2381
2708
|
}
|
|
2382
|
-
function
|
|
2709
|
+
function E() {
|
|
2383
2710
|
return a(be, null, [a("div", {
|
|
2384
2711
|
class: "fv-datagrid-resize-overlay",
|
|
2385
2712
|
style: A.value
|
|
@@ -2389,8 +2716,8 @@ function vn(e, n, t, o, l, u, s) {
|
|
|
2389
2716
|
}, null)]);
|
|
2390
2717
|
}
|
|
2391
2718
|
return {
|
|
2392
|
-
renderGridHeader:
|
|
2393
|
-
renderGridColumnResizeOverlay:
|
|
2719
|
+
renderGridHeader: H,
|
|
2720
|
+
renderGridColumnResizeOverlay: E
|
|
2394
2721
|
};
|
|
2395
2722
|
}
|
|
2396
2723
|
function hn(e, n) {
|
|
@@ -2436,7 +2763,7 @@ function pn(e, n, t, o) {
|
|
|
2436
2763
|
for: `${A.dataIndex}`
|
|
2437
2764
|
}, null)]);
|
|
2438
2765
|
}
|
|
2439
|
-
function
|
|
2766
|
+
function h(A) {
|
|
2440
2767
|
return a("div", {
|
|
2441
2768
|
class: "fv-grid-sidebar-row-number",
|
|
2442
2769
|
onMouseover: (w) => l(w, A)
|
|
@@ -2446,7 +2773,7 @@ function pn(e, n, t, o) {
|
|
|
2446
2773
|
return (s.value || r.value) && A.value.map((w) => a("div", {
|
|
2447
2774
|
class: u(w),
|
|
2448
2775
|
style: d(w)
|
|
2449
|
-
}, [s.value && c(w), r.value &&
|
|
2776
|
+
}, [s.value && c(w), r.value && h(w)]));
|
|
2450
2777
|
}
|
|
2451
2778
|
function m(A) {
|
|
2452
2779
|
return a("div", {
|
|
@@ -2463,7 +2790,7 @@ function pn(e, n, t, o) {
|
|
|
2463
2790
|
function gn(e, n, t) {
|
|
2464
2791
|
const {
|
|
2465
2792
|
columnContext: o
|
|
2466
|
-
} = t, l =
|
|
2793
|
+
} = t, l = v(e.summary), u = b(() => {
|
|
2467
2794
|
const r = l.value;
|
|
2468
2795
|
return r && r.enable && r.groupFields && r.groupFields.length > 0;
|
|
2469
2796
|
});
|
|
@@ -2474,7 +2801,7 @@ function gn(e, n, t) {
|
|
|
2474
2801
|
class: "fv-datagird-summary-panel"
|
|
2475
2802
|
}, [a("span", {
|
|
2476
2803
|
class: "fv-datagrid-summary-title"
|
|
2477
|
-
}, [_e("
|
|
2804
|
+
}, [_e("当页合计")]), a("div", {
|
|
2478
2805
|
class: "fv-datagrid-summary-content"
|
|
2479
2806
|
}, [o.value.summaryColumns.map((r) => a("div", {
|
|
2480
2807
|
class: "fv-datagrid-summary-field"
|
|
@@ -2524,21 +2851,21 @@ function yn(e, n, t) {
|
|
|
2524
2851
|
renderVerticalScrollbar: u
|
|
2525
2852
|
};
|
|
2526
2853
|
}
|
|
2527
|
-
const xt = X({
|
|
2854
|
+
const xt = /* @__PURE__ */ X({
|
|
2528
2855
|
name: "FDataGrid",
|
|
2529
2856
|
props: Za,
|
|
2530
2857
|
emits: [],
|
|
2531
2858
|
setup(e) {
|
|
2532
2859
|
var te;
|
|
2533
|
-
const n =
|
|
2860
|
+
const n = v(e.columns), t = 20, o = 0, l = v(), u = v(), s = v(e.showStripe), r = v(!1), d = v(((te = e.rowOption) == null ? void 0 : te.wrapContent) || !1), f = sn(e), p = an(e), {
|
|
2534
2861
|
columnContext: c
|
|
2535
|
-
} = p,
|
|
2862
|
+
} = p, h = ln(e, c), {
|
|
2536
2863
|
calculateColumnsSize: i
|
|
2537
|
-
} =
|
|
2864
|
+
} = h, m = Lt(e), A = cn(e), w = Xa(e, n, m, f, t, o, A), {
|
|
2538
2865
|
getVisualData: y
|
|
2539
2866
|
} = w, k = Ja(e, c), S = on(e), {
|
|
2540
2867
|
sidebarWidth: g
|
|
2541
|
-
} = S, x =
|
|
2868
|
+
} = S, x = v(y(0, t + o)), P = en(e, f, x, c, w, t, o, g), {
|
|
2542
2869
|
onWheel: T,
|
|
2543
2870
|
dataGridWidth: _,
|
|
2544
2871
|
viewPortHeight: C,
|
|
@@ -2551,11 +2878,11 @@ const xt = X({
|
|
|
2551
2878
|
"fv-grid-content-hover": r.value,
|
|
2552
2879
|
"fv-grid-wrap-content": d.value
|
|
2553
2880
|
})), {
|
|
2554
|
-
renderDataArea:
|
|
2881
|
+
renderDataArea: H
|
|
2555
2882
|
} = dn(e, u, k, p, A, m, O, w, P, x), {
|
|
2556
|
-
renderGridHeader:
|
|
2883
|
+
renderGridHeader: E,
|
|
2557
2884
|
renderGridColumnResizeOverlay: W
|
|
2558
|
-
} = vn(e, l, p,
|
|
2885
|
+
} = vn(e, l, p, h, S, P), {
|
|
2559
2886
|
renderDataGridPagination: M
|
|
2560
2887
|
} = hn(e, f), {
|
|
2561
2888
|
renderDataGridSidebar: F
|
|
@@ -2574,7 +2901,7 @@ const xt = X({
|
|
|
2574
2901
|
l.value && (window.addEventListener("resize", ee), i(c, l.value, B), ke(() => {
|
|
2575
2902
|
l.value && (_.value = l.value.clientWidth), u.value && (B.value = u.value.clientWidth, C.value = u.value.clientHeight);
|
|
2576
2903
|
}));
|
|
2577
|
-
}),
|
|
2904
|
+
}), He(() => {
|
|
2578
2905
|
window.removeEventListener("resize", ee);
|
|
2579
2906
|
}), le(B, () => {
|
|
2580
2907
|
l.value && i(c, l.value, B);
|
|
@@ -2582,7 +2909,7 @@ const xt = X({
|
|
|
2582
2909
|
class: N.value,
|
|
2583
2910
|
style: "height:600px",
|
|
2584
2911
|
onWheel: T
|
|
2585
|
-
}, [
|
|
2912
|
+
}, [E(), a("div", {
|
|
2586
2913
|
ref: l,
|
|
2587
2914
|
class: D.value,
|
|
2588
2915
|
onMouseover: () => {
|
|
@@ -2591,7 +2918,7 @@ const xt = X({
|
|
|
2591
2918
|
onMouseleave: () => {
|
|
2592
2919
|
r.value = !1;
|
|
2593
2920
|
}
|
|
2594
|
-
}, [F(x),
|
|
2921
|
+
}, [F(x), H(), K(), $()]), R(), M(), W()]);
|
|
2595
2922
|
}
|
|
2596
2923
|
}), bn = {
|
|
2597
2924
|
install(e) {
|
|
@@ -2669,8 +2996,8 @@ function Me() {
|
|
|
2669
2996
|
return Math.round(u(f) / 1e3);
|
|
2670
2997
|
}
|
|
2671
2998
|
function r(f, p, c) {
|
|
2672
|
-
const
|
|
2673
|
-
return i - m > m -
|
|
2999
|
+
const h = u(p), i = u(c), m = u(f);
|
|
3000
|
+
return i - m > m - h ? p : c;
|
|
2674
3001
|
}
|
|
2675
3002
|
function d() {
|
|
2676
3003
|
const f = new Date();
|
|
@@ -2685,7 +3012,7 @@ function Me() {
|
|
|
2685
3012
|
}
|
|
2686
3013
|
return { emptyDate: e, getDate: n, getDate2: t, getDayNumber: o, getEpocTime: s, getNearDate: r, getWeekdayIndex: l, getTimeInMilliseconds: u, getToday: d };
|
|
2687
3014
|
}
|
|
2688
|
-
function
|
|
3015
|
+
function Ee() {
|
|
2689
3016
|
const { getTimeInMilliseconds: e } = Me();
|
|
2690
3017
|
function n(c) {
|
|
2691
3018
|
return c && c.year !== 0 && c.month !== 0 && c.day !== 0;
|
|
@@ -2696,27 +3023,27 @@ function He() {
|
|
|
2696
3023
|
function o(c) {
|
|
2697
3024
|
return c && c.year !== 0;
|
|
2698
3025
|
}
|
|
2699
|
-
function l(c,
|
|
2700
|
-
return e(c) < e(
|
|
3026
|
+
function l(c, h) {
|
|
3027
|
+
return e(c) < e(h);
|
|
2701
3028
|
}
|
|
2702
|
-
function u(c,
|
|
2703
|
-
return e(c) <= e(
|
|
3029
|
+
function u(c, h) {
|
|
3030
|
+
return e(c) <= e(h);
|
|
2704
3031
|
}
|
|
2705
|
-
function s(c,
|
|
2706
|
-
return e(c) === e(
|
|
3032
|
+
function s(c, h) {
|
|
3033
|
+
return e(c) === e(h);
|
|
2707
3034
|
}
|
|
2708
|
-
function r(c,
|
|
2709
|
-
const i = e(
|
|
3035
|
+
function r(c, h) {
|
|
3036
|
+
const i = e(h);
|
|
2710
3037
|
return e(c.from) === i || e(c.to) === i;
|
|
2711
3038
|
}
|
|
2712
|
-
function d(c,
|
|
2713
|
-
return !
|
|
3039
|
+
function d(c, h) {
|
|
3040
|
+
return !h || !n(h.to) || !n(h.from) ? !1 : u(h.from, c) && u(c, h.to);
|
|
2714
3041
|
}
|
|
2715
|
-
function f(c,
|
|
2716
|
-
return n(
|
|
3042
|
+
function f(c, h) {
|
|
3043
|
+
return n(h) && e(c) >= e(h);
|
|
2717
3044
|
}
|
|
2718
|
-
function p(c,
|
|
2719
|
-
return n(
|
|
3045
|
+
function p(c, h) {
|
|
3046
|
+
return n(h) && e(c) <= e(h);
|
|
2720
3047
|
}
|
|
2721
3048
|
return {
|
|
2722
3049
|
isDateEarlier: l,
|
|
@@ -2731,12 +3058,12 @@ function He() {
|
|
|
2731
3058
|
isMonthDisabledByDisableUntil: p
|
|
2732
3059
|
};
|
|
2733
3060
|
}
|
|
2734
|
-
const Ge = X({
|
|
3061
|
+
const Ge = /* @__PURE__ */ X({
|
|
2735
3062
|
name: "FDatePickerCalendarView",
|
|
2736
3063
|
props: wn,
|
|
2737
3064
|
emits: ["click", "clickWeek", "keyDown", "mouseEnter", "mouseLeave"],
|
|
2738
3065
|
setup(e, n) {
|
|
2739
|
-
const t =
|
|
3066
|
+
const t = v(e.dates), o = v(e.daysInWeek), l = v(e.enableKeyboadNavigate), u = v(e.enableMarkCurrent), s = v(e.enablePeriod), r = v(e.firstDayOfTheWeek), d = v(e.selected), f = v(e.selectedPeriod), p = v(e.selectedWeek), c = v(e.selectMode), h = v(e.showWeekNumber), i = v(e.weekTitle), m = b(() => h.value && r.value === "Mon");
|
|
2740
3067
|
le(() => e.dates, () => {
|
|
2741
3068
|
t.value = e.dates;
|
|
2742
3069
|
}), le(() => e.selected, () => {
|
|
@@ -2748,7 +3075,7 @@ const Ge = X({
|
|
|
2748
3075
|
isInitializedDate: y,
|
|
2749
3076
|
equalOrEarlier: k,
|
|
2750
3077
|
isPoint: S
|
|
2751
|
-
} =
|
|
3078
|
+
} = Ee(), {
|
|
2752
3079
|
getKeyCodeFromEvent: g
|
|
2753
3080
|
} = tt(), x = (M) => {
|
|
2754
3081
|
const F = !!p.value && M.numberInTheYear === p.value.numberInTheYear && M.year === p.value.year;
|
|
@@ -2756,7 +3083,7 @@ const Ge = X({
|
|
|
2756
3083
|
"f-datepicker-selectWeek": c.value === "week",
|
|
2757
3084
|
"f-datepicker-selectedWeek": c.value === "week" && F
|
|
2758
3085
|
};
|
|
2759
|
-
}, P = b(() =>
|
|
3086
|
+
}, P = b(() => h.value && r.value === "Mon");
|
|
2760
3087
|
function T(M) {
|
|
2761
3088
|
return w(M, f.value);
|
|
2762
3089
|
}
|
|
@@ -2795,11 +3122,11 @@ const Ge = X({
|
|
|
2795
3122
|
function D(M, F) {
|
|
2796
3123
|
c.value === "week" && (M.stopPropagation(), n.emit("clickWeek", F));
|
|
2797
3124
|
}
|
|
2798
|
-
function
|
|
3125
|
+
function H(M, F) {
|
|
2799
3126
|
const R = g(M);
|
|
2800
3127
|
R !== Ce.tab && (M.preventDefault(), R === Ce.enter || R === Ce.space ? N(M, F) : l.value && n.emit("keyDown", F.date));
|
|
2801
3128
|
}
|
|
2802
|
-
function
|
|
3129
|
+
function E(M) {
|
|
2803
3130
|
f.value && y(f.value.from) && !y(f.value.to) && (t.value.forEach((F) => {
|
|
2804
3131
|
F.days.forEach((R) => {
|
|
2805
3132
|
R.range = !!f.value && (k(f.value.from, R.date) && k(R.date, M.date) || k(R.date, f.value.from) && k(M.date, R.date));
|
|
@@ -2835,8 +3162,8 @@ const Ge = X({
|
|
|
2835
3162
|
tabindex: "0",
|
|
2836
3163
|
class: B(R, F, K),
|
|
2837
3164
|
onClick: ($) => N($, R),
|
|
2838
|
-
onKeydown: ($) =>
|
|
2839
|
-
onMouseenter: () =>
|
|
3165
|
+
onKeydown: ($) => H($, R),
|
|
3166
|
+
onMouseenter: () => E(R),
|
|
2840
3167
|
onMouseleave: () => W()
|
|
2841
3168
|
}, [R.marked && R.marked.marked && a("span", {
|
|
2842
3169
|
class: "f-datepicker-markdate",
|
|
@@ -2861,13 +3188,13 @@ const Ge = X({
|
|
|
2861
3188
|
selectingYear: { type: Boolean, default: !1 },
|
|
2862
3189
|
selectMode: { type: String, default: "day" }
|
|
2863
3190
|
};
|
|
2864
|
-
const Le = X({
|
|
3191
|
+
const Le = /* @__PURE__ */ X({
|
|
2865
3192
|
name: "FDatePickerCalendarNavbar",
|
|
2866
3193
|
props: xn,
|
|
2867
3194
|
emits: ["clickMonth", "clickYear", "prePage", "preRecord", "nextRecord", "nextPage"],
|
|
2868
3195
|
setup(e, n) {
|
|
2869
3196
|
return () => {
|
|
2870
|
-
const t =
|
|
3197
|
+
const t = v(e.ariaLabelPrevMonth), o = v(e.ariaLabelNextMonth), l = v(e.dateFormat), u = v(e.disablePrePage), s = v(e.disablePreRecord), r = v(e.disableNextRecord), d = v(e.disableNextPage), f = v(e.activeMonth), p = v(e.years), c = v(e.selectingMonth), h = v(e.selectingYear), i = v(e.selectMode), m = v(!0), A = v(!0);
|
|
2871
3198
|
le(() => e.activeMonth, () => {
|
|
2872
3199
|
var M, F, R, K;
|
|
2873
3200
|
f.value = {
|
|
@@ -2879,11 +3206,11 @@ const Le = X({
|
|
|
2879
3206
|
});
|
|
2880
3207
|
const w = b(() => ({
|
|
2881
3208
|
"f-datepicker-header": !0,
|
|
2882
|
-
monthYearSelBarBorder: c.value ||
|
|
3209
|
+
monthYearSelBarBorder: c.value || h.value
|
|
2883
3210
|
})), y = b(() => ({
|
|
2884
3211
|
"f-datepicker-header-btn": !0,
|
|
2885
3212
|
"f-datepicker-header-btn-disabled": u.value
|
|
2886
|
-
})), k = b(() => !c.value && !
|
|
3213
|
+
})), k = b(() => !c.value && !h.value), S = b(() => ({
|
|
2887
3214
|
"f-datepicker-header-btn": !0,
|
|
2888
3215
|
"f-datepicker-header-btn-disabled": s.value
|
|
2889
3216
|
})), g = b(() => ({
|
|
@@ -2919,10 +3246,10 @@ const Le = X({
|
|
|
2919
3246
|
function D(M) {
|
|
2920
3247
|
M.stopPropagation(), M.stopPropagation(), n.emit("nextRecord");
|
|
2921
3248
|
}
|
|
2922
|
-
function
|
|
3249
|
+
function H(M) {
|
|
2923
3250
|
M.stopPropagation(), n.emit("nextPage");
|
|
2924
3251
|
}
|
|
2925
|
-
function
|
|
3252
|
+
function E() {
|
|
2926
3253
|
return a("button", {
|
|
2927
3254
|
type: "button",
|
|
2928
3255
|
class: P.value,
|
|
@@ -2931,10 +3258,10 @@ const Le = X({
|
|
|
2931
3258
|
},
|
|
2932
3259
|
tabindex: m.value ? "0" : "-1",
|
|
2933
3260
|
disabled: i.value === "year"
|
|
2934
|
-
}, [
|
|
3261
|
+
}, [h.value ? p.value.length > 3 ? p.value[0][1].year + " - " + p.value[3][1].year : "" : f.value.displayTextOfYear]);
|
|
2935
3262
|
}
|
|
2936
3263
|
function W() {
|
|
2937
|
-
return !
|
|
3264
|
+
return !h.value && i.value !== "month" && a("button", {
|
|
2938
3265
|
type: "button",
|
|
2939
3266
|
class: T.value,
|
|
2940
3267
|
onClick: (M) => {
|
|
@@ -2963,7 +3290,7 @@ const Le = X({
|
|
|
2963
3290
|
class: "k-icon k-i-arrow-chevron-left"
|
|
2964
3291
|
}, null)])]), a("div", {
|
|
2965
3292
|
class: "f-datepicker-monthYearText"
|
|
2966
|
-
}, [_.value === "yyyy-MM" ? [
|
|
3293
|
+
}, [_.value === "yyyy-MM" ? [E(), W()] : [W(), E()]]), a("div", {
|
|
2967
3294
|
class: "f-datepicker-next-btn"
|
|
2968
3295
|
}, [k.value && a("button", {
|
|
2969
3296
|
type: "button",
|
|
@@ -2976,7 +3303,7 @@ const Le = X({
|
|
|
2976
3303
|
title: "nextPage",
|
|
2977
3304
|
type: "button",
|
|
2978
3305
|
class: x.value,
|
|
2979
|
-
onClick:
|
|
3306
|
+
onClick: H
|
|
2980
3307
|
}, [a("i", {
|
|
2981
3308
|
class: "k-icon k-i-arrow-double-60-right"
|
|
2982
3309
|
}, null)])])]);
|
|
@@ -3036,18 +3363,18 @@ const Le = X({
|
|
|
3036
3363
|
enablePeriod: { Type: Boolean, default: !1 },
|
|
3037
3364
|
selected: { Type: Object, default: null },
|
|
3038
3365
|
selectedPeriod: { Type: Object, default: null }
|
|
3039
|
-
}, ze = X({
|
|
3366
|
+
}, ze = /* @__PURE__ */ X({
|
|
3040
3367
|
name: "FDatePickerMonthView",
|
|
3041
3368
|
props: kn,
|
|
3042
3369
|
emits: ["click", "keyDown", "mouseEnter", "mouseLeave"],
|
|
3043
3370
|
setup(e, n) {
|
|
3044
|
-
const t =
|
|
3371
|
+
const t = v(e.months), o = v(e.enableMarkCurrent), l = v(e.enableKeyboadNavigate), u = v(e.enablePeriod), s = v(e.selected), r = v(e.selectedPeriod), {
|
|
3045
3372
|
equal: d,
|
|
3046
3373
|
inPeriod: f,
|
|
3047
3374
|
isInitializedDate: p,
|
|
3048
3375
|
equalOrEarlier: c
|
|
3049
|
-
} =
|
|
3050
|
-
getKeyCodeFromEvent:
|
|
3376
|
+
} = Ee(), {
|
|
3377
|
+
getKeyCodeFromEvent: h
|
|
3051
3378
|
} = tt();
|
|
3052
3379
|
le(() => e.months, () => {
|
|
3053
3380
|
t.value = e.months;
|
|
@@ -3058,7 +3385,7 @@ const Le = X({
|
|
|
3058
3385
|
x.stopPropagation(), !P.disable && n.emit("click", P);
|
|
3059
3386
|
}
|
|
3060
3387
|
function m(x, P) {
|
|
3061
|
-
const T =
|
|
3388
|
+
const T = h(x);
|
|
3062
3389
|
T !== Ce.tab && (x.preventDefault(), T === Ce.enter || T === Ce.space ? i(x, P) : l.value && n.emit("keyDown", P));
|
|
3063
3390
|
}
|
|
3064
3391
|
function A(x) {
|
|
@@ -3127,18 +3454,18 @@ const Le = X({
|
|
|
3127
3454
|
enablePeriod: { Type: Boolean, default: !1 },
|
|
3128
3455
|
selected: { Type: Object, default: null },
|
|
3129
3456
|
selectedPeriod: { Type: Object, default: null }
|
|
3130
|
-
}, Ye = X({
|
|
3457
|
+
}, Ye = /* @__PURE__ */ X({
|
|
3131
3458
|
name: "FDatePickerYearView",
|
|
3132
3459
|
props: Sn,
|
|
3133
3460
|
emits: ["click", "keyDown", "mouseEnter", "mouseLeave"],
|
|
3134
3461
|
setup(e, n) {
|
|
3135
|
-
const t =
|
|
3462
|
+
const t = v(e.years), o = v(e.enableMarkCurrent), l = v(e.enableKeyboadNavigate), u = v(e.enablePeriod), s = v(e.selected), r = v(e.selectedPeriod), {
|
|
3136
3463
|
equal: d,
|
|
3137
3464
|
inPeriod: f,
|
|
3138
3465
|
isInitializedDate: p,
|
|
3139
3466
|
equalOrEarlier: c
|
|
3140
|
-
} =
|
|
3141
|
-
getKeyCodeFromEvent:
|
|
3467
|
+
} = Ee(), {
|
|
3468
|
+
getKeyCodeFromEvent: h
|
|
3142
3469
|
} = tt();
|
|
3143
3470
|
le(() => e.years, () => {
|
|
3144
3471
|
t.value = e.years;
|
|
@@ -3177,7 +3504,7 @@ const Le = X({
|
|
|
3177
3504
|
P.stopPropagation(), !T.disable && n.emit("click", T);
|
|
3178
3505
|
}
|
|
3179
3506
|
function S(P, T) {
|
|
3180
|
-
const _ =
|
|
3507
|
+
const _ = h(P);
|
|
3181
3508
|
_ !== Ce.tab && (P.preventDefault(), _ === Ce.enter || _ === Ce.space ? k(P, T) : l.value && n.emit("keyDown", T));
|
|
3182
3509
|
}
|
|
3183
3510
|
function g(P) {
|
|
@@ -3248,8 +3575,8 @@ function at() {
|
|
|
3248
3575
|
return { getNumberByValue: n, getDayNumber: e, getMonthNumberByMonthName: t, getWeekNumber: o };
|
|
3249
3576
|
}
|
|
3250
3577
|
function _n(e, n, t, o, l, u, s, r) {
|
|
3251
|
-
const { getTimeInMilliseconds: d, getWeekdayIndex: f } = Me(), { isInitializedDate: p } =
|
|
3252
|
-
function
|
|
3578
|
+
const { getTimeInMilliseconds: d, getWeekdayIndex: f } = Me(), { isInitializedDate: p } = Ee(), { getDayNumber: c } = at();
|
|
3579
|
+
function h(i) {
|
|
3253
3580
|
if (i.year && i.year < e && i.month === 12 || i.year && i.year > n && i.month === 1)
|
|
3254
3581
|
return !0;
|
|
3255
3582
|
const m = d(i);
|
|
@@ -3263,7 +3590,7 @@ function _n(e, n, t, o, l, u, s, r) {
|
|
|
3263
3590
|
const A = c(i);
|
|
3264
3591
|
return !!(r.length > 0 && r.find((y) => f(y) === A) || l.length > 0 && l.find((y) => (y.year === 0 || y.year === i.year) && (y.month === 0 || y.month === i.month) && y.day === i.day) || u.length > 0 && u.find((y) => p(y.from) && p(y.to) && m >= d(y.from) && m <= d(y.to)));
|
|
3265
3592
|
}
|
|
3266
|
-
return { isDisabledDate:
|
|
3593
|
+
return { isDisabledDate: h };
|
|
3267
3594
|
}
|
|
3268
3595
|
function An() {
|
|
3269
3596
|
const { getDayNumber: e } = at();
|
|
@@ -3290,7 +3617,7 @@ function An() {
|
|
|
3290
3617
|
return { isHighlightedDate: t, isMarkedDate: n };
|
|
3291
3618
|
}
|
|
3292
3619
|
function Yt() {
|
|
3293
|
-
const { getTimeInMilliseconds: e } = Me(), { isInitializedDate: n } =
|
|
3620
|
+
const { getTimeInMilliseconds: e } = Me(), { isInitializedDate: n } = Ee();
|
|
3294
3621
|
function t(l, u) {
|
|
3295
3622
|
return n(u) && e(l) <= e(u);
|
|
3296
3623
|
}
|
|
@@ -3304,7 +3631,7 @@ function nt() {
|
|
|
3304
3631
|
function o(p) {
|
|
3305
3632
|
const c = { displayTextOfMonth: "", month: 0, year: 0, displayTextOfYear: "" };
|
|
3306
3633
|
if (p) {
|
|
3307
|
-
const
|
|
3634
|
+
const h = p.match(/[^0-9]/), i = h && h.length ? h[0] : "", m = p.split(i);
|
|
3308
3635
|
c.month = m[0].length === 2 ? Number(m[0]) : Number(m[1]), c.year = m[0].length === 2 ? Number(m[1]) : Number(m[0]);
|
|
3309
3636
|
}
|
|
3310
3637
|
return c;
|
|
@@ -3312,19 +3639,19 @@ function nt() {
|
|
|
3312
3639
|
function l(p, c) {
|
|
3313
3640
|
return new Date(c, p, 0).getDate();
|
|
3314
3641
|
}
|
|
3315
|
-
function u(p, c,
|
|
3316
|
-
return new Date(p, c - 1,
|
|
3642
|
+
function u(p, c, h) {
|
|
3643
|
+
return new Date(p, c - 1, h, 0, 0, 0, 0);
|
|
3317
3644
|
}
|
|
3318
3645
|
function s(p, c) {
|
|
3319
|
-
const
|
|
3320
|
-
return
|
|
3646
|
+
const h = u(c, p, 1);
|
|
3647
|
+
return h.setMonth(h.getMonth() - 1), l(h.getMonth() + 1, h.getFullYear());
|
|
3321
3648
|
}
|
|
3322
|
-
function r(p, c,
|
|
3649
|
+
function r(p, c, h, i) {
|
|
3323
3650
|
const m = e(), A = [], { year: w } = c, y = 3;
|
|
3324
3651
|
for (let k = 1; k <= 12; k += y) {
|
|
3325
3652
|
const S = [];
|
|
3326
3653
|
for (let g = k; g < k + y; g++) {
|
|
3327
|
-
const x = n({ year: w, month: g, day: 1 },
|
|
3654
|
+
const x = n({ year: w, month: g, day: 1 }, h) || t({ year: w, month: g, day: l(g, w || 0) }, i);
|
|
3328
3655
|
S.push({
|
|
3329
3656
|
month: g,
|
|
3330
3657
|
displayText: p[g],
|
|
@@ -3338,16 +3665,16 @@ function nt() {
|
|
|
3338
3665
|
return A;
|
|
3339
3666
|
}
|
|
3340
3667
|
function d(p, c) {
|
|
3341
|
-
const
|
|
3668
|
+
const h = {
|
|
3342
3669
|
year: p === 12 ? c + 1 : c
|
|
3343
3670
|
}, i = p === 12 ? 1 : p + 1;
|
|
3344
|
-
return
|
|
3671
|
+
return h.month = i, h;
|
|
3345
3672
|
}
|
|
3346
3673
|
function f(p, c) {
|
|
3347
|
-
const
|
|
3674
|
+
const h = {
|
|
3348
3675
|
year: p === 1 ? c - 1 : c
|
|
3349
3676
|
}, i = p === 1 ? 12 : p - 1;
|
|
3350
|
-
return
|
|
3677
|
+
return h.month = i, h;
|
|
3351
3678
|
}
|
|
3352
3679
|
return { daysInMonth: l, daysInPreMonth: s, generateMonths: r, parseDefaultMonth: o, getNextMonth: d, getPreviousMonth: f };
|
|
3353
3680
|
}
|
|
@@ -3366,11 +3693,11 @@ function Tn({ isDisabledDate: e }) {
|
|
|
3366
3693
|
function c(i, m, A, w, y) {
|
|
3367
3694
|
return i === y.day && m === y.month && A === y.year && w === he.current;
|
|
3368
3695
|
}
|
|
3369
|
-
function
|
|
3696
|
+
function h(i, m, A, w, y, k, S, g, x) {
|
|
3370
3697
|
const P = [], T = n(), _ = p(m, i, f(A)), C = t(i, m), B = o(i, m);
|
|
3371
3698
|
let O = 1, N = he.previous;
|
|
3372
3699
|
for (let D = 1; D < 7; D++) {
|
|
3373
|
-
const
|
|
3700
|
+
const H = [];
|
|
3374
3701
|
if (D === 1) {
|
|
3375
3702
|
const W = B - _ + 1;
|
|
3376
3703
|
for (let F = W; F <= B; F++) {
|
|
@@ -3379,13 +3706,13 @@ function Tn({ isDisabledDate: e }) {
|
|
|
3379
3706
|
month: i === 1 ? 12 : i - 1,
|
|
3380
3707
|
day: F
|
|
3381
3708
|
}, K = c(F, i, m, N, T), $ = e(R), ee = r(R, w, y), te = s(R, g, S, k);
|
|
3382
|
-
|
|
3709
|
+
H.push({ date: R, tag: N, isCurrent: K, disable: $, marked: ee, highlight: te });
|
|
3383
3710
|
}
|
|
3384
3711
|
N = he.current;
|
|
3385
|
-
const M = 7 -
|
|
3712
|
+
const M = 7 - H.length;
|
|
3386
3713
|
for (let F = 0; F < M; F++) {
|
|
3387
3714
|
const R = { year: m, month: i, day: O }, K = c(O, i, m, N, T), $ = e(R), ee = r(R, w, y), te = s(R, g, S, k);
|
|
3388
|
-
|
|
3715
|
+
H.push({ date: R, tag: N, isCurrent: K, disable: $, marked: ee, highlight: te }), O++;
|
|
3389
3716
|
}
|
|
3390
3717
|
} else
|
|
3391
3718
|
for (let W = 1; W <= 7; W++) {
|
|
@@ -3395,20 +3722,20 @@ function Tn({ isDisabledDate: e }) {
|
|
|
3395
3722
|
month: N === he.current ? i : N === he.next && i < 12 ? i + 1 : 1,
|
|
3396
3723
|
day: O
|
|
3397
3724
|
}, F = c(O, i, m, N, T), R = e(M), K = r(M, w, y), $ = s(M, g, S, k);
|
|
3398
|
-
|
|
3725
|
+
H.push({ date: M, tag: N, isCurrent: F, disable: R, marked: K, highlight: $ }), O++;
|
|
3399
3726
|
}
|
|
3400
|
-
const
|
|
3401
|
-
P.push({ days:
|
|
3727
|
+
const E = x && A === "Mon." ? d(H[0].date) : 0;
|
|
3728
|
+
P.push({ days: H, numberInTheYear: E, year: m });
|
|
3402
3729
|
}
|
|
3403
3730
|
return P;
|
|
3404
3731
|
}
|
|
3405
|
-
return { generateCalendar:
|
|
3732
|
+
return { generateCalendar: h };
|
|
3406
3733
|
}
|
|
3407
3734
|
function Pn() {
|
|
3408
3735
|
const { getToday: e } = Me(), { daysInMonth: n } = nt(), { isMonthDisabledByDisableSince: t, isMonthDisabledByDisableUntil: o } = Yt();
|
|
3409
3736
|
function l(u, s, r, d, f, p) {
|
|
3410
|
-
const c = [],
|
|
3411
|
-
for (let k =
|
|
3737
|
+
const c = [], h = u - u % 10, { year: i, month: m } = s, A = e(), w = 3, y = h + 10;
|
|
3738
|
+
for (let k = h - 1; k < y; k += w) {
|
|
3412
3739
|
const S = [];
|
|
3413
3740
|
for (let g = k; g < k + w; g++) {
|
|
3414
3741
|
const x = t({ year: g, month: m, day: 1 }, f) || o({ year: g, month: m, day: n(m || 0, g) }, p), P = g < r || g > d;
|
|
@@ -3426,12 +3753,12 @@ function Pn() {
|
|
|
3426
3753
|
}
|
|
3427
3754
|
return { generateYears: l };
|
|
3428
3755
|
}
|
|
3429
|
-
const Ct = X({
|
|
3756
|
+
const Ct = /* @__PURE__ */ X({
|
|
3430
3757
|
name: "FDatePickerContainer",
|
|
3431
3758
|
props: Cn,
|
|
3432
3759
|
emits: ["datePicked"],
|
|
3433
3760
|
setup(e, n) {
|
|
3434
|
-
const t =
|
|
3761
|
+
const t = v(e.top), o = v(e.left), l = v(e.position), u = v(e.enablePeriod), s = v(e.selectMode), r = v(e.dateFormat), d = v(e.nameOfMonths), f = v([]), p = v(!1), c = v(""), h = v(!1), i = v(""), m = v(), A = v(!1), w = v(!1), y = v(!1), k = v(!1), S = v(!1), g = v(!1), x = v(!1), P = v(!1), T = v(e.secondaryDates), _ = v(e.daysInWeek), C = v(e.enableKeyboadNavigate), B = v(e.enableMarkCurrent), O = v(e.firstDayOfTheWeek), N = v(e.showWeekNumber), D = v(e.selectedDate), H = v(e.selectedWeek), E = v(e.selectedPeriod), W = v(e.weekTitle), M = v(e.secondaryMonths), F = v(e.selectedMonth), R = v(e.minYear), K = v(e.maxYear), $ = v(e.disableSince), ee = v(e.disableUntil), te = v(e.disableDates), fe = v(e.disablePeriod), me = v(e.disableWeekdays), V = v(e.disableWeekends), z = _n(R.value, K.value, $.value, ee.value, te.value, fe.value, V.value, me.value), {
|
|
3435
3762
|
generateCalendar: J
|
|
3436
3763
|
} = Tn(z), {
|
|
3437
3764
|
getToday: ae
|
|
@@ -3441,12 +3768,12 @@ const Ct = X({
|
|
|
3441
3768
|
getPreviousMonth: re
|
|
3442
3769
|
} = nt(), {
|
|
3443
3770
|
generateYears: ce
|
|
3444
|
-
} = Pn(), U = ae(), G =
|
|
3771
|
+
} = Pn(), U = ae(), G = v({
|
|
3445
3772
|
year: U.year || 1,
|
|
3446
3773
|
month: U.month || 1,
|
|
3447
3774
|
displayTextOfMonth: d.value[U.month || "1"],
|
|
3448
3775
|
displayTextOfYear: `${U.year}`
|
|
3449
|
-
}), pe = U.month === 12 ? (U.year || 1) + 1 : U.year, xe = (U.month || 1) < 12 ? (U.month || 1) + 1 : 1, j =
|
|
3776
|
+
}), pe = U.month === 12 ? (U.year || 1) + 1 : U.year, xe = (U.month || 1) < 12 ? (U.month || 1) + 1 : 1, j = v({
|
|
3450
3777
|
year: pe,
|
|
3451
3778
|
month: xe,
|
|
3452
3779
|
displayTextOfMonth: d.value[U.month || "1"],
|
|
@@ -3480,7 +3807,7 @@ const Ct = X({
|
|
|
3480
3807
|
I.stopPropagation();
|
|
3481
3808
|
}
|
|
3482
3809
|
function Te(I, ue) {
|
|
3483
|
-
const q = G.value.year - (
|
|
3810
|
+
const q = G.value.year - (h.value ? 10 : 1), Pe = {
|
|
3484
3811
|
year: q,
|
|
3485
3812
|
month: G.value.month,
|
|
3486
3813
|
displayTextOfMonth: d.value[G.value.month || "1"],
|
|
@@ -3516,10 +3843,10 @@ const Ct = X({
|
|
|
3516
3843
|
G.value = Pe;
|
|
3517
3844
|
}
|
|
3518
3845
|
function Qt(I) {
|
|
3519
|
-
p.value = !0,
|
|
3846
|
+
p.value = !0, h.value = !1;
|
|
3520
3847
|
}
|
|
3521
3848
|
function Zt(I) {
|
|
3522
|
-
p.value = !1,
|
|
3849
|
+
p.value = !1, h.value = !0;
|
|
3523
3850
|
}
|
|
3524
3851
|
const Xt = b(() => ({
|
|
3525
3852
|
"active-month": G.value,
|
|
@@ -3530,7 +3857,7 @@ const Ct = X({
|
|
|
3530
3857
|
"disable-next-page": k.value,
|
|
3531
3858
|
years: se.value,
|
|
3532
3859
|
"selecting-month": p.value,
|
|
3533
|
-
"selecting-year":
|
|
3860
|
+
"selecting-year": h.value,
|
|
3534
3861
|
"select-mode": s.value
|
|
3535
3862
|
})), Jt = b(() => ({
|
|
3536
3863
|
"active-month": j.value,
|
|
@@ -3554,7 +3881,7 @@ const Ct = X({
|
|
|
3554
3881
|
onClickYear: (q) => Zt()
|
|
3555
3882
|
}), null);
|
|
3556
3883
|
}
|
|
3557
|
-
const ut = b(() => !p.value && !
|
|
3884
|
+
const ut = b(() => !p.value && !h.value && !m.value || u.value && s.value !== "week" && !c.value && !i.value && !m.value), ea = b(() => p.value && !h.value), ta = b(() => h.value && !p.value), aa = b(() => ({
|
|
3558
3885
|
dates: Q.value,
|
|
3559
3886
|
daysInWeek: _.value,
|
|
3560
3887
|
enableKeyboadNavigate: C.value,
|
|
@@ -3562,8 +3889,8 @@ const Ct = X({
|
|
|
3562
3889
|
enablePeriod: u.value,
|
|
3563
3890
|
firstDayOfTheWeek: O.value,
|
|
3564
3891
|
selected: D.value,
|
|
3565
|
-
selectedPeriod:
|
|
3566
|
-
selectedWeek:
|
|
3892
|
+
selectedPeriod: E.value,
|
|
3893
|
+
selectedWeek: H.value,
|
|
3567
3894
|
selectMode: s.value,
|
|
3568
3895
|
showWeekNumber: N.value,
|
|
3569
3896
|
weekTitle: W.value
|
|
@@ -3575,7 +3902,7 @@ const Ct = X({
|
|
|
3575
3902
|
enablePeriod: u.value,
|
|
3576
3903
|
firstDayOfTheWeek: O.value,
|
|
3577
3904
|
selected: D.value,
|
|
3578
|
-
selectedPeriod:
|
|
3905
|
+
selectedPeriod: E.value,
|
|
3579
3906
|
selectMode: N.value,
|
|
3580
3907
|
showWeekNumber: N.value,
|
|
3581
3908
|
weekTitle: W.value
|
|
@@ -3583,10 +3910,10 @@ const Ct = X({
|
|
|
3583
3910
|
function la(I, ue) {
|
|
3584
3911
|
D.value = I, n.emit("datePicked", `${I.year}-${I.month}-${I.day}`);
|
|
3585
3912
|
}
|
|
3586
|
-
function El(I) {
|
|
3587
|
-
}
|
|
3588
3913
|
function Hl(I) {
|
|
3589
3914
|
}
|
|
3915
|
+
function El(I) {
|
|
3916
|
+
}
|
|
3590
3917
|
function Rl(I, ue) {
|
|
3591
3918
|
}
|
|
3592
3919
|
function Vl(I, ue) {
|
|
@@ -3606,17 +3933,17 @@ const Ct = X({
|
|
|
3606
3933
|
enableKeyboadNavigate: C.value,
|
|
3607
3934
|
enablePeriod: u.value,
|
|
3608
3935
|
selected: F.value,
|
|
3609
|
-
selectedPeriod:
|
|
3936
|
+
selectedPeriod: E.value
|
|
3610
3937
|
})), sa = b(() => ({
|
|
3611
3938
|
months: M.value,
|
|
3612
3939
|
enableMarkCurrent: B.value,
|
|
3613
3940
|
enableKeyboadNavigate: C.value,
|
|
3614
3941
|
enablePeriod: u.value,
|
|
3615
3942
|
selected: F.value,
|
|
3616
|
-
selectedPeriod:
|
|
3943
|
+
selectedPeriod: E.value
|
|
3617
3944
|
}));
|
|
3618
3945
|
function ia(I, ue) {
|
|
3619
|
-
p.value = !1,
|
|
3946
|
+
p.value = !1, h.value = !1, F.value = I, G.value = {
|
|
3620
3947
|
month: I.month || 1,
|
|
3621
3948
|
displayTextOfMonth: d.value[G.value.month || "1"],
|
|
3622
3949
|
year: G.value.year || 1,
|
|
@@ -3643,17 +3970,17 @@ const Ct = X({
|
|
|
3643
3970
|
enableMarkCurrent: B.value,
|
|
3644
3971
|
enablePeriod: u.value,
|
|
3645
3972
|
selected: D.value,
|
|
3646
|
-
selectedPeriod:
|
|
3973
|
+
selectedPeriod: E.value
|
|
3647
3974
|
})), ra = b(() => ({
|
|
3648
3975
|
years: f.value,
|
|
3649
3976
|
enableKeyboadNavigate: C.value,
|
|
3650
3977
|
enableMarkCurrent: B.value,
|
|
3651
3978
|
enablePeriod: u.value,
|
|
3652
3979
|
selected: D.value,
|
|
3653
|
-
selectedPeriod:
|
|
3980
|
+
selectedPeriod: E.value
|
|
3654
3981
|
}));
|
|
3655
3982
|
function ca(I, ue) {
|
|
3656
|
-
p.value = !0,
|
|
3983
|
+
p.value = !0, h.value = !1, G.value = {
|
|
3657
3984
|
month: G.value.month,
|
|
3658
3985
|
displayTextOfMonth: G.value.displayTextOfMonth,
|
|
3659
3986
|
year: I.year || 1,
|
|
@@ -3712,20 +4039,20 @@ const Ct = X({
|
|
|
3712
4039
|
onClick: (I) => ge(I)
|
|
3713
4040
|
}, [a("div", {
|
|
3714
4041
|
class: "f-datepicker-content"
|
|
3715
|
-
}, [it(!1, Xt.value), rt(!1, aa.value), p.value && ct(!1, oa.value),
|
|
4042
|
+
}, [it(!1, Xt.value), rt(!1, aa.value), p.value && ct(!1, oa.value), h.value && dt(!1, ua.value), a("div", {
|
|
3716
4043
|
class: "f-datepicker-footer"
|
|
3717
4044
|
}, [a("div", {
|
|
3718
4045
|
class: "f-datepicker-redirect"
|
|
3719
4046
|
}, [ut.value && a("button", {
|
|
3720
4047
|
class: "btn btn-link",
|
|
3721
4048
|
onClick: da
|
|
3722
|
-
}, [_e("
|
|
4049
|
+
}, [_e("今天")]), ea.value && a("button", {
|
|
3723
4050
|
class: "btn btn-link",
|
|
3724
4051
|
onClick: fa
|
|
3725
|
-
}, [_e("
|
|
4052
|
+
}, [_e("本月")]), ta.value && a("button", {
|
|
3726
4053
|
class: "btn btn-link",
|
|
3727
4054
|
onClick: va
|
|
3728
|
-
}, [_e("
|
|
4055
|
+
}, [_e("今年")])])])]), ha.value && a("div", {
|
|
3729
4056
|
class: "f-datepicker-content"
|
|
3730
4057
|
}, [it(!0, Jt.value), rt(!0, na.value), c.value && ct(!0, sa.value), i.value && dt(!0, ra.value)])]);
|
|
3731
4058
|
}
|
|
@@ -3745,15 +4072,18 @@ const Ct = X({
|
|
|
3745
4072
|
highlightDates: { Type: Array, default: [] },
|
|
3746
4073
|
highlightSaturday: { Type: Boolean, default: !1 },
|
|
3747
4074
|
highlightSunday: { Type: Boolean, default: !1 },
|
|
4075
|
+
/**
|
|
4076
|
+
* 组件值
|
|
4077
|
+
*/
|
|
3748
4078
|
modelValue: { type: String, default: "" },
|
|
3749
4079
|
nameOfMonths: { Type: Object, default: zt },
|
|
3750
4080
|
periodDelimiter: { Type: String, default: "" }
|
|
3751
|
-
}, kt = X({
|
|
4081
|
+
}, kt = /* @__PURE__ */ X({
|
|
3752
4082
|
name: "FDatePicker",
|
|
3753
4083
|
props: Bn,
|
|
3754
4084
|
emits: ["update:modelValue", "datePicked"],
|
|
3755
4085
|
setup(e, n) {
|
|
3756
|
-
const t = '<span class="f-icon f-icon-date"></span>', o =
|
|
4086
|
+
const t = '<span class="f-icon f-icon-date"></span>', o = v(e.modelValue), l = v(null);
|
|
3757
4087
|
function u() {
|
|
3758
4088
|
}
|
|
3759
4089
|
function s(r) {
|
|
@@ -3785,12 +4115,12 @@ const Ct = X({
|
|
|
3785
4115
|
checked: { Type: Boolean, default: !1 },
|
|
3786
4116
|
id: { Type: String, default: "" },
|
|
3787
4117
|
disabled: { Type: Boolean, default: !1 }
|
|
3788
|
-
}, Dn = X({
|
|
4118
|
+
}, Dn = /* @__PURE__ */ X({
|
|
3789
4119
|
name: "FListViewCheckBox",
|
|
3790
4120
|
props: Nn,
|
|
3791
4121
|
emits: ["change"],
|
|
3792
4122
|
setup(e, n) {
|
|
3793
|
-
const t =
|
|
4123
|
+
const t = v(e.checked), o = v(e.disabled), l = v(e.id);
|
|
3794
4124
|
function u(s) {
|
|
3795
4125
|
s.stopPropagation(), t.value = !t.value, o.value || n.emit("change", {
|
|
3796
4126
|
originalEvent: s,
|
|
@@ -3804,21 +4134,21 @@ const Ct = X({
|
|
|
3804
4134
|
type: "checkbox",
|
|
3805
4135
|
class: "custom-control-input",
|
|
3806
4136
|
"onUpdate:modelValue": (s) => t.value = s
|
|
3807
|
-
}, null), [[
|
|
4137
|
+
}, null), [[Et, t.value]]), a("label", {
|
|
3808
4138
|
class: "custom-control-label",
|
|
3809
4139
|
onClick: (s) => u(s)
|
|
3810
4140
|
}, null)]);
|
|
3811
4141
|
}
|
|
3812
4142
|
});
|
|
3813
|
-
const St = X({
|
|
4143
|
+
const St = /* @__PURE__ */ X({
|
|
3814
4144
|
name: "FListView",
|
|
3815
4145
|
props: On,
|
|
3816
4146
|
emits: ["checkValuesChange", "clickItem", "selectChange"],
|
|
3817
4147
|
setup(e, n) {
|
|
3818
4148
|
return () => {
|
|
3819
|
-
const t =
|
|
3820
|
-
let
|
|
3821
|
-
const i =
|
|
4149
|
+
const t = v(e.multiSelect), o = v(e.cardView), l = v(""), u = v(!0), s = v({}), r = v("暂无数据"), d = v(!0), f = v(!1), p = [], c = v("id");
|
|
4150
|
+
let h = [];
|
|
4151
|
+
const i = v(e.data), m = v(e.data), A = b(() => ({
|
|
3822
4152
|
"f-list-view": !0,
|
|
3823
4153
|
"f-list-view-multiple": t.value
|
|
3824
4154
|
})), w = b(() => ({
|
|
@@ -3836,7 +4166,7 @@ const St = X({
|
|
|
3836
4166
|
"f-un-select": !!O.selectDisable,
|
|
3837
4167
|
"f-listview-active": k()
|
|
3838
4168
|
};
|
|
3839
|
-
return l.value.split(" ").reduce((
|
|
4169
|
+
return l.value.split(" ").reduce((H, E) => (H[E] = !0, H), N), N;
|
|
3840
4170
|
}, g = b(() => i.value.length === 0), x = b(() => g.value && !n.slots.empty), P = b(() => !!n.slots.footer || u.value);
|
|
3841
4171
|
function T(O, N) {
|
|
3842
4172
|
return "";
|
|
@@ -3844,26 +4174,26 @@ const St = X({
|
|
|
3844
4174
|
function _(O) {
|
|
3845
4175
|
n.emit("checkValuesChange", O);
|
|
3846
4176
|
}
|
|
3847
|
-
function C(O, N, D,
|
|
3848
|
-
const
|
|
4177
|
+
function C(O, N, D, H = !1) {
|
|
4178
|
+
const E = typeof event == "boolean";
|
|
3849
4179
|
if (!(N.unClick || N.selectDisable)) {
|
|
3850
4180
|
if (n.emit("selectChange", {
|
|
3851
4181
|
listdata: N,
|
|
3852
4182
|
index: D
|
|
3853
4183
|
}), t.value)
|
|
3854
4184
|
if (N.checked) {
|
|
3855
|
-
if (!d.value ||
|
|
3856
|
-
const W =
|
|
3857
|
-
|
|
4185
|
+
if (!d.value || E) {
|
|
4186
|
+
const W = h.findIndex((M, F) => T() === T());
|
|
4187
|
+
h.splice(W, 1), N.checked = !1;
|
|
3858
4188
|
}
|
|
3859
4189
|
} else
|
|
3860
|
-
|
|
4190
|
+
h.find((M, F) => T() === T()) || (h.unshift(N), N.checked = !0);
|
|
3861
4191
|
else
|
|
3862
|
-
|
|
3863
|
-
if (
|
|
3864
|
-
data:
|
|
4192
|
+
h = [], h.push(N);
|
|
4193
|
+
if (H || (s.value = N), n.emit("clickItem", {
|
|
4194
|
+
data: h,
|
|
3865
4195
|
index: D,
|
|
3866
|
-
checkChangeEvent:
|
|
4196
|
+
checkChangeEvent: H
|
|
3867
4197
|
}), t.value) {
|
|
3868
4198
|
let W = m.value.filter((M) => !!M.checked).map((M) => M[c.value]);
|
|
3869
4199
|
f.value && (W = p.map((M) => M[c.value])), _(W);
|
|
@@ -3871,8 +4201,8 @@ const St = X({
|
|
|
3871
4201
|
}
|
|
3872
4202
|
}
|
|
3873
4203
|
function B(O, N, D) {
|
|
3874
|
-
const
|
|
3875
|
-
C(
|
|
4204
|
+
const H = O.checked;
|
|
4205
|
+
C(H, N, D, !0);
|
|
3876
4206
|
}
|
|
3877
4207
|
return a("div", {
|
|
3878
4208
|
class: A.value
|
|
@@ -3918,8 +4248,8 @@ const St = X({
|
|
|
3918
4248
|
type: { Type: String, default: "info" },
|
|
3919
4249
|
title: { Type: String, default: "" },
|
|
3920
4250
|
detail: { Type: String, default: "" },
|
|
3921
|
-
okButtonText: { Type: String, default: "
|
|
3922
|
-
cancelButtonText: { Type: String, default: "
|
|
4251
|
+
okButtonText: { Type: String, default: "确定" },
|
|
4252
|
+
cancelButtonText: { Type: String, default: "取消" },
|
|
3923
4253
|
exceptionInfo: { Type: Object, default: { date: "", message: "", detail: "" } }
|
|
3924
4254
|
};
|
|
3925
4255
|
function lt() {
|
|
@@ -3930,7 +4260,7 @@ async function Fn(e) {
|
|
|
3930
4260
|
throw lt();
|
|
3931
4261
|
return navigator.clipboard.writeText(e);
|
|
3932
4262
|
}
|
|
3933
|
-
async function
|
|
4263
|
+
async function Hn(e) {
|
|
3934
4264
|
const n = document.createElement("span");
|
|
3935
4265
|
n.textContent = e, n.style.whiteSpace = "pre", n.style.webkitUserSelect = "auto", n.style.userSelect = "all", document.body.appendChild(n);
|
|
3936
4266
|
const t = window.getSelection(), o = window.document.createRange();
|
|
@@ -3944,12 +4274,12 @@ async function En(e) {
|
|
|
3944
4274
|
if (!l)
|
|
3945
4275
|
throw lt();
|
|
3946
4276
|
}
|
|
3947
|
-
async function
|
|
4277
|
+
async function En(e) {
|
|
3948
4278
|
try {
|
|
3949
4279
|
await Fn(e);
|
|
3950
4280
|
} catch (n) {
|
|
3951
4281
|
try {
|
|
3952
|
-
await
|
|
4282
|
+
await Hn(e);
|
|
3953
4283
|
} catch (t) {
|
|
3954
4284
|
throw t || n || lt();
|
|
3955
4285
|
}
|
|
@@ -3957,20 +4287,20 @@ async function Hn(e) {
|
|
|
3957
4287
|
}
|
|
3958
4288
|
function Rn(e, n) {
|
|
3959
4289
|
async function t(o) {
|
|
3960
|
-
await
|
|
4290
|
+
await En(o);
|
|
3961
4291
|
}
|
|
3962
4292
|
return { onCopy: t };
|
|
3963
4293
|
}
|
|
3964
|
-
const Ke = X({
|
|
4294
|
+
const Ke = /* @__PURE__ */ X({
|
|
3965
4295
|
name: "FMessageBox",
|
|
3966
4296
|
props: Wn,
|
|
3967
4297
|
emits: ["accept", "reject", "close"],
|
|
3968
4298
|
setup(e, n) {
|
|
3969
|
-
const t =
|
|
3970
|
-
|
|
3971
|
-
const s =
|
|
3972
|
-
|
|
3973
|
-
const d =
|
|
4299
|
+
const t = v(e.type), o = v(e.title), l = v(e.detail), u = v(e.exceptionInfo);
|
|
4300
|
+
v("");
|
|
4301
|
+
const s = v(14), r = v(140);
|
|
4302
|
+
v(""), v("");
|
|
4303
|
+
const d = v(!1), f = v(""), p = v(l.value.length), c = v([]), h = v(e.okButtonText), i = v(e.cancelButtonText), m = v(!0), A = v(!0), w = v(!0), y = v("复制详细信息"), k = v(3), S = v(480), g = b(() => {
|
|
3974
4304
|
const j = {
|
|
3975
4305
|
"modal-tips": !0,
|
|
3976
4306
|
"d-flex": !0,
|
|
@@ -3985,7 +4315,7 @@ const Ke = X({
|
|
|
3985
4315
|
"f-icon": !0
|
|
3986
4316
|
}, Q = `f-icon-${t.value}`;
|
|
3987
4317
|
return j[Q] = !0, j;
|
|
3988
|
-
}), T = b(() => o.value || u.value && u.value.message), _ = b(() => l.value), C = b(() => !!l.value), B = b(() => !!u.value), O = b(() => !!u.value && !!u.value.date), N = b(() =>
|
|
4318
|
+
}), T = b(() => o.value || u.value && u.value.message), _ = b(() => l.value), C = b(() => !!l.value), B = b(() => !!u.value), O = b(() => !!u.value && !!u.value.date), N = b(() => `发生时间 : ${u.value && u.value.date || ""}`), D = b(() => !!u.value && !!u.value.detail), H = b(() => {
|
|
3989
4319
|
const j = `${S.value}px`;
|
|
3990
4320
|
return {
|
|
3991
4321
|
overflow: "hidden",
|
|
@@ -3995,7 +4325,7 @@ const Ke = X({
|
|
|
3995
4325
|
"-webkit-line-clamp": k.value,
|
|
3996
4326
|
"max-height": j
|
|
3997
4327
|
};
|
|
3998
|
-
}),
|
|
4328
|
+
}), E = b(() => u.value && u.value.detail || ""), W = b(() => !0), M = v(!1), F = v("展开"), R = v("收起"), K = b(() => {
|
|
3999
4329
|
const j = {
|
|
4000
4330
|
display: "block",
|
|
4001
4331
|
color: "#2A87FF"
|
|
@@ -4022,9 +4352,9 @@ const Ke = X({
|
|
|
4022
4352
|
}
|
|
4023
4353
|
}
|
|
4024
4354
|
b(() => d.value && r.value);
|
|
4025
|
-
const V = b(() => !(c.value && c.value.length) && (
|
|
4355
|
+
const V = b(() => !(c.value && c.value.length) && (h.value || i.value));
|
|
4026
4356
|
b(() => t.value === "prompt" && m.value);
|
|
4027
|
-
const z = b(() => A.value && i.value), J = b(() => w.value &&
|
|
4357
|
+
const z = b(() => A.value && i.value), J = b(() => w.value && h.value);
|
|
4028
4358
|
function ae(j) {
|
|
4029
4359
|
t.value === "question" && n.emit("reject"), n.emit("close");
|
|
4030
4360
|
}
|
|
@@ -4033,10 +4363,10 @@ const Ke = X({
|
|
|
4033
4363
|
}
|
|
4034
4364
|
const oe = b(() => !!(c.value && c.value.length)), re = b(() => u.value && u.value.date && u.value.message && u.value.detail), {
|
|
4035
4365
|
onCopy: ce
|
|
4036
|
-
} = Rn(), U =
|
|
4366
|
+
} = Rn(), U = v("复制成功"), G = v(!1);
|
|
4037
4367
|
function pe(j) {
|
|
4038
|
-
ce(
|
|
4039
|
-
U.value = "
|
|
4368
|
+
ce(E.value).catch((Q) => {
|
|
4369
|
+
U.value = "复制失败";
|
|
4040
4370
|
}).finally(() => {
|
|
4041
4371
|
G.value = !0, setTimeout(() => {
|
|
4042
4372
|
G.value = !1;
|
|
@@ -4084,9 +4414,9 @@ const Ke = X({
|
|
|
4084
4414
|
}, [O.value && a("div", null, [N.value]), D.value && a("div", {
|
|
4085
4415
|
id: "exception_error_msg",
|
|
4086
4416
|
ref: "exceptionMessageRef",
|
|
4087
|
-
style:
|
|
4088
|
-
}, [_e("
|
|
4089
|
-
innerHTML:
|
|
4417
|
+
style: H.value
|
|
4418
|
+
}, [_e("详细信息 : "), a("span", {
|
|
4419
|
+
innerHTML: E.value
|
|
4090
4420
|
}, null)]), W.value && a("span", {
|
|
4091
4421
|
style: K.value
|
|
4092
4422
|
}, [M.value && a("span", {
|
|
@@ -4127,7 +4457,7 @@ const Ke = X({
|
|
|
4127
4457
|
type: "button",
|
|
4128
4458
|
class: "btn btn-primary btn-lg",
|
|
4129
4459
|
onClick: ne
|
|
4130
|
-
}, [
|
|
4460
|
+
}, [h.value])]), oe.value && a("div", {
|
|
4131
4461
|
class: "modal-footer"
|
|
4132
4462
|
}, [re.value && a("span", {
|
|
4133
4463
|
style: "width: 100%;color: #2A87FF;padding-left: 37px;"
|
|
@@ -4156,32 +4486,32 @@ const Ke = X({
|
|
|
4156
4486
|
modelValue: { type: Boolean, default: !1 },
|
|
4157
4487
|
showHeader: { type: Boolean, default: !0 },
|
|
4158
4488
|
showButtons: { type: Boolean, default: !0 }
|
|
4159
|
-
}, qe = X({
|
|
4489
|
+
}, qe = /* @__PURE__ */ X({
|
|
4160
4490
|
name: "FModal",
|
|
4161
4491
|
props: Vn,
|
|
4162
4492
|
emits: ["update:modelValue"],
|
|
4163
4493
|
setup(e, n) {
|
|
4164
|
-
const t =
|
|
4494
|
+
const t = v(e.width), o = v(e.height), l = v(e.modelValue), u = v(""), s = v(e.class), r = v(!0), d = v(e.showHeader), f = v(""), p = v(!0), c = v(!1), h = v(!1), i = v(""), m = v(""), A = v(""), w = v(e.showButtons), y = v(e.title);
|
|
4165
4495
|
function k($, ee) {
|
|
4166
4496
|
l.value = !1, n.emit("update:modelValue", !1);
|
|
4167
4497
|
}
|
|
4168
4498
|
const S = [{
|
|
4169
|
-
text: "
|
|
4499
|
+
text: "取消",
|
|
4170
4500
|
class: "btn btn-light",
|
|
4171
4501
|
handle: ($) => {
|
|
4172
4502
|
k();
|
|
4173
4503
|
}
|
|
4174
4504
|
}, {
|
|
4175
|
-
text: "
|
|
4505
|
+
text: "确定",
|
|
4176
4506
|
class: "btn btn-primary",
|
|
4177
4507
|
handle: ($) => {
|
|
4178
4508
|
k();
|
|
4179
4509
|
}
|
|
4180
|
-
}], g =
|
|
4181
|
-
|
|
4510
|
+
}], g = v(e.buttons && e.buttons.length ? e.buttons : S), x = b(() => !!f.value), P = b(() => !!w.value && !!g.value);
|
|
4511
|
+
v(), v(), le(() => e.modelValue, () => {
|
|
4182
4512
|
l.value = e.modelValue;
|
|
4183
4513
|
});
|
|
4184
|
-
const T =
|
|
4514
|
+
const T = v(!1), _ = b(() => l.value), C = b(() => {
|
|
4185
4515
|
const $ = {
|
|
4186
4516
|
modal: !0,
|
|
4187
4517
|
"farris-modal": !0
|
|
@@ -4205,9 +4535,9 @@ const Ke = X({
|
|
|
4205
4535
|
})), D = b(() => ({
|
|
4206
4536
|
"modal-content": !0,
|
|
4207
4537
|
"modal-content-has-header": d.value
|
|
4208
|
-
})), E = b(() => ({
|
|
4209
|
-
display: d.value ? "" : "none"
|
|
4210
4538
|
})), H = b(() => ({
|
|
4539
|
+
display: d.value ? "" : "none"
|
|
4540
|
+
})), E = b(() => ({
|
|
4211
4541
|
"f-icon": !0,
|
|
4212
4542
|
modal_maximize: !0,
|
|
4213
4543
|
modalrevert: T.value
|
|
@@ -4247,7 +4577,7 @@ const Ke = X({
|
|
|
4247
4577
|
}, [a("div", {
|
|
4248
4578
|
ref: "modalHeaderRef",
|
|
4249
4579
|
class: "modal-header",
|
|
4250
|
-
style:
|
|
4580
|
+
style: H.value
|
|
4251
4581
|
}, [a("div", {
|
|
4252
4582
|
class: "modal-title"
|
|
4253
4583
|
}, [x.value && a("span", {
|
|
@@ -4257,7 +4587,7 @@ const Ke = X({
|
|
|
4257
4587
|
class: "modal-title-label"
|
|
4258
4588
|
}, [y.value])]), a("div", {
|
|
4259
4589
|
class: "actions"
|
|
4260
|
-
}, [a("ul", null, [
|
|
4590
|
+
}, [a("ul", null, [h.value && a("li", {
|
|
4261
4591
|
class: "f-btn-icon f-bare"
|
|
4262
4592
|
}, [a("span", {
|
|
4263
4593
|
class: "f-icon modal_minimize"
|
|
@@ -4265,7 +4595,7 @@ const Ke = X({
|
|
|
4265
4595
|
onClick: K,
|
|
4266
4596
|
class: "f-btn-icon f-bare"
|
|
4267
4597
|
}, [a("span", {
|
|
4268
|
-
class:
|
|
4598
|
+
class: E.value
|
|
4269
4599
|
}, null)]), p.value && a("li", {
|
|
4270
4600
|
class: "f-btn-icon f-bare",
|
|
4271
4601
|
onClick: (te) => k()
|
|
@@ -4308,10 +4638,10 @@ function In(e, n) {
|
|
|
4308
4638
|
t.style.display = "contents";
|
|
4309
4639
|
const o = et({
|
|
4310
4640
|
setup() {
|
|
4311
|
-
|
|
4641
|
+
He(() => {
|
|
4312
4642
|
document.body.removeChild(t);
|
|
4313
4643
|
});
|
|
4314
|
-
const l =
|
|
4644
|
+
const l = v(!0), u = e.type === "error" || e.type === "prompt", s = e.type === "error" ? "错误提示" : e.type === "prompt" ? e.title : "", r = e.acceptCallback || (() => {
|
|
4315
4645
|
}), d = e.rejectCallback || (() => {
|
|
4316
4646
|
});
|
|
4317
4647
|
return () => a(qe, {
|
|
@@ -4344,7 +4674,7 @@ class Gn {
|
|
|
4344
4674
|
type: "info",
|
|
4345
4675
|
title: n,
|
|
4346
4676
|
detail: t,
|
|
4347
|
-
okButtonText: "
|
|
4677
|
+
okButtonText: "知道了",
|
|
4348
4678
|
cancelButtonText: ""
|
|
4349
4679
|
});
|
|
4350
4680
|
this.show(o);
|
|
@@ -4354,7 +4684,7 @@ class Gn {
|
|
|
4354
4684
|
type: "warning",
|
|
4355
4685
|
title: n,
|
|
4356
4686
|
detail: t,
|
|
4357
|
-
okButtonText: "
|
|
4687
|
+
okButtonText: "知道了",
|
|
4358
4688
|
cancelButtonText: ""
|
|
4359
4689
|
});
|
|
4360
4690
|
this.show(o);
|
|
@@ -4364,7 +4694,7 @@ class Gn {
|
|
|
4364
4694
|
type: "success",
|
|
4365
4695
|
title: n,
|
|
4366
4696
|
detail: t,
|
|
4367
|
-
okButtonText: "
|
|
4697
|
+
okButtonText: "关闭",
|
|
4368
4698
|
cancelButtonText: ""
|
|
4369
4699
|
});
|
|
4370
4700
|
this.show(o);
|
|
@@ -4372,7 +4702,7 @@ class Gn {
|
|
|
4372
4702
|
static error(n, t, o) {
|
|
4373
4703
|
const l = we({
|
|
4374
4704
|
type: "error",
|
|
4375
|
-
okButtonText: "
|
|
4705
|
+
okButtonText: "关闭",
|
|
4376
4706
|
cancelButtonText: "",
|
|
4377
4707
|
exceptionInfo: {
|
|
4378
4708
|
date: o,
|
|
@@ -4387,8 +4717,8 @@ class Gn {
|
|
|
4387
4717
|
type: "prompt",
|
|
4388
4718
|
title: n,
|
|
4389
4719
|
detail: t,
|
|
4390
|
-
okButtonText: "
|
|
4391
|
-
cancelButtonText: "
|
|
4720
|
+
okButtonText: "确定",
|
|
4721
|
+
cancelButtonText: "取消"
|
|
4392
4722
|
});
|
|
4393
4723
|
this.show(o);
|
|
4394
4724
|
}
|
|
@@ -4397,8 +4727,8 @@ class Gn {
|
|
|
4397
4727
|
type: "question",
|
|
4398
4728
|
title: n,
|
|
4399
4729
|
detail: t,
|
|
4400
|
-
okButtonText: "
|
|
4401
|
-
cancelButtonText: "
|
|
4730
|
+
okButtonText: "确定",
|
|
4731
|
+
cancelButtonText: "取消",
|
|
4402
4732
|
acceptCallback: o,
|
|
4403
4733
|
rejectCallback: l
|
|
4404
4734
|
});
|
|
@@ -4427,12 +4757,12 @@ const Ln = {
|
|
|
4427
4757
|
animate: { type: String, default: "fadeIn" },
|
|
4428
4758
|
options: { type: Object }
|
|
4429
4759
|
};
|
|
4430
|
-
const Ue = X({
|
|
4760
|
+
const Ue = /* @__PURE__ */ X({
|
|
4431
4761
|
name: "Toast",
|
|
4432
4762
|
props: Yn,
|
|
4433
4763
|
emits: ["close", "click"],
|
|
4434
4764
|
setup: (e, n) => {
|
|
4435
|
-
const t =
|
|
4765
|
+
const t = v(e.animate), o = "fadeOut", l = b(() => e.options), u = v(!1), s = b(() => {
|
|
4436
4766
|
const y = {
|
|
4437
4767
|
animated: u.value,
|
|
4438
4768
|
toast: !0
|
|
@@ -4443,7 +4773,7 @@ const Ue = X({
|
|
|
4443
4773
|
"f-icon": !0
|
|
4444
4774
|
};
|
|
4445
4775
|
return g[S] = !0, g;
|
|
4446
|
-
}), d = b(() => l.value.title || l.value.msg), f = b(() => l.value.title && l.value.msg), p = b(() => !l.value.title && l.value.msg), c = b(() => !0),
|
|
4776
|
+
}), d = b(() => l.value.title || l.value.msg), f = b(() => l.value.title && l.value.msg), p = b(() => !l.value.title && l.value.msg), c = b(() => !0), h = b(() => !!l.value.buttons || !!n.slots.default);
|
|
4447
4777
|
function i(y) {
|
|
4448
4778
|
y.stopPropagation(), y.preventDefault(), u.value = !1, setTimeout(() => {
|
|
4449
4779
|
n.emit("close", l.value);
|
|
@@ -4488,7 +4818,7 @@ const Ue = X({
|
|
|
4488
4818
|
}, null), a("p", {
|
|
4489
4819
|
class: "toast-msg",
|
|
4490
4820
|
innerHTML: l.value.msg
|
|
4491
|
-
}, null),
|
|
4821
|
+
}, null), h.value && w()]), p.value && (l.value.buttons ? a("div", {
|
|
4492
4822
|
class: "toast-title-btns-wrapper d-flex"
|
|
4493
4823
|
}, [a("h5", {
|
|
4494
4824
|
class: "toast-title modal-tips-title only-toast-msg",
|
|
@@ -4500,7 +4830,7 @@ const Ue = X({
|
|
|
4500
4830
|
innerHTML: l.value.msg
|
|
4501
4831
|
}, null))])])]);
|
|
4502
4832
|
}
|
|
4503
|
-
}), Qe = X({
|
|
4833
|
+
}), Qe = /* @__PURE__ */ X({
|
|
4504
4834
|
name: "Notify",
|
|
4505
4835
|
props: zn,
|
|
4506
4836
|
emits: ["close", "empty"],
|
|
@@ -4512,33 +4842,33 @@ const Ue = X({
|
|
|
4512
4842
|
right: 12,
|
|
4513
4843
|
top: 136,
|
|
4514
4844
|
bottom: 12
|
|
4515
|
-
}, l =
|
|
4516
|
-
const
|
|
4845
|
+
}, l = v(e.toasts || []), u = b(() => {
|
|
4846
|
+
const h = {
|
|
4517
4847
|
left: e.position.indexOf("left") > -1 ? `${e.left ? e.left : o.left}px` : "",
|
|
4518
4848
|
right: e.position.indexOf("right") > -1 ? `${e.right ? e.right : o.right}px` : "",
|
|
4519
4849
|
top: e.position.indexOf("top") > -1 ? `${e.top ? e.top : o.top}px` : "",
|
|
4520
4850
|
bottom: e.position.indexOf("bottom") > -1 ? `${e.bottom ? e.bottom : o.bottom}px` : ""
|
|
4521
4851
|
};
|
|
4522
|
-
return e.position.indexOf("center") && (
|
|
4852
|
+
return e.position.indexOf("center") && (h.left = "50%", h.transform = "translate(-50%, -50%)"), h;
|
|
4523
4853
|
});
|
|
4524
|
-
function s(
|
|
4854
|
+
function s(h) {
|
|
4525
4855
|
n.emit("close");
|
|
4526
4856
|
}
|
|
4527
|
-
function r(
|
|
4528
|
-
l.value.length >= e.limit && l.value.shift(), l.value.push(
|
|
4857
|
+
function r(h) {
|
|
4858
|
+
l.value.length >= e.limit && l.value.shift(), l.value.push(h);
|
|
4529
4859
|
}
|
|
4530
|
-
function d(
|
|
4531
|
-
|
|
4860
|
+
function d(h) {
|
|
4861
|
+
h && h.onRemove && h.onRemove.call(h);
|
|
4532
4862
|
}
|
|
4533
|
-
function f(
|
|
4534
|
-
const i = l.value.findIndex((m) => m.id ===
|
|
4863
|
+
function f(h) {
|
|
4864
|
+
const i = l.value.findIndex((m) => m.id === h);
|
|
4535
4865
|
if (i > -1) {
|
|
4536
4866
|
const m = l.value[i];
|
|
4537
4867
|
d(m), l.value.splice(i, 1);
|
|
4538
4868
|
}
|
|
4539
4869
|
}
|
|
4540
4870
|
function p() {
|
|
4541
|
-
l.value.forEach((
|
|
4871
|
+
l.value.forEach((h) => d(h)), l.value.length = 0, n.emit("empty");
|
|
4542
4872
|
}
|
|
4543
4873
|
n.expose({
|
|
4544
4874
|
addToast: r,
|
|
@@ -4546,15 +4876,15 @@ const Ue = X({
|
|
|
4546
4876
|
clearAll: p,
|
|
4547
4877
|
closeToast: s
|
|
4548
4878
|
});
|
|
4549
|
-
function c(
|
|
4879
|
+
function c(h, i) {
|
|
4550
4880
|
s();
|
|
4551
4881
|
}
|
|
4552
4882
|
return () => a("div", {
|
|
4553
4883
|
id: e.id,
|
|
4554
4884
|
class: t.value,
|
|
4555
4885
|
style: u.value
|
|
4556
|
-
}, [l.value.map((
|
|
4557
|
-
options:
|
|
4886
|
+
}, [l.value.map((h) => a(Ue, {
|
|
4887
|
+
options: h,
|
|
4558
4888
|
animate: e.animate,
|
|
4559
4889
|
onClose: (i) => c()
|
|
4560
4890
|
}, null))]);
|
|
@@ -4565,7 +4895,7 @@ function Kn(e, n) {
|
|
|
4565
4895
|
t.style.display = "contents";
|
|
4566
4896
|
const o = et({
|
|
4567
4897
|
setup() {
|
|
4568
|
-
return
|
|
4898
|
+
return He(() => {
|
|
4569
4899
|
document.body.removeChild(t);
|
|
4570
4900
|
}), () => a(Qe, Se(e, {
|
|
4571
4901
|
onClose: o.unmount
|
|
@@ -4587,34 +4917,120 @@ const Un = {
|
|
|
4587
4917
|
e.component(Qe.name, Qe), e.component(Ue.name, Ue), e.provide("NotifyService", qn);
|
|
4588
4918
|
}
|
|
4589
4919
|
}, Qn = {
|
|
4920
|
+
/**
|
|
4921
|
+
* 组件标识
|
|
4922
|
+
*/
|
|
4590
4923
|
id: String,
|
|
4924
|
+
/**
|
|
4925
|
+
* 是否禁用
|
|
4926
|
+
*/
|
|
4591
4927
|
disabled: { type: Boolean, default: !1 },
|
|
4928
|
+
/**
|
|
4929
|
+
* 是否只读
|
|
4930
|
+
*/
|
|
4592
4931
|
readonly: { type: Boolean, default: !1 },
|
|
4932
|
+
/**
|
|
4933
|
+
* 是否可编辑
|
|
4934
|
+
*/
|
|
4593
4935
|
editable: { type: Boolean, default: !0 },
|
|
4936
|
+
/**
|
|
4937
|
+
* 格式化 formatter 和 parser 必须同时存在
|
|
4938
|
+
* formatter: (val: number) => string;
|
|
4939
|
+
* parser: (val: string | number) => number;
|
|
4940
|
+
*/
|
|
4594
4941
|
formatter: { type: Function },
|
|
4595
4942
|
parser: { type: Function },
|
|
4596
|
-
|
|
4943
|
+
/**
|
|
4944
|
+
* 空白提示文本
|
|
4945
|
+
*/
|
|
4946
|
+
placeholder: { type: String, default: "请输入数字" },
|
|
4947
|
+
/**
|
|
4948
|
+
* up or down 步长
|
|
4949
|
+
*/
|
|
4597
4950
|
step: { type: Number, default: 1 },
|
|
4951
|
+
/**
|
|
4952
|
+
* 最大值
|
|
4953
|
+
*/
|
|
4598
4954
|
max: { type: String },
|
|
4955
|
+
/**
|
|
4956
|
+
* 最小值
|
|
4957
|
+
*/
|
|
4599
4958
|
min: { type: String },
|
|
4959
|
+
/**
|
|
4960
|
+
* 启用大数支持
|
|
4961
|
+
*/
|
|
4600
4962
|
bigNumber: { type: Boolean, default: !1 },
|
|
4963
|
+
/**
|
|
4964
|
+
* 是否显示加减按钮
|
|
4965
|
+
*/
|
|
4601
4966
|
showButton: { type: Boolean, default: !0 },
|
|
4967
|
+
/**
|
|
4968
|
+
* 是否使用千分值
|
|
4969
|
+
*/
|
|
4602
4970
|
useThousands: { type: Boolean, default: !0 },
|
|
4971
|
+
/**
|
|
4972
|
+
* 文本方向
|
|
4973
|
+
*/
|
|
4603
4974
|
textAlign: { type: String, default: "left" },
|
|
4975
|
+
/**
|
|
4976
|
+
* 自动补全小数
|
|
4977
|
+
*/
|
|
4604
4978
|
autoDecimal: { type: Boolean, default: !0 },
|
|
4979
|
+
/**
|
|
4980
|
+
* 允许为空
|
|
4981
|
+
*/
|
|
4605
4982
|
canNull: { type: Boolean, default: !1 },
|
|
4983
|
+
/**
|
|
4984
|
+
* 精度
|
|
4985
|
+
*/
|
|
4606
4986
|
precision: { type: Number, default: 0 },
|
|
4987
|
+
/**
|
|
4988
|
+
* 前缀
|
|
4989
|
+
*/
|
|
4607
4990
|
prefix: { type: String, default: "" },
|
|
4991
|
+
/**
|
|
4992
|
+
* 后缀
|
|
4993
|
+
*/
|
|
4608
4994
|
suffix: { type: String, default: "" },
|
|
4995
|
+
/**
|
|
4996
|
+
* 小数点符号
|
|
4997
|
+
*/
|
|
4609
4998
|
decimalSeparator: { type: String, default: "." },
|
|
4999
|
+
/**
|
|
5000
|
+
* 千分位符号
|
|
5001
|
+
*/
|
|
4610
5002
|
groupSeparator: { type: String, default: "," },
|
|
5003
|
+
/**
|
|
5004
|
+
* 使用千分位时,每组显示的字符数
|
|
5005
|
+
*/
|
|
4611
5006
|
groupSize: { type: Number, default: 3 },
|
|
5007
|
+
/**
|
|
5008
|
+
* 值
|
|
5009
|
+
*/
|
|
4612
5010
|
value: { type: String, default: "" },
|
|
5011
|
+
/**
|
|
5012
|
+
* 显示0值
|
|
5013
|
+
*/
|
|
4613
5014
|
showZero: { type: Boolean, default: !0 },
|
|
5015
|
+
/**
|
|
5016
|
+
* 下限placeholder
|
|
5017
|
+
*/
|
|
4614
5018
|
beginPlaceHolder: { type: String, default: "" },
|
|
5019
|
+
/**
|
|
5020
|
+
* 上限placeholder
|
|
5021
|
+
*/
|
|
4615
5022
|
endPlaceHolder: { type: String, default: "" },
|
|
5023
|
+
/**
|
|
5024
|
+
* 间隔符
|
|
5025
|
+
*/
|
|
4616
5026
|
separator: { type: String, default: "~" },
|
|
5027
|
+
/**
|
|
5028
|
+
* 下限值
|
|
5029
|
+
*/
|
|
4617
5030
|
beginValue: { type: String, default: "0" },
|
|
5031
|
+
/**
|
|
5032
|
+
* 上限值
|
|
5033
|
+
*/
|
|
4618
5034
|
endValue: { type: String, default: "0" }
|
|
4619
5035
|
};
|
|
4620
5036
|
function Kt(e, n, t, o, l, u, s) {
|
|
@@ -4633,7 +5049,7 @@ function Kt(e, n, t, o, l, u, s) {
|
|
|
4633
5049
|
function c(g) {
|
|
4634
5050
|
return e.precision !== null && e.precision !== void 0 ? g.toFixed(p()) : g.toFixed();
|
|
4635
5051
|
}
|
|
4636
|
-
function
|
|
5052
|
+
function h(g) {
|
|
4637
5053
|
const x = c(g);
|
|
4638
5054
|
return e.bigNumber ? x : Number(g);
|
|
4639
5055
|
}
|
|
@@ -4646,7 +5062,7 @@ function Kt(e, n, t, o, l, u, s) {
|
|
|
4646
5062
|
const T = new ie("" + e.max);
|
|
4647
5063
|
if (g.gt(T)) {
|
|
4648
5064
|
P = T;
|
|
4649
|
-
const _ =
|
|
5065
|
+
const _ = h(T);
|
|
4650
5066
|
i(_, x);
|
|
4651
5067
|
}
|
|
4652
5068
|
}
|
|
@@ -4654,7 +5070,7 @@ function Kt(e, n, t, o, l, u, s) {
|
|
|
4654
5070
|
const T = new ie("" + e.min);
|
|
4655
5071
|
if (g.lt(T)) {
|
|
4656
5072
|
P = T;
|
|
4657
|
-
const _ =
|
|
5073
|
+
const _ = h(T);
|
|
4658
5074
|
i(_, x);
|
|
4659
5075
|
}
|
|
4660
5076
|
}
|
|
@@ -4667,17 +5083,15 @@ function Kt(e, n, t, o, l, u, s) {
|
|
|
4667
5083
|
if (P.isNaN()) {
|
|
4668
5084
|
if (e.canNull)
|
|
4669
5085
|
return null;
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
return 0;
|
|
4678
|
-
}
|
|
5086
|
+
const T = new ie("" + e.min), _ = new ie("" + e.max);
|
|
5087
|
+
if (!T.isNaN())
|
|
5088
|
+
P = T;
|
|
5089
|
+
else if (!_.isNaN())
|
|
5090
|
+
P = _;
|
|
5091
|
+
else
|
|
5092
|
+
return 0;
|
|
4679
5093
|
}
|
|
4680
|
-
return
|
|
5094
|
+
return h(P);
|
|
4681
5095
|
}
|
|
4682
5096
|
function w(g, x) {
|
|
4683
5097
|
return x === void 0 && (x = t.value), x = new ie(x), !(g === "up" && e.max && !new ie(e.max).isNaN() && x.gte(new ie(e.max)) || g === "down" && e.min && !new ie(e.min).isNaN() && x.lte(new ie(e.min)));
|
|
@@ -4691,13 +5105,13 @@ function Kt(e, n, t, o, l, u, s) {
|
|
|
4691
5105
|
groupSize: e.groupSize
|
|
4692
5106
|
};
|
|
4693
5107
|
}
|
|
4694
|
-
function k(g) {
|
|
5108
|
+
function k(g, x) {
|
|
5109
|
+
return e.precision !== null && e.precision !== void 0 ? g.toFormat(p(), x) : g.toFormat(x);
|
|
5110
|
+
}
|
|
5111
|
+
function S(g) {
|
|
4695
5112
|
g = f(g);
|
|
4696
5113
|
const x = new ie(g), P = m(x);
|
|
4697
|
-
return P.valueOf()
|
|
4698
|
-
}
|
|
4699
|
-
function S(g, x) {
|
|
4700
|
-
return e.precision !== null && e.precision !== void 0 ? g.toFormat(p(), x) : g.toFormat(x);
|
|
5114
|
+
return P.valueOf() === "0" && !e.showZero || e.canNull && x.isNaN() || P.isNaN() ? "" : e.formatter ? e.formatter(P.toNumber()) : (Object.keys(o.value).length || (o.value = y()), k(P, o.value));
|
|
4701
5115
|
}
|
|
4702
5116
|
return {
|
|
4703
5117
|
isEmpty: r,
|
|
@@ -4705,18 +5119,18 @@ function Kt(e, n, t, o, l, u, s) {
|
|
|
4705
5119
|
cleanNumString: f,
|
|
4706
5120
|
getPrecision: p,
|
|
4707
5121
|
toFixed: c,
|
|
4708
|
-
_getRealValue:
|
|
5122
|
+
_getRealValue: h,
|
|
4709
5123
|
getRealValue: A,
|
|
4710
5124
|
isDisableOfBtn: w,
|
|
4711
5125
|
buildFormatOptions: y,
|
|
4712
5126
|
_modelChanged: i,
|
|
4713
5127
|
validInterval: m,
|
|
4714
|
-
format:
|
|
4715
|
-
_toFormat:
|
|
5128
|
+
format: S,
|
|
5129
|
+
_toFormat: k
|
|
4716
5130
|
};
|
|
4717
5131
|
}
|
|
4718
5132
|
function Zn(e, n, t, o, l, u, s, r, d, f, p) {
|
|
4719
|
-
const { isDisableOfBtn: c, format:
|
|
5133
|
+
const { isDisableOfBtn: c, format: h, getRealValue: i, isEmpty: m, _modelChanged: A } = Kt(
|
|
4720
5134
|
e,
|
|
4721
5135
|
n,
|
|
4722
5136
|
t,
|
|
@@ -4740,7 +5154,7 @@ function Zn(e, n, t, o, l, u, s, r, d, f, p) {
|
|
|
4740
5154
|
const N = new ie(B || 0);
|
|
4741
5155
|
_ === "up" ? O = N.plus(Number(e.step)) : O = N.minus(Number(e.step));
|
|
4742
5156
|
const D = O.toFixed();
|
|
4743
|
-
C === "beginValue" ? f.value = l.value ? D :
|
|
5157
|
+
C === "beginValue" ? f.value = l.value ? D : h(D) : C === "endValue" && (p.value = l.value ? D : h(D)), A(i(O, C), C);
|
|
4744
5158
|
}
|
|
4745
5159
|
}
|
|
4746
5160
|
function k(_, C) {
|
|
@@ -4752,14 +5166,14 @@ function Zn(e, n, t, o, l, u, s, r, d, f, p) {
|
|
|
4752
5166
|
function g(_, C) {
|
|
4753
5167
|
if (_.stopPropagation(), e.readonly || e.disabled || !e.editable)
|
|
4754
5168
|
return;
|
|
4755
|
-
C === "beginValue" ? (f.value =
|
|
5169
|
+
C === "beginValue" ? (f.value = h(r.value), w(r.value, "blur")) : C === "endValue" && (p.value = h(d.value), w(d.value, "blur")), l.value = !1;
|
|
4756
5170
|
const B = {
|
|
4757
5171
|
eventTarget: s.value,
|
|
4758
5172
|
event: _,
|
|
4759
5173
|
beginValue: r.value,
|
|
4760
|
-
formatBeginValue:
|
|
5174
|
+
formatBeginValue: h(r.value),
|
|
4761
5175
|
endValue: d.value,
|
|
4762
|
-
formatEndValue:
|
|
5176
|
+
formatEndValue: h(d.value)
|
|
4763
5177
|
};
|
|
4764
5178
|
n.emit("focus", B), s.value = "";
|
|
4765
5179
|
}
|
|
@@ -4773,9 +5187,9 @@ function Zn(e, n, t, o, l, u, s, r, d, f, p) {
|
|
|
4773
5187
|
eventTarget: s.value,
|
|
4774
5188
|
event: _,
|
|
4775
5189
|
beginValue: r.value,
|
|
4776
|
-
formatBeginValue:
|
|
5190
|
+
formatBeginValue: h(r.value),
|
|
4777
5191
|
endValue: d.value,
|
|
4778
|
-
formatEndValue:
|
|
5192
|
+
formatEndValue: h(d.value)
|
|
4779
5193
|
};
|
|
4780
5194
|
n.emit("focus", B);
|
|
4781
5195
|
}
|
|
@@ -4798,14 +5212,14 @@ function Zn(e, n, t, o, l, u, s, r, d, f, p) {
|
|
|
4798
5212
|
onKeyDown: T
|
|
4799
5213
|
};
|
|
4800
5214
|
}
|
|
4801
|
-
const _t = X({
|
|
5215
|
+
const _t = /* @__PURE__ */ X({
|
|
4802
5216
|
name: "FNumberRange",
|
|
4803
5217
|
props: Qn,
|
|
4804
5218
|
emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
|
|
4805
5219
|
setup(e, n) {
|
|
4806
|
-
const t =
|
|
5220
|
+
const t = v(null), o = v(null), l = v(null), u = v(""), s = v(!1), r = v(""), d = v(""), f = v(""), p = v({}), {
|
|
4807
5221
|
isDisableOfBtn: c,
|
|
4808
|
-
format:
|
|
5222
|
+
format: h,
|
|
4809
5223
|
buildFormatOptions: i,
|
|
4810
5224
|
getRealValue: m
|
|
4811
5225
|
} = Kt(e, n, t, p, u, o, l), {
|
|
@@ -4818,11 +5232,11 @@ const _t = X({
|
|
|
4818
5232
|
} = Zn(e, n, t, r, s, p, u, o, l, d, f);
|
|
4819
5233
|
return Ne(() => {
|
|
4820
5234
|
const x = m(e.beginValue);
|
|
4821
|
-
o.value = x, d.value =
|
|
5235
|
+
o.value = x, d.value = h(x);
|
|
4822
5236
|
const P = m(e.endValue);
|
|
4823
|
-
l.value = P, f.value =
|
|
5237
|
+
l.value = P, f.value = h(P);
|
|
4824
5238
|
}), le(() => [e.precision, e.useThousands, e.prefix, e.suffix], ([x, P, T, _]) => {
|
|
4825
|
-
p.value = i(), d.value =
|
|
5239
|
+
p.value = i(), d.value = h(o.value), f.value = h(l.value);
|
|
4826
5240
|
}), () => a("div", null, [a("div", {
|
|
4827
5241
|
class: "input-group number-range f-cmp-number-spinner"
|
|
4828
5242
|
}, [a("div", {
|
|
@@ -4924,29 +5338,100 @@ const _t = X({
|
|
|
4924
5338
|
e.component(_t.name, _t);
|
|
4925
5339
|
}
|
|
4926
5340
|
}, Jn = {
|
|
5341
|
+
/**
|
|
5342
|
+
* 组件标识
|
|
5343
|
+
*/
|
|
4927
5344
|
id: String,
|
|
5345
|
+
/**
|
|
5346
|
+
* 是否禁用
|
|
5347
|
+
*/
|
|
4928
5348
|
disabled: { type: Boolean, default: !1 },
|
|
5349
|
+
/**
|
|
5350
|
+
* 是否只读
|
|
5351
|
+
*/
|
|
4929
5352
|
readonly: { type: Boolean, default: !1 },
|
|
5353
|
+
/**
|
|
5354
|
+
* 是否可编辑
|
|
5355
|
+
*/
|
|
4930
5356
|
editable: { type: Boolean, default: !0 },
|
|
5357
|
+
/**
|
|
5358
|
+
* 格式化 formatter 和 parser 必须同时存在
|
|
5359
|
+
* formatter: (val: number) => string;
|
|
5360
|
+
* parser: (val: string | number) => number;
|
|
5361
|
+
*/
|
|
4931
5362
|
formatter: { type: Function },
|
|
4932
5363
|
parser: { type: Function },
|
|
4933
|
-
|
|
5364
|
+
/**
|
|
5365
|
+
* 空白提示文本
|
|
5366
|
+
*/
|
|
5367
|
+
placeholder: { type: String, default: "请输入数字" },
|
|
5368
|
+
/**
|
|
5369
|
+
* up or down 步长
|
|
5370
|
+
*/
|
|
4934
5371
|
step: { type: Number, default: 1 },
|
|
5372
|
+
/**
|
|
5373
|
+
* 最大值
|
|
5374
|
+
*/
|
|
4935
5375
|
max: { type: String },
|
|
5376
|
+
/**
|
|
5377
|
+
* 最小值
|
|
5378
|
+
*/
|
|
4936
5379
|
min: { type: String },
|
|
5380
|
+
/**
|
|
5381
|
+
* 启用大数支持
|
|
5382
|
+
*/
|
|
4937
5383
|
bigNumber: { type: Boolean, default: !1 },
|
|
5384
|
+
/**
|
|
5385
|
+
* 是否显示加减按钮
|
|
5386
|
+
*/
|
|
4938
5387
|
showButton: { type: Boolean, default: !0 },
|
|
5388
|
+
/**
|
|
5389
|
+
* 是否使用千分值
|
|
5390
|
+
*/
|
|
4939
5391
|
useThousands: { type: Boolean, default: !0 },
|
|
5392
|
+
/**
|
|
5393
|
+
* 文本方向
|
|
5394
|
+
*/
|
|
4940
5395
|
textAlign: { type: String, default: "left" },
|
|
5396
|
+
/**
|
|
5397
|
+
* 自动补全小数
|
|
5398
|
+
*/
|
|
4941
5399
|
autoDecimal: { type: Boolean, default: !0 },
|
|
5400
|
+
/**
|
|
5401
|
+
* 允许为空
|
|
5402
|
+
*/
|
|
4942
5403
|
canNull: { type: Boolean, default: !1 },
|
|
5404
|
+
/**
|
|
5405
|
+
* 精度
|
|
5406
|
+
*/
|
|
4943
5407
|
precision: { type: Number, default: 0 },
|
|
5408
|
+
/**
|
|
5409
|
+
* 前缀
|
|
5410
|
+
*/
|
|
4944
5411
|
prefix: { type: String, default: "" },
|
|
5412
|
+
/**
|
|
5413
|
+
* 后缀
|
|
5414
|
+
*/
|
|
4945
5415
|
suffix: { type: String, default: "" },
|
|
5416
|
+
/**
|
|
5417
|
+
* 小数点符号
|
|
5418
|
+
*/
|
|
4946
5419
|
decimalSeparator: { type: String, default: "." },
|
|
5420
|
+
/**
|
|
5421
|
+
* 千分位符号
|
|
5422
|
+
*/
|
|
4947
5423
|
groupSeparator: { type: String, default: "," },
|
|
5424
|
+
/**
|
|
5425
|
+
* 使用千分位时,每组显示的字符数
|
|
5426
|
+
*/
|
|
4948
5427
|
groupSize: { type: Number, default: 3 },
|
|
5428
|
+
/**
|
|
5429
|
+
* 值
|
|
5430
|
+
*/
|
|
4949
5431
|
value: { type: String, default: "" },
|
|
5432
|
+
/**
|
|
5433
|
+
* 显示0值
|
|
5434
|
+
*/
|
|
4950
5435
|
showZero: { type: Boolean, default: !0 }
|
|
4951
5436
|
};
|
|
4952
5437
|
function qt(e, n, t, o) {
|
|
@@ -4998,7 +5483,7 @@ function qt(e, n, t, o) {
|
|
|
4998
5483
|
}
|
|
4999
5484
|
return f(k);
|
|
5000
5485
|
}
|
|
5001
|
-
function
|
|
5486
|
+
function h(y, k) {
|
|
5002
5487
|
k === void 0 && (k = t.value);
|
|
5003
5488
|
const S = new ie(k);
|
|
5004
5489
|
return !(y === "up" && e.max && !new ie(e.max).isNaN() && S.gte(new ie(e.max)) || y === "down" && e.min && !new ie(e.min).isNaN() && S.lte(new ie(e.min)));
|
|
@@ -5031,7 +5516,7 @@ function qt(e, n, t, o) {
|
|
|
5031
5516
|
toFixed: d,
|
|
5032
5517
|
_getRealValue: f,
|
|
5033
5518
|
getRealValue: c,
|
|
5034
|
-
isDisableOfBtn:
|
|
5519
|
+
isDisableOfBtn: h,
|
|
5035
5520
|
buildFormatOptions: i,
|
|
5036
5521
|
_modelChanged: m,
|
|
5037
5522
|
validInterval: p,
|
|
@@ -5040,14 +5525,14 @@ function qt(e, n, t, o) {
|
|
|
5040
5525
|
};
|
|
5041
5526
|
}
|
|
5042
5527
|
function el(e, n, t, o, l, u) {
|
|
5043
|
-
|
|
5528
|
+
v(""), v(!1);
|
|
5044
5529
|
const { isDisableOfBtn: s, format: r, getRealValue: d, cleanNumString: f, isEmpty: p, _modelChanged: c } = qt(
|
|
5045
5530
|
e,
|
|
5046
5531
|
n,
|
|
5047
5532
|
t,
|
|
5048
5533
|
u
|
|
5049
5534
|
);
|
|
5050
|
-
function
|
|
5535
|
+
function h(g, x = "change") {
|
|
5051
5536
|
let P = g;
|
|
5052
5537
|
x === "change" && (P = d(g), c(P));
|
|
5053
5538
|
}
|
|
@@ -5071,7 +5556,7 @@ function el(e, n, t, o, l, u) {
|
|
|
5071
5556
|
i("down"), g.stopPropagation();
|
|
5072
5557
|
}
|
|
5073
5558
|
function w(g) {
|
|
5074
|
-
g.stopPropagation(), !(e.readonly || e.disabled) && (o.value = r(t.value), l.value = !1,
|
|
5559
|
+
g.stopPropagation(), !(e.readonly || e.disabled) && (o.value = r(t.value), l.value = !1, h(t.value, "blur"), n.emit("blur", { event: g, formatted: o.value, value: t.value }));
|
|
5075
5560
|
}
|
|
5076
5561
|
function y(g) {
|
|
5077
5562
|
if (g.stopPropagation(), e.readonly || e.disabled) {
|
|
@@ -5082,13 +5567,13 @@ function el(e, n, t, o, l, u) {
|
|
|
5082
5567
|
}
|
|
5083
5568
|
function k(g) {
|
|
5084
5569
|
var x;
|
|
5085
|
-
g.stopPropagation(), e.disabled, o.value = (x = g.target) == null ? void 0 : x.value,
|
|
5570
|
+
g.stopPropagation(), e.disabled, o.value = (x = g.target) == null ? void 0 : x.value, h(o.value, "change");
|
|
5086
5571
|
}
|
|
5087
5572
|
function S(g) {
|
|
5088
5573
|
g.key === "ArrowDown" && (g.preventDefault(), A(g)), g.key === "ArrowUp" && (g.preventDefault(), m(g)), g.stopPropagation();
|
|
5089
5574
|
}
|
|
5090
5575
|
return {
|
|
5091
|
-
onModelChange:
|
|
5576
|
+
onModelChange: h,
|
|
5092
5577
|
up: m,
|
|
5093
5578
|
down: A,
|
|
5094
5579
|
onBlurTextBox: w,
|
|
@@ -5097,12 +5582,12 @@ function el(e, n, t, o, l, u) {
|
|
|
5097
5582
|
onKeyDown: S
|
|
5098
5583
|
};
|
|
5099
5584
|
}
|
|
5100
|
-
const At = X({
|
|
5585
|
+
const At = /* @__PURE__ */ X({
|
|
5101
5586
|
name: "FNumberSpinner",
|
|
5102
5587
|
props: Jn,
|
|
5103
5588
|
emits: ["valueChange", "blur", "focus", "click", "input"],
|
|
5104
5589
|
setup(e, n) {
|
|
5105
|
-
const t =
|
|
5590
|
+
const t = v(null), o = v(!1), l = v(""), u = v({}), {
|
|
5106
5591
|
isDisableOfBtn: s,
|
|
5107
5592
|
format: r,
|
|
5108
5593
|
buildFormatOptions: d,
|
|
@@ -5110,7 +5595,7 @@ const At = X({
|
|
|
5110
5595
|
} = qt(e, n, t, u), {
|
|
5111
5596
|
onFocusTextBox: p,
|
|
5112
5597
|
onBlurTextBox: c,
|
|
5113
|
-
onInput:
|
|
5598
|
+
onInput: h,
|
|
5114
5599
|
up: i,
|
|
5115
5600
|
down: m,
|
|
5116
5601
|
onKeyDown: A
|
|
@@ -5131,7 +5616,7 @@ const At = X({
|
|
|
5131
5616
|
value: l.value,
|
|
5132
5617
|
onBlur: c,
|
|
5133
5618
|
onFocus: p,
|
|
5134
|
-
onInput: (w) =>
|
|
5619
|
+
onInput: (w) => h(w, "change"),
|
|
5135
5620
|
disabled: e.disabled,
|
|
5136
5621
|
readonly: e.readonly || !e.editable,
|
|
5137
5622
|
placeholder: e.disabled || e.readonly || !e.editable ? "" : e.placeholder,
|
|
@@ -5177,7 +5662,7 @@ const At = X({
|
|
|
5177
5662
|
totalItems: { type: Number, default: 0 }
|
|
5178
5663
|
};
|
|
5179
5664
|
function nl(e, n) {
|
|
5180
|
-
const t =
|
|
5665
|
+
const t = v("跳转至"), o = v(""), l = v(e.value);
|
|
5181
5666
|
function u() {
|
|
5182
5667
|
e.value = l.value;
|
|
5183
5668
|
}
|
|
@@ -5257,7 +5742,7 @@ function ll(e, n, t) {
|
|
|
5257
5742
|
};
|
|
5258
5743
|
}
|
|
5259
5744
|
function ol(e, n) {
|
|
5260
|
-
const t =
|
|
5745
|
+
const t = v("共"), o = v("条"), l = b(() => ({
|
|
5261
5746
|
"pagination-message": !0,
|
|
5262
5747
|
"text-truncate": !0,
|
|
5263
5748
|
"d-flex": !0,
|
|
@@ -5283,7 +5768,7 @@ function ol(e, n) {
|
|
|
5283
5768
|
};
|
|
5284
5769
|
}
|
|
5285
5770
|
function sl(e, n, t) {
|
|
5286
|
-
const o =
|
|
5771
|
+
const o = v(!1), l = v("显示"), u = v("条"), s = b(() => ({
|
|
5287
5772
|
dropup: !0,
|
|
5288
5773
|
"dropdown-right": !0,
|
|
5289
5774
|
"pg-pagelist": !0,
|
|
@@ -5305,7 +5790,7 @@ function sl(e, n, t) {
|
|
|
5305
5790
|
function c(i, m) {
|
|
5306
5791
|
e.value = m, o.value = !1;
|
|
5307
5792
|
}
|
|
5308
|
-
function
|
|
5793
|
+
function h() {
|
|
5309
5794
|
return a("li", {
|
|
5310
5795
|
class: "pagination-pagelist"
|
|
5311
5796
|
}, [a("div", {
|
|
@@ -5331,7 +5816,7 @@ function sl(e, n, t) {
|
|
|
5331
5816
|
}, [a("span", null, [i])]))])])]);
|
|
5332
5817
|
}
|
|
5333
5818
|
return {
|
|
5334
|
-
renderPageList:
|
|
5819
|
+
renderPageList: h
|
|
5335
5820
|
};
|
|
5336
5821
|
}
|
|
5337
5822
|
function il(e, n) {
|
|
@@ -5413,31 +5898,31 @@ function ul(e, n, t) {
|
|
|
5413
5898
|
};
|
|
5414
5899
|
}
|
|
5415
5900
|
function rl(e) {
|
|
5416
|
-
const n =
|
|
5901
|
+
const n = v([]);
|
|
5417
5902
|
function t(l, u, s, r) {
|
|
5418
5903
|
const d = Math.ceil(s / 2);
|
|
5419
5904
|
return l === s ? r : l === 1 ? l : s < r ? r - d < u ? r - s + l : d < u ? u - d + l : l : l;
|
|
5420
5905
|
}
|
|
5421
5906
|
function o(l, u, s, r) {
|
|
5422
|
-
const d = [], f = Math.ceil(s / u), p = Math.ceil(r / 2), c = l <= p,
|
|
5907
|
+
const d = [], f = Math.ceil(s / u), p = Math.ceil(r / 2), c = l <= p, h = f - p < l, i = !c && !h, m = r < f;
|
|
5423
5908
|
let A = 1;
|
|
5424
5909
|
for (; A <= f && A <= r; ) {
|
|
5425
|
-
const w = t(A, l, r, f), y = A === 2 && (i ||
|
|
5910
|
+
const w = t(A, l, r, f), y = A === 2 && (i || h), k = A === r - 1 && (i || c), S = m && (y || k) ? "..." : "" + w;
|
|
5426
5911
|
d.push({ label: S, value: w }), A++;
|
|
5427
5912
|
}
|
|
5428
5913
|
n.value = d;
|
|
5429
5914
|
}
|
|
5430
5915
|
return { pages: n, updatePages: o };
|
|
5431
5916
|
}
|
|
5432
|
-
const Tt = X({
|
|
5917
|
+
const Tt = /* @__PURE__ */ X({
|
|
5433
5918
|
name: "FPagination",
|
|
5434
5919
|
props: al,
|
|
5435
5920
|
emits: ["pageIndexChanged"],
|
|
5436
5921
|
setup(e, n) {
|
|
5437
|
-
const t =
|
|
5922
|
+
const t = v(!1), o = v(e.mode), l = v(""), u = v(!1), s = v(e.pageSize), r = v(e.currentPage), d = v(e.totalItems), {
|
|
5438
5923
|
pages: f,
|
|
5439
5924
|
updatePages: p
|
|
5440
|
-
} = rl(), c = b(() => r.value === 1),
|
|
5925
|
+
} = rl(), c = b(() => r.value === 1), h = b(() => [20, 50, 100]), i = b(() => Math.ceil(d.value / s.value)), m = b(() => r.value === i.value), A = b(() => !0), w = b(() => r.value > 1), y = b(() => !(u.value && f.value.length <= 1)), k = b(() => !0), S = b(() => !0), g = b(() => !0), x = b(() => !0), {
|
|
5441
5926
|
renderFirstPage: P,
|
|
5442
5927
|
renderPreviousPage: T
|
|
5443
5928
|
} = ul(r, c, w), {
|
|
@@ -5447,7 +5932,7 @@ const Tt = X({
|
|
|
5447
5932
|
renderPageInfo: B
|
|
5448
5933
|
} = ol(l, d), {
|
|
5449
5934
|
renderPageList: O
|
|
5450
|
-
} = sl(s,
|
|
5935
|
+
} = sl(s, h, d), {
|
|
5451
5936
|
renderPageNumbers: N
|
|
5452
5937
|
} = il(r, f), {
|
|
5453
5938
|
renderGotoButton: D
|
|
@@ -5457,13 +5942,13 @@ const Tt = X({
|
|
|
5457
5942
|
}), le(r, () => {
|
|
5458
5943
|
n.emit("pageIndexChanged", r.value);
|
|
5459
5944
|
});
|
|
5460
|
-
const
|
|
5945
|
+
const H = b(() => ({
|
|
5461
5946
|
"ngx-pagination": !0,
|
|
5462
5947
|
pagination: !0,
|
|
5463
5948
|
responsive: t.value,
|
|
5464
5949
|
"pager-viewmode-default": o.value === "default",
|
|
5465
5950
|
"pager-viewmode-simple": o.value === "simple"
|
|
5466
|
-
})),
|
|
5951
|
+
})), E = b(() => ({
|
|
5467
5952
|
position: "relative",
|
|
5468
5953
|
"justify-content": l.value === "center" ? "center" : "start"
|
|
5469
5954
|
}));
|
|
@@ -5489,8 +5974,8 @@ const Tt = X({
|
|
|
5489
5974
|
class: "pagination-container"
|
|
5490
5975
|
}, [y.value && a("ul", {
|
|
5491
5976
|
role: "navigation",
|
|
5492
|
-
class:
|
|
5493
|
-
style:
|
|
5977
|
+
class: H.value,
|
|
5978
|
+
style: E.value
|
|
5494
5979
|
}, [o.value === "default" ? W() : M()])]);
|
|
5495
5980
|
}
|
|
5496
5981
|
}), cl = {
|
|
@@ -5504,17 +5989,17 @@ const Tt = X({
|
|
|
5504
5989
|
type: Object
|
|
5505
5990
|
}
|
|
5506
5991
|
};
|
|
5507
|
-
const Pt = X({
|
|
5992
|
+
const Pt = /* @__PURE__ */ X({
|
|
5508
5993
|
name: "FPopover",
|
|
5509
5994
|
props: dl,
|
|
5510
5995
|
emits: [],
|
|
5511
5996
|
setup(e, n) {
|
|
5512
5997
|
let t = 0, o = 0;
|
|
5513
5998
|
typeof window < "u" && (t = document.documentElement.scrollLeft, o = document.documentElement.scrollTop);
|
|
5514
|
-
const l =
|
|
5999
|
+
const l = v(), u = v(), s = v(e.placement), r = v("0px"), d = v("0px"), f = b(() => !!e.title), p = v(!1), c = b(() => {
|
|
5515
6000
|
const w = `popover in popover-${s.value}`, y = `bs-popover-${s.value}`, k = {};
|
|
5516
6001
|
return k[w] = !0, k[y] = !0, k;
|
|
5517
|
-
}),
|
|
6002
|
+
}), h = b(() => ({
|
|
5518
6003
|
"popover-content": !0,
|
|
5519
6004
|
"popover-body": !0
|
|
5520
6005
|
})), i = b(() => ({
|
|
@@ -5550,7 +6035,7 @@ const Pt = X({
|
|
|
5550
6035
|
}, null), f.value && a("h3", {
|
|
5551
6036
|
class: "popover-title popover-header"
|
|
5552
6037
|
}, [e.title]), a("div", {
|
|
5553
|
-
class:
|
|
6038
|
+
class: h.value
|
|
5554
6039
|
}, [n.slots.default && ((w = n.slots) == null ? void 0 : w.default())])]), [[Ft, p.value]])];
|
|
5555
6040
|
}
|
|
5556
6041
|
})]);
|
|
@@ -5573,14 +6058,41 @@ const fl = {
|
|
|
5573
6058
|
e.component(Pt.name, Pt), e.directive("popover", fl);
|
|
5574
6059
|
}
|
|
5575
6060
|
}, hl = {
|
|
6061
|
+
/**
|
|
6062
|
+
* 组件标识
|
|
6063
|
+
*/
|
|
5576
6064
|
id: String,
|
|
6065
|
+
/**
|
|
6066
|
+
* 组件名称
|
|
6067
|
+
*/
|
|
5577
6068
|
name: { type: String, default: "" },
|
|
6069
|
+
/**
|
|
6070
|
+
* 单选组枚举数组
|
|
6071
|
+
*/
|
|
5578
6072
|
enumData: Array,
|
|
6073
|
+
/**
|
|
6074
|
+
* 枚举数组中展示文本的key值。
|
|
6075
|
+
*/
|
|
5579
6076
|
textField: { type: String, default: "name" },
|
|
6077
|
+
/**
|
|
6078
|
+
* 枚举数组中枚举值的key值。
|
|
6079
|
+
*/
|
|
5580
6080
|
valueField: { type: String, default: "value" },
|
|
6081
|
+
/**
|
|
6082
|
+
* 组件是否水平排列
|
|
6083
|
+
*/
|
|
5581
6084
|
horizontal: { type: Boolean, default: !1 },
|
|
6085
|
+
/**
|
|
6086
|
+
* 禁用组件,不允许切换单选值
|
|
6087
|
+
*/
|
|
5582
6088
|
disabled: { type: Boolean, default: !1 },
|
|
6089
|
+
/**
|
|
6090
|
+
* 组件值
|
|
6091
|
+
*/
|
|
5583
6092
|
modelValue: { type: String, default: "" },
|
|
6093
|
+
/**
|
|
6094
|
+
* 输入框Tab键索引
|
|
6095
|
+
*/
|
|
5584
6096
|
tabIndex: Number
|
|
5585
6097
|
};
|
|
5586
6098
|
function pl(e, n, t) {
|
|
@@ -5605,12 +6117,12 @@ function pl(e, n, t) {
|
|
|
5605
6117
|
onClickRadio: r
|
|
5606
6118
|
};
|
|
5607
6119
|
}
|
|
5608
|
-
const Mt = X({
|
|
6120
|
+
const Mt = /* @__PURE__ */ X({
|
|
5609
6121
|
name: "FRadioGroup",
|
|
5610
6122
|
props: hl,
|
|
5611
6123
|
emits: ["changeValue", "update:modelValue"],
|
|
5612
6124
|
setup(e, n) {
|
|
5613
|
-
const t =
|
|
6125
|
+
const t = v(e.modelValue), {
|
|
5614
6126
|
enumData: o,
|
|
5615
6127
|
onClickRadio: l,
|
|
5616
6128
|
getValue: u,
|
|
@@ -5663,28 +6175,28 @@ const Mt = X({
|
|
|
5663
6175
|
showToolbarMoreButton: { type: Boolean, default: !0 },
|
|
5664
6176
|
clickThrottleTime: { type: Number, default: 350 },
|
|
5665
6177
|
headerClass: { type: String, default: "" }
|
|
5666
|
-
}, Ot = X({
|
|
6178
|
+
}, Ot = /* @__PURE__ */ X({
|
|
5667
6179
|
name: "FSection",
|
|
5668
6180
|
props: ml,
|
|
5669
6181
|
emits: [],
|
|
5670
6182
|
setup(e, n) {
|
|
5671
6183
|
const t = b(() => !0), o = b(() => !0), l = b(() => !0);
|
|
5672
|
-
b(() => !1), b(() => !1), b(() => !1), b(() => !1),
|
|
6184
|
+
b(() => !1), b(() => !1), b(() => !1), b(() => !1), v([]);
|
|
5673
6185
|
const u = b(() => {
|
|
5674
|
-
const c = e.headerClass.split(" "),
|
|
6186
|
+
const c = e.headerClass.split(" "), h = {
|
|
5675
6187
|
"f-section-header": !0
|
|
5676
6188
|
};
|
|
5677
|
-
return c.reduce((i, m) => (i[m] = !0, i),
|
|
6189
|
+
return c.reduce((i, m) => (i[m] = !0, i), h), h;
|
|
5678
6190
|
});
|
|
5679
6191
|
b(() => ({
|
|
5680
6192
|
"f-section-extend": !0
|
|
5681
6193
|
}));
|
|
5682
6194
|
const s = b(() => {
|
|
5683
|
-
const c = e.contentClass.split(" "),
|
|
6195
|
+
const c = e.contentClass.split(" "), h = {
|
|
5684
6196
|
"f-section-content": !0
|
|
5685
6197
|
};
|
|
5686
|
-
return c.reduce((i, m) => (i[m] = !0, i),
|
|
5687
|
-
}), r =
|
|
6198
|
+
return c.reduce((i, m) => (i[m] = !0, i), h), h;
|
|
6199
|
+
}), r = v(e.mainTitle), d = v(e.subTitle);
|
|
5688
6200
|
function f() {
|
|
5689
6201
|
return t.value && a("div", {
|
|
5690
6202
|
class: u.value
|
|
@@ -5708,6 +6220,9 @@ const Mt = X({
|
|
|
5708
6220
|
e.component(Ot.name, Ot);
|
|
5709
6221
|
}
|
|
5710
6222
|
}, bl = {
|
|
6223
|
+
/**
|
|
6224
|
+
* 组件值
|
|
6225
|
+
*/
|
|
5711
6226
|
modelValue: { type: Boolean, default: !1 },
|
|
5712
6227
|
disable: { type: Boolean },
|
|
5713
6228
|
onBackground: { type: String },
|
|
@@ -5717,7 +6232,7 @@ const Mt = X({
|
|
|
5717
6232
|
onLabel: { type: String },
|
|
5718
6233
|
offLabel: { type: String },
|
|
5719
6234
|
size: { type: String, default: "medium" }
|
|
5720
|
-
}, Nt = X({
|
|
6235
|
+
}, Nt = /* @__PURE__ */ X({
|
|
5721
6236
|
name: "FSwitch",
|
|
5722
6237
|
props: bl,
|
|
5723
6238
|
emits: ["update:modelValue"],
|
|
@@ -5727,7 +6242,7 @@ const Mt = X({
|
|
|
5727
6242
|
size: o,
|
|
5728
6243
|
onLabel: l,
|
|
5729
6244
|
offLabel: u
|
|
5730
|
-
} = Rt(e), s =
|
|
6245
|
+
} = Rt(e), s = v(e.modelValue);
|
|
5731
6246
|
function r() {
|
|
5732
6247
|
return "";
|
|
5733
6248
|
}
|
|
@@ -5749,7 +6264,7 @@ const Mt = X({
|
|
|
5749
6264
|
outline: "none",
|
|
5750
6265
|
"backgroud-color": r(),
|
|
5751
6266
|
"border-color": d()
|
|
5752
|
-
})),
|
|
6267
|
+
})), h = b(() => ({
|
|
5753
6268
|
background: f()
|
|
5754
6269
|
})), i = b(() => (l == null ? void 0 : l.value) || (u == null ? void 0 : u.value));
|
|
5755
6270
|
function m(w, y = !0) {
|
|
@@ -5771,7 +6286,7 @@ const Mt = X({
|
|
|
5771
6286
|
}, [l == null ? void 0 : l.value]), a("span", {
|
|
5772
6287
|
class: "switch-label-unchecked"
|
|
5773
6288
|
}, [u == null ? void 0 : u.value])]), a("small", {
|
|
5774
|
-
style:
|
|
6289
|
+
style: h.value
|
|
5775
6290
|
}, [n.slots.default && n.slots.default()])]);
|
|
5776
6291
|
}
|
|
5777
6292
|
}), wl = {
|
|
@@ -5799,7 +6314,7 @@ const Mt = X({
|
|
|
5799
6314
|
};
|
|
5800
6315
|
function Cl(e, n, t) {
|
|
5801
6316
|
function o(p) {
|
|
5802
|
-
const c = p.value.findIndex((
|
|
6317
|
+
const c = p.value.findIndex((h) => h.props.show !== !1 && !t.value && !h.props.disabled);
|
|
5803
6318
|
!t.value && c !== -1 && (t.value = p.value[c].props.id);
|
|
5804
6319
|
}
|
|
5805
6320
|
function l(p) {
|
|
@@ -5828,20 +6343,20 @@ function Cl(e, n, t) {
|
|
|
5828
6343
|
};
|
|
5829
6344
|
}
|
|
5830
6345
|
function d(p) {
|
|
5831
|
-
var
|
|
6346
|
+
var h;
|
|
5832
6347
|
if (e.autoTitleWidth)
|
|
5833
6348
|
return;
|
|
5834
|
-
const c = (
|
|
5835
|
-
if (
|
|
6349
|
+
const c = (h = p.value) == null ? void 0 : h.querySelectorAll(".st-tab-text");
|
|
6350
|
+
if (c)
|
|
5836
6351
|
for (let i = 0; i < c.length; i++) {
|
|
5837
6352
|
const m = c[i].parentNode;
|
|
5838
6353
|
c[i].scrollWidth > m.offsetWidth ? c[i].classList.contains("farris-title-text-custom") || c[i].classList.add("farris-title-text-custom") : c[i].classList.remove("farris-title-text-custom");
|
|
5839
6354
|
}
|
|
5840
6355
|
}
|
|
5841
6356
|
function f(p, c) {
|
|
5842
|
-
const
|
|
6357
|
+
const h = t.value;
|
|
5843
6358
|
t.value = c, n.emit("tabChange", {
|
|
5844
|
-
prevId:
|
|
6359
|
+
prevId: h,
|
|
5845
6360
|
nextId: t.value
|
|
5846
6361
|
}), p.preventDefault(), p.stopPropagation();
|
|
5847
6362
|
}
|
|
@@ -5855,19 +6370,19 @@ function Cl(e, n, t) {
|
|
|
5855
6370
|
selectTabByTabId: f
|
|
5856
6371
|
};
|
|
5857
6372
|
}
|
|
5858
|
-
const Dt = X({
|
|
6373
|
+
const Dt = /* @__PURE__ */ X({
|
|
5859
6374
|
name: "FTabs",
|
|
5860
6375
|
props: xl,
|
|
5861
6376
|
emits: ["tabChange", "tabRemove"],
|
|
5862
6377
|
setup(e, n) {
|
|
5863
|
-
const t = ft(), o = ft(), l =
|
|
6378
|
+
const t = ft(), o = ft(), l = v(!0), u = v(!0), s = v([]), r = v(e.activeId), d = b(() => {
|
|
5864
6379
|
const V = s.value.find((z) => z.props.id === r.value);
|
|
5865
6380
|
return V == null ? void 0 : V.slots;
|
|
5866
6381
|
}), f = b(() => {
|
|
5867
6382
|
const V = s.value.find((J) => J.props.id === r.value);
|
|
5868
6383
|
return (V == null ? void 0 : V.props.toolbarPosition) === "inHead";
|
|
5869
|
-
}), p =
|
|
5870
|
-
setActiveId:
|
|
6384
|
+
}), p = v("atuo"), c = v(""), {
|
|
6385
|
+
setActiveId: h,
|
|
5871
6386
|
getTabStyle: i,
|
|
5872
6387
|
getTabClass: m,
|
|
5873
6388
|
getTabNavLinkClass: A,
|
|
@@ -5915,7 +6430,7 @@ const Dt = X({
|
|
|
5915
6430
|
}));
|
|
5916
6431
|
};
|
|
5917
6432
|
function C(V, z, J = !1) {
|
|
5918
|
-
s.value.findIndex((ae) => ae.props.id === z), s.value = s.value.filter((ae) => ae.props.id !== z), r.value === z && (r.value = "",
|
|
6433
|
+
s.value.findIndex((ae) => ae.props.id === z), s.value = s.value.filter((ae) => ae.props.id !== z), r.value === z && (r.value = "", h(s)), g(V), ke(() => {
|
|
5919
6434
|
y(o), S(), J && (u.value = !0);
|
|
5920
6435
|
const ae = s.value.findIndex((ne) => ne.props.id === r.value);
|
|
5921
6436
|
P(ae), n.emit("tabRemove", {
|
|
@@ -5939,13 +6454,13 @@ const Dt = X({
|
|
|
5939
6454
|
"farris-tabs-nav-pills": O.value
|
|
5940
6455
|
})), D = b(() => ({
|
|
5941
6456
|
width: f.value && e.titleWidth ? `${e.titleWidth}%` : ""
|
|
5942
|
-
})),
|
|
6457
|
+
})), H = b(() => ({
|
|
5943
6458
|
btn: !0,
|
|
5944
6459
|
"sc-nav-btn": !0,
|
|
5945
6460
|
"px-1": !0,
|
|
5946
6461
|
"sc-nav-lr": !0,
|
|
5947
6462
|
"d-none": l.value
|
|
5948
|
-
})),
|
|
6463
|
+
})), E = b(() => ({
|
|
5949
6464
|
"btn-group": !0,
|
|
5950
6465
|
"sc-nav-btn": !0,
|
|
5951
6466
|
dropdown: !0,
|
|
@@ -5982,6 +6497,7 @@ const Dt = X({
|
|
|
5982
6497
|
}), ee = b(() => ({
|
|
5983
6498
|
spacer: !0,
|
|
5984
6499
|
"f-utils-fill": !0,
|
|
6500
|
+
// 'spacer-sides': !hideButtons.value && hideDropDown.value,
|
|
5985
6501
|
"spacer-sides-dropdown": !l.value
|
|
5986
6502
|
})), te = b(() => ({
|
|
5987
6503
|
nav: !0,
|
|
@@ -6024,7 +6540,7 @@ const Dt = X({
|
|
|
6024
6540
|
}, [a("button", {
|
|
6025
6541
|
title: "left-arrow-button",
|
|
6026
6542
|
type: "button",
|
|
6027
|
-
class:
|
|
6543
|
+
class: H.value,
|
|
6028
6544
|
onClick: () => {
|
|
6029
6545
|
x(0, -1);
|
|
6030
6546
|
}
|
|
@@ -6052,7 +6568,7 @@ const Dt = X({
|
|
|
6052
6568
|
class: "f-icon f-icon-close"
|
|
6053
6569
|
}, null)])])]);
|
|
6054
6570
|
})])]), a("div", {
|
|
6055
|
-
class:
|
|
6571
|
+
class: E.value
|
|
6056
6572
|
}, [a("button", {
|
|
6057
6573
|
title: "right-arrow-button",
|
|
6058
6574
|
type: "button",
|
|
@@ -6093,7 +6609,7 @@ const Dt = X({
|
|
|
6093
6609
|
class: "dropdown-title"
|
|
6094
6610
|
}, [ne.props.title])]))]) : a("div", {
|
|
6095
6611
|
class: "dropdown-no-data"
|
|
6096
|
-
}, [_e("
|
|
6612
|
+
}, [_e("没有相关数据")])])])]), d.value && a("div", {
|
|
6097
6613
|
class: "farris-tabs-toolbar"
|
|
6098
6614
|
}, [(z = (V = d.value) == null ? void 0 : V.toolbarExtra) == null ? void 0 : z.call(V)])]), a("div", {
|
|
6099
6615
|
class: "farris-tabs-content"
|
|
@@ -6112,21 +6628,21 @@ const Dt = X({
|
|
|
6112
6628
|
show: { type: Boolean, default: !0 },
|
|
6113
6629
|
toolbar: { type: Object },
|
|
6114
6630
|
toolbarPosition: { type: String, default: "inContent" }
|
|
6115
|
-
}, jt = X({
|
|
6631
|
+
}, jt = /* @__PURE__ */ X({
|
|
6116
6632
|
name: "FTabPage",
|
|
6117
6633
|
props: kl,
|
|
6118
6634
|
emits: [],
|
|
6119
6635
|
setup(e, n) {
|
|
6120
6636
|
const t = De("tabs");
|
|
6121
6637
|
ga();
|
|
6122
|
-
const o =
|
|
6638
|
+
const o = v(!0), l = {
|
|
6123
6639
|
slots: n.slots,
|
|
6124
6640
|
props: e
|
|
6125
6641
|
};
|
|
6126
6642
|
Ne(() => {
|
|
6127
6643
|
const s = t == null ? void 0 : t.tabs.value.findIndex((r) => r.props.id === e.id);
|
|
6128
|
-
!s || s === -1 ? t == null || t.addTab(l) : s > -1 && (o.value = !1, console.warn(
|
|
6129
|
-
}),
|
|
6644
|
+
!s || s === -1 ? t == null || t.addTab(l) : s > -1 && (o.value = !1, console.warn(`已经存在id为${e.id}的页签啦`));
|
|
6645
|
+
}), He(() => {
|
|
6130
6646
|
});
|
|
6131
6647
|
function u() {
|
|
6132
6648
|
return {
|
|
@@ -6155,13 +6671,16 @@ const Dt = X({
|
|
|
6155
6671
|
e.component(Dt.name, Dt), e.component(jt.name, jt);
|
|
6156
6672
|
}
|
|
6157
6673
|
}, _l = {
|
|
6674
|
+
/**
|
|
6675
|
+
* 组件值
|
|
6676
|
+
*/
|
|
6158
6677
|
modelValue: { type: String, default: "" }
|
|
6159
|
-
}, Wt = X({
|
|
6678
|
+
}, Wt = /* @__PURE__ */ X({
|
|
6160
6679
|
name: "FText",
|
|
6161
6680
|
props: _l,
|
|
6162
6681
|
emits: ["update:modelValue"],
|
|
6163
6682
|
setup(e, n) {
|
|
6164
|
-
const t =
|
|
6683
|
+
const t = v(!0), o = v(!0), l = v(""), u = v(0), s = v(0), r = v(e.modelValue), d = b(() => ({
|
|
6165
6684
|
"f-form-control-text": !t.value,
|
|
6166
6685
|
"f-form-context-textarea": t,
|
|
6167
6686
|
"f-component-text-auto-size": o.value
|
|
@@ -6207,8 +6726,8 @@ function Pl(e, n) {
|
|
|
6207
6726
|
}
|
|
6208
6727
|
function u(s, r, d, f, p) {
|
|
6209
6728
|
let c = s;
|
|
6210
|
-
const
|
|
6211
|
-
return Math.abs(d[
|
|
6729
|
+
const h = s.split("-")[0], i = o.get(h), m = f[i] + p[i];
|
|
6730
|
+
return Math.abs(d[h] - r[h]) < m && (c = l(s, h)), c;
|
|
6212
6731
|
}
|
|
6213
6732
|
return { adjustPlacement: u };
|
|
6214
6733
|
}
|
|
@@ -6218,24 +6737,24 @@ function Bl(e, n) {
|
|
|
6218
6737
|
return (s === "left" || s === "top") && r <= u[s] && (d = !0, f = u[s] + 6), (s === "right" || s === "bottom") && r >= u[s] && (d = !0, f = u[s] - 6), { overBound: d, fixedValue: f };
|
|
6219
6738
|
}
|
|
6220
6739
|
function l(u, s, r, d, f, p, c) {
|
|
6221
|
-
let
|
|
6740
|
+
let h = s.tooltip.left, i = s.tooltip.top, m = s.arrow.left, A = s.arrow.top;
|
|
6222
6741
|
const y = u.split("-")[0];
|
|
6223
6742
|
if (["top", "bottom"].includes(y)) {
|
|
6224
6743
|
const P = o(r, "left", s.tooltip.left), T = o(r, "right", s.tooltip.left + f.width);
|
|
6225
|
-
|
|
6744
|
+
h = P.overBound ? P.fixedValue : T.overBound ? T.fixedValue - f.width : s.tooltip.left, m = P.overBound ? f.width - (h + f.width - d.right) - c.width : T.overBound ? d.left - h : s.arrow.left;
|
|
6226
6745
|
}
|
|
6227
6746
|
const k = o(r, "top", s.tooltip.top), S = o(r, "bottom", s.tooltip.top + f.height);
|
|
6228
|
-
return i = k.overBound ? k.fixedValue : S.overBound ? S.fixedValue - f.height : s.tooltip.top, A = k.overBound ? s.arrow.top : S.overBound ? f.height - (i + f.height - d.top) : s.arrow.top, { arrow: { left: m, top: A }, tooltip: { left:
|
|
6747
|
+
return i = k.overBound ? k.fixedValue : S.overBound ? S.fixedValue - f.height : s.tooltip.top, A = k.overBound ? s.arrow.top : S.overBound ? f.height - (i + f.height - d.top) : s.arrow.top, { arrow: { left: m, top: A }, tooltip: { left: h, top: i } };
|
|
6229
6748
|
}
|
|
6230
6749
|
return { adjustPosition: l };
|
|
6231
6750
|
}
|
|
6232
6751
|
function Ml(e, n) {
|
|
6233
6752
|
function o(s, r, d, f, p) {
|
|
6234
|
-
const c = s.split("-"),
|
|
6753
|
+
const c = s.split("-"), h = c[0], i = c[1] || "middle", m = ["top", "bottom"].includes(h) ? i === "middle" ? (f.width - p.width) / 2 : i === "right" ? f.width - p.width - 6 : 6 : 0, A = ["left", "right"].includes(h) ? i === "middle" ? (f.height - p.height) / 2 : i === "bottom" ? f.height - p.height - 6 : 6 : 0, w = h === "left" ? f.width + p.width : 0, y = h === "top" ? f.height + p.height : 0;
|
|
6235
6754
|
return { left: w + m, top: y + A, right: 0 };
|
|
6236
6755
|
}
|
|
6237
6756
|
function l(s, r, d, f, p) {
|
|
6238
|
-
const c = s.split("-"),
|
|
6757
|
+
const c = s.split("-"), h = c[0], i = c[1] || "middle", m = (d.width - f.width) / 2, A = (d.height - f.height) / 2, w = h === "right" ? r.right : r.left, y = h === "bottom" ? r.bottom : r.top, k = h === "top" ? 0 - A - f.height - p.height : h === "bottom" ? 0 - A + p.height : 0, S = ["left", "right"].includes(h) ? i === "middle" ? (r.height - f.height) / 2 : i === "bottom" ? r.height - f.height : 0 : 0, g = h === "left" ? 0 - m - f.width - p.width : h === "right" ? 0 - m + p.width : 0, x = ["top", "bottom"].includes(h) ? i === "middle" ? (r.width - f.width) / 2 : i === "right" ? r.width - f.width : 0 : 0, P = y + k + S;
|
|
6239
6758
|
return { left: w + g + x, top: P };
|
|
6240
6759
|
}
|
|
6241
6760
|
function u(s, r, d, f, p) {
|
|
@@ -6245,18 +6764,18 @@ function Ml(e, n) {
|
|
|
6245
6764
|
return { calculate: u };
|
|
6246
6765
|
}
|
|
6247
6766
|
function Ol(e, n) {
|
|
6248
|
-
const t =
|
|
6767
|
+
const t = v(e.horizontalRelative), o = v(e.verticalRelative);
|
|
6249
6768
|
function l(s) {
|
|
6250
6769
|
return typeof s == "string" ? document.querySelector(s) : s;
|
|
6251
6770
|
}
|
|
6252
6771
|
function u() {
|
|
6253
|
-
let s = document.documentElement.clientWidth, r = document.documentElement.clientHeight, d = 0, f = 0, p = 0, c = 0,
|
|
6254
|
-
return t.value && ({ left: f, right: s, x: p, width: i } = l(t.value).getBoundingClientRect()), o.value && ({ bottom: r, top: d, y: c, height:
|
|
6772
|
+
let s = document.documentElement.clientWidth, r = document.documentElement.clientHeight, d = 0, f = 0, p = 0, c = 0, h = r - d, i = s - f;
|
|
6773
|
+
return t.value && ({ left: f, right: s, x: p, width: i } = l(t.value).getBoundingClientRect()), o.value && ({ bottom: r, top: d, y: c, height: h } = l(o.value).getBoundingClientRect()), { top: d, left: f, right: s, bottom: r, height: h, width: i, x: p, y: c };
|
|
6255
6774
|
}
|
|
6256
6775
|
return { getRelativeElementBound: u };
|
|
6257
6776
|
}
|
|
6258
6777
|
function Nl(e, n, t, o, l, u) {
|
|
6259
|
-
const s =
|
|
6778
|
+
const s = v(e.placement), { getRelativeElementBound: r } = Ol(e), { calculate: d } = Ml(), { adjustPlacement: f } = Pl(), { adjustPosition: p } = Bl(), c = b(() => s.value.split("-")[0]), h = b(() => {
|
|
6260
6779
|
const i = r();
|
|
6261
6780
|
s.value = f(s.value, i, t, o, u);
|
|
6262
6781
|
const m = d(s.value, t, o, l, u);
|
|
@@ -6270,14 +6789,14 @@ function Nl(e, n, t, o, l, u) {
|
|
|
6270
6789
|
u
|
|
6271
6790
|
);
|
|
6272
6791
|
});
|
|
6273
|
-
return { tooltipPlacement: c, tooltipPosition:
|
|
6792
|
+
return { tooltipPlacement: c, tooltipPosition: h };
|
|
6274
6793
|
}
|
|
6275
|
-
const Ze = X({
|
|
6794
|
+
const Ze = /* @__PURE__ */ X({
|
|
6276
6795
|
name: "FTooltip",
|
|
6277
6796
|
props: Tl,
|
|
6278
6797
|
emits: ["click"],
|
|
6279
6798
|
setup(e, n) {
|
|
6280
|
-
const t =
|
|
6799
|
+
const t = v(!0), o = v(), l = v(), u = v(), s = v(e.placement.split("-")[0]), r = b(() => {
|
|
6281
6800
|
const S = {
|
|
6282
6801
|
tooltip: !0,
|
|
6283
6802
|
show: !0
|
|
@@ -6286,12 +6805,12 @@ const Ze = X({
|
|
|
6286
6805
|
}), {
|
|
6287
6806
|
scrollLeft: d,
|
|
6288
6807
|
scrollTop: f
|
|
6289
|
-
} = document.documentElement, p = b(() => t.value), c = b(() => e.content),
|
|
6290
|
-
|
|
6808
|
+
} = document.documentElement, p = b(() => t.value), c = b(() => e.content), h = v("0px"), i = v("0px");
|
|
6809
|
+
v("");
|
|
6291
6810
|
const m = b(() => ({
|
|
6292
|
-
left:
|
|
6811
|
+
left: h.value,
|
|
6293
6812
|
top: i.value
|
|
6294
|
-
})), A =
|
|
6813
|
+
})), A = v(""), w = v(""), y = b(() => ({
|
|
6295
6814
|
left: A.value,
|
|
6296
6815
|
top: w.value
|
|
6297
6816
|
}));
|
|
@@ -6301,7 +6820,7 @@ const Ze = X({
|
|
|
6301
6820
|
tooltipPlacement: S,
|
|
6302
6821
|
tooltipPosition: g
|
|
6303
6822
|
} = Nl(e, n, e.reference.getBoundingClientRect(), l.value.getBoundingClientRect(), u.value.getBoundingClientRect(), o.value.getBoundingClientRect());
|
|
6304
|
-
|
|
6823
|
+
h.value = `${g.value.tooltip.left + d}px`, i.value = `${g.value.tooltip.top + f}px`, A.value = `${g.value.arrow.left}px`, w.value = `${g.value.arrow.top}px`, s.value = S.value;
|
|
6305
6824
|
}
|
|
6306
6825
|
});
|
|
6307
6826
|
function k(S) {
|
|
@@ -6330,7 +6849,7 @@ const Ze = X({
|
|
|
6330
6849
|
function Dl(e, n) {
|
|
6331
6850
|
const t = document.createElement("div"), o = et({
|
|
6332
6851
|
setup() {
|
|
6333
|
-
return
|
|
6852
|
+
return He(() => {
|
|
6334
6853
|
document.body.removeChild(t);
|
|
6335
6854
|
}), () => a(Ze, Se(e, {
|
|
6336
6855
|
onClick: o.unmount
|
|
@@ -6367,7 +6886,8 @@ const Wl = {
|
|
|
6367
6886
|
install(e) {
|
|
6368
6887
|
e.component(Ze.name, Ze), e.directive("tooltip", Wl);
|
|
6369
6888
|
}
|
|
6370
|
-
}
|
|
6889
|
+
};
|
|
6890
|
+
const Ul = {
|
|
6371
6891
|
install(e) {
|
|
6372
6892
|
e.use(ba).use(Ca).use(Ta).use(Na).use(Wa).use(Qa).use(bn).use(Mn).use(jn).use(Ln).use($n).use(Un).use(Xn).use(tl).use(cl).use(vl).use(gl).use(yl).use(wl).use(Sl).use(Al).use(Fl);
|
|
6373
6893
|
}
|