vft 0.0.416 → 0.0.419
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/dist/index.css +1 -1
- package/es/components/breadcrumb/breadcrumb-item.vue.d.ts +1 -1
- package/es/components/breadcrumb/breadcrumb.vue.d.ts +1 -1
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/drawer/index.d.ts +1 -2
- package/es/components/radio/radio-button.vue.d.ts +1 -1
- package/es/components/radio/radio.vue.d.ts +15 -15
- package/es/components/radio/use-radio.d.ts +1 -1
- package/es/components/search/index.d.ts +172 -2
- package/es/components/search/search.vue.d.ts +3 -15
- package/es/components/search/search.vue2.js +78 -60
- package/es/components/search/types.d.ts +12 -0
- package/es/components/search/types.js +1 -0
- package/es/components/table/use/use-data-source.d.ts +1 -1
- package/es/components/teleport/teleport.vue.d.ts +1 -1
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/breadcrumb/breadcrumb-item.vue.d.ts +1 -1
- package/lib/components/breadcrumb/breadcrumb.vue.d.ts +1 -1
- package/lib/components/drawer/index.d.ts +1 -2
- package/lib/components/radio/radio-button.vue.d.ts +1 -1
- package/lib/components/radio/radio.vue.d.ts +15 -15
- package/lib/components/radio/use-radio.d.ts +1 -1
- package/lib/components/search/index.d.ts +172 -2
- package/lib/components/search/search.vue.d.ts +3 -15
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/search/types.cjs +1 -0
- package/lib/components/search/types.d.ts +12 -0
- package/lib/components/table/use/use-data-source.d.ts +1 -1
- package/lib/components/teleport/teleport.vue.d.ts +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/theme-style/index.css +1 -1
- package/theme-style/src/card.scss +4 -4
- package/theme-style/src/dialog.scss +1 -0
- package/theme-style/src/drawer.scss +3 -12
- package/theme-style/vft-card.css +1 -1
- package/theme-style/vft-dialog.css +1 -1
- package/theme-style/vft-drawer.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,50 +1,68 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, ref as a, computed as u, createElementBlock as V, openBlock as h, Fragment as T, withDirectives as X, createBlock as Y, createCommentVNode as Z, normalizeStyle as _, normalizeClass as w, unref as l, createVNode as ee, mergeProps as B, createSlots as oe, withCtx as i, renderSlot as r, createElementVNode as te } from "vue";
|
|
2
|
+
import { VftInput as ne } from "../input/index.js";
|
|
3
|
+
import { VftPopover as ae } from "../popover/index.js";
|
|
2
4
|
import "@vueuse/core";
|
|
3
5
|
import "@vft/utils";
|
|
4
|
-
import { addUnit as
|
|
6
|
+
import { addUnit as d } from "../../utils/helper.js";
|
|
5
7
|
import { generateCssVars as b } from "../../utils/ns-cover.js";
|
|
6
8
|
import "lodash-es";
|
|
7
9
|
import "../form/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import { VftPopover as ie } from "../popover/index.js";
|
|
10
|
-
import { useNamespace as ae } from "../../hooks/use-namespace/index.js";
|
|
10
|
+
import { useNamespace as le } from "../../hooks/use-namespace/index.js";
|
|
11
11
|
import "../../hooks/use-model-toggle/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
import { ClickOutside as
|
|
15
|
-
const re =
|
|
14
|
+
import { ClickOutside as ie } from "@vft/directives";
|
|
15
|
+
const re = g({
|
|
16
16
|
name: "vft-search"
|
|
17
|
-
}),
|
|
17
|
+
}), Be = /* @__PURE__ */ g({
|
|
18
18
|
...re,
|
|
19
19
|
props: {
|
|
20
20
|
width: { default: 200 },
|
|
21
21
|
activeWidth: {},
|
|
22
22
|
usePopover: { type: Boolean, default: !1 },
|
|
23
23
|
popoverCfg: {},
|
|
24
|
+
id: {},
|
|
25
|
+
size: {},
|
|
26
|
+
disabled: { type: Boolean },
|
|
24
27
|
modelValue: { default: "" },
|
|
25
|
-
|
|
28
|
+
type: {},
|
|
29
|
+
resize: {},
|
|
30
|
+
autosize: { type: [Object, Boolean] },
|
|
31
|
+
autocomplete: {},
|
|
32
|
+
formatter: {},
|
|
33
|
+
parser: {},
|
|
26
34
|
placeholder: { default: "请输入你要搜索的内容" },
|
|
35
|
+
form: {},
|
|
36
|
+
readonly: { type: Boolean },
|
|
37
|
+
clearable: { type: Boolean, default: !0 },
|
|
38
|
+
showPassword: { type: Boolean },
|
|
39
|
+
showWordLimit: { type: Boolean },
|
|
27
40
|
suffixIcon: { default: () => ({ icon: "icon-search", color: "#8B8C8C", pointer: !0 }) },
|
|
28
41
|
prefixIcon: {},
|
|
29
|
-
clearIcon: {}
|
|
42
|
+
clearIcon: {},
|
|
43
|
+
containerRole: {},
|
|
44
|
+
label: {},
|
|
45
|
+
tabindex: {},
|
|
46
|
+
validateEvent: { type: Boolean },
|
|
47
|
+
inputStyle: { type: [Boolean, null, String, Object, Array] }
|
|
30
48
|
},
|
|
31
49
|
emits: ["update:modelValue", "blur", "focus", "clear", "enter", "prefixClick", "suffixClick", "mouseenter", "mouseleave", "keydown", "change", "input", "compositionstart", "compositionupdate", "compositionend"],
|
|
32
|
-
setup(t, { expose:
|
|
33
|
-
const
|
|
50
|
+
setup(t, { expose: P, emit: R }) {
|
|
51
|
+
const f = le("search"), o = R, y = a(), C = a(), c = a(), p = a(!1), m = a(!1), n = a(!1), S = u(
|
|
34
52
|
() => b(
|
|
35
53
|
{
|
|
36
|
-
width: t.activeWidth && (n.value || t.modelValue) ?
|
|
54
|
+
width: t.activeWidth && (n.value || t.modelValue) ? d(t.activeWidth) : d(t.width)
|
|
37
55
|
},
|
|
38
56
|
"input"
|
|
39
57
|
)
|
|
40
|
-
),
|
|
58
|
+
), $ = u(
|
|
41
59
|
() => b(
|
|
42
60
|
{
|
|
43
|
-
"active-width": t.activeWidth ?
|
|
61
|
+
"active-width": t.activeWidth ? d(t.activeWidth) : d(t.width)
|
|
44
62
|
},
|
|
45
63
|
"search"
|
|
46
64
|
)
|
|
47
|
-
),
|
|
65
|
+
), x = u(() => ({
|
|
48
66
|
"show-arrow": !1,
|
|
49
67
|
transition: "vft-zoom-in-top",
|
|
50
68
|
placement: "bottom-start",
|
|
@@ -53,47 +71,47 @@ const re = P({
|
|
|
53
71
|
...t.popoverCfg
|
|
54
72
|
})), E = (e) => {
|
|
55
73
|
o("update:modelValue", e), o("input", e);
|
|
56
|
-
},
|
|
74
|
+
}, W = () => {
|
|
57
75
|
v();
|
|
58
76
|
};
|
|
59
|
-
function
|
|
77
|
+
function z() {
|
|
60
78
|
n.value = !0;
|
|
61
79
|
}
|
|
62
80
|
function v() {
|
|
63
81
|
n.value = !1;
|
|
64
82
|
}
|
|
65
|
-
const
|
|
83
|
+
const I = () => {
|
|
66
84
|
o("clear"), s(!1);
|
|
67
85
|
};
|
|
68
|
-
function
|
|
86
|
+
function M() {
|
|
69
87
|
m.value = !0, o("mouseenter", t.modelValue);
|
|
70
88
|
}
|
|
71
|
-
function
|
|
89
|
+
function U() {
|
|
72
90
|
m.value = !1, o("mouseleave", t.modelValue);
|
|
73
91
|
}
|
|
74
|
-
const
|
|
92
|
+
const F = () => {
|
|
75
93
|
n.value = !0, p.value = !0, o("focus");
|
|
76
94
|
};
|
|
77
|
-
function
|
|
95
|
+
function N() {
|
|
78
96
|
p.value = !1, o("blur");
|
|
79
97
|
}
|
|
80
|
-
function
|
|
98
|
+
function O() {
|
|
81
99
|
s(), o("prefixClick", t.modelValue);
|
|
82
100
|
}
|
|
83
|
-
function
|
|
101
|
+
function j() {
|
|
84
102
|
s(), o("suffixClick", t.modelValue);
|
|
85
103
|
}
|
|
86
|
-
function
|
|
104
|
+
function A() {
|
|
87
105
|
s(), o("enter", t.modelValue);
|
|
88
106
|
}
|
|
89
107
|
function s(e = !0) {
|
|
90
108
|
t.usePopover && v(), e && c.value.blur();
|
|
91
109
|
}
|
|
92
|
-
const
|
|
110
|
+
const D = (e) => {
|
|
93
111
|
o("keydown", e);
|
|
94
|
-
},
|
|
112
|
+
}, K = u(() => y.value?.popperRef?.contentRef), L = (e) => {
|
|
95
113
|
o("update:modelValue", e);
|
|
96
|
-
},
|
|
114
|
+
}, H = (e) => {
|
|
97
115
|
o("change", e);
|
|
98
116
|
}, q = (e) => {
|
|
99
117
|
o("compositionstart", e);
|
|
@@ -102,87 +120,87 @@ const re = P({
|
|
|
102
120
|
}, J = (e) => {
|
|
103
121
|
o("compositionend", e);
|
|
104
122
|
};
|
|
105
|
-
return
|
|
123
|
+
return P({
|
|
106
124
|
isFocus: p,
|
|
107
125
|
isHover: m,
|
|
108
126
|
visible: n,
|
|
109
127
|
hidePopover: v,
|
|
110
|
-
showPopover:
|
|
128
|
+
showPopover: z,
|
|
111
129
|
inputRef: c
|
|
112
|
-
}), (e,
|
|
130
|
+
}), (e, k) => (h(), V(T, null, [
|
|
113
131
|
X((h(), V("div", {
|
|
114
132
|
ref_key: "searchRef",
|
|
115
|
-
ref:
|
|
116
|
-
class: w([
|
|
117
|
-
style: _(
|
|
133
|
+
ref: C,
|
|
134
|
+
class: w([l(f).b(), l(f).is("active", !!n.value || !!e.modelValue)]),
|
|
135
|
+
style: _($.value)
|
|
118
136
|
}, [
|
|
119
|
-
ee(
|
|
137
|
+
ee(l(ne), B({
|
|
120
138
|
ref_key: "inputRef",
|
|
121
139
|
ref: c
|
|
122
140
|
}, e.$props, {
|
|
123
|
-
"input-style":
|
|
141
|
+
"input-style": S.value,
|
|
124
142
|
onInput: E,
|
|
125
|
-
onFocus:
|
|
126
|
-
onEnter:
|
|
127
|
-
onBlur:
|
|
128
|
-
onMouseenter:
|
|
143
|
+
onFocus: F,
|
|
144
|
+
onEnter: A,
|
|
145
|
+
onBlur: N,
|
|
146
|
+
onMouseenter: M,
|
|
129
147
|
"onUpdate:modelValue": L,
|
|
130
|
-
onMouseleave:
|
|
131
|
-
onPrefixClick:
|
|
132
|
-
onSuffixClick:
|
|
133
|
-
onChange:
|
|
134
|
-
onKeydown:
|
|
135
|
-
onClear:
|
|
148
|
+
onMouseleave: U,
|
|
149
|
+
onPrefixClick: O,
|
|
150
|
+
onSuffixClick: j,
|
|
151
|
+
onChange: H,
|
|
152
|
+
onKeydown: D,
|
|
153
|
+
onClear: I,
|
|
136
154
|
onCompositionstart: q,
|
|
137
155
|
onCompositionupdate: G,
|
|
138
156
|
onCompositionend: J
|
|
139
157
|
}), oe({ _: 2 }, [
|
|
140
158
|
e.$slots.prefix ? {
|
|
141
159
|
name: "prefix",
|
|
142
|
-
fn:
|
|
160
|
+
fn: i(() => [
|
|
143
161
|
r(e.$slots, "prefix")
|
|
144
162
|
]),
|
|
145
163
|
key: "0"
|
|
146
164
|
} : void 0,
|
|
147
165
|
e.$slots.suffix ? {
|
|
148
166
|
name: "suffix",
|
|
149
|
-
fn:
|
|
167
|
+
fn: i(() => [
|
|
150
168
|
r(e.$slots, "suffix")
|
|
151
169
|
]),
|
|
152
170
|
key: "1"
|
|
153
171
|
} : void 0,
|
|
154
172
|
e.$slots.prepend ? {
|
|
155
173
|
name: "prepend",
|
|
156
|
-
fn:
|
|
174
|
+
fn: i(() => [
|
|
157
175
|
r(e.$slots, "prepend")
|
|
158
176
|
]),
|
|
159
177
|
key: "2"
|
|
160
178
|
} : void 0,
|
|
161
179
|
e.$slots.append ? {
|
|
162
180
|
name: "append",
|
|
163
|
-
fn:
|
|
181
|
+
fn: i(() => [
|
|
164
182
|
r(e.$slots, "append")
|
|
165
183
|
]),
|
|
166
184
|
key: "3"
|
|
167
185
|
} : void 0
|
|
168
186
|
]), 1040, ["input-style"])
|
|
169
187
|
], 6)), [
|
|
170
|
-
[
|
|
188
|
+
[l(ie), W, K.value]
|
|
171
189
|
]),
|
|
172
|
-
e.usePopover ? (h(), Y(
|
|
190
|
+
e.usePopover ? (h(), Y(l(ae), B({
|
|
173
191
|
key: 0,
|
|
174
192
|
style: { "--vft-transition-duration": "3s" },
|
|
175
193
|
ref_key: "popoverRef",
|
|
176
|
-
ref:
|
|
177
|
-
},
|
|
178
|
-
"virtual-ref":
|
|
194
|
+
ref: y
|
|
195
|
+
}, x.value, {
|
|
196
|
+
"virtual-ref": C.value,
|
|
179
197
|
visible: n.value,
|
|
180
|
-
"onUpdate:visible":
|
|
198
|
+
"onUpdate:visible": k[0] || (k[0] = (Q) => n.value = Q),
|
|
181
199
|
"virtual-triggering": ""
|
|
182
200
|
}), {
|
|
183
|
-
default:
|
|
201
|
+
default: i(() => [
|
|
184
202
|
te("div", {
|
|
185
|
-
class: w(
|
|
203
|
+
class: w(l(f).e("content"))
|
|
186
204
|
}, [
|
|
187
205
|
r(e.$slots, "default")
|
|
188
206
|
], 2)
|
|
@@ -193,5 +211,5 @@ const re = P({
|
|
|
193
211
|
}
|
|
194
212
|
});
|
|
195
213
|
export {
|
|
196
|
-
|
|
214
|
+
Be as default
|
|
197
215
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PopoverProps } from 'vft/es/components/popover';
|
|
2
|
+
import type { InputProps } from 'vft/es/components/input';
|
|
3
|
+
export interface SearchProps extends InputProps {
|
|
4
|
+
/** input 框宽度 */
|
|
5
|
+
width?: string | number;
|
|
6
|
+
/** input 获取焦点时的宽度 */
|
|
7
|
+
activeWidth?: string | number;
|
|
8
|
+
/** 是否需要 popover */
|
|
9
|
+
usePopover?: boolean;
|
|
10
|
+
/** popover 相关配置 参考 element */
|
|
11
|
+
popoverCfg?: PopoverProps;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type PaginationProps } from 'vft/es/components/pagination';
|
|
2
2
|
import { type ComputedRef } from 'vue';
|
|
3
|
-
import { type Recordable } from '../../types
|
|
3
|
+
import { type Recordable } from '../../types';
|
|
4
4
|
import type { TableProps } from '../types';
|
|
5
5
|
export declare function useDataSource(propsRef: ComputedRef<TableProps>, { tableData, setLoading, getPaginationInfo, setPagination }: {
|
|
6
6
|
tableData: any;
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type DrawerProps } from './drawer.vue';
|
|
2
1
|
export declare const VftDrawer: import("vft/es/utils").SFCWithInstall<{
|
|
3
2
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
4
3
|
direction: {
|
|
@@ -394,4 +393,4 @@ export declare const VftDrawer: import("vft/es/utils").SFCWithInstall<{
|
|
|
394
393
|
};
|
|
395
394
|
})> & Record<string, any>;
|
|
396
395
|
export default VftDrawer;
|
|
397
|
-
export
|
|
396
|
+
export * from './types';
|
|
@@ -2,46 +2,46 @@ declare function __VLS_template(): {
|
|
|
2
2
|
default?(_: {}): any;
|
|
3
3
|
};
|
|
4
4
|
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
-
modelValue: import("vft/es/utils
|
|
5
|
+
modelValue: import("vft/es/utils").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
|
|
6
6
|
size: {
|
|
7
|
-
readonly type: import("vue").PropType<import("vft/es/utils
|
|
7
|
+
readonly type: import("vue").PropType<import("vft/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
|
|
8
8
|
readonly required: false;
|
|
9
9
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
10
10
|
__epPropKey: true;
|
|
11
11
|
};
|
|
12
12
|
disabled: BooleanConstructor;
|
|
13
|
-
label: import("vft/es/utils
|
|
14
|
-
value: import("vft/es/utils
|
|
15
|
-
name: import("vft/es/utils
|
|
13
|
+
label: import("vft/es/utils").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
|
|
14
|
+
value: import("vft/es/utils").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
|
|
15
|
+
name: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
16
16
|
border: BooleanConstructor;
|
|
17
17
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
-
click: (data: import("./types
|
|
18
|
+
click: (data: import("./types").RadioProps) => void;
|
|
19
19
|
change: (data: string | number | boolean | undefined) => void;
|
|
20
20
|
"update:modelValue": (data: string | number | boolean | undefined) => void;
|
|
21
21
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
-
modelValue: import("vft/es/utils
|
|
22
|
+
modelValue: import("vft/es/utils").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
|
|
23
23
|
size: {
|
|
24
|
-
readonly type: import("vue").PropType<import("vft/es/utils
|
|
24
|
+
readonly type: import("vue").PropType<import("vft/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
|
|
25
25
|
readonly required: false;
|
|
26
26
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
27
27
|
__epPropKey: true;
|
|
28
28
|
};
|
|
29
29
|
disabled: BooleanConstructor;
|
|
30
|
-
label: import("vft/es/utils
|
|
31
|
-
value: import("vft/es/utils
|
|
32
|
-
name: import("vft/es/utils
|
|
30
|
+
label: import("vft/es/utils").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
|
|
31
|
+
value: import("vft/es/utils").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
|
|
32
|
+
name: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
33
33
|
border: BooleanConstructor;
|
|
34
34
|
}>> & Readonly<{
|
|
35
|
-
onClick?: ((data: import("./types
|
|
35
|
+
onClick?: ((data: import("./types").RadioProps) => any) | undefined;
|
|
36
36
|
"onUpdate:modelValue"?: ((data: string | number | boolean | undefined) => any) | undefined;
|
|
37
37
|
onChange?: ((data: string | number | boolean | undefined) => any) | undefined;
|
|
38
38
|
}>, {
|
|
39
|
-
label: import("vft/es/utils
|
|
39
|
+
label: import("vft/es/utils").EpPropMergeType<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown>;
|
|
40
40
|
disabled: boolean;
|
|
41
|
-
value: import("vft/es/utils
|
|
41
|
+
value: import("vft/es/utils").EpPropMergeType<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown>;
|
|
42
42
|
border: boolean;
|
|
43
43
|
name: string;
|
|
44
|
-
modelValue: import("vft/es/utils
|
|
44
|
+
modelValue: import("vft/es/utils").EpPropMergeType<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown>;
|
|
45
45
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
46
46
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
47
47
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RadioButtonProps, RadioEmitProps, RadioProps } from './types
|
|
1
|
+
import type { RadioButtonProps, RadioEmitProps, RadioProps } from './types';
|
|
2
2
|
export declare const useRadio: (props: RadioProps | RadioButtonProps, emit?: RadioEmitProps) => {
|
|
3
3
|
radioRef: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
4
4
|
isGroup: import("vue").ComputedRef<boolean>;
|