@farris/ui-vue 1.0.0-beta.2 → 1.0.0-beta.4
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 +93 -0
- package/accordion/index.umd.js +1 -0
- package/accordion/package.json +8 -0
- package/accordion/style.css +1 -0
- package/avatar/index.esm.js +94 -0
- package/avatar/index.umd.js +1 -0
- package/avatar/package.json +8 -0
- package/avatar/style.css +1 -0
- package/button/index.esm.js +206 -0
- package/button/index.umd.js +1 -0
- package/button/package.json +8 -0
- package/button-edit/index.esm.js +300 -0
- package/button-edit/index.umd.js +1 -0
- package/button-edit/package.json +8 -0
- package/checkbox/index.esm.js +97 -0
- package/checkbox/index.umd.js +1 -0
- package/checkbox/package.json +8 -0
- package/combo-list/index.esm.js +457 -0
- package/combo-list/index.umd.js +1 -0
- package/combo-list/package.json +8 -0
- package/data-grid/index.esm.js +1535 -0
- package/data-grid/index.umd.js +1 -0
- package/data-grid/package.json +8 -0
- package/data-grid/style.css +1 -0
- package/date-picker/index.esm.js +1479 -0
- package/date-picker/index.umd.js +1 -0
- package/date-picker/package.json +8 -0
- package/date-picker/style.css +1 -0
- package/{src/index.esm.js → farris.all.esm.js} +1 -2
- package/farris.all.umd.js +1 -0
- package/list-view/index.esm.js +144 -0
- package/list-view/index.umd.js +1 -0
- package/list-view/package.json +8 -0
- package/list-view/style.css +1 -0
- package/message-box/index.esm.js +499 -0
- package/message-box/index.umd.js +1 -0
- package/message-box/package.json +8 -0
- package/modal/index.esm.js +165 -0
- package/modal/index.umd.js +1 -0
- package/modal/package.json +8 -0
- package/notify/index.esm.js +187 -0
- package/notify/index.umd.js +1 -0
- package/notify/package.json +8 -0
- package/notify/style.css +1 -0
- package/package.json +6 -5
- package/pagination/index.esm.js +334 -0
- package/pagination/index.umd.js +1 -0
- package/pagination/package.json +8 -0
- package/pagination/style.css +1 -0
- package/popover/index.esm.js +83 -0
- package/popover/index.umd.js +1 -0
- package/popover/package.json +8 -0
- package/popover/style.css +1 -0
- package/radio-group/index.esm.js +79 -0
- package/radio-group/index.umd.js +1 -0
- package/radio-group/package.json +8 -0
- package/section/index.esm.js +70 -0
- package/section/index.umd.js +1 -0
- package/section/package.json +8 -0
- package/switch/index.esm.js +78 -0
- package/switch/index.umd.js +1 -0
- package/switch/package.json +8 -0
- package/tabs/index.esm.js +385 -0
- package/tabs/index.umd.js +1 -0
- package/tabs/package.json +8 -0
- package/tabs/style.css +1 -0
- package/text/index.esm.js +33 -0
- package/text/index.umd.js +1 -0
- package/text/package.json +8 -0
- package/tooltip/index.esm.js +195 -0
- package/tooltip/index.umd.js +1 -0
- package/tooltip/package.json +8 -0
- package/tooltip/style.css +1 -0
- package/types/accordion/index.d.ts +25 -0
- package/types/accordion/src/accordion.component.d.ts +70 -0
- package/types/accordion/src/accordion.props.d.ts +50 -0
- package/types/accordion/src/components/accordion-item.component.d.ts +38 -0
- package/types/accordion/src/components/accordion-item.props.d.ts +34 -0
- package/types/avatar/index.d.ts +23 -0
- package/types/avatar/src/avatar.component.d.ts +109 -0
- package/types/avatar/src/avatar.props.d.ts +96 -0
- package/types/avatar/src/composition/types.d.ts +31 -0
- package/types/avatar/src/composition/use-image.d.ts +19 -0
- package/types/button/index.d.ts +24 -0
- package/types/button/src/button-group.component.d.ts +106 -0
- package/types/button/src/button-group.props.d.ts +106 -0
- package/types/button/src/button.component.d.ts +34 -0
- package/types/button/src/button.props.d.ts +47 -0
- package/types/button/src/composition/types-group.d.ts +24 -0
- package/types/button/src/composition/types.d.ts +24 -0
- package/types/button/src/composition/use-button-group.d.ts +19 -0
- package/types/button/src/composition/use-button.d.ts +19 -0
- package/types/button-edit/index.d.ts +23 -0
- package/types/button-edit/src/button-edit.props.d.ts +135 -0
- package/types/button-edit/src/composition/types.d.ts +118 -0
- package/types/button-edit/src/composition/use-button.d.ts +19 -0
- package/types/button-edit/src/composition/use-clear.d.ts +19 -0
- package/types/button-edit/src/composition/use-text-box.d.ts +19 -0
- package/types/checkbox/index.d.ts +23 -0
- package/types/checkbox/src/checkbox-group.component.d.ts +148 -0
- package/types/checkbox/src/checkbox-group.props.d.ts +123 -0
- package/types/checkbox/src/composition/types.d.ts +46 -0
- package/types/checkbox/src/composition/use-checkbox-group.d.ts +19 -0
- package/types/combo-list/index.d.ts +25 -0
- package/types/combo-list/src/combo-list.props.d.ts +290 -0
- package/types/combo-list/src/components/option.component.d.ts +39 -0
- package/types/combo-list/src/components/options.component.d.ts +10 -0
- package/types/combo-list/src/composition/index.d.ts +18 -0
- package/types/combo-list/src/composition/use-combo-list.d.ts +30 -0
- package/types/combo-list/src/composition/use-option.d.ts +19 -0
- package/types/combo-list/src/composition/use-options.d.ts +2 -0
- package/types/combo-list/src/composition/use-panel.d.ts +8 -0
- package/types/combo-list/src/const.d.ts +40 -0
- package/types/combo-list/src/types.d.ts +186 -0
- package/types/data-grid/index.d.ts +23 -0
- package/types/data-grid/src/components/data/data-area.component.d.ts +21 -0
- package/types/data-grid/src/components/editors/date-picker.component.d.ts +2 -0
- package/types/data-grid/src/components/editors/text-area-editor.component.d.ts +2 -0
- package/types/data-grid/src/components/editors/text-editor.component.d.ts +17 -0
- package/types/data-grid/src/components/header/data-grid-header.component.d.ts +22 -0
- package/types/data-grid/src/components/pagination/data-grid-pagination.component.d.ts +5 -0
- package/types/data-grid/src/components/scrollbar/horizontal-scrollbar.component.d.ts +21 -0
- package/types/data-grid/src/components/scrollbar/vertical-scrollbar.component.d.ts +21 -0
- package/types/data-grid/src/components/sidebar/data-grid-sidebar.component.d.ts +21 -0
- package/types/data-grid/src/components/summary/data-grid-summary.component.d.ts +5 -0
- package/types/data-grid/src/composition/types.d.ts +175 -0
- package/types/data-grid/src/composition/use-column.d.ts +17 -0
- package/types/data-grid/src/composition/use-data-view.d.ts +19 -0
- package/types/data-grid/src/composition/use-edit.d.ts +18 -0
- package/types/data-grid/src/composition/use-fit-column.d.ts +20 -0
- package/types/data-grid/src/composition/use-group-column.d.ts +22 -0
- package/types/data-grid/src/composition/use-group-data.d.ts +3 -0
- package/types/data-grid/src/composition/use-positon-style.d.ts +20 -0
- package/types/data-grid/src/composition/use-resize.d.ts +20 -0
- package/types/data-grid/src/composition/use-row.d.ts +3 -0
- package/types/data-grid/src/composition/use-sidebar.d.ts +3 -0
- package/types/data-grid/src/composition/use-virtual-scroll.d.ts +20 -0
- package/types/data-grid/src/composition/use-visual-data.d.ts +19 -0
- package/types/data-grid/src/data-grid.component.d.ts +278 -0
- package/types/data-grid/src/data-grid.props.d.ts +650 -0
- package/types/date-picker/index.d.ts +28 -0
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +166 -0
- package/types/date-picker/src/components/calendar/calendar.props.d.ts +94 -0
- package/types/date-picker/src/components/calendar-navbar/calendar-navbar.component.d.ts +138 -0
- package/types/date-picker/src/components/calendar-navbar/calendar-navbar.props.d.ts +81 -0
- package/types/date-picker/src/components/date-picker-container/date-picker-container.component.d.ts +626 -0
- package/types/date-picker/src/components/date-picker-container/date-picker-container.props.d.ts +306 -0
- package/types/date-picker/src/components/month/month.component.d.ts +86 -0
- package/types/date-picker/src/components/month/month.props.d.ts +57 -0
- package/types/date-picker/src/components/year/year.component.d.ts +86 -0
- package/types/date-picker/src/components/year/year.props.d.ts +57 -0
- package/types/date-picker/src/composition/types.d.ts +102 -0
- package/types/date-picker/src/composition/use-calendar.d.ts +2 -0
- package/types/date-picker/src/composition/use-compare.d.ts +2 -0
- package/types/date-picker/src/composition/use-date.d.ts +2 -0
- package/types/date-picker/src/composition/use-disable-date.d.ts +18 -0
- package/types/date-picker/src/composition/use-disable-month.d.ts +2 -0
- package/types/date-picker/src/composition/use-event.d.ts +45 -0
- package/types/date-picker/src/composition/use-mark.d.ts +2 -0
- package/types/date-picker/src/composition/use-month.d.ts +2 -0
- package/types/date-picker/src/composition/use-number.d.ts +2 -0
- package/types/date-picker/src/composition/use-year.d.ts +2 -0
- package/types/date-picker/src/date-picker.props.d.ts +168 -0
- package/types/date-picker/src/types/calendar.d.ts +30 -0
- package/types/date-picker/src/types/common.d.ts +42 -0
- package/types/date-picker/src/types/date-model.d.ts +38 -0
- package/types/date-picker/src/types/month.d.ts +48 -0
- package/types/date-picker/src/types/year.d.ts +24 -0
- package/types/index.d.ts +20 -0
- package/types/list-view/index.d.ts +23 -0
- package/types/list-view/src/components/list-view-checkbox.component.d.ts +32 -0
- package/types/list-view/src/components/list-view-checkbox.props.d.ts +31 -0
- package/types/list-view/src/list-view.props.d.ts +44 -0
- package/types/message-box/index.d.ts +24 -0
- package/types/message-box/src/composition/types.d.ts +18 -0
- package/types/message-box/src/composition/use-copy.d.ts +18 -0
- package/types/message-box/src/message-box.component.d.ts +72 -0
- package/types/message-box/src/message-box.props.d.ts +52 -0
- package/types/modal/index.d.ts +23 -0
- package/types/modal/src/modal.component.d.ts +104 -0
- package/types/modal/src/modal.props.d.ts +72 -0
- package/types/notify/index.d.ts +26 -0
- package/types/notify/src/components/toast.component.d.ts +21 -0
- package/types/notify/src/components/toast.props.d.ts +27 -0
- package/types/notify/src/notify.props.d.ts +99 -0
- package/types/number-range/index.d.ts +23 -0
- package/types/number-range/src/composition/types.d.ts +52 -0
- package/types/number-range/src/composition/use-data.d.ts +19 -0
- package/types/number-range/src/composition/use-util.d.ts +19 -0
- package/types/number-range/src/number-range.component.d.ts +247 -0
- package/types/number-range/src/number-range.props.d.ts +216 -0
- package/types/number-spinner/index.d.ts +23 -0
- package/types/number-spinner/src/composition/types.d.ts +52 -0
- package/types/number-spinner/src/composition/use-data.d.ts +19 -0
- package/types/number-spinner/src/composition/use-util.d.ts +19 -0
- package/types/number-spinner/src/number-spinner.component.d.ts +202 -0
- package/types/number-spinner/src/number-spinner.props.d.ts +181 -0
- package/types/overlay/src/overlay.component.d.ts +20 -0
- package/types/overlay/src/overlay.props.d.ts +26 -0
- package/types/pagination/index.d.ts +23 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +19 -0
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +20 -0
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +20 -0
- package/types/pagination/src/components/pages/page-info.component.d.ts +19 -0
- package/types/pagination/src/components/pages/page-list.component.d.ts +19 -0
- package/types/pagination/src/components/pages/page-number.component.d.ts +20 -0
- package/types/pagination/src/composition/types.d.ts +24 -0
- package/types/pagination/src/composition/use-pages.d.ts +18 -0
- package/types/pagination/src/pagination.components.d.ts +41 -0
- package/types/pagination/src/pagination.props.d.ts +36 -0
- package/types/popover/index.d.ts +24 -0
- package/types/popover/src/popover.component.d.ts +26 -0
- package/types/popover/src/popover.directive.d.ts +5 -0
- package/types/popover/src/popover.props.d.ts +30 -0
- package/types/radio-group/index.d.ts +23 -0
- package/types/radio-group/src/composition/change-radio.d.ts +19 -0
- package/types/radio-group/src/composition/types.d.ts +42 -0
- package/types/radio-group/src/radio-group.component.d.ts +91 -0
- package/types/radio-group/src/radio-group.props.d.ts +87 -0
- package/types/section/index.d.ts +23 -0
- package/types/section/src/section.component.d.ts +187 -0
- package/types/section/src/section.props.d.ts +117 -0
- package/types/switch/index.d.ts +23 -0
- package/types/switch/src/switch.component.d.ts +66 -0
- package/types/switch/src/switch.props.d.ts +52 -0
- package/types/tabs/index.d.ts +25 -0
- package/types/tabs/src/components/tab-page.component.d.ts +101 -0
- package/types/tabs/src/components/tab-page.props.d.ts +63 -0
- package/types/tabs/src/composition/types.d.ts +35 -0
- package/types/tabs/src/composition/use-tabs.d.ts +18 -0
- package/types/tabs/src/tabs.component.d.ts +149 -0
- package/types/tabs/src/tabs.props.d.ts +86 -0
- package/types/text/index.d.ts +23 -0
- package/types/text/src/text.component.d.ts +14 -0
- package/types/text/src/text.props.d.ts +26 -0
- package/types/tooltip/index.d.ts +24 -0
- package/types/tooltip/src/composition/types.d.ts +45 -0
- package/types/tooltip/src/composition/use-adjust-placement.d.ts +20 -0
- package/types/tooltip/src/composition/use-adjust-position.d.ts +6 -0
- package/types/tooltip/src/composition/use-calculate-position.d.ts +21 -0
- package/types/tooltip/src/composition/use-relative.d.ts +19 -0
- package/types/tooltip/src/composition/use-tooltip-position.d.ts +22 -0
- package/types/tooltip/src/tooltip.component.d.ts +56 -0
- package/types/tooltip/src/tooltip.props.d.ts +45 -0
- package/src/index.umd.js +0 -1
- /package/{src/style.css → style.css} +0 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { ref as f, createVNode as e, computed as v, defineComponent as D, watch as T, Fragment as I, createTextVNode as M } from "vue";
|
|
2
|
+
const H = {
|
|
3
|
+
currentPage: { type: Number, default: 1 },
|
|
4
|
+
mode: { type: String, default: "default" },
|
|
5
|
+
pageSize: { type: Number, default: 20 },
|
|
6
|
+
totalItems: { type: Number, default: 0 }
|
|
7
|
+
};
|
|
8
|
+
function K(l, o) {
|
|
9
|
+
const r = f("\u8DF3\u8F6C\u81F3"), u = f(""), n = f(l.value);
|
|
10
|
+
function i() {
|
|
11
|
+
l.value = n.value;
|
|
12
|
+
}
|
|
13
|
+
function t(p) {
|
|
14
|
+
p.key === "Enter" && i();
|
|
15
|
+
}
|
|
16
|
+
function a(p) {
|
|
17
|
+
n.value = p.target.valueAsNumber;
|
|
18
|
+
}
|
|
19
|
+
function s() {
|
|
20
|
+
return e("li", {
|
|
21
|
+
class: "page-goto-input",
|
|
22
|
+
style: "padding-left: 10px; white-space: nowrap;"
|
|
23
|
+
}, [e("span", {
|
|
24
|
+
class: "pg-message-text"
|
|
25
|
+
}, [r.value]), e("input", {
|
|
26
|
+
class: "form-control farris-gotopagenumber",
|
|
27
|
+
title: "page-number",
|
|
28
|
+
value: l.value,
|
|
29
|
+
type: "number",
|
|
30
|
+
min: "1",
|
|
31
|
+
max: o.value,
|
|
32
|
+
style: "display: inline-block;margin-left:3px;",
|
|
33
|
+
onChange: () => i(),
|
|
34
|
+
onInput: (p) => a(p),
|
|
35
|
+
onKeyup: (p) => t(p)
|
|
36
|
+
}, null), u.value]);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
renderGotoButton: s
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function q(l, o, r) {
|
|
43
|
+
const u = v(() => ({
|
|
44
|
+
"page-item": !0,
|
|
45
|
+
disabled: o.value
|
|
46
|
+
}));
|
|
47
|
+
function n(s) {
|
|
48
|
+
l.value = l.value < r.value ? l.value + 1 : r.value;
|
|
49
|
+
}
|
|
50
|
+
function i(s) {
|
|
51
|
+
l.value = r.value;
|
|
52
|
+
}
|
|
53
|
+
function t() {
|
|
54
|
+
return e("li", {
|
|
55
|
+
class: u.value
|
|
56
|
+
}, [!o.value && e("a", {
|
|
57
|
+
class: "page-link",
|
|
58
|
+
tabindex: "0",
|
|
59
|
+
onClick: (s) => n()
|
|
60
|
+
}, [e("span", {
|
|
61
|
+
class: "f-icon f-page-next"
|
|
62
|
+
}, null)]), o.value && e("span", {
|
|
63
|
+
class: "page-link"
|
|
64
|
+
}, [e("span", {
|
|
65
|
+
class: "f-icon f-page-next"
|
|
66
|
+
}, null)])]);
|
|
67
|
+
}
|
|
68
|
+
function a() {
|
|
69
|
+
return e("li", {
|
|
70
|
+
class: u.value
|
|
71
|
+
}, [!o.value && e("a", {
|
|
72
|
+
class: "page-link",
|
|
73
|
+
tabindex: "0",
|
|
74
|
+
onClick: (s) => i()
|
|
75
|
+
}, [e("span", {
|
|
76
|
+
class: "f-icon f-page-last"
|
|
77
|
+
}, null)]), o.value && e("span", {
|
|
78
|
+
class: "page-link"
|
|
79
|
+
}, [e("span", {
|
|
80
|
+
class: "f-icon f-page-last"
|
|
81
|
+
}, null)])]);
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
renderLastPage: a,
|
|
85
|
+
renderNextPage: t
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function J(l, o) {
|
|
89
|
+
const r = f("\u5171"), u = f("\u6761"), n = v(() => ({
|
|
90
|
+
"pagination-message": !0,
|
|
91
|
+
"text-truncate": !0,
|
|
92
|
+
"d-flex": !0,
|
|
93
|
+
"ml-auto": l.value === "right",
|
|
94
|
+
"flex-fill": l.value === "right"
|
|
95
|
+
}));
|
|
96
|
+
function i() {
|
|
97
|
+
return e("li", {
|
|
98
|
+
class: n.value
|
|
99
|
+
}, [e("div", {
|
|
100
|
+
class: "text-truncate",
|
|
101
|
+
style: "line-height: 26px"
|
|
102
|
+
}, [e("span", {
|
|
103
|
+
class: "pg-message-text"
|
|
104
|
+
}, [r.value]), e("b", {
|
|
105
|
+
class: "pg-message-total"
|
|
106
|
+
}, [o.value]), e("span", {
|
|
107
|
+
class: "pg-message-text"
|
|
108
|
+
}, [u.value])])]);
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
renderPageInfo: i
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
function Q(l, o, r) {
|
|
115
|
+
const u = f(!1), n = f("\u663E\u793A"), i = f("\u6761"), t = v(() => ({
|
|
116
|
+
dropup: !0,
|
|
117
|
+
"dropdown-right": !0,
|
|
118
|
+
"pg-pagelist": !0,
|
|
119
|
+
"pagelist-disabled": r.value === 0,
|
|
120
|
+
show: u.value
|
|
121
|
+
})), a = v(() => ({
|
|
122
|
+
"dropdown-menu": !0,
|
|
123
|
+
show: u.value
|
|
124
|
+
})), s = (c) => ({
|
|
125
|
+
"dropdown-item": !0,
|
|
126
|
+
active: l.value === c
|
|
127
|
+
});
|
|
128
|
+
function p(c) {
|
|
129
|
+
u.value = !0;
|
|
130
|
+
}
|
|
131
|
+
function b(c) {
|
|
132
|
+
u.value = !1;
|
|
133
|
+
}
|
|
134
|
+
function h(c, g) {
|
|
135
|
+
l.value = g, u.value = !1;
|
|
136
|
+
}
|
|
137
|
+
function x() {
|
|
138
|
+
return e("li", {
|
|
139
|
+
class: "pagination-pagelist"
|
|
140
|
+
}, [e("div", {
|
|
141
|
+
class: t.value,
|
|
142
|
+
onMouseenter: (c) => p(),
|
|
143
|
+
onMouseleave: (c) => b()
|
|
144
|
+
}, [e("div", {
|
|
145
|
+
class: "pg-pagelist-info"
|
|
146
|
+
}, [e("span", {
|
|
147
|
+
class: "pagelist-text"
|
|
148
|
+
}, [n.value]), e("b", {
|
|
149
|
+
class: "cur-pagesize"
|
|
150
|
+
}, [l.value]), e("span", {
|
|
151
|
+
class: "pagelist-text"
|
|
152
|
+
}, [i.value]), e("i", {
|
|
153
|
+
class: "f-icon f-icon-dropdown"
|
|
154
|
+
}, null)]), e("div", {
|
|
155
|
+
class: a.value,
|
|
156
|
+
style: "margin-bottom: -1px;"
|
|
157
|
+
}, [o.value.map((c) => e("li", {
|
|
158
|
+
class: s(c),
|
|
159
|
+
onClick: (g) => h(g, c)
|
|
160
|
+
}, [e("span", null, [c])]))])])]);
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
renderPageList: x
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
function U(l, o) {
|
|
167
|
+
const r = (t) => ({
|
|
168
|
+
"page-item": !0,
|
|
169
|
+
current: l.value === t.value,
|
|
170
|
+
ellipsis: t.label === "..."
|
|
171
|
+
}), u = (t) => ({
|
|
172
|
+
"f-icon": !0,
|
|
173
|
+
"f-icon-arrow-seek-left": t.value < l.value,
|
|
174
|
+
"f-icon-arrow-seek-right": t.value > l.value
|
|
175
|
+
});
|
|
176
|
+
function n(t, a) {
|
|
177
|
+
l.value = a;
|
|
178
|
+
}
|
|
179
|
+
function i() {
|
|
180
|
+
return o.value.map((t) => e("li", {
|
|
181
|
+
class: r(t)
|
|
182
|
+
}, [l.value !== t.value && e("a", {
|
|
183
|
+
class: "page-link",
|
|
184
|
+
tabindex: "0",
|
|
185
|
+
onClick: (a) => n(a, t.value)
|
|
186
|
+
}, [e("span", {
|
|
187
|
+
class: "page-link-label"
|
|
188
|
+
}, [t.label]), t.label === "..." && e("i", {
|
|
189
|
+
class: u(t)
|
|
190
|
+
}, null)]), l.value === t.value && e("span", {
|
|
191
|
+
class: "page-link"
|
|
192
|
+
}, [t.label])]));
|
|
193
|
+
}
|
|
194
|
+
return {
|
|
195
|
+
renderPageNumbers: i
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function X(l, o, r) {
|
|
199
|
+
const u = v(() => ({
|
|
200
|
+
"page-item": !0,
|
|
201
|
+
disabled: o.value
|
|
202
|
+
}));
|
|
203
|
+
function n(s) {
|
|
204
|
+
l.value = 1;
|
|
205
|
+
}
|
|
206
|
+
function i(s) {
|
|
207
|
+
l.value = l.value > 2 ? l.value - 1 : 1;
|
|
208
|
+
}
|
|
209
|
+
function t() {
|
|
210
|
+
return e("li", {
|
|
211
|
+
class: u.value
|
|
212
|
+
}, [r.value && e("a", {
|
|
213
|
+
tabindex: "0",
|
|
214
|
+
class: "page-link",
|
|
215
|
+
onClick: (s) => n()
|
|
216
|
+
}, [e("span", {
|
|
217
|
+
class: "f-icon f-page-first"
|
|
218
|
+
}, null)]), o.value && e("span", {
|
|
219
|
+
class: "page-link"
|
|
220
|
+
}, [e("span", {
|
|
221
|
+
class: "f-icon f-page-first"
|
|
222
|
+
}, null)])]);
|
|
223
|
+
}
|
|
224
|
+
function a() {
|
|
225
|
+
return e("li", {
|
|
226
|
+
class: u.value
|
|
227
|
+
}, [r.value && e("a", {
|
|
228
|
+
tabindex: "0",
|
|
229
|
+
class: "page-link",
|
|
230
|
+
onClick: (s) => i()
|
|
231
|
+
}, [e("span", {
|
|
232
|
+
class: "f-icon f-page-pre"
|
|
233
|
+
}, null)]), o.value && e("span", {
|
|
234
|
+
class: "page-link"
|
|
235
|
+
}, [e("span", {
|
|
236
|
+
class: "f-icon f-page-pre"
|
|
237
|
+
}, null)])]);
|
|
238
|
+
}
|
|
239
|
+
return {
|
|
240
|
+
renderFirstPage: t,
|
|
241
|
+
renderPreviousPage: a
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
function Y(l) {
|
|
245
|
+
const o = f([]);
|
|
246
|
+
function r(n, i, t, a) {
|
|
247
|
+
const s = Math.ceil(t / 2);
|
|
248
|
+
return n === t ? a : n === 1 ? n : t < a ? a - s < i ? a - t + n : s < i ? i - s + n : n : n;
|
|
249
|
+
}
|
|
250
|
+
function u(n, i, t, a) {
|
|
251
|
+
const s = [], p = Math.ceil(t / i), b = Math.ceil(a / 2), h = n <= b, x = p - b < n, c = !h && !x, g = a < p;
|
|
252
|
+
let d = 1;
|
|
253
|
+
for (; d <= p && d <= a; ) {
|
|
254
|
+
const y = r(d, n, a, p), C = d === 2 && (c || x), P = d === a - 1 && (c || h), k = g && (C || P) ? "..." : "" + y;
|
|
255
|
+
s.push({ label: k, value: y }), d++;
|
|
256
|
+
}
|
|
257
|
+
o.value = s;
|
|
258
|
+
}
|
|
259
|
+
return { pages: o, updatePages: u };
|
|
260
|
+
}
|
|
261
|
+
const L = D({
|
|
262
|
+
name: "FPagination",
|
|
263
|
+
props: H,
|
|
264
|
+
emits: ["pageIndexChanged"],
|
|
265
|
+
setup(l, o) {
|
|
266
|
+
const r = f(!1), u = f(l.mode), n = f(""), i = f(!1), t = f(l.pageSize), a = f(l.currentPage), s = f(l.totalItems), {
|
|
267
|
+
pages: p,
|
|
268
|
+
updatePages: b
|
|
269
|
+
} = Y(), h = v(() => a.value === 1), x = v(() => [20, 50, 100]), c = v(() => Math.ceil(s.value / t.value)), g = v(() => a.value === c.value), d = v(() => !0), y = v(() => a.value > 1), C = v(() => !(i.value && p.value.length <= 1)), P = v(() => !0), k = v(() => !0), $ = v(() => !0), m = v(() => !0), {
|
|
270
|
+
renderFirstPage: w,
|
|
271
|
+
renderPreviousPage: N
|
|
272
|
+
} = X(a, h, y), {
|
|
273
|
+
renderLastPage: j,
|
|
274
|
+
renderNextPage: O
|
|
275
|
+
} = q(a, g, c), {
|
|
276
|
+
renderPageInfo: B
|
|
277
|
+
} = J(n, s), {
|
|
278
|
+
renderPageList: E
|
|
279
|
+
} = Q(t, x, s), {
|
|
280
|
+
renderPageNumbers: z
|
|
281
|
+
} = U(a, p), {
|
|
282
|
+
renderGotoButton: S
|
|
283
|
+
} = K(a, c);
|
|
284
|
+
b(a.value, t.value, s.value, 7), T([a, t], () => {
|
|
285
|
+
b(a.value, t.value, s.value, 7);
|
|
286
|
+
}), T(a, () => {
|
|
287
|
+
o.emit("pageIndexChanged", a.value);
|
|
288
|
+
});
|
|
289
|
+
const F = v(() => ({
|
|
290
|
+
"ngx-pagination": !0,
|
|
291
|
+
pagination: !0,
|
|
292
|
+
responsive: r.value,
|
|
293
|
+
"pager-viewmode-default": u.value === "default",
|
|
294
|
+
"pager-viewmode-simple": u.value === "simple"
|
|
295
|
+
})), G = v(() => ({
|
|
296
|
+
position: "relative",
|
|
297
|
+
"justify-content": n.value === "center" ? "center" : "start"
|
|
298
|
+
}));
|
|
299
|
+
function V() {
|
|
300
|
+
return e(I, null, [P.value && B(), k.value && E(), m.value && w(), m.value && N(), $.value && z(), m.value && O(), m.value && j(), d.value && S()]);
|
|
301
|
+
}
|
|
302
|
+
function W() {
|
|
303
|
+
return e(I, null, [e("li", {
|
|
304
|
+
class: "page-item d-flex flex-fill"
|
|
305
|
+
}, null), m.value && w(), m.value && N(), S(), e("li", {
|
|
306
|
+
class: "page-item page-separator",
|
|
307
|
+
style: "margin-left: 10px"
|
|
308
|
+
}, [e("span", {
|
|
309
|
+
style: "font-size: 15px; font-weight: 200;"
|
|
310
|
+
}, [M(" /")])]), e("li", {
|
|
311
|
+
class: "page-item page-total",
|
|
312
|
+
style: "margin-left: 5px"
|
|
313
|
+
}, [e("span", {
|
|
314
|
+
style: "font-size: 16px; font-weight: 600;"
|
|
315
|
+
}, [M(" "), c.value])]), m.value && O(), m.value && j()]);
|
|
316
|
+
}
|
|
317
|
+
return () => e("div", {
|
|
318
|
+
class: "pagination-container"
|
|
319
|
+
}, [C.value && e("ul", {
|
|
320
|
+
role: "navigation",
|
|
321
|
+
class: F.value,
|
|
322
|
+
style: G.value
|
|
323
|
+
}, [u.value === "default" ? V() : W()])]);
|
|
324
|
+
}
|
|
325
|
+
}), _ = {
|
|
326
|
+
install(l) {
|
|
327
|
+
l.component(L.name, L);
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
export {
|
|
331
|
+
L as Pagination,
|
|
332
|
+
_ as default,
|
|
333
|
+
H as paginationProps
|
|
334
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(p,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(p=typeof globalThis<"u"?globalThis:p||self,e(p.pagination={},p.Vue))})(this,function(p,e){"use strict";const C={currentPage:{type:Number,default:1},mode:{type:String,default:"default"},pageSize:{type:Number,default:20},totalItems:{type:Number,default:0}};function T(n,c){const u=e.ref("\u8DF3\u8F6C\u81F3"),o=e.ref(""),l=e.ref(n.value);function r(){n.value=l.value}function t(d){d.key==="Enter"&&r()}function a(d){l.value=d.target.valueAsNumber}function s(){return e.createVNode("li",{class:"page-goto-input",style:"padding-left: 10px; white-space: nowrap;"},[e.createVNode("span",{class:"pg-message-text"},[u.value]),e.createVNode("input",{class:"form-control farris-gotopagenumber",title:"page-number",value:n.value,type:"number",min:"1",max:c.value,style:"display: inline-block;margin-left:3px;",onChange:()=>r(),onInput:d=>a(d),onKeyup:d=>t(d)},null),o.value])}return{renderGotoButton:s}}function M(n,c,u){const o=e.computed(()=>({"page-item":!0,disabled:c.value}));function l(s){n.value=n.value<u.value?n.value+1:u.value}function r(s){n.value=u.value}function t(){return e.createVNode("li",{class:o.value},[!c.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:s=>l()},[e.createVNode("span",{class:"f-icon f-page-next"},null)]),c.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-next"},null)])])}function a(){return e.createVNode("li",{class:o.value},[!c.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:s=>r()},[e.createVNode("span",{class:"f-icon f-page-last"},null)]),c.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-last"},null)])])}return{renderLastPage:a,renderNextPage:t}}function I(n,c){const u=e.ref("\u5171"),o=e.ref("\u6761"),l=e.computed(()=>({"pagination-message":!0,"text-truncate":!0,"d-flex":!0,"ml-auto":n.value==="right","flex-fill":n.value==="right"}));function r(){return e.createVNode("li",{class:l.value},[e.createVNode("div",{class:"text-truncate",style:"line-height: 26px"},[e.createVNode("span",{class:"pg-message-text"},[u.value]),e.createVNode("b",{class:"pg-message-total"},[c.value]),e.createVNode("span",{class:"pg-message-text"},[o.value])])])}return{renderPageInfo:r}}function L(n,c,u){const o=e.ref(!1),l=e.ref("\u663E\u793A"),r=e.ref("\u6761"),t=e.computed(()=>({dropup:!0,"dropdown-right":!0,"pg-pagelist":!0,"pagelist-disabled":u.value===0,show:o.value})),a=e.computed(()=>({"dropdown-menu":!0,show:o.value})),s=i=>({"dropdown-item":!0,active:n.value===i});function d(i){o.value=!0}function N(i){o.value=!1}function b(i,f){n.value=f,o.value=!1}function V(){return e.createVNode("li",{class:"pagination-pagelist"},[e.createVNode("div",{class:t.value,onMouseenter:i=>d(),onMouseleave:i=>N()},[e.createVNode("div",{class:"pg-pagelist-info"},[e.createVNode("span",{class:"pagelist-text"},[l.value]),e.createVNode("b",{class:"cur-pagesize"},[n.value]),e.createVNode("span",{class:"pagelist-text"},[r.value]),e.createVNode("i",{class:"f-icon f-icon-dropdown"},null)]),e.createVNode("div",{class:a.value,style:"margin-bottom: -1px;"},[c.value.map(i=>e.createVNode("li",{class:s(i),onClick:f=>b(f,i)},[e.createVNode("span",null,[i])]))])])])}return{renderPageList:V}}function $(n,c){const u=t=>({"page-item":!0,current:n.value===t.value,ellipsis:t.label==="..."}),o=t=>({"f-icon":!0,"f-icon-arrow-seek-left":t.value<n.value,"f-icon-arrow-seek-right":t.value>n.value});function l(t,a){n.value=a}function r(){return c.value.map(t=>e.createVNode("li",{class:u(t)},[n.value!==t.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:a=>l(a,t.value)},[e.createVNode("span",{class:"page-link-label"},[t.label]),t.label==="..."&&e.createVNode("i",{class:o(t)},null)]),n.value===t.value&&e.createVNode("span",{class:"page-link"},[t.label])]))}return{renderPageNumbers:r}}function B(n,c,u){const o=e.computed(()=>({"page-item":!0,disabled:c.value}));function l(s){n.value=1}function r(s){n.value=n.value>2?n.value-1:1}function t(){return e.createVNode("li",{class:o.value},[u.value&&e.createVNode("a",{tabindex:"0",class:"page-link",onClick:s=>l()},[e.createVNode("span",{class:"f-icon f-page-first"},null)]),c.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-first"},null)])])}function a(){return e.createVNode("li",{class:o.value},[u.value&&e.createVNode("a",{tabindex:"0",class:"page-link",onClick:s=>r()},[e.createVNode("span",{class:"f-icon f-page-pre"},null)]),c.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-pre"},null)])])}return{renderFirstPage:t,renderPreviousPage:a}}function E(n){const c=e.ref([]);function u(l,r,t,a){const s=Math.ceil(t/2);return l===t?a:l===1?l:t<a?a-s<r?a-t+l:s<r?r-s+l:l:l}function o(l,r,t,a){const s=[],d=Math.ceil(t/r),N=Math.ceil(a/2),b=l<=N,V=d-N<l,i=!b&&!V,f=a<d;let g=1;for(;g<=d&&g<=a;){const v=u(g,l,a,d),x=g===2&&(i||V),y=g===a-1&&(i||b),P=f&&(x||y)?"...":""+v;s.push({label:P,value:v}),g++}c.value=s}return{pages:c,updatePages:o}}const J="",h=e.defineComponent({name:"FPagination",props:C,emits:["pageIndexChanged"],setup(n,c){const u=e.ref(!1),o=e.ref(n.mode),l=e.ref(""),r=e.ref(!1),t=e.ref(n.pageSize),a=e.ref(n.currentPage),s=e.ref(n.totalItems),{pages:d,updatePages:N}=E(),b=e.computed(()=>a.value===1),V=e.computed(()=>[20,50,100]),i=e.computed(()=>Math.ceil(s.value/t.value)),f=e.computed(()=>a.value===i.value),g=e.computed(()=>!0),v=e.computed(()=>a.value>1),x=e.computed(()=>!(r.value&&d.value.length<=1)),y=e.computed(()=>!0),P=e.computed(()=>!0),F=e.computed(()=>!0),m=e.computed(()=>!0),{renderFirstPage:k,renderPreviousPage:w}=B(a,b,v),{renderLastPage:j,renderNextPage:O}=M(a,f,i),{renderPageInfo:G}=I(l,s),{renderPageList:W}=L(t,V,s),{renderPageNumbers:_}=$(a,d),{renderGotoButton:S}=T(a,i);N(a.value,t.value,s.value,7),e.watch([a,t],()=>{N(a.value,t.value,s.value,7)}),e.watch(a,()=>{c.emit("pageIndexChanged",a.value)});const q=e.computed(()=>({"ngx-pagination":!0,pagination:!0,responsive:u.value,"pager-viewmode-default":o.value==="default","pager-viewmode-simple":o.value==="simple"})),A=e.computed(()=>({position:"relative","justify-content":l.value==="center"?"center":"start"}));function D(){return e.createVNode(e.Fragment,null,[y.value&&G(),P.value&&W(),m.value&&k(),m.value&&w(),F.value&&_(),m.value&&O(),m.value&&j(),g.value&&S()])}function H(){return e.createVNode(e.Fragment,null,[e.createVNode("li",{class:"page-item d-flex flex-fill"},null),m.value&&k(),m.value&&w(),S(),e.createVNode("li",{class:"page-item page-separator",style:"margin-left: 10px"},[e.createVNode("span",{style:"font-size: 15px; font-weight: 200;"},[e.createTextVNode(" /")])]),e.createVNode("li",{class:"page-item page-total",style:"margin-left: 5px"},[e.createVNode("span",{style:"font-size: 16px; font-weight: 600;"},[e.createTextVNode(" "),i.value])]),m.value&&O(),m.value&&j()])}return()=>e.createVNode("div",{class:"pagination-container"},[x.value&&e.createVNode("ul",{role:"navigation",class:q.value,style:A.value},[o.value==="default"?D():H()])])}}),z={install(n){n.component(h.name,h)}};p.Pagination=h,p.default=z,p.paginationProps=C,Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.page-item.ellipsis>.page-link{background:none;border:none;box-shadow:none;line-height:8px;font-size:16px}.page-item.ellipsis>.page-link>.f-icon{display:none}.page-item.ellipsis:hover>.page-link{line-height:20px}.page-item.ellipsis:hover>.page-link>.page-link-label{display:none}.page-item.ellipsis:hover>.page-link>.f-icon{display:inline-block!important}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { defineComponent as S, ref as p, computed as c, createVNode as l, Fragment as j, Teleport as I, withDirectives as O, vShow as $, nextTick as b } from "vue";
|
|
2
|
+
const k = {
|
|
3
|
+
title: { type: String },
|
|
4
|
+
placement: { type: String, default: "top" },
|
|
5
|
+
reference: {
|
|
6
|
+
type: Object
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
const w = S({
|
|
10
|
+
name: "FPopover",
|
|
11
|
+
props: k,
|
|
12
|
+
emits: [],
|
|
13
|
+
setup(e, o) {
|
|
14
|
+
let n = 0, t = 0;
|
|
15
|
+
typeof window < "u" && (n = document.documentElement.scrollLeft, t = document.documentElement.scrollTop);
|
|
16
|
+
const a = p(), i = p(), f = p(e.placement), h = p("0px"), m = p("0px"), y = c(() => !!e.title), u = p(!1), g = c(() => {
|
|
17
|
+
const r = `popover in popover-${f.value}`, v = `bs-popover-${f.value}`, s = {};
|
|
18
|
+
return s[r] = !0, s[v] = !0, s;
|
|
19
|
+
}), C = c(() => ({
|
|
20
|
+
"popover-content": !0,
|
|
21
|
+
"popover-body": !0
|
|
22
|
+
})), L = c(() => ({
|
|
23
|
+
left: h.value,
|
|
24
|
+
top: m.value
|
|
25
|
+
}));
|
|
26
|
+
async function R(r) {
|
|
27
|
+
var v;
|
|
28
|
+
if (i.value && a.value) {
|
|
29
|
+
u.value = !0, await b();
|
|
30
|
+
const s = r.getBoundingClientRect(), x = a.value.getBoundingClientRect(), T = (v = i.value) == null ? void 0 : v.getBoundingClientRect();
|
|
31
|
+
h.value = `${s.left + s.width / 2 + n}px`, m.value = `${s.top - (T.height + x.height) + t}px`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function E() {
|
|
35
|
+
u.value = !1;
|
|
36
|
+
}
|
|
37
|
+
return o.expose({
|
|
38
|
+
hide: E,
|
|
39
|
+
show: R
|
|
40
|
+
}), () => l(j, null, [l(I, {
|
|
41
|
+
to: "body"
|
|
42
|
+
}, {
|
|
43
|
+
default: () => {
|
|
44
|
+
var r;
|
|
45
|
+
return [O(l("div", {
|
|
46
|
+
ref: i,
|
|
47
|
+
class: g.value,
|
|
48
|
+
style: L.value
|
|
49
|
+
}, [l("div", {
|
|
50
|
+
ref: a,
|
|
51
|
+
class: "popover-arrow arrow"
|
|
52
|
+
}, null), y.value && l("h3", {
|
|
53
|
+
class: "popover-title popover-header"
|
|
54
|
+
}, [e.title]), l("div", {
|
|
55
|
+
class: C.value
|
|
56
|
+
}, [o.slots.default && ((r = o.slots) == null ? void 0 : r.default())])]), [[$, u.value]])];
|
|
57
|
+
}
|
|
58
|
+
})]);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
function d(e, o, n) {
|
|
62
|
+
e.stopPropagation(), o.value.value.show(n);
|
|
63
|
+
}
|
|
64
|
+
function P(e, o) {
|
|
65
|
+
e.stopPropagation(), o.value.value.hide();
|
|
66
|
+
}
|
|
67
|
+
const B = {
|
|
68
|
+
mounted: (e, o, n) => {
|
|
69
|
+
o.modifiers.hover ? (e.addEventListener("mouseenter", (t) => d(t, o, e)), e.addEventListener("mouseleave", (t) => P(t, o))) : o.modifiers.click ? e.addEventListener("click", (t) => d(t, o, e)) : (e.addEventListener("mouseenter", (t) => d(t, o, e)), e.addEventListener("mouseleave", (t) => P(t, o)));
|
|
70
|
+
},
|
|
71
|
+
unMounted: (e, o, n) => {
|
|
72
|
+
}
|
|
73
|
+
}, F = {
|
|
74
|
+
install(e) {
|
|
75
|
+
e.component(w.name, w), e.directive("popover", B);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
export {
|
|
79
|
+
w as Popover,
|
|
80
|
+
B as PopoverDirective,
|
|
81
|
+
F as default,
|
|
82
|
+
k as popoverProps
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.popover={},r.Vue))})(this,function(r,e){"use strict";const f={title:{type:String},placement:{type:String,default:"top"},reference:{type:Object}},N="",i=e.defineComponent({name:"FPopover",props:f,emits:[],setup(o,t){let s=0,n=0;typeof window<"u"&&(s=document.documentElement.scrollLeft,n=document.documentElement.scrollTop);const d=e.ref(),u=e.ref(),P=e.ref(o.placement),y=e.ref("0px"),w=e.ref("0px"),T=e.computed(()=>!!o.title),v=e.ref(!1),C=e.computed(()=>{const p=`popover in popover-${P.value}`,l=`bs-popover-${P.value}`,c={};return c[p]=!0,c[l]=!0,c}),L=e.computed(()=>({"popover-content":!0,"popover-body":!0})),R=e.computed(()=>({left:y.value,top:w.value}));async function E(p){var l;if(u.value&&d.value){v.value=!0,await e.nextTick();const c=p.getBoundingClientRect(),V=d.value.getBoundingClientRect(),j=(l=u.value)==null?void 0:l.getBoundingClientRect();y.value=`${c.left+c.width/2+s}px`,w.value=`${c.top-(j.height+V.height)+n}px`}}function S(){v.value=!1}return t.expose({hide:S,show:E}),()=>e.createVNode(e.Fragment,null,[e.createVNode(e.Teleport,{to:"body"},{default:()=>{var p;return[e.withDirectives(e.createVNode("div",{ref:u,class:C.value,style:R.value},[e.createVNode("div",{ref:d,class:"popover-arrow arrow"},null),T.value&&e.createVNode("h3",{class:"popover-title popover-header"},[o.title]),e.createVNode("div",{class:L.value},[t.slots.default&&((p=t.slots)==null?void 0:p.default())])]),[[e.vShow,v.value]])]}})])}});function a(o,t,s){o.stopPropagation(),t.value.value.show(s)}function h(o,t){o.stopPropagation(),t.value.value.hide()}const m={mounted:(o,t,s)=>{t.modifiers.hover?(o.addEventListener("mouseenter",n=>a(n,t,o)),o.addEventListener("mouseleave",n=>h(n,t))):t.modifiers.click?o.addEventListener("click",n=>a(n,t,o)):(o.addEventListener("mouseenter",n=>a(n,t,o)),o.addEventListener("mouseleave",n=>h(n,t)))},unMounted:(o,t,s)=>{}},g={install(o){o.component(i.name,i),o.directive("popover",m)}};r.Popover=i,r.PopoverDirective=m,r.default=g,r.popoverProps=f,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.bs3.popover-top{margin-bottom:10px}.bs3.popover.top>.arrow{margin-left:-2px}.bs3.popover.top{margin-bottom:10px}.popover.bottom>.arrow{margin-left:-4px}.bs3.bs-popover-left{margin-right:.5rem}.bs3.bs-popover-right .arrow,.bs3.bs-popover-left .arrow{margin:.3rem 0}.arrow-left .arrow{left:calc(50% - 10px)}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { computed as m, defineComponent as v, ref as b, createVNode as u } from "vue";
|
|
2
|
+
const h = {
|
|
3
|
+
id: String,
|
|
4
|
+
name: { type: String, default: "" },
|
|
5
|
+
enumData: Array,
|
|
6
|
+
textField: { type: String, default: "name" },
|
|
7
|
+
valueField: { type: String, default: "value" },
|
|
8
|
+
horizontal: { type: Boolean, default: !1 },
|
|
9
|
+
disabled: { type: Boolean, default: !1 },
|
|
10
|
+
modelValue: { type: String, default: "" },
|
|
11
|
+
tabIndex: Number
|
|
12
|
+
};
|
|
13
|
+
function p(e, o, n) {
|
|
14
|
+
const i = m(() => !e.disabled), d = m(() => e.enumData || []);
|
|
15
|
+
function l(a) {
|
|
16
|
+
return a[e.valueField];
|
|
17
|
+
}
|
|
18
|
+
function r(a) {
|
|
19
|
+
return a[e.textField];
|
|
20
|
+
}
|
|
21
|
+
function c(a, s) {
|
|
22
|
+
if (i.value) {
|
|
23
|
+
const t = l(a);
|
|
24
|
+
n.value !== t && (n.value = t, o.emit("changeValue", t), o.emit("update:modelValue", t));
|
|
25
|
+
}
|
|
26
|
+
s.stopPropagation();
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
enumData: d,
|
|
30
|
+
getValue: l,
|
|
31
|
+
getText: r,
|
|
32
|
+
onClickRadio: c
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const f = v({
|
|
36
|
+
name: "FRadioGroup",
|
|
37
|
+
props: h,
|
|
38
|
+
emits: ["changeValue", "update:modelValue"],
|
|
39
|
+
setup(e, o) {
|
|
40
|
+
const n = b(e.modelValue), {
|
|
41
|
+
enumData: i,
|
|
42
|
+
onClickRadio: d,
|
|
43
|
+
getValue: l,
|
|
44
|
+
getText: r
|
|
45
|
+
} = p(e, o, n), c = m(() => ({
|
|
46
|
+
"farris-checkradio-hor": e.horizontal
|
|
47
|
+
}));
|
|
48
|
+
return () => u("div", {
|
|
49
|
+
class: ["farris-input-wrap", c.value]
|
|
50
|
+
}, [i.value.map((a, s) => {
|
|
51
|
+
const t = "radio_" + e.name + s;
|
|
52
|
+
return u("div", {
|
|
53
|
+
class: "custom-control custom-radio"
|
|
54
|
+
}, [u("input", {
|
|
55
|
+
type: "radio",
|
|
56
|
+
class: "custom-control-input",
|
|
57
|
+
name: e.name,
|
|
58
|
+
id: t,
|
|
59
|
+
value: l(a),
|
|
60
|
+
checked: l(a) === n.value,
|
|
61
|
+
disabled: e.disabled,
|
|
62
|
+
tabindex: e.tabIndex,
|
|
63
|
+
onClick: (g) => d(a, g)
|
|
64
|
+
}, null), u("label", {
|
|
65
|
+
class: "custom-control-label",
|
|
66
|
+
for: t
|
|
67
|
+
}, [r(a)])]);
|
|
68
|
+
})]);
|
|
69
|
+
}
|
|
70
|
+
}), x = {
|
|
71
|
+
install(e) {
|
|
72
|
+
e.component(f.name, f);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
f as RadioGroup,
|
|
77
|
+
x as default,
|
|
78
|
+
h as radioGroupProps
|
|
79
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(n,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n["radio-group"]={},n.Vue))})(this,function(n,t){"use strict";const p={id:String,name:{type:String,default:""},enumData:Array,textField:{type:String,default:"name"},valueField:{type:String,default:"value"},horizontal:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},modelValue:{type:String,default:""},tabIndex:Number};function g(e,d,i){const r=t.computed(()=>!e.disabled),c=t.computed(()=>e.enumData||[]);function u(a){return a[e.valueField]}function s(a){return a[e.textField]}function f(a,m){if(r.value){const o=u(a);i.value!==o&&(i.value=o,d.emit("changeValue",o),d.emit("update:modelValue",o))}m.stopPropagation()}return{enumData:c,getValue:u,getText:s,onClickRadio:f}}const l=t.defineComponent({name:"FRadioGroup",props:p,emits:["changeValue","update:modelValue"],setup(e,d){const i=t.ref(e.modelValue),{enumData:r,onClickRadio:c,getValue:u,getText:s}=g(e,d,i),f=t.computed(()=>({"farris-checkradio-hor":e.horizontal}));return()=>t.createVNode("div",{class:["farris-input-wrap",f.value]},[r.value.map((a,m)=>{const o="radio_"+e.name+m;return t.createVNode("div",{class:"custom-control custom-radio"},[t.createVNode("input",{type:"radio",class:"custom-control-input",name:e.name,id:o,value:u(a),checked:u(a)===i.value,disabled:e.disabled,tabindex:e.tabIndex,onClick:h=>c(a,h)},null),t.createVNode("label",{class:"custom-control-label",for:o},[s(a)])])})])}}),V={install(e){e.component(l.name,l)}};n.RadioGroup=l,n.default=V,n.radioGroupProps=p,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineComponent as C, computed as e, ref as s, createVNode as n } from "vue";
|
|
2
|
+
const v = {
|
|
3
|
+
contentClass: { type: String, default: "" },
|
|
4
|
+
maxStatus: { type: Boolean, default: !1 },
|
|
5
|
+
enableAccording: { type: Boolean, default: !1 },
|
|
6
|
+
enableCollapse: { type: Boolean, default: !0 },
|
|
7
|
+
mainTitle: { type: String, default: "" },
|
|
8
|
+
subTitle: { type: String, default: "" },
|
|
9
|
+
showHeader: { type: Boolean, default: !0 },
|
|
10
|
+
enableMaximize: { type: Boolean, default: !1 },
|
|
11
|
+
fill: { type: Boolean, default: !1 },
|
|
12
|
+
expandStatus: { type: Boolean, default: !0 },
|
|
13
|
+
cotext: { type: Object },
|
|
14
|
+
index: { type: Number },
|
|
15
|
+
toolbarPosition: { type: String, default: "" },
|
|
16
|
+
toolbarButtons: { type: Array, default: [] },
|
|
17
|
+
toolbar: { type: Object, default: {} },
|
|
18
|
+
showToolbarMoreButton: { type: Boolean, default: !0 },
|
|
19
|
+
clickThrottleTime: { type: Number, default: 350 },
|
|
20
|
+
headerClass: { type: String, default: "" }
|
|
21
|
+
}, i = C({
|
|
22
|
+
name: "FSection",
|
|
23
|
+
props: v,
|
|
24
|
+
emits: [],
|
|
25
|
+
setup(t, u) {
|
|
26
|
+
const d = e(() => !0), c = e(() => !0), f = e(() => !0);
|
|
27
|
+
e(() => !1), e(() => !1), e(() => !1), e(() => !1), s([]);
|
|
28
|
+
const p = e(() => {
|
|
29
|
+
const o = t.headerClass.split(" "), a = {
|
|
30
|
+
"f-section-header": !0
|
|
31
|
+
};
|
|
32
|
+
return o.reduce((l, r) => (l[r] = !0, l), a), a;
|
|
33
|
+
});
|
|
34
|
+
e(() => ({
|
|
35
|
+
"f-section-extend": !0
|
|
36
|
+
}));
|
|
37
|
+
const y = e(() => {
|
|
38
|
+
const o = t.contentClass.split(" "), a = {
|
|
39
|
+
"f-section-content": !0
|
|
40
|
+
};
|
|
41
|
+
return o.reduce((l, r) => (l[r] = !0, l), a), a;
|
|
42
|
+
}), m = s(t.mainTitle), b = s(t.subTitle);
|
|
43
|
+
function h() {
|
|
44
|
+
return d.value && n("div", {
|
|
45
|
+
class: p.value
|
|
46
|
+
}, [c.value && n("div", {
|
|
47
|
+
class: "f-title"
|
|
48
|
+
}, [n("h4", {
|
|
49
|
+
class: "f-title-text"
|
|
50
|
+
}, [m.value]), f.value && n("span", null, [b.value])])]);
|
|
51
|
+
}
|
|
52
|
+
function S() {
|
|
53
|
+
return n("div", {
|
|
54
|
+
class: y.value
|
|
55
|
+
}, [u.slots.default && u.slots.default()]);
|
|
56
|
+
}
|
|
57
|
+
return () => n("div", {
|
|
58
|
+
class: "f-section"
|
|
59
|
+
}, [h(), S()]);
|
|
60
|
+
}
|
|
61
|
+
}), B = {
|
|
62
|
+
install(t) {
|
|
63
|
+
t.component(i.name, i);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
i as Section,
|
|
68
|
+
B as default,
|
|
69
|
+
v as sectionProps
|
|
70
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.section={},t.Vue))})(this,function(t,e){"use strict";const u={contentClass:{type:String,default:""},maxStatus:{type:Boolean,default:!1},enableAccording:{type:Boolean,default:!1},enableCollapse:{type:Boolean,default:!0},mainTitle:{type:String,default:""},subTitle:{type:String,default:""},showHeader:{type:Boolean,default:!0},enableMaximize:{type:Boolean,default:!1},fill:{type:Boolean,default:!1},expandStatus:{type:Boolean,default:!0},cotext:{type:Object},index:{type:Number},toolbarPosition:{type:String,default:""},toolbarButtons:{type:Array,default:[]},toolbar:{type:Object,default:{}},showToolbarMoreButton:{type:Boolean,default:!0},clickThrottleTime:{type:Number,default:350},headerClass:{type:String,default:""}},l=e.defineComponent({name:"FSection",props:u,emits:[],setup(n,d){const i=e.computed(()=>!0),f=e.computed(()=>!0),p=e.computed(()=>!0);e.computed(()=>!1),e.computed(()=>!1),e.computed(()=>!1),e.computed(()=>!1),e.ref([]);const m=e.computed(()=>{const r=n.headerClass.split(" "),o={"f-section-header":!0};return r.reduce((a,s)=>(a[s]=!0,a),o),o});e.computed(()=>({"f-section-extend":!0}));const y=e.computed(()=>{const r=n.contentClass.split(" "),o={"f-section-content":!0};return r.reduce((a,s)=>(a[s]=!0,a),o),o}),h=e.ref(n.mainTitle),S=e.ref(n.subTitle);function b(){return i.value&&e.createVNode("div",{class:m.value},[f.value&&e.createVNode("div",{class:"f-title"},[e.createVNode("h4",{class:"f-title-text"},[h.value]),p.value&&e.createVNode("span",null,[S.value])])])}function T(){return e.createVNode("div",{class:y.value},[d.slots.default&&d.slots.default()])}return()=>e.createVNode("div",{class:"f-section"},[b(),T()])}}),c={install(n){n.component(l.name,l)}};t.Section=l,t.default=c,t.sectionProps=u,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|