vft 0.0.388 → 0.0.389
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/es/components/alert/alert.vue.d.ts +11 -1
- package/es/components/alert/alert.vue2.js +65 -13
- package/es/components/alert/index.d.ts +76 -28
- package/es/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/es/components/autocomplete/index.d.ts +6 -6
- package/es/components/carousel/index.d.ts +3 -3
- package/es/components/carousel/types.d.ts +1 -1
- package/es/components/carousel/use-carousel.d.ts +2 -2
- package/es/components/carousel/use-carousel.js +37 -37
- package/es/components/index.js +137 -138
- package/es/components/input-tag/input-tag.vue.d.ts +1 -1
- package/es/components/select/index.d.ts +5 -5
- package/es/components/select/select.vue.d.ts +5 -5
- package/es/components/select/useSelect.d.ts +4 -4
- package/es/components/super-form/component-map.d.ts +1 -34
- package/es/components/super-form/component-map.js +39 -43
- package/es/components/super-form/index.js +8 -9
- package/es/components/super-form/super-form-item.vue2.js +4 -3
- package/es/components/super-form/types.d.ts +1 -1
- package/es/components/super-form/use/helper.d.ts +1 -1
- package/es/components/super-form/use/helper.js +32 -31
- package/es/components/super-form/use/use-auto-focus.js +1 -1
- package/es/components/super-form/use/use-form-events.js +41 -40
- package/es/components/table/table.vue2.js +22 -22
- package/es/constants/index.js +10 -9
- package/es/constants/key.d.ts +34 -0
- package/es/constants/key.js +4 -2
- package/es/index.js +2 -2
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/alert/alert.vue.d.ts +11 -1
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/alert/index.d.ts +76 -28
- package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/lib/components/autocomplete/index.d.ts +6 -6
- package/lib/components/carousel/index.d.ts +3 -3
- package/lib/components/carousel/types.d.ts +1 -1
- package/lib/components/carousel/use-carousel.cjs +1 -1
- package/lib/components/carousel/use-carousel.d.ts +2 -2
- package/lib/components/index.cjs +1 -1
- package/lib/components/input-tag/input-tag.vue.d.ts +1 -1
- package/lib/components/select/index.d.ts +5 -5
- package/lib/components/select/select.vue.d.ts +5 -5
- package/lib/components/select/useSelect.d.ts +4 -4
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/component-map.d.ts +1 -34
- package/lib/components/super-form/index.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/types.d.ts +1 -1
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/super-form/use/helper.d.ts +1 -1
- package/lib/components/super-form/use/use-auto-focus.cjs +1 -1
- package/lib/components/super-form/use/use-form-events.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/constants/index.cjs +1 -1
- package/lib/constants/key.cjs +1 -1
- package/lib/constants/key.d.ts +34 -0
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/web-types.json +1 -1
|
@@ -4,22 +4,22 @@ import { vLoading as ge } from "../loading/directive.js";
|
|
|
4
4
|
import { deepMerge as _, omit as de, isFunction as ue } from "@vft/utils";
|
|
5
5
|
import "@vueuse/core";
|
|
6
6
|
import "../config-provider/hooks/use-global-config.js";
|
|
7
|
+
import { FormCompEnum as fe } from "../../constants/key.js";
|
|
7
8
|
import "lodash-es";
|
|
8
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as me } from "../../hooks/use-namespace/index.js";
|
|
9
10
|
import "../../hooks/use-model-toggle/index.js";
|
|
10
11
|
import "@popperjs/core";
|
|
11
12
|
import "../../hooks/use-z-index/index.js";
|
|
12
13
|
import "../icon/index.js";
|
|
13
|
-
import { VftPagination as
|
|
14
|
-
import { VftSuperForm as
|
|
15
|
-
import { VxeGrid as
|
|
16
|
-
import
|
|
17
|
-
import { PAGE_SIZE as
|
|
18
|
-
import { useColumns as
|
|
19
|
-
import { useDataSource as
|
|
20
|
-
import { useLoading as
|
|
21
|
-
import { usePagination as
|
|
22
|
-
import { FormCompEnum as ke } from "../super-form/component-map.js";
|
|
14
|
+
import { VftPagination as pe } from "../pagination/index.js";
|
|
15
|
+
import { VftSuperForm as he } from "../super-form/index.js";
|
|
16
|
+
import { VxeGrid as be } from "vxe-table";
|
|
17
|
+
import Ce from "xe-utils";
|
|
18
|
+
import { PAGE_SIZE as ye } from "./constants.js";
|
|
19
|
+
import { useColumns as we } from "./use/use-columns.js";
|
|
20
|
+
import { useDataSource as ve } from "./use/use-data-source.js";
|
|
21
|
+
import { useLoading as xe } from "./use/use-loading.js";
|
|
22
|
+
import { usePagination as ke } from "./use/use-pagination.js";
|
|
23
23
|
import { useForm as Se } from "../super-form/use/use-form.js";
|
|
24
24
|
import { EmptyEnum as Be } from "../empty/constants.js";
|
|
25
25
|
const ze = {
|
|
@@ -34,7 +34,7 @@ const ze = {
|
|
|
34
34
|
},
|
|
35
35
|
api: {},
|
|
36
36
|
pageSize: {
|
|
37
|
-
default:
|
|
37
|
+
default: ye
|
|
38
38
|
},
|
|
39
39
|
total: {},
|
|
40
40
|
rowkey: {
|
|
@@ -387,18 +387,18 @@ const ze = {
|
|
|
387
387
|
expose: F,
|
|
388
388
|
emit: A
|
|
389
389
|
}) {
|
|
390
|
-
const i =
|
|
390
|
+
const i = me("table"), l = A, E = ee(), p = d(), N = d([]), s = d(), O = ae(), t = u(() => _(O.props, e(s))), {
|
|
391
391
|
getLoading: V,
|
|
392
392
|
setLoading: I
|
|
393
|
-
} =
|
|
393
|
+
} = xe(t), {
|
|
394
394
|
getPaginationInfo: c,
|
|
395
395
|
setPagination: g,
|
|
396
396
|
getShowPagination: h,
|
|
397
397
|
getCurrentPage: q
|
|
398
|
-
} =
|
|
398
|
+
} = ke(t), {
|
|
399
399
|
getViewColumns: G,
|
|
400
400
|
setColumns: K
|
|
401
|
-
} =
|
|
401
|
+
} = we(t);
|
|
402
402
|
te(() => q(), (a) => {
|
|
403
403
|
oe(() => {
|
|
404
404
|
b({
|
|
@@ -428,7 +428,7 @@ const ze = {
|
|
|
428
428
|
getDataSource: W,
|
|
429
429
|
getRawDataSource: w,
|
|
430
430
|
tableSearch: v
|
|
431
|
-
} =
|
|
431
|
+
} = ve(t, {
|
|
432
432
|
tableData: N,
|
|
433
433
|
setLoading: I,
|
|
434
434
|
getPaginationInfo: c,
|
|
@@ -565,7 +565,7 @@ const ze = {
|
|
|
565
565
|
"toolbar-tool-click",
|
|
566
566
|
"zoom"
|
|
567
567
|
].forEach((a) => {
|
|
568
|
-
const o =
|
|
568
|
+
const o = Ce.camelCase(`on-${a}`);
|
|
569
569
|
k[o] = (...n) => l(a, ...n);
|
|
570
570
|
});
|
|
571
571
|
const r = u(() => {
|
|
@@ -600,7 +600,7 @@ const ze = {
|
|
|
600
600
|
const Z = {
|
|
601
601
|
field: "_filterTableData",
|
|
602
602
|
label: "",
|
|
603
|
-
type:
|
|
603
|
+
type: fe.SEARCH,
|
|
604
604
|
componentProps: ({}) => ({
|
|
605
605
|
onChange: (a) => {
|
|
606
606
|
B({
|
|
@@ -637,11 +637,11 @@ const ze = {
|
|
|
637
637
|
...S
|
|
638
638
|
}), (a, o) => (f(), re("div", {
|
|
639
639
|
class: ne(e(i).b())
|
|
640
|
-
}, [z(e(
|
|
640
|
+
}, [z(e(be), D({
|
|
641
641
|
ref_key: "xGrid",
|
|
642
642
|
ref: p
|
|
643
643
|
}, r.value), {
|
|
644
|
-
toolbarButtons: m(() => [H(a.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (f(), R(e(
|
|
644
|
+
toolbarButtons: m(() => [H(a.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (f(), R(e(he), {
|
|
645
645
|
key: 0,
|
|
646
646
|
onRegister: e(J),
|
|
647
647
|
onSubmit: B,
|
|
@@ -652,7 +652,7 @@ const ze = {
|
|
|
652
652
|
}, null, 8, ["type"])]),
|
|
653
653
|
loading: m(() => [ce(ie("div", ze, null, 512), [[e(ge), r.value.loading]])]),
|
|
654
654
|
_: 3
|
|
655
|
-
}, 16), r.value.showPager && e(h) ? (f(), R(e(
|
|
655
|
+
}, 16), r.value.showPager && e(h) ? (f(), R(e(pe), D({
|
|
656
656
|
key: 0
|
|
657
657
|
}, e(c), {
|
|
658
658
|
class: [e(i).e("pager"), e(i).m("pager-" + e(c).pagePlacement)],
|
package/es/constants/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { EVENT_CODE as e } from "./aria.js";
|
|
2
|
-
import { WEEK_DAYS as
|
|
3
|
-
import { CHANGE_EVENT as
|
|
4
|
-
import { INSTALLED_KEY as x } from "./key.js";
|
|
5
|
-
import { componentSizeMap as
|
|
2
|
+
import { WEEK_DAYS as m, datePickTypes as p } from "./date.js";
|
|
3
|
+
import { CHANGE_EVENT as T, INPUT_EVENT as N, UPDATE_MODEL_EVENT as _ } from "./event.js";
|
|
4
|
+
import { FormCompEnum as n, INSTALLED_KEY as x } from "./key.js";
|
|
5
|
+
import { componentSizeMap as A, componentSizes as S } from "./size.js";
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
T as CHANGE_EVENT,
|
|
8
8
|
e as EVENT_CODE,
|
|
9
|
+
n as FormCompEnum,
|
|
9
10
|
N as INPUT_EVENT,
|
|
10
11
|
x as INSTALLED_KEY,
|
|
11
12
|
_ as UPDATE_MODEL_EVENT,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
m as WEEK_DAYS,
|
|
14
|
+
A as componentSizeMap,
|
|
15
|
+
S as componentSizes,
|
|
16
|
+
p as datePickTypes
|
|
16
17
|
};
|
package/es/constants/key.d.ts
CHANGED
|
@@ -1 +1,35 @@
|
|
|
1
1
|
export declare const INSTALLED_KEY: unique symbol;
|
|
2
|
+
export declare enum FormCompEnum {
|
|
3
|
+
AUTOCOMPLETE = "autocomplete",
|
|
4
|
+
Cascader = "cascader",
|
|
5
|
+
ColorPicker = "colorPicker",
|
|
6
|
+
INPUT = "input",
|
|
7
|
+
INPUT_NUMBER = "input-number",
|
|
8
|
+
INPUT_NUMBER_STEP = "input-number-step",
|
|
9
|
+
INPUT_TAG = "input-tag",
|
|
10
|
+
PASSWORD = "password",
|
|
11
|
+
TEXTAREA = "textarea",
|
|
12
|
+
Slider = "slider",
|
|
13
|
+
DIVIDER = "divider",
|
|
14
|
+
SELECT = "select",
|
|
15
|
+
SEARCH = "search",
|
|
16
|
+
RADIO = "radio",
|
|
17
|
+
RADIO_SINGLE = "radio_single",
|
|
18
|
+
RADIO_BUTTON = "radio-button",
|
|
19
|
+
CHECKBOX = "checkbox",
|
|
20
|
+
CHECKBOX_SINGLE = "checkbox_single",
|
|
21
|
+
CHECKBOX_BUTTON = "checkbox-button",
|
|
22
|
+
SWITCH = "switch",
|
|
23
|
+
Upload = "upload",
|
|
24
|
+
TIME_PICKER = "time-picker",
|
|
25
|
+
TIMERANGE_PICKER = "time-picker",
|
|
26
|
+
YEAR_PICKER = "year",
|
|
27
|
+
MONTH_PICKER = "month",
|
|
28
|
+
DATE_PICKER = "date",
|
|
29
|
+
DATES_PICKER = "dates",
|
|
30
|
+
DATETIME_PICKER = "datetime",
|
|
31
|
+
WEEK_PICKER = "week",
|
|
32
|
+
DATETIMERANGE_PICKER = "datetimerange",
|
|
33
|
+
DATERANGE_PICKER = "daterange",
|
|
34
|
+
MONTHRANGE_PICKER = "monthrange"
|
|
35
|
+
}
|
package/es/constants/key.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
const
|
|
1
|
+
const I = Symbol("INSTALLED_KEY");
|
|
2
|
+
var t = /* @__PURE__ */ ((e) => (e.AUTOCOMPLETE = "autocomplete", e.Cascader = "cascader", e.ColorPicker = "colorPicker", e.INPUT = "input", e.INPUT_NUMBER = "input-number", e.INPUT_NUMBER_STEP = "input-number-step", e.INPUT_TAG = "input-tag", e.PASSWORD = "password", e.TEXTAREA = "textarea", e.Slider = "slider", e.DIVIDER = "divider", e.SELECT = "select", e.SEARCH = "search", e.RADIO = "radio", e.RADIO_SINGLE = "radio_single", e.RADIO_BUTTON = "radio-button", e.CHECKBOX = "checkbox", e.CHECKBOX_SINGLE = "checkbox_single", e.CHECKBOX_BUTTON = "checkbox-button", e.SWITCH = "switch", e.Upload = "upload", e.TIME_PICKER = "time-picker", e.TIMERANGE_PICKER = "time-picker", e.YEAR_PICKER = "year", e.MONTH_PICKER = "month", e.DATE_PICKER = "date", e.DATES_PICKER = "dates", e.DATETIME_PICKER = "datetime", e.WEEK_PICKER = "week", e.DATETIMERANGE_PICKER = "datetimerange", e.DATERANGE_PICKER = "daterange", e.MONTHRANGE_PICKER = "monthrange", e))(t || {});
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
+
t as FormCompEnum,
|
|
5
|
+
I as INSTALLED_KEY
|
|
4
6
|
};
|
package/es/index.js
CHANGED
|
@@ -105,7 +105,7 @@ export { VftSuperForm } from "./components/super-form/index.js";
|
|
|
105
105
|
export { EVENT_CODE } from "./constants/aria.js";
|
|
106
106
|
export { WEEK_DAYS, datePickTypes } from "./constants/date.js";
|
|
107
107
|
export { CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from "./constants/event.js";
|
|
108
|
-
export { INSTALLED_KEY } from "./constants/key.js";
|
|
108
|
+
export { FormCompEnum, INSTALLED_KEY } from "./constants/key.js";
|
|
109
109
|
export { componentSizeMap, componentSizes } from "./constants/size.js";
|
|
110
110
|
export { useAttrs } from "./hooks/use-attrs/index.js";
|
|
111
111
|
export { useDraggable } from "./hooks/use-draggable/index.js";
|
|
@@ -202,7 +202,7 @@ export { watermarkProps } from "./components/watermark/watermark.js";
|
|
|
202
202
|
export { vLoading, createLoadingDirective } from "./components/loading/directive.js";
|
|
203
203
|
export { Loading } from "./components/loading/service.js";
|
|
204
204
|
export { messageDefaults, messageTypes } from "./components/message/types.js";
|
|
205
|
-
export {
|
|
205
|
+
export { clearComponents, getComponent, getRegisteredComponents, hasComponent, isDatePicker, isInput, isRangePicker, registerComponent, registerComponents, removeComponent } from "./components/super-form/component-map.js";
|
|
206
206
|
export { getDynamicProps, useForm } from "./components/super-form/use/use-form.js";
|
|
207
207
|
|
|
208
208
|
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
|
@@ -27,11 +27,16 @@ export interface AlertProps {
|
|
|
27
27
|
center?: boolean;
|
|
28
28
|
effect?: alertEffects;
|
|
29
29
|
}
|
|
30
|
-
declare
|
|
30
|
+
declare function __VLS_template(): {
|
|
31
|
+
title?(_: {}): any;
|
|
32
|
+
default?(_: {}): any;
|
|
33
|
+
};
|
|
34
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<AlertProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
35
|
close: (evt: MouseEvent) => void;
|
|
32
36
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<AlertProps>>> & Readonly<{
|
|
33
37
|
onClose?: ((evt: MouseEvent) => any) | undefined;
|
|
34
38
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
35
40
|
export default _default;
|
|
36
41
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
37
42
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -42,3 +47,8 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
42
47
|
required: true;
|
|
43
48
|
};
|
|
44
49
|
};
|
|
50
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
51
|
+
new (): {
|
|
52
|
+
$slots: S;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../icon/index.cjs");require("@vueuse/core");require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");const m=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const p=e.defineComponent({name:"vft-alert"}),k=e.defineComponent({...p,props:{title:{default:""},description:{default:""},type:{default:"info"},closable:{type:Boolean,default:!0},closeText:{default:""},showIcon:{type:Boolean},center:{type:Boolean},effect:{default:"light"}},emits:{close:l=>l instanceof MouseEvent},setup(l,{emit:i}){const o=m.useNamespace("alert"),u=i,n=e.useSlots(),s=e.ref(!0),r=e.computed(()=>l.type),d=e.computed(()=>[o.e("icon"),{[o.is("big")]:!!l.description||!!n.default}]),f=e.computed(()=>({[o.is("bold")]:l.description||n.default})),a=t=>{s.value=!1,u("close",t)};return(t,B)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(o).b("fade")},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass([e.unref(o).b(),e.unref(o).m(t.type),e.unref(o).is("center",t.center),e.unref(o).is(t.effect)]),role:"alert"},[t.showIcon&&r.value?(e.openBlock(),e.createBlock(e.unref(c.VftIcon),{key:0,class:e.normalizeClass(d.value),icon:r.value},null,8,["class","icon"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("content"))},[t.title||t.$slots.title?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(o).e("title"),f.value])},[e.renderSlot(t.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2)):e.createCommentVNode("",!0),t.$slots.default||t.description?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(e.unref(o).e("description"))},[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2)):e.createCommentVNode("",!0),t.closable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.closeText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(o).e("close-btn"),e.unref(o).is("customed")]),onClick:a},e.toDisplayString(t.closeText),3)):(e.openBlock(),e.createBlock(e.unref(c.VftIcon),{key:1,class:e.normalizeClass(e.unref(o).e("close-btn")),onClick:a,icon:"icon-close"},null,8,["class"]))],64)):e.createCommentVNode("",!0)],2)],2),[[e.vShow,s.value]])]),_:3},8,["name"]))}});exports.default=k;
|
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
export * from './types';
|
|
2
|
-
export declare const VftAlert: import("vft/es/utils").SFCWithInstall<
|
|
2
|
+
export declare const VftAlert: import("vft/es/utils").SFCWithInstall<{
|
|
3
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
+
title: {
|
|
5
|
+
type: import("vue").PropType<string>;
|
|
6
|
+
};
|
|
7
|
+
description: {
|
|
8
|
+
type: import("vue").PropType<string>;
|
|
9
|
+
};
|
|
10
|
+
type: {
|
|
11
|
+
type: import("vue").PropType<import("./types").TypeComponents>;
|
|
12
|
+
};
|
|
13
|
+
closable: {
|
|
14
|
+
type: import("vue").PropType<boolean>;
|
|
15
|
+
};
|
|
16
|
+
closeText: {
|
|
17
|
+
type: import("vue").PropType<string>;
|
|
18
|
+
};
|
|
19
|
+
showIcon: {
|
|
20
|
+
type: import("vue").PropType<boolean>;
|
|
21
|
+
};
|
|
22
|
+
center: {
|
|
23
|
+
type: import("vue").PropType<boolean>;
|
|
24
|
+
};
|
|
25
|
+
effect: {
|
|
26
|
+
type: import("vue").PropType<import("./types").alertEffects>;
|
|
27
|
+
};
|
|
28
|
+
}>> & Readonly<{
|
|
29
|
+
onClose?: ((evt: MouseEvent) => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
close: (evt: MouseEvent) => void;
|
|
32
|
+
}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
33
|
+
P: {};
|
|
34
|
+
B: {};
|
|
35
|
+
D: {};
|
|
36
|
+
C: {};
|
|
37
|
+
M: {};
|
|
38
|
+
Defaults: {};
|
|
39
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
40
|
+
title: {
|
|
41
|
+
type: import("vue").PropType<string>;
|
|
42
|
+
};
|
|
43
|
+
description: {
|
|
44
|
+
type: import("vue").PropType<string>;
|
|
45
|
+
};
|
|
46
|
+
type: {
|
|
47
|
+
type: import("vue").PropType<import("./types").TypeComponents>;
|
|
48
|
+
};
|
|
49
|
+
closable: {
|
|
50
|
+
type: import("vue").PropType<boolean>;
|
|
51
|
+
};
|
|
52
|
+
closeText: {
|
|
53
|
+
type: import("vue").PropType<string>;
|
|
54
|
+
};
|
|
55
|
+
showIcon: {
|
|
56
|
+
type: import("vue").PropType<boolean>;
|
|
57
|
+
};
|
|
58
|
+
center: {
|
|
59
|
+
type: import("vue").PropType<boolean>;
|
|
60
|
+
};
|
|
61
|
+
effect: {
|
|
62
|
+
type: import("vue").PropType<import("./types").alertEffects>;
|
|
63
|
+
};
|
|
64
|
+
}>> & Readonly<{
|
|
65
|
+
onClose?: ((evt: MouseEvent) => any) | undefined;
|
|
66
|
+
}>, {}, {}, {}, {}, {}>;
|
|
67
|
+
__isFragment?: never;
|
|
68
|
+
__isTeleport?: never;
|
|
69
|
+
__isSuspense?: never;
|
|
70
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
3
71
|
title: {
|
|
4
72
|
type: import("vue").PropType<string>;
|
|
5
73
|
};
|
|
@@ -24,34 +92,14 @@ export declare const VftAlert: import("vft/es/utils").SFCWithInstall<import("vue
|
|
|
24
92
|
effect: {
|
|
25
93
|
type: import("vue").PropType<import("./types").alertEffects>;
|
|
26
94
|
};
|
|
95
|
+
}>> & Readonly<{
|
|
96
|
+
onClose?: ((evt: MouseEvent) => any) | undefined;
|
|
27
97
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
98
|
close: (evt: MouseEvent) => void;
|
|
29
|
-
}, string, import("vue").
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
description: {
|
|
34
|
-
type: import("vue").PropType<string>;
|
|
99
|
+
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
100
|
+
$slots: {
|
|
101
|
+
title?(_: {}): any;
|
|
102
|
+
default?(_: {}): any;
|
|
35
103
|
};
|
|
36
|
-
|
|
37
|
-
type: import("vue").PropType<import("./types").TypeComponents>;
|
|
38
|
-
};
|
|
39
|
-
closable: {
|
|
40
|
-
type: import("vue").PropType<boolean>;
|
|
41
|
-
};
|
|
42
|
-
closeText: {
|
|
43
|
-
type: import("vue").PropType<string>;
|
|
44
|
-
};
|
|
45
|
-
showIcon: {
|
|
46
|
-
type: import("vue").PropType<boolean>;
|
|
47
|
-
};
|
|
48
|
-
center: {
|
|
49
|
-
type: import("vue").PropType<boolean>;
|
|
50
|
-
};
|
|
51
|
-
effect: {
|
|
52
|
-
type: import("vue").PropType<import("./types").alertEffects>;
|
|
53
|
-
};
|
|
54
|
-
}>> & Readonly<{
|
|
55
|
-
onClose?: ((evt: MouseEvent) => any) | undefined;
|
|
56
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
104
|
+
})> & Record<string, any>;
|
|
57
105
|
export default VftAlert;
|
|
@@ -62,9 +62,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
62
62
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
63
63
|
readonly effect?: "light" | "dark" | undefined;
|
|
64
64
|
readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
|
|
65
|
+
readonly visible?: boolean | undefined;
|
|
65
66
|
readonly teleported?: boolean | undefined;
|
|
66
67
|
readonly open?: boolean | undefined;
|
|
67
|
-
readonly visible?: boolean | undefined;
|
|
68
68
|
readonly arrowOffset?: number | undefined;
|
|
69
69
|
readonly gpuAcceleration?: boolean | undefined;
|
|
70
70
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -480,9 +480,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
480
480
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
481
481
|
readonly effect?: "light" | "dark" | undefined;
|
|
482
482
|
readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
|
|
483
|
+
readonly visible?: boolean | undefined;
|
|
483
484
|
readonly teleported?: boolean | undefined;
|
|
484
485
|
readonly open?: boolean | undefined;
|
|
485
|
-
readonly visible?: boolean | undefined;
|
|
486
486
|
readonly arrowOffset?: number | undefined;
|
|
487
487
|
readonly gpuAcceleration?: boolean | undefined;
|
|
488
488
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -86,9 +86,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
86
86
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
87
87
|
readonly effect?: "light" | "dark" | undefined;
|
|
88
88
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
89
|
+
readonly visible?: boolean | undefined;
|
|
89
90
|
readonly teleported?: boolean | undefined;
|
|
90
91
|
readonly open?: boolean | undefined;
|
|
91
|
-
readonly visible?: boolean | undefined;
|
|
92
92
|
readonly arrowOffset?: number | undefined;
|
|
93
93
|
readonly gpuAcceleration?: boolean | undefined;
|
|
94
94
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -504,9 +504,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
504
504
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
505
505
|
readonly effect?: "light" | "dark" | undefined;
|
|
506
506
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
507
|
+
readonly visible?: boolean | undefined;
|
|
507
508
|
readonly teleported?: boolean | undefined;
|
|
508
509
|
readonly open?: boolean | undefined;
|
|
509
|
-
readonly visible?: boolean | undefined;
|
|
510
510
|
readonly arrowOffset?: number | undefined;
|
|
511
511
|
readonly gpuAcceleration?: boolean | undefined;
|
|
512
512
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -1007,9 +1007,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1007
1007
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
1008
1008
|
readonly effect?: "light" | "dark" | undefined;
|
|
1009
1009
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
1010
|
+
readonly visible?: boolean | undefined;
|
|
1010
1011
|
readonly teleported?: boolean | undefined;
|
|
1011
1012
|
readonly open?: boolean | undefined;
|
|
1012
|
-
readonly visible?: boolean | undefined;
|
|
1013
1013
|
readonly arrowOffset?: number | undefined;
|
|
1014
1014
|
readonly gpuAcceleration?: boolean | undefined;
|
|
1015
1015
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -1425,9 +1425,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1425
1425
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
1426
1426
|
readonly effect?: "light" | "dark" | undefined;
|
|
1427
1427
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
1428
|
+
readonly visible?: boolean | undefined;
|
|
1428
1429
|
readonly teleported?: boolean | undefined;
|
|
1429
1430
|
readonly open?: boolean | undefined;
|
|
1430
|
-
readonly visible?: boolean | undefined;
|
|
1431
1431
|
readonly arrowOffset?: number | undefined;
|
|
1432
1432
|
readonly gpuAcceleration?: boolean | undefined;
|
|
1433
1433
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -1917,9 +1917,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1917
1917
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
1918
1918
|
readonly effect?: "light" | "dark" | undefined;
|
|
1919
1919
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
1920
|
+
readonly visible?: boolean | undefined;
|
|
1920
1921
|
readonly teleported?: boolean | undefined;
|
|
1921
1922
|
readonly open?: boolean | undefined;
|
|
1922
|
-
readonly visible?: boolean | undefined;
|
|
1923
1923
|
readonly arrowOffset?: number | undefined;
|
|
1924
1924
|
readonly gpuAcceleration?: boolean | undefined;
|
|
1925
1925
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -2335,9 +2335,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
2335
2335
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
2336
2336
|
readonly effect?: "light" | "dark" | undefined;
|
|
2337
2337
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
2338
|
+
readonly visible?: boolean | undefined;
|
|
2338
2339
|
readonly teleported?: boolean | undefined;
|
|
2339
2340
|
readonly open?: boolean | undefined;
|
|
2340
|
-
readonly visible?: boolean | undefined;
|
|
2341
2341
|
readonly arrowOffset?: number | undefined;
|
|
2342
2342
|
readonly gpuAcceleration?: boolean | undefined;
|
|
2343
2343
|
readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
|
|
@@ -4,7 +4,7 @@ export declare const VftCarousel: import("vft/es/utils").SFCWithInstall<{
|
|
|
4
4
|
type: import("vue").PropType<string | number>;
|
|
5
5
|
};
|
|
6
6
|
height: {
|
|
7
|
-
type: import("vue").PropType<string>;
|
|
7
|
+
type: import("vue").PropType<string | number>;
|
|
8
8
|
};
|
|
9
9
|
trigger: {
|
|
10
10
|
type: import("vue").PropType<"click" | "hover">;
|
|
@@ -60,7 +60,7 @@ export declare const VftCarousel: import("vft/es/utils").SFCWithInstall<{
|
|
|
60
60
|
type: import("vue").PropType<string | number>;
|
|
61
61
|
};
|
|
62
62
|
height: {
|
|
63
|
-
type: import("vue").PropType<string>;
|
|
63
|
+
type: import("vue").PropType<string | number>;
|
|
64
64
|
};
|
|
65
65
|
trigger: {
|
|
66
66
|
type: import("vue").PropType<"click" | "hover">;
|
|
@@ -111,7 +111,7 @@ export declare const VftCarousel: import("vft/es/utils").SFCWithInstall<{
|
|
|
111
111
|
type: import("vue").PropType<string | number>;
|
|
112
112
|
};
|
|
113
113
|
height: {
|
|
114
|
-
type: import("vue").PropType<string>;
|
|
114
|
+
type: import("vue").PropType<string | number>;
|
|
115
115
|
};
|
|
116
116
|
trigger: {
|
|
117
117
|
type: import("vue").PropType<"click" | "hover">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),b=require("lodash-es"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),b=require("lodash-es"),ne=require("@vueuse/core"),y=require("@vft/utils"),re=require("../../utils/error.cjs");require("../config-provider/hooks/use-global-config.cjs");const ae=require("../../constants/event.cjs"),le=require("../../utils/vue/vnode.cjs");require("../../hooks/use-model-toggle/index.cjs");const ue=require("../../hooks/use-ordered-children/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const E=require("./constants.cjs"),A=300,oe=(n,M,N)=>{const{children:u,addChild:O,removeChild:L,ChildrenSorter:H}=ue.useOrderedChildren(t.getCurrentInstance(),E.CAROUSEL_ITEM_NAME),_=t.useSlots(),a=t.ref(-1),s=t.ref(null),m=t.ref(!1),f=t.ref(),T=t.ref(0),c=t.ref(!0),R=t.computed(()=>n.arrow!=="never"&&!t.unref(v)),P=t.computed(()=>u.value.some(e=>e.props.label&&e.props.label?.toString().length>0)),I=t.computed(()=>n.type==="card"),v=t.computed(()=>n.direction==="vertical"),U=t.computed(()=>n.height!=="auto"?{height:n.height}:{height:y.addUnit(T.value),overflow:"hidden"}),z=b.throttle(e=>{i(e)},A,{trailing:!0}),B=b.throttle(e=>{J(e)},A),V=e=>c.value?a.value<=1?e<=1:e>1:!0;function h(){s.value&&(clearInterval(s.value),s.value=null)}function d(){n.interval<=0||!n.autoplay||s.value||(s.value=setInterval(()=>k(),n.interval))}const k=()=>{a.value<u.value.length-1?a.value=a.value+1:n.loop&&(a.value=0)};function i(e){if(y.isString(e)){const o=u.value.filter(C=>C.props.name===e);o.length>0&&(e=u.value.indexOf(o[0]))}if(e=Number(e),Number.isNaN(e)||e!==Math.floor(e)){re.debugWarn(N,"index must be integer.");return}const r=u.value.length,l=a.value;e<0?a.value=n.loop?r-1:0:e>=r?a.value=n.loop?0:r-1:a.value=e,l===a.value&&g(l),q()}function g(e){u.value.forEach((r,l)=>{r.translateItem(l,a.value,e)})}function j(e,r){const l=t.unref(u),o=l.length;if(o===0||!e.states.inStage)return!1;const C=r+1,$=r-1,w=o-1,x=l[w].states.active,p=l[0].states.active,ee=l[C]?.states?.active,te=l[$]?.states?.active;return r===w&&p||ee?"left":r===0&&x||te?"right":!1}function D(){m.value=!0,n.pauseOnHover&&h()}function F(){m.value=!1,d()}function G(e){t.unref(v)||u.value.forEach((r,l)=>{e===j(r,l)&&(r.states.hover=!0)})}function K(){t.unref(v)||u.value.forEach(e=>{e.states.hover=!1})}function W(e){a.value=e}function J(e){n.trigger==="hover"&&e!==a.value&&(a.value=e)}function Q(){i(a.value-1)}function X(){i(a.value+1)}function q(){h(),n.pauseOnHover||d()}function Y(e){n.height==="auto"&&(T.value=e)}function Z(){const e=_.default?.();if(!e)return null;const l=le.flattedChildren(e).filter(o=>t.isVNode(o)&&o.type.name===E.CAROUSEL_ITEM_NAME);return l?.length===2&&n.loop&&!I.value?(c.value=!0,l):(c.value=!1,null)}t.watch(()=>a.value,(e,r)=>{g(r),c.value&&(e=e%2,r=r%2),r>-1&&M(ae.CHANGE_EVENT,e,r)}),t.watch(()=>n.autoplay,e=>{e?d():h()}),t.watch(()=>n.loop,()=>{i(a.value)}),t.watch(()=>n.interval,()=>{q()});const S=t.shallowRef();return t.onMounted(()=>{t.watch(()=>u.value,()=>{u.value.length>0&&i(n.initialIndex)},{immediate:!0}),S.value=ne.useResizeObserver(f.value,()=>{g()}),d()}),t.onBeforeUnmount(()=>{h(),f.value&&S.value&&S.value.stop()}),t.provide(E.carouselContextKey,{root:f,isCardType:I,isVertical:v,items:u,loop:n.loop,cardScale:n.cardScale,addItem:O,removeItem:L,setActiveItem:i,setContainerHeight:Y}),{root:f,activeIndex:a,arrowDisplay:R,hasLabel:P,hover:m,isCardType:I,items:u,isVertical:v,containerStyle:U,isItemsTwoLength:c,handleButtonEnter:G,handleButtonLeave:K,handleIndicatorClick:W,handleMouseEnter:D,handleMouseLeave:F,setActiveItem:i,prev:Q,next:X,PlaceholderItem:Z,isTwoLengthShow:V,ItemsSorter:H,throttledArrowClick:z,throttledIndicatorHover:B}};exports.useCarousel=oe;
|
|
@@ -10,10 +10,10 @@ export declare const useCarousel: (props: CarouselProps, emit: any, componentNam
|
|
|
10
10
|
items: import("vue").ShallowRef<CarouselItemContext[], CarouselItemContext[]>;
|
|
11
11
|
isVertical: import("vue").ComputedRef<boolean>;
|
|
12
12
|
containerStyle: import("vue").ComputedRef<{
|
|
13
|
-
height: string | undefined;
|
|
13
|
+
height: string | number | undefined;
|
|
14
14
|
overflow?: undefined;
|
|
15
15
|
} | {
|
|
16
|
-
height: string;
|
|
16
|
+
height: string | undefined;
|
|
17
17
|
overflow: string;
|
|
18
18
|
}>;
|
|
19
19
|
isItemsTwoLength: import("vue").Ref<boolean, boolean>;
|