@farris/ui-vue 1.0.0-beta.5 → 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 +1052 -533
- 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/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/accordion/index.esm.js
CHANGED
|
@@ -6,7 +6,7 @@ const C = {
|
|
|
6
6
|
enableFold: { type: Boolean, default: !0 },
|
|
7
7
|
expanded: { type: Boolean, default: !1 }
|
|
8
8
|
};
|
|
9
|
-
const h = f({
|
|
9
|
+
const h = /* @__PURE__ */ f({
|
|
10
10
|
name: "FAccordion",
|
|
11
11
|
props: C,
|
|
12
12
|
emits: [],
|
|
@@ -32,7 +32,7 @@ const h = f({
|
|
|
32
32
|
title: { type: String, default: "" },
|
|
33
33
|
disable: { type: Boolean, default: !1 }
|
|
34
34
|
};
|
|
35
|
-
const m = f({
|
|
35
|
+
const m = /* @__PURE__ */ f({
|
|
36
36
|
name: "FAccordionItem",
|
|
37
37
|
props: g,
|
|
38
38
|
emits: [],
|
package/accordion/package.json
CHANGED
package/avatar/index.esm.js
CHANGED
|
@@ -1,13 +1,40 @@
|
|
|
1
1
|
import { ref as s, computed as n, defineComponent as m, createVNode as t } from "vue";
|
|
2
2
|
const C = {
|
|
3
|
+
/**
|
|
4
|
+
* 头像宽度
|
|
5
|
+
*/
|
|
3
6
|
avatarWidth: { type: Number, default: 100 },
|
|
7
|
+
/**
|
|
8
|
+
* 头像高度
|
|
9
|
+
*/
|
|
4
10
|
avatarHeight: { type: Number, default: 100 },
|
|
11
|
+
/**
|
|
12
|
+
* 组件标识
|
|
13
|
+
*/
|
|
5
14
|
cover: { type: String },
|
|
15
|
+
/**
|
|
16
|
+
* 只读
|
|
17
|
+
*/
|
|
6
18
|
readonly: { type: Boolean, default: !1 },
|
|
19
|
+
/**
|
|
20
|
+
* 头像形状
|
|
21
|
+
*/
|
|
7
22
|
shape: { type: String, default: "circle" },
|
|
23
|
+
/**
|
|
24
|
+
* 头像最大尺寸, 单位MB
|
|
25
|
+
*/
|
|
8
26
|
maxSize: { type: Number, default: 1 },
|
|
27
|
+
/**
|
|
28
|
+
* 组件值
|
|
29
|
+
*/
|
|
9
30
|
modelValue: { type: String, default: "" },
|
|
31
|
+
/**
|
|
32
|
+
* 头像标题
|
|
33
|
+
*/
|
|
10
34
|
tile: { type: String, default: "" },
|
|
35
|
+
/**
|
|
36
|
+
* 支持的头像类型
|
|
37
|
+
*/
|
|
11
38
|
type: { type: Array, default: [] }
|
|
12
39
|
};
|
|
13
40
|
function Q(A, y, a, r) {
|
|
@@ -35,7 +62,7 @@ function Q(A, y, a, r) {
|
|
|
35
62
|
}
|
|
36
63
|
return { acceptTypes: c, imageSource: i, imageTitle: f, onClickImage: H };
|
|
37
64
|
}
|
|
38
|
-
const v = m({
|
|
65
|
+
const v = /* @__PURE__ */ m({
|
|
39
66
|
name: "FAvatar",
|
|
40
67
|
props: C,
|
|
41
68
|
emits: ["change", "update:modelValue"],
|
package/avatar/package.json
CHANGED
package/button/index.esm.js
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as C, ref as p, computed as E, createVNode as i, nextTick as V } from "vue";
|
|
2
|
+
const G = {
|
|
3
|
+
/**
|
|
4
|
+
* 组件标识
|
|
5
|
+
*/
|
|
3
6
|
id: String,
|
|
7
|
+
/**
|
|
8
|
+
* 设置按钮类型
|
|
9
|
+
*/
|
|
4
10
|
type: { type: String, default: "primary" },
|
|
11
|
+
/**
|
|
12
|
+
* 是否禁用
|
|
13
|
+
*/
|
|
5
14
|
disabled: { type: Boolean, default: !1 },
|
|
15
|
+
/**
|
|
16
|
+
* 按钮尺寸
|
|
17
|
+
*/
|
|
6
18
|
size: { type: String, default: "small" }
|
|
7
19
|
};
|
|
8
|
-
function
|
|
20
|
+
function j(n, u) {
|
|
9
21
|
function c(f) {
|
|
10
22
|
f.stopPropagation(), n.disabled || u.emit("click", f);
|
|
11
23
|
}
|
|
@@ -13,92 +25,138 @@ function G(n, u) {
|
|
|
13
25
|
onClickButton: c
|
|
14
26
|
};
|
|
15
27
|
}
|
|
16
|
-
const R =
|
|
28
|
+
const R = /* @__PURE__ */ C({
|
|
17
29
|
name: "FButton",
|
|
18
|
-
props:
|
|
30
|
+
props: G,
|
|
19
31
|
emits: ["click"],
|
|
20
32
|
setup(n, u) {
|
|
21
33
|
const {
|
|
22
34
|
onClickButton: c
|
|
23
|
-
} =
|
|
35
|
+
} = j(n, u), f = p(n.size), r = p(n.type), d = p(n.disabled), a = E(() => {
|
|
36
|
+
const s = {
|
|
37
|
+
btn: !0,
|
|
38
|
+
"btn-lg": f.value === "large",
|
|
39
|
+
"btn-sm": f.value !== "large"
|
|
40
|
+
};
|
|
41
|
+
return r.value && (s[`btn-${r.value}`] = !0), s;
|
|
42
|
+
});
|
|
24
43
|
return () => i("button", {
|
|
25
|
-
class:
|
|
26
|
-
disabled:
|
|
27
|
-
onClick: (
|
|
44
|
+
class: a.value,
|
|
45
|
+
disabled: d.value,
|
|
46
|
+
onClick: (s) => c(s)
|
|
28
47
|
}, [u.slots.default && u.slots.default()]);
|
|
29
48
|
}
|
|
30
49
|
}), L = {
|
|
50
|
+
/**
|
|
51
|
+
* 组件标识
|
|
52
|
+
*/
|
|
31
53
|
id: String,
|
|
54
|
+
/**
|
|
55
|
+
* 横向纠正的参照
|
|
56
|
+
*/
|
|
32
57
|
rectifyReferenceH: { type: Object },
|
|
58
|
+
/**
|
|
59
|
+
* 纵向纠正的参照
|
|
60
|
+
*/
|
|
33
61
|
rectifyReferenceV: { type: Object },
|
|
62
|
+
/**
|
|
63
|
+
* 是否自动纠正位置
|
|
64
|
+
*/
|
|
34
65
|
autoRectify: { type: Boolean, default: !1 },
|
|
66
|
+
/**
|
|
67
|
+
* 计算方向的真正placement
|
|
68
|
+
*/
|
|
35
69
|
realPlacement: { type: String, default: "bottom-right" },
|
|
70
|
+
/**
|
|
71
|
+
* 重新计算后的placement
|
|
72
|
+
*/
|
|
36
73
|
rectifyPlacement: { type: String, default: "bottom-right" },
|
|
74
|
+
/**
|
|
75
|
+
* 按钮信息
|
|
76
|
+
*/
|
|
37
77
|
data: { type: Array },
|
|
78
|
+
/**
|
|
79
|
+
* 显示的按钮数量 默认为2
|
|
80
|
+
*/
|
|
38
81
|
count: { type: Number, default: 2 },
|
|
82
|
+
/**
|
|
83
|
+
* 按钮大小
|
|
84
|
+
*/
|
|
39
85
|
size: { type: String, default: "small" },
|
|
86
|
+
/**
|
|
87
|
+
* 按钮样式
|
|
88
|
+
*/
|
|
40
89
|
type: { type: String, default: "primary" },
|
|
90
|
+
/**
|
|
91
|
+
* 按钮展示位置
|
|
92
|
+
*/
|
|
41
93
|
placement: { type: String, default: "bottom" },
|
|
94
|
+
/**
|
|
95
|
+
* 下拉面板显示
|
|
96
|
+
*/
|
|
42
97
|
showPanel: { type: Boolean, default: !1 },
|
|
98
|
+
/**
|
|
99
|
+
* 下拉面板显示标志
|
|
100
|
+
*/
|
|
43
101
|
dpFlag: { type: Boolean, default: !1 }
|
|
44
102
|
};
|
|
45
|
-
function
|
|
103
|
+
function $(n, u, c, f) {
|
|
46
104
|
let r = 0, d = 0;
|
|
47
|
-
const a =
|
|
48
|
-
let
|
|
105
|
+
const a = p(n.showPanel), s = p(n.realPlacement);
|
|
106
|
+
let g = !1;
|
|
49
107
|
function h() {
|
|
50
108
|
c.value && document.body.appendChild(c.value);
|
|
51
109
|
}
|
|
52
110
|
function k() {
|
|
53
111
|
a.value = !0;
|
|
54
112
|
}
|
|
55
|
-
function
|
|
113
|
+
function b() {
|
|
56
114
|
a.value = !1;
|
|
57
115
|
}
|
|
58
116
|
function P() {
|
|
59
|
-
a.value && !
|
|
60
|
-
a.value && !
|
|
117
|
+
a.value && !g && setTimeout(() => {
|
|
118
|
+
a.value && !g && (b(), g = !1);
|
|
61
119
|
}, 1e3);
|
|
62
120
|
}
|
|
63
121
|
function e() {
|
|
64
122
|
setTimeout(() => {
|
|
65
|
-
a.value && (
|
|
123
|
+
a.value && (b(), g = !1);
|
|
66
124
|
}, 1e3);
|
|
67
125
|
}
|
|
68
|
-
function
|
|
69
|
-
k(),
|
|
126
|
+
function m() {
|
|
127
|
+
k(), g = !0;
|
|
70
128
|
}
|
|
71
|
-
function
|
|
129
|
+
function x() {
|
|
72
130
|
e();
|
|
73
131
|
}
|
|
74
|
-
function
|
|
75
|
-
let l = document.documentElement.clientWidth, t = document.documentElement.clientHeight, o = 0,
|
|
132
|
+
function O() {
|
|
133
|
+
let l = document.documentElement.clientWidth, t = document.documentElement.clientHeight, o = 0, y = 0;
|
|
76
134
|
if (n.rectifyReferenceH) {
|
|
77
|
-
const
|
|
78
|
-
|
|
135
|
+
const v = document.querySelector("props.rectifyReferenceH");
|
|
136
|
+
v && (l = v.getBoundingClientRect().right, y = v.getBoundingClientRect().left);
|
|
79
137
|
}
|
|
80
138
|
if (n.rectifyReferenceV) {
|
|
81
|
-
const
|
|
82
|
-
|
|
139
|
+
const v = document.querySelector("props.rectifyReferenceV");
|
|
140
|
+
v && (t = v.getBoundingClientRect().bottom, o = v.getBoundingClientRect().top);
|
|
83
141
|
}
|
|
84
|
-
return { top: o, left:
|
|
142
|
+
return { top: o, left: y, right: l, bottom: t };
|
|
85
143
|
}
|
|
86
|
-
function
|
|
144
|
+
function B(l) {
|
|
87
145
|
if (!n.autoRectify)
|
|
88
146
|
return;
|
|
89
|
-
const t =
|
|
90
|
-
o.value.indexOf("bottom") > -1 ? d > t.bottom - l.bottom && (o.value = o.value.replace("bottom", "top")) : o.value.indexOf("top") > -1 && d > l.top - t.top && (o.value = o.value.replace("top", "bottom")), o.value.indexOf("left") > -1 ? r > l.left - t.left && (o.value = o.value.replace("left", "right")) : o.value.indexOf("right") > -1 && r > t.right - l.right && (o.value = o.value.replace("right", "left")),
|
|
147
|
+
const t = O(), o = s;
|
|
148
|
+
o.value.indexOf("bottom") > -1 ? d > t.bottom - l.bottom && (o.value = o.value.replace("bottom", "top")) : o.value.indexOf("top") > -1 && d > l.top - t.top && (o.value = o.value.replace("top", "bottom")), o.value.indexOf("left") > -1 ? r > l.left - t.left && (o.value = o.value.replace("left", "right")) : o.value.indexOf("right") > -1 && r > t.right - l.right && (o.value = o.value.replace("right", "left")), s.value = o.value;
|
|
91
149
|
}
|
|
92
|
-
function
|
|
150
|
+
function M(l) {
|
|
93
151
|
let t = "";
|
|
94
|
-
n.autoRectify ? t = n.rectifyPlacement : t =
|
|
95
|
-
let o = 0,
|
|
96
|
-
t.indexOf("top") > -1 ? o = l.top - d : t.indexOf("bottom") > -1 && (o = l.bottom), t.indexOf("right") > -1 ?
|
|
152
|
+
n.autoRectify ? t = n.rectifyPlacement : t = s.value;
|
|
153
|
+
let o = 0, y = 0;
|
|
154
|
+
t.indexOf("top") > -1 ? o = l.top - d : t.indexOf("bottom") > -1 && (o = l.bottom), t.indexOf("right") > -1 ? y = l.right : t.indexOf("left") > -1 && (y = l.left - r), t.indexOf("-top") > -1 ? o -= l.height : t.indexOf("-bottom") > -1 && (o += l.height), c.value.style.top = o + "px", c.value.style.left = y + "px";
|
|
97
155
|
}
|
|
98
156
|
async function F() {
|
|
99
|
-
await
|
|
157
|
+
await V();
|
|
100
158
|
const l = f.value.getBoundingClientRect(), t = c.value.getBoundingClientRect();
|
|
101
|
-
d = t.height, r = t.width, n.autoRectify &&
|
|
159
|
+
d = t.height, r = t.width, n.autoRectify && B(l), M(l);
|
|
102
160
|
}
|
|
103
161
|
function T(l) {
|
|
104
162
|
l.stopPropagation(), a.value = !a.value, a.value && (h(), F()), u.emit("changeState", a.value);
|
|
@@ -124,32 +182,32 @@ function j(n, u, c, f) {
|
|
|
124
182
|
default:
|
|
125
183
|
t = l;
|
|
126
184
|
}
|
|
127
|
-
|
|
185
|
+
s.value = t;
|
|
128
186
|
}
|
|
129
187
|
return {
|
|
130
188
|
showPanel: a,
|
|
131
189
|
clickEvent: T,
|
|
132
190
|
toggle: H,
|
|
133
191
|
getRealPlacement: S,
|
|
134
|
-
bindMenuMouseenter:
|
|
192
|
+
bindMenuMouseenter: m,
|
|
135
193
|
unbindMenuMouseleave: P,
|
|
136
|
-
bindMenuMouseleave:
|
|
194
|
+
bindMenuMouseleave: x
|
|
137
195
|
};
|
|
138
196
|
}
|
|
139
|
-
const w =
|
|
197
|
+
const w = /* @__PURE__ */ C({
|
|
140
198
|
name: "FButtonGroup",
|
|
141
199
|
props: L,
|
|
142
200
|
emits: ["click", "changeState", "change", "clickMenuOut"],
|
|
143
201
|
setup(n, u) {
|
|
144
|
-
const c = n.data && n.data.slice(0, n.count) || [], f = n.data && n.data.slice(n.count) || [], r =
|
|
202
|
+
const c = n.data && n.data.slice(0, n.count) || [], f = n.data && n.data.slice(n.count) || [], r = p(), d = p(), {
|
|
145
203
|
showPanel: a,
|
|
146
|
-
clickEvent:
|
|
147
|
-
toggle:
|
|
204
|
+
clickEvent: s,
|
|
205
|
+
toggle: g,
|
|
148
206
|
getRealPlacement: h,
|
|
149
207
|
bindMenuMouseenter: k,
|
|
150
|
-
unbindMenuMouseleave:
|
|
208
|
+
unbindMenuMouseleave: b,
|
|
151
209
|
bindMenuMouseleave: P
|
|
152
|
-
} =
|
|
210
|
+
} = $(n, u, r, d);
|
|
153
211
|
return h(n.placement), () => i("div", {
|
|
154
212
|
class: "f-btn-group"
|
|
155
213
|
}, [i("div", {
|
|
@@ -159,22 +217,22 @@ const w = x({
|
|
|
159
217
|
id: e.id,
|
|
160
218
|
title: e.id,
|
|
161
219
|
class: "btn btn-link btn-icontext" + (e.disabled ? " disabled" : ""),
|
|
162
|
-
onClick: (
|
|
220
|
+
onClick: (m) => g(m, e)
|
|
163
221
|
}, [i("i", {
|
|
164
|
-
class:
|
|
222
|
+
class: `f-icon ${e.icon ? e.icon : ""}`
|
|
165
223
|
}, null)]), !e.icon && i("button", {
|
|
166
224
|
id: e.id,
|
|
167
225
|
class: "btn " + (e.type ? "btn-" + e.type : "btn-link") + " " + (e.type && e.type !== "link" ? "f-btn-ml" : "") + (e.disabled ? " disabled" : ""),
|
|
168
|
-
onClick: (
|
|
226
|
+
onClick: (m) => g(m, e)
|
|
169
227
|
}, [e == null ? void 0 : e.text])]))]), f.length ? i("div", {
|
|
170
228
|
class: "btn-group f-btn-group-dropdown",
|
|
171
|
-
onMouseleave: (e) =>
|
|
229
|
+
onMouseleave: (e) => b()
|
|
172
230
|
}, [i("button", {
|
|
173
231
|
title: "button",
|
|
174
232
|
ref: d,
|
|
175
233
|
type: "button",
|
|
176
234
|
class: "f-btn-dropdown",
|
|
177
|
-
onClick: (e) =>
|
|
235
|
+
onClick: (e) => s(e)
|
|
178
236
|
}, [i("span", {
|
|
179
237
|
class: "f-icon f-icon-lookup"
|
|
180
238
|
}, null)]), i("div", {
|
|
@@ -186,9 +244,9 @@ const w = x({
|
|
|
186
244
|
}, [f.map((e) => i("div", null, [i("div", null, [e.divider && i("div", {
|
|
187
245
|
class: "dropdown-divider"
|
|
188
246
|
}, null), i("li", {
|
|
189
|
-
id:
|
|
247
|
+
id: e.id,
|
|
190
248
|
class: "dropdown-item" + (e.disabled ? " disabled" : ""),
|
|
191
|
-
onClick: (
|
|
249
|
+
onClick: (m) => g(m, e)
|
|
192
250
|
}, [e.icon && i("i", {
|
|
193
251
|
class: "f-icon dropdown-item-icon" + e.icon
|
|
194
252
|
}, null), i("span", null, [e == null ? void 0 : e.text])])])]))])]) : ""]);
|
|
@@ -200,7 +258,8 @@ const w = x({
|
|
|
200
258
|
};
|
|
201
259
|
export {
|
|
202
260
|
R as FButton,
|
|
261
|
+
w as FButtonGroup,
|
|
203
262
|
L as buttonGroupProps,
|
|
204
|
-
|
|
263
|
+
G as buttonProps,
|
|
205
264
|
N as default
|
|
206
265
|
};
|
package/button/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(c,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(c=typeof globalThis<"u"?globalThis:c||self,t(c.button={},c.Vue))})(this,function(c,t){"use strict";const N={id:String,type:{type:String,default:"primary"},disabled:{type:Boolean,default:!1},size:{type:String,default:"small"}};function w(o,u){function f(s){s.stopPropagation(),o.disabled||u.emit("click",s)}return{onClickButton:f}}const v=t.defineComponent({name:"FButton",props:N,emits:["click"],setup(o,u){const{onClickButton:f}=w(o,u),s=t.ref(o.size),d=t.ref(o.type),m=t.ref(o.disabled),a=t.computed(()=>{const r={btn:!0,"btn-lg":s.value==="large","btn-sm":s.value!=="large"};return d.value&&(r[`btn-${d.value}`]=!0),r});return()=>t.createVNode("button",{class:a.value,disabled:m.value,onClick:r=>f(r)},[u.slots.default&&u.slots.default()])}}),C={id:String,rectifyReferenceH:{type:Object},rectifyReferenceV:{type:Object},autoRectify:{type:Boolean,default:!1},realPlacement:{type:String,default:"bottom-right"},rectifyPlacement:{type:String,default:"bottom-right"},data:{type:Array},count:{type:Number,default:2},size:{type:String,default:"small"},type:{type:String,default:"primary"},placement:{type:String,default:"bottom"},showPanel:{type:Boolean,default:!1},dpFlag:{type:Boolean,default:!1}};function B(o,u,f,s){let d=0,m=0;const a=t.ref(o.showPanel),r=t.ref(o.realPlacement);let g=!1;function k(){f.value&&document.body.appendChild(f.value)}function V(){a.value=!0}function h(){a.value=!1}function R(){a.value&&!g&&setTimeout(()=>{a.value&&!g&&(h(),g=!1)},1e3)}function e(){setTimeout(()=>{a.value&&(h(),g=!1)},1e3)}function p(){V(),g=!0}function O(){e()}function x(){let l=document.documentElement.clientWidth,n=document.documentElement.clientHeight,i=0,b=0;if(o.rectifyReferenceH){const y=document.querySelector("props.rectifyReferenceH");y&&(l=y.getBoundingClientRect().right,b=y.getBoundingClientRect().left)}if(o.rectifyReferenceV){const y=document.querySelector("props.rectifyReferenceV");y&&(n=y.getBoundingClientRect().bottom,i=y.getBoundingClientRect().top)}return{top:i,left:b,right:l,bottom:n}}function T(l){if(!o.autoRectify)return;const n=x(),i=r;i.value.indexOf("bottom")>-1?m>n.bottom-l.bottom&&(i.value=i.value.replace("bottom","top")):i.value.indexOf("top")>-1&&m>l.top-n.top&&(i.value=i.value.replace("top","bottom")),i.value.indexOf("left")>-1?d>l.left-n.left&&(i.value=i.value.replace("left","right")):i.value.indexOf("right")>-1&&d>n.right-l.right&&(i.value=i.value.replace("right","left")),r.value=i.value}function F(l){let n="";o.autoRectify?n=o.rectifyPlacement:n=r.value;let i=0,b=0;n.indexOf("top")>-1?i=l.top-m:n.indexOf("bottom")>-1&&(i=l.bottom),n.indexOf("right")>-1?b=l.right:n.indexOf("left")>-1&&(b=l.left-d),n.indexOf("-top")>-1?i-=l.height:n.indexOf("-bottom")>-1&&(i+=l.height),f.value.style.top=i+"px",f.value.style.left=b+"px"}async function S(){await t.nextTick();const l=s.value.getBoundingClientRect(),n=f.value.getBoundingClientRect();m=n.height,d=n.width,o.autoRectify&&T(l),F(l)}function G(l){l.stopPropagation(),a.value=!a.value,a.value&&(k(),S()),u.emit("changeState",a.value)}function H(l,n){l.stopPropagation(),!n.disabled&&(a.value=!1,u.emit("change",n.id),u.emit("click",n))}function j(l){let n="bottom-right";switch(l){case"top":n="top-right";break;case"left":n="left-bottom";break;case"right":n="right-bottom";break;case"bottom":n="bottom-right";break;default:n=l}r.value=n}return{showPanel:a,clickEvent:G,toggle:H,getRealPlacement:j,bindMenuMouseenter:p,unbindMenuMouseleave:R,bindMenuMouseleave:O}}const P=t.defineComponent({name:"FButtonGroup",props:C,emits:["click","changeState","change","clickMenuOut"],setup(o,u){const f=o.data&&o.data.slice(0,o.count)||[],s=o.data&&o.data.slice(o.count)||[],d=t.ref(),m=t.ref(),{showPanel:a,clickEvent:r,toggle:g,getRealPlacement:k,bindMenuMouseenter:V,unbindMenuMouseleave:h,bindMenuMouseleave:R}=B(o,u,d,m);return k(o.placement),()=>t.createVNode("div",{class:"f-btn-group"},[t.createVNode("div",{class:(o.size==="large"?"btn-group-lg":"btn-group-sm")+" btn-group f-btn-group-links"},[f.map(e=>t.createVNode("div",null,[e.icon&&t.createVNode("button",{type:"button",id:e.id,title:e.id,class:"btn btn-link btn-icontext"+(e.disabled?" disabled":""),onClick:p=>g(p,e)},[t.createVNode("i",{class:`f-icon ${e.icon?e.icon:""}`},null)]),!e.icon&&t.createVNode("button",{id:e.id,class:"btn "+(e.type?"btn-"+e.type:"btn-link")+" "+(e.type&&e.type!=="link"?"f-btn-ml":"")+(e.disabled?" disabled":""),onClick:p=>g(p,e)},[e==null?void 0:e.text])]))]),s.length?t.createVNode("div",{class:"btn-group f-btn-group-dropdown",onMouseleave:e=>h()},[t.createVNode("button",{title:"button",ref:m,type:"button",class:"f-btn-dropdown",onClick:e=>r(e)},[t.createVNode("span",{class:"f-icon f-icon-lookup"},null)]),t.createVNode("div",{ref:d,class:"dropdown-menu f-btn-group-dropdown-menu"+(a.value?" show":""),style:"position:fixed;",onMouseenter:e=>V(),onMouseleave:e=>R()},[s.map(e=>t.createVNode("div",null,[t.createVNode("div",null,[e.divider&&t.createVNode("div",{class:"dropdown-divider"},null),t.createVNode("li",{id:e.id,class:"dropdown-item"+(e.disabled?" disabled":""),onClick:p=>g(p,e)},[e.icon&&t.createVNode("i",{class:"f-icon dropdown-item-icon"+e.icon},null),t.createVNode("span",null,[e==null?void 0:e.text])])])]))])]):""])}}),M={install(o){o.component(v.name,v),o.component(P.name,P)}};c.FButton=v,c.FButtonGroup=P,c.buttonGroupProps=C,c.buttonProps=N,c.default=M,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/button/package.json
CHANGED
package/button-edit/index.esm.js
CHANGED
|
@@ -1,22 +1,76 @@
|
|
|
1
1
|
import { computed as d, watch as P, ref as g, defineComponent as E, createVNode as f, Teleport as H, Fragment as _, mergeProps as q, withDirectives as z, vShow as J } from "vue";
|
|
2
2
|
const Q = {
|
|
3
|
+
/**
|
|
4
|
+
* 组件标识
|
|
5
|
+
*/
|
|
3
6
|
id: String,
|
|
7
|
+
/**
|
|
8
|
+
* 扩展按钮显示内容,这是一段现在扩展按钮中的html标签
|
|
9
|
+
*/
|
|
4
10
|
buttonContent: { type: String, default: '<i class="f-icon f-icon-lookup"></i>' },
|
|
11
|
+
/**
|
|
12
|
+
* 启用输入框自动完成功能
|
|
13
|
+
*/
|
|
5
14
|
autoComplete: { type: Boolean, default: !1 },
|
|
15
|
+
/**
|
|
16
|
+
* 组件自定义样式
|
|
17
|
+
*/
|
|
6
18
|
customClass: { type: String, default: "" },
|
|
19
|
+
/**
|
|
20
|
+
* 禁用组件,既不允许在输入框中录入,也不允许点击扩展按钮。
|
|
21
|
+
*/
|
|
7
22
|
disable: { type: Boolean, default: !1 },
|
|
23
|
+
/**
|
|
24
|
+
* 允许在输入框中录入文本。
|
|
25
|
+
*/
|
|
8
26
|
editable: { type: Boolean, default: !0 },
|
|
27
|
+
/**
|
|
28
|
+
* 显示清空文本按钮
|
|
29
|
+
*/
|
|
9
30
|
enableClear: { type: Boolean, default: !1 },
|
|
31
|
+
/**
|
|
32
|
+
* 组件值
|
|
33
|
+
*/
|
|
10
34
|
modelValue: { type: String, default: "" },
|
|
35
|
+
/**
|
|
36
|
+
* 将组件设置为只读,既不允许在输入框中录入,也不允许点击扩展按钮,但是允许复制输入框中的内容。
|
|
37
|
+
*/
|
|
11
38
|
readonly: { type: Boolean, default: !1 },
|
|
39
|
+
/**
|
|
40
|
+
* 文本对齐方式
|
|
41
|
+
*/
|
|
12
42
|
textAlign: { type: String, default: "left" },
|
|
43
|
+
/**
|
|
44
|
+
* 禁用组件时,是否显示扩展按钮
|
|
45
|
+
*/
|
|
13
46
|
showButtonWhenDisabled: { type: Boolean, default: !1 },
|
|
47
|
+
/**
|
|
48
|
+
* 显示输入框的标签
|
|
49
|
+
*/
|
|
14
50
|
enableTitle: { type: Boolean, default: !1 },
|
|
51
|
+
/**
|
|
52
|
+
* 输入框类型
|
|
53
|
+
*/
|
|
15
54
|
inputType: { type: String, default: "text" },
|
|
55
|
+
/**
|
|
56
|
+
* 显示输入框提示信息
|
|
57
|
+
*/
|
|
16
58
|
forcePlaceholder: { type: Boolean, default: !1 },
|
|
59
|
+
/**
|
|
60
|
+
* 输入框提示文本
|
|
61
|
+
*/
|
|
17
62
|
placeholder: { type: String, default: "" },
|
|
63
|
+
/**
|
|
64
|
+
* 输入框最小长度
|
|
65
|
+
*/
|
|
18
66
|
minLength: Number,
|
|
67
|
+
/**
|
|
68
|
+
* 输入框最大长度
|
|
69
|
+
*/
|
|
19
70
|
maxLength: Number,
|
|
71
|
+
/**
|
|
72
|
+
* 输入框Tab键索引
|
|
73
|
+
*/
|
|
20
74
|
tabIndex: Number
|
|
21
75
|
};
|
|
22
76
|
function X(e, n, o) {
|
|
@@ -124,7 +178,7 @@ function Y(e, n, o, r, a) {
|
|
|
124
178
|
v.stopPropagation(), (y || b) && (s("", !1), c(!l.value), n.emit("clear"));
|
|
125
179
|
}
|
|
126
180
|
function B(v) {
|
|
127
|
-
if (
|
|
181
|
+
if (u.value) {
|
|
128
182
|
if (!o.value) {
|
|
129
183
|
c(!1);
|
|
130
184
|
return;
|
|
@@ -133,7 +187,7 @@ function Y(e, n, o, r, a) {
|
|
|
133
187
|
}
|
|
134
188
|
}
|
|
135
189
|
function m(v) {
|
|
136
|
-
|
|
190
|
+
u.value && c(!1);
|
|
137
191
|
}
|
|
138
192
|
return {
|
|
139
193
|
enableClearButton: u,
|
|
@@ -145,7 +199,7 @@ function Y(e, n, o, r, a) {
|
|
|
145
199
|
}
|
|
146
200
|
const Z = {
|
|
147
201
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } }
|
|
148
|
-
}, $ = E({
|
|
202
|
+
}, $ = /* @__PURE__ */ E({
|
|
149
203
|
name: "FOverlay",
|
|
150
204
|
props: Z,
|
|
151
205
|
emits: ["click"],
|
|
@@ -174,7 +228,7 @@ const Z = {
|
|
|
174
228
|
}
|
|
175
229
|
});
|
|
176
230
|
}
|
|
177
|
-
}), M = E({
|
|
231
|
+
}), M = /* @__PURE__ */ E({
|
|
178
232
|
name: "FButtonEdit",
|
|
179
233
|
props: Q,
|
|
180
234
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
package/button-edit/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(m,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(m=typeof globalThis<"u"?globalThis:m||self,t(m["button-edit"]={},m.Vue))})(this,function(m,t){"use strict";const w={id:String,buttonContent:{type:String,default:'<i class="f-icon f-icon-lookup"></i>'},autoComplete:{type:Boolean,default:!1},customClass:{type:String,default:""},disable:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},enableClear:{type:Boolean,default:!1},modelValue:{type:String,default:""},readonly:{type:Boolean,default:!1},textAlign:{type:String,default:"left"},showButtonWhenDisabled:{type:Boolean,default:!1},enableTitle:{type:Boolean,default:!1},inputType:{type:String,default:"text"},forcePlaceholder:{type:Boolean,default:!1},placeholder:{type:String,default:""},minLength:Number,maxLength:Number,tabIndex:Number};function P(e,o,l){const f=t.computed(()=>({"input-group-append":!0,"append-force-show":e.showButtonWhenDisabled&&(e.readonly||e.disable)})),u=t.computed(()=>e.showButtonWhenDisabled||(!e.editable||!e.readonly)&&!e.disable);function a(c){u.value&&(l.value=!0,o.emit("clickButton",{origin:c,value:e.modelValue})),c.stopPropagation()}function i(c){o.emit("mouseEnterIcon",c)}function s(c){o.emit("mouseLeaveIcon",c)}function d(){o.emit("mouseOverButton")}return{buttonClass:f,onClickButton:a,onMouseEnterButton:i,onMouseLeaveButton:s,onMouseOverButton:d}}function M(e,o,l,f){const u=t.computed(()=>e.enableTitle?l.value:""),a=t.computed(()=>(e.disable||e.readonly)&&!e.forcePlaceholder?"":e.placeholder),i=t.computed(()=>e.readonly||!e.editable);let s=!1;const d=t.computed(()=>!e.disable&&s),c=t.computed(()=>({"text-left":e.textAlign==="left","text-center":e.textAlign==="center","text-right":e.textAlign==="right","form-control":!0,"f-utils-fill":!0}));function x(n,r=!0){l.value!==n&&(l.value=n,r&&o.emit("change",n),o.emit("update:modelValue",n))}t.watch(()=>e.modelValue,n=>{l.value=n,o.emit("change",n)});function g(n){s=!1,o.emit("blur",n),n.stopPropagation()}function B(n){o.emit("click",n)}function b(n){if(e.disable){s=!0;return}s=!0,i.value||o.emit("focus",n)}function y(n){o.emit("input",n.target.value);const r=n.target.value;f.value=r,l.value!==r&&x(r,!1)}function T(n){n.target.tagName!=="INPUT"&&n.preventDefault(),n.stopPropagation()}function v(n){o.emit("keydown",n)}function k(n){o.emit("keyup",n)}function V(n){const r=n.target.value;x(r)}return{hasFocusedTextBox:d,isTextBoxReadonly:i,textBoxClass:c,textBoxPlaceholder:a,textBoxTitle:u,changeTextBoxValue:x,onBlurTextBox:g,onClickTextBox:B,onFocusTextBox:b,onInput:y,onKeyDownTextBox:v,onKeyUpTextBox:k,onMouseDownTextBox:T,onTextBoxValueChange:V}}function N(e,o,l,f,u){const a=t.ref(!1),i=t.computed(()=>e.enableClear&&!e.readonly&&!e.disable),{changeTextBoxValue:s}=M(e,o,l,u);function d(B){a.value=B}t.watch(u,()=>{f.value?d(!!u.value):d(!1)});function c(B){const b=!e.readonly&&!e.disable&&e.editable,y=!e.editable;B.stopPropagation(),(b||y)&&(s("",!1),d(!a.value),o.emit("clear"))}function x(B){if(
|
|
1
|
+
(function(m,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(m=typeof globalThis<"u"?globalThis:m||self,t(m["button-edit"]={},m.Vue))})(this,function(m,t){"use strict";const w={id:String,buttonContent:{type:String,default:'<i class="f-icon f-icon-lookup"></i>'},autoComplete:{type:Boolean,default:!1},customClass:{type:String,default:""},disable:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},enableClear:{type:Boolean,default:!1},modelValue:{type:String,default:""},readonly:{type:Boolean,default:!1},textAlign:{type:String,default:"left"},showButtonWhenDisabled:{type:Boolean,default:!1},enableTitle:{type:Boolean,default:!1},inputType:{type:String,default:"text"},forcePlaceholder:{type:Boolean,default:!1},placeholder:{type:String,default:""},minLength:Number,maxLength:Number,tabIndex:Number};function P(e,o,l){const f=t.computed(()=>({"input-group-append":!0,"append-force-show":e.showButtonWhenDisabled&&(e.readonly||e.disable)})),u=t.computed(()=>e.showButtonWhenDisabled||(!e.editable||!e.readonly)&&!e.disable);function a(c){u.value&&(l.value=!0,o.emit("clickButton",{origin:c,value:e.modelValue})),c.stopPropagation()}function i(c){o.emit("mouseEnterIcon",c)}function s(c){o.emit("mouseLeaveIcon",c)}function d(){o.emit("mouseOverButton")}return{buttonClass:f,onClickButton:a,onMouseEnterButton:i,onMouseLeaveButton:s,onMouseOverButton:d}}function M(e,o,l,f){const u=t.computed(()=>e.enableTitle?l.value:""),a=t.computed(()=>(e.disable||e.readonly)&&!e.forcePlaceholder?"":e.placeholder),i=t.computed(()=>e.readonly||!e.editable);let s=!1;const d=t.computed(()=>!e.disable&&s),c=t.computed(()=>({"text-left":e.textAlign==="left","text-center":e.textAlign==="center","text-right":e.textAlign==="right","form-control":!0,"f-utils-fill":!0}));function x(n,r=!0){l.value!==n&&(l.value=n,r&&o.emit("change",n),o.emit("update:modelValue",n))}t.watch(()=>e.modelValue,n=>{l.value=n,o.emit("change",n)});function g(n){s=!1,o.emit("blur",n),n.stopPropagation()}function B(n){o.emit("click",n)}function b(n){if(e.disable){s=!0;return}s=!0,i.value||o.emit("focus",n)}function y(n){o.emit("input",n.target.value);const r=n.target.value;f.value=r,l.value!==r&&x(r,!1)}function T(n){n.target.tagName!=="INPUT"&&n.preventDefault(),n.stopPropagation()}function v(n){o.emit("keydown",n)}function k(n){o.emit("keyup",n)}function V(n){const r=n.target.value;x(r)}return{hasFocusedTextBox:d,isTextBoxReadonly:i,textBoxClass:c,textBoxPlaceholder:a,textBoxTitle:u,changeTextBoxValue:x,onBlurTextBox:g,onClickTextBox:B,onFocusTextBox:b,onInput:y,onKeyDownTextBox:v,onKeyUpTextBox:k,onMouseDownTextBox:T,onTextBoxValueChange:V}}function N(e,o,l,f,u){const a=t.ref(!1),i=t.computed(()=>e.enableClear&&!e.readonly&&!e.disable),{changeTextBoxValue:s}=M(e,o,l,u);function d(B){a.value=B}t.watch(u,()=>{f.value?d(!!u.value):d(!1)});function c(B){const b=!e.readonly&&!e.disable&&e.editable,y=!e.editable;B.stopPropagation(),(b||y)&&(s("",!1),d(!a.value),o.emit("clear"))}function x(B){if(i.value){if(!l.value){d(!1);return}(!e.editable||!e.readonly)&&!e.disable&&d(!0)}}function g(B){i.value&&d(!1)}return{enableClearButton:i,showClearButton:a,onClearValue:c,onMouseEnterTextBox:x,onMouseLeaveTextBox:g}}const E={popupContentPosition:{type:Object,default:{left:0,top:0}}},S=t.defineComponent({name:"FOverlay",props:E,emits:["click"],setup(e,o){const l=t.ref(e.popupContentPosition);function f(a){o.emit("click"),a.preventDefault(),a.stopPropagation()}const u=t.computed(()=>({position:"relative",left:`${l.value.left}px`,top:`${l.value.top}px`}));return()=>t.createVNode(t.Teleport,{to:"body"},{default:()=>{var a,i;return[t.createVNode("div",{class:"overlay-container",style:"pointer-events: auto;",onClick:s=>f(s)},[t.createVNode("div",{style:u.value},[(i=(a=o.slots).default)==null?void 0:i.call(a)])])]}})}}),p=t.defineComponent({name:"FButtonEdit",props:w,emits:["updateExtendInfo","clear","change","click","clickButton","blur","focus","mouseEnterIcon","mouseLeaveIcon","keyup","keydown","inputClick","input","update:modelValue"],setup(e,o){const l=t.ref(),f=t.ref(e.modelValue),u=t.ref(!1),{buttonClass:a,onClickButton:i,onMouseEnterButton:s,onMouseLeaveButton:d}=P(e,o,u),c=t.ref(""),{hasFocusedTextBox:x,isTextBoxReadonly:g,textBoxClass:B,textBoxPlaceholder:b,textBoxTitle:y,onBlurTextBox:T,onClickTextBox:v,onFocusTextBox:k,onInput:V,onKeyDownTextBox:n,onKeyUpTextBox:r,onMouseDownTextBox:L,onTextBoxValueChange:O}=M(e,o,f,c),{enableClearButton:D,showClearButton:F,onClearValue:K,onMouseEnterTextBox:j,onMouseLeaveTextBox:A}=N(e,o,f,x,c),R=t.computed(()=>({"input-group":!0,"f-state-disable":e.disable,"f-state-editable":e.editable&&!e.disable&&!e.readonly,"f-state-readonly":e.readonly&&!e.disable,"f-state-focus":x}));function U(){u.value=!1}const W=t.computed(()=>u.value),_=()=>{if(l.value){const C=l.value.getBoundingClientRect(),{left:h,top:G,height:H}=C;return{left:h,top:G+H}}return{left:0,top:0}};function q(C){u.value=!1}return o.expose({commitValue:q}),()=>t.createVNode(t.Fragment,null,[t.createVNode("div",t.mergeProps(o.attrs,{ref:l,class:"f-cmp-inputgroup",id:e.id}),[t.createVNode("div",{class:[e.customClass,R.value],onMouseenter:j,onMouseleave:A},[t.createVNode("input",{name:"input-group-value",autocomplete:""+e.autoComplete,class:B.value,disabled:e.disable,maxlength:e.maxLength,minlength:e.minLength,placeholder:b.value,readonly:g.value,tabindex:e.tabIndex,title:y.value,type:e.inputType,value:f.value,onBlur:T,onChange:O,onClick:v,onFocus:k,onInput:V,onKeydown:n,onKeyup:r,onMousedown:L},null),t.createVNode("div",{class:a.value},[D.value&&t.withDirectives(t.createVNode("span",{class:"input-group-text input-group-clear",onClick:K},[t.createVNode("i",{class:"f-icon modal_close"},null)]),[[t.vShow,F.value]]),e.buttonContent&&t.createVNode("span",{class:"input-group-text input-group-append-button",onClick:i,onMouseenter:s,onMouseleave:d,innerHTML:e.buttonContent},null)])])]),W.value&&t.createVNode(S,{"popup-content-position":_(),onClick:U},{default:()=>{var C,h;return[(h=(C=o.slots).default)==null?void 0:h.call(C)]}})])}}),I={install(e){e.component(p.name,p)}};m.ButtonEdit=p,m.buttonEditProps=w,m.default=I,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/button-edit/package.json
CHANGED
package/checkbox/index.esm.js
CHANGED
|
@@ -1,16 +1,53 @@
|
|
|
1
1
|
import { computed as x, ref as v, defineComponent as p, createVNode as m } from "vue";
|
|
2
2
|
const V = {
|
|
3
|
+
/**
|
|
4
|
+
* 组件标识
|
|
5
|
+
*/
|
|
3
6
|
id: String,
|
|
7
|
+
/**
|
|
8
|
+
* 组件名称
|
|
9
|
+
*/
|
|
4
10
|
name: { type: String, default: "" },
|
|
11
|
+
/**
|
|
12
|
+
* 单选组枚举数组
|
|
13
|
+
*/
|
|
5
14
|
enumData: { type: Array, default: [] },
|
|
15
|
+
/**
|
|
16
|
+
* 枚举数组中展示文本的key值。
|
|
17
|
+
*/
|
|
6
18
|
textField: { type: String, default: "name" },
|
|
19
|
+
/**
|
|
20
|
+
* 枚举数组中枚举值的key值。
|
|
21
|
+
*/
|
|
7
22
|
valueField: { type: String, default: "value" },
|
|
23
|
+
/**
|
|
24
|
+
* 组件是否水平排列
|
|
25
|
+
*/
|
|
8
26
|
horizontal: { type: Boolean, default: !1 },
|
|
27
|
+
/**
|
|
28
|
+
* 禁用组件,不允许切换单选值
|
|
29
|
+
*/
|
|
9
30
|
disable: { type: Boolean, default: !1 },
|
|
31
|
+
/**
|
|
32
|
+
* 组件值,字符串或者数组
|
|
33
|
+
*/
|
|
10
34
|
modelValue: [String, Array],
|
|
35
|
+
/**
|
|
36
|
+
* 输入框Tab键索引
|
|
37
|
+
*/
|
|
11
38
|
tabIndex: { type: Number, default: 0 },
|
|
39
|
+
/**
|
|
40
|
+
* 分隔符,默认逗号
|
|
41
|
+
*/
|
|
12
42
|
separator: { type: String, default: "," },
|
|
43
|
+
/**
|
|
44
|
+
* 值类型是否为字符串
|
|
45
|
+
*/
|
|
13
46
|
isStringValue: { type: Boolean, default: !0 },
|
|
47
|
+
/**
|
|
48
|
+
* 异步获取枚举数组方法
|
|
49
|
+
*/
|
|
50
|
+
// loadData: () => Observable < { data: Array<Checkbox> } >
|
|
14
51
|
loadData: { type: Function }
|
|
15
52
|
};
|
|
16
53
|
function y(e, i, l) {
|
|
@@ -48,7 +85,7 @@ function y(e, i, l) {
|
|
|
48
85
|
onClickCheckbox: b
|
|
49
86
|
};
|
|
50
87
|
}
|
|
51
|
-
const k = p({
|
|
88
|
+
const k = /* @__PURE__ */ p({
|
|
52
89
|
name: "FCheckboxGroup",
|
|
53
90
|
props: V,
|
|
54
91
|
emits: ["changeValue", "update:modelValue"],
|