@keyblade/pro-components 1.13.8-alpha.2 → 1.13.8-alpha.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.
@@ -8,6 +8,8 @@ declare module 'vue' {
8
8
  KbProMenu: typeof import('./index')['ProMenu'];
9
9
  KbProPageContainer: typeof import('./index')['ProPageContainer'];
10
10
  KbProReuseTabs: typeof import('./index')['ProReuseTabs'];
11
+ KbProFooterBar: typeof import('./index')['ProFooterBar'];
12
+ KbProTextarea: typeof import('./index')['ProTextarea'];
11
13
  }
12
14
  }
13
15
  export {};
@@ -0,0 +1,7 @@
1
+ import { ProFooterBarProps } from './pro-footer-bar/inerface';
2
+ import { ProTextareaProps } from './pro-textarea';
3
+ export interface GlobalProps {
4
+ footerBar?: ProFooterBarProps;
5
+ textarea?: ProTextareaProps;
6
+ }
7
+ export declare const globalProps: GlobalProps;
@@ -0,0 +1,4 @@
1
+ const o = {};
2
+ export {
3
+ o as globalProps
4
+ };
package/es/index.d.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  import { App } from 'vue';
2
+ import { GlobalProps } from './global-props';
2
3
  declare const _default: {
3
- install(app: App): void;
4
+ install(app: App, options?: GlobalProps): void;
4
5
  };
5
6
  export default _default;
6
7
  export { default as ProPageHeader } from './pro-page-header';
7
8
  export { default as ProKeepAliveRouterView } from './pro-keep-alive-router-view';
8
9
  export { default as ProLayout } from './pro-layout';
10
+ export { default as ProFooterBar } from './pro-footer-bar';
9
11
  export { default as ProMenu } from './pro-menu';
10
12
  export type { IProMenuItem } from './pro-menu';
11
13
  export { default as ProPageContainer } from './pro-page-container';
@@ -14,5 +16,7 @@ export type { IProTab } from './pro-reuse-tabs';
14
16
  export { default as ProImageUpload } from './pro-image-upload';
15
17
  export * from './pro-image-upload';
16
18
  export { default as ProDateRangePicker } from './pro-date-range-picker';
19
+ export { default as ProTextarea } from './pro-textarea';
17
20
  export { default as ProTable } from './pro-table';
18
21
  export type {} from './components';
22
+ export * from './inerface';
package/es/index.js CHANGED
@@ -1,30 +1,35 @@
1
1
  import { ProPageHeader as e } from "./pro-page-header/index.js";
2
- import { ProKeepAliveRouterView as r } from "./pro-keep-alive-router-view/index.js";
3
- import { ProLayout as m } from "./pro-layout/index.js";
4
- import { ProMenu as t } from "./pro-menu/index.js";
5
- import { ProPageContainer as i } from "./pro-page-container/index.js";
6
- import { ProReuseTabs as s } from "./pro-reuse-tabs/index.js";
2
+ import { ProKeepAliveRouterView as m } from "./pro-keep-alive-router-view/index.js";
3
+ import { ProLayout as t } from "./pro-layout/index.js";
4
+ import { ProMenu as i } from "./pro-menu/index.js";
5
+ import { ProPageContainer as s } from "./pro-page-container/index.js";
6
+ import { ProReuseTabs as f } from "./pro-reuse-tabs/index.js";
7
7
  import { ProImageUpload as u } from "./pro-image-upload/index.js";
8
- import { ProDateRangePicker as f } from "./pro-date-range-picker/index.js";
9
- import { ProTable as a } from "./pro-table/index.js";
10
- import { EImageUploadInnerBeforeUploadStep as T } from "./pro-image-upload/types.js";
11
- import { defaultImageUploadOptions as v } from "./pro-image-upload/constant.js";
12
- const R = {
13
- install(o) {
14
- o.use(e), o.use(r), o.use(m), o.use(t), o.use(i), o.use(s), o.use(u), o.use(f), o.use(a);
8
+ import { ProDateRangePicker as a } from "./pro-date-range-picker/index.js";
9
+ import { ProTable as P } from "./pro-table/index.js";
10
+ import { ProTextarea as l } from "./pro-textarea/index.js";
11
+ import { ProFooterBar as n } from "./pro-footer-bar/index.js";
12
+ import { globalProps as d } from "./global-props.js";
13
+ import { EImageUploadInnerBeforeUploadStep as y } from "./pro-image-upload/types.js";
14
+ import { defaultImageUploadOptions as C } from "./pro-image-upload/constant.js";
15
+ const k = {
16
+ install(o, r) {
17
+ Object.assign(d, r || {}), o.use(e), o.use(m), o.use(t), o.use(n), o.use(i), o.use(s), o.use(f), o.use(u), o.use(a), o.use(l), o.use(P);
15
18
  }
16
19
  };
17
20
  export {
18
- T as EImageUploadInnerBeforeUploadStep,
19
- f as ProDateRangePicker,
21
+ y as EImageUploadInnerBeforeUploadStep,
22
+ a as ProDateRangePicker,
23
+ n as ProFooterBar,
20
24
  u as ProImageUpload,
21
- r as ProKeepAliveRouterView,
22
- m as ProLayout,
23
- t as ProMenu,
24
- i as ProPageContainer,
25
+ m as ProKeepAliveRouterView,
26
+ t as ProLayout,
27
+ i as ProMenu,
28
+ s as ProPageContainer,
25
29
  e as ProPageHeader,
26
- s as ProReuseTabs,
27
- a as ProTable,
28
- R as default,
29
- v as defaultImageUploadOptions
30
+ f as ProReuseTabs,
31
+ P as ProTable,
32
+ l as ProTextarea,
33
+ k as default,
34
+ C as defaultImageUploadOptions
30
35
  };
@@ -0,0 +1 @@
1
+ export * from './pro-footer-bar/inerface';
@@ -1,7 +1,7 @@
1
1
  import o from "./pro-date-range-picker.vue2.js";
2
2
  /* empty css */
3
- import e from "../_virtual/_plugin-vue_export-helper.js";
4
- const _ = /* @__PURE__ */ e(o, [["__scopeId", "data-v-960e2e33"]]);
3
+ import r from "../_virtual/_plugin-vue_export-helper.js";
4
+ const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-26a58e45"]]);
5
5
  export {
6
6
  _ as default
7
7
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as R, ref as m, computed as h, resolveComponent as y, createElementBlock as w, openBlock as N, normalizeClass as q, createVNode as n, mergeProps as c, withCtx as f, createTextVNode as A, toDisplayString as H, nextTick as D } from "vue";
1
+ import { defineComponent as R, ref as p, computed as y, resolveComponent as b, createElementBlock as w, openBlock as I, normalizeClass as N, createVNode as i, mergeProps as s, withCtx as c, createTextVNode as q, toDisplayString as A, nextTick as D } from "vue";
2
2
  import o from "dayjs";
3
- import { range as p } from "./pro-date-range-picker.js";
4
- const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
3
+ import { range as f } from "./pro-date-range-picker.js";
4
+ const H = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
5
5
  __name: "pro-date-range-picker",
6
6
  props: {
7
7
  modelValue: {},
@@ -17,7 +17,7 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
17
17
  },
18
18
  emits: ["update:modelValue"],
19
19
  setup(F, { emit: g }) {
20
- const e = F, V = g, k = m(), P = m(), i = m(), s = h({
20
+ const e = F, V = g, h = p(), P = p(), n = p(), u = y({
21
21
  get: () => e.modelValue[e.startField],
22
22
  set: (t) => {
23
23
  V("update:modelValue", {
@@ -25,7 +25,7 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
25
25
  [e.startField]: t
26
26
  });
27
27
  }
28
- }), b = h({
28
+ }), k = y({
29
29
  get: () => e.modelValue[e.endField],
30
30
  set: (t) => {
31
31
  V("update:modelValue", {
@@ -43,24 +43,24 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
43
43
  return e.modelValue[e.startField] ? (e.intraday && ((d = e.datePickerProps) != null && d.showTime) && t.setDate(t.getDate() + 1), o(t).isBefore(o(e.modelValue[e.startField]))) : !1;
44
44
  }, C = (t) => {
45
45
  if (!e.modelValue[e.startField] || !t || !e.intraday) {
46
- i.value = {};
46
+ n.value = {};
47
47
  return;
48
48
  }
49
49
  const a = o(e.modelValue[e.startField]), d = o(t);
50
50
  if (!a.isSame(d, "day")) {
51
- i.value = {};
51
+ n.value = {};
52
52
  return;
53
53
  }
54
- const l = a.hour(), r = a.minute(), _ = a.second();
55
- i.value = {
56
- disabledHours: () => p(0, l),
57
- disabledMinutes: (u) => u === l ? p(0, r) : [],
58
- disabledSeconds: (u, B) => u === l && B === r ? p(0, _) : []
54
+ const l = a.hour(), r = a.minute(), B = a.second();
55
+ n.value = {
56
+ disabledHours: () => f(0, l),
57
+ disabledMinutes: (m) => m === l ? f(0, r) : [],
58
+ disabledSeconds: (m, _) => m === l && _ === r ? f(0, B) : []
59
59
  };
60
60
  }, T = () => {
61
61
  setTimeout(() => {
62
62
  const t = e.modelValue[e.endField], a = e.modelValue[e.startField];
63
- o(a).isAfter(o(t)) && (s.value = t), t && !a && D(() => {
63
+ o(a).isAfter(o(t)) && (u.value = t), t && !a && D(() => {
64
64
  var l;
65
65
  const d = (l = P.value) == null ? void 0 : l.$el.parentElement.querySelector("input");
66
66
  d && d.click();
@@ -70,26 +70,26 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
70
70
  setTimeout(() => {
71
71
  e.modelValue[e.endField] && !e.modelValue[e.startField] && D(() => {
72
72
  var a;
73
- const t = (a = k.value) == null ? void 0 : a.$el.parentElement.querySelector("input");
73
+ const t = (a = h.value) == null ? void 0 : a.$el.parentElement.querySelector("input");
74
74
  t && t.click();
75
75
  });
76
76
  });
77
77
  };
78
78
  return (t, a) => {
79
- const d = y("a-date-picker"), l = y("a-form-item");
80
- return N(), w("div", {
81
- class: q(I)
79
+ const d = b("a-date-picker"), l = b("a-form-item");
80
+ return I(), w("div", {
81
+ class: N(H)
82
82
  }, [
83
- n(l, c(t.formItemProps, {
83
+ i(l, s(t.formItemProps, {
84
84
  field: t.startField,
85
85
  "hide-label": t.hideLabel
86
86
  }), {
87
- default: f(() => [
88
- n(d, c({
87
+ default: c(() => [
88
+ i(d, s({
89
89
  ref_key: "startDatePickerRef",
90
- ref: k,
91
- modelValue: s.value,
92
- "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r)
90
+ ref: h,
91
+ modelValue: u.value,
92
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => u.value = r)
93
93
  }, t.datePickerProps, {
94
94
  placeholder: t.startPlaceholder,
95
95
  "disabled-date": (r) => v(r),
@@ -98,33 +98,36 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
98
98
  ]),
99
99
  _: 1
100
100
  }, 16, ["field", "hide-label"]),
101
- n(l, { "hide-label": "" }, {
102
- default: f(() => [
103
- A(H(t.separator), 1)
101
+ i(l, {
102
+ "hide-label": "",
103
+ style: { "max-height": "32px", top: "0px" }
104
+ }, {
105
+ default: c(() => [
106
+ q(A(t.separator), 1)
104
107
  ]),
105
108
  _: 1
106
109
  }),
107
- n(l, {
110
+ i(l, s(t.formItemProps, {
108
111
  field: t.endField,
109
112
  "hide-label": "",
110
113
  style: { "margin-right": "0px" }
111
- }, {
112
- default: f(() => [
113
- n(d, c({
114
+ }), {
115
+ default: c(() => [
116
+ i(d, s({
114
117
  ref_key: "endDatePickerRef",
115
118
  ref: P,
116
- modelValue: b.value,
117
- "onUpdate:modelValue": a[1] || (a[1] = (r) => b.value = r)
119
+ modelValue: k.value,
120
+ "onUpdate:modelValue": a[1] || (a[1] = (r) => k.value = r)
118
121
  }, t.datePickerProps, {
119
122
  placeholder: t.endPlaceholder,
120
123
  "disabled-date": (r) => S(r),
121
- "disabled-time": () => i.value,
124
+ "disabled-time": () => n.value,
122
125
  onSelect: C,
123
126
  onChange: E
124
127
  }), null, 16, ["modelValue", "placeholder", "disabled-date", "disabled-time"])
125
128
  ]),
126
129
  _: 1
127
- }, 8, ["field"])
130
+ }, 16, ["field"])
128
131
  ]);
129
132
  };
130
133
  }
@@ -0,0 +1,38 @@
1
+ import { App } from 'vue';
2
+ declare const ProFooterBar: {
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./inerface').ProFooterBarProps> & Readonly<{
4
+ onBack?: (() => any) | undefined;
5
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
6
+ back: () => any;
7
+ }, import('vue').PublicProps, {
8
+ backText: string;
9
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
10
+ P: {};
11
+ B: {};
12
+ D: {};
13
+ C: {};
14
+ M: {};
15
+ Defaults: {};
16
+ }, Readonly<import('./inerface').ProFooterBarProps> & Readonly<{
17
+ onBack?: (() => any) | undefined;
18
+ }>, {}, {}, {}, {}, {
19
+ backText: string;
20
+ }>;
21
+ __isFragment?: never;
22
+ __isTeleport?: never;
23
+ __isSuspense?: never;
24
+ } & import('vue').ComponentOptionsBase<Readonly<import('./inerface').ProFooterBarProps> & Readonly<{
25
+ onBack?: (() => any) | undefined;
26
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
27
+ back: () => any;
28
+ }, string, {
29
+ backText: string;
30
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
31
+ $slots: {
32
+ default?(_: {}): any;
33
+ };
34
+ }) & {
35
+ install: (app: App) => void;
36
+ };
37
+ export { ProFooterBar };
38
+ export default ProFooterBar;
@@ -0,0 +1,11 @@
1
+ import r from "./index.vue.js";
2
+ import { Button as t, Space as e } from "@arco-design/web-vue";
3
+ const n = Object.assign(r, {
4
+ install: (o) => {
5
+ o.use(t), o.use(e), o.component("KbProFooterBar", r);
6
+ }
7
+ });
8
+ export {
9
+ n as ProFooterBar,
10
+ n as default
11
+ };
@@ -0,0 +1,24 @@
1
+ import { ProFooterBarProps } from './inerface';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: HTMLDivElement;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<ProFooterBarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
12
+ back: () => any;
13
+ }, string, import('vue').PublicProps, Readonly<ProFooterBarProps> & Readonly<{
14
+ onBack?: (() => any) | undefined;
15
+ }>, {
16
+ backText: string;
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
18
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
+ export default _default;
20
+ type __VLS_WithTemplateSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./index.vue2.js";
2
+ /* empty css */
3
+ import r from "../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f9d45b25"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -0,0 +1,44 @@
1
+ import { defineComponent as u, computed as f, resolveComponent as t, createElementBlock as B, openBlock as _, normalizeClass as b, createVNode as a, withCtx as n, withDirectives as h, renderSlot as v, createTextVNode as x, toDisplayString as C, vShow as g } from "vue";
2
+ import { globalProps as c } from "../global-props.js";
3
+ const w = "keyblade-pro-footer-bar", S = /* @__PURE__ */ u({
4
+ __name: "index",
5
+ props: {
6
+ hideBack: { type: Boolean },
7
+ backText: { default: "返回" },
8
+ onBack: {}
9
+ },
10
+ emits: ["back"],
11
+ setup(r, { emit: s }) {
12
+ const l = r, i = s, p = () => {
13
+ var e, o;
14
+ i("back"), (o = (e = c.footerBar) == null ? void 0 : e.onBack) == null || o.call(e);
15
+ }, d = f(() => {
16
+ var e;
17
+ return l.hideBack || ((e = c.footerBar) == null ? void 0 : e.hideBack);
18
+ });
19
+ return (e, o) => {
20
+ const m = t("a-button"), k = t("a-space");
21
+ return _(), B("div", {
22
+ class: b(w)
23
+ }, [
24
+ a(k, null, {
25
+ default: n(() => [
26
+ h(a(m, { onClick: p }, {
27
+ default: n(() => [
28
+ x(C(e.backText), 1)
29
+ ]),
30
+ _: 1
31
+ }, 512), [
32
+ [g, !d.value]
33
+ ]),
34
+ v(e.$slots, "default", {}, void 0, !0)
35
+ ]),
36
+ _: 3
37
+ })
38
+ ]);
39
+ };
40
+ }
41
+ });
42
+ export {
43
+ S as default
44
+ };
@@ -0,0 +1,7 @@
1
+ export interface ProFooterBarProps {
2
+ /** 是否隐藏返回按钮 */
3
+ hideBack?: boolean;
4
+ /** 返回按钮文字 */
5
+ backText?: string;
6
+ onBack?: () => void;
7
+ }
@@ -609,8 +609,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
609
609
  onCropperImgLoad?: ((value: File) => any) | undefined;
610
610
  }>, {
611
611
  name: string;
612
- accept: string[];
613
612
  disabled: boolean;
613
+ accept: string[];
614
614
  multiple: boolean;
615
615
  singleLimit: number;
616
616
  hideInnerBeforeUploadLoading: boolean;
@@ -528,8 +528,8 @@ declare const ProImageUpload: {
528
528
  cropperImgLoad: (value: File) => any;
529
529
  }, import('vue').PublicProps, {
530
530
  name: string;
531
- accept: string[];
532
531
  disabled: boolean;
532
+ accept: string[];
533
533
  multiple: boolean;
534
534
  singleLimit: number;
535
535
  hideInnerBeforeUploadLoading: boolean;
@@ -1103,8 +1103,8 @@ declare const ProImageUpload: {
1103
1103
  isUploadComplete: import('vue').ComputedRef<boolean>;
1104
1104
  }, {}, {}, {}, {
1105
1105
  name: string;
1106
- accept: string[];
1107
1106
  disabled: boolean;
1107
+ accept: string[];
1108
1108
  multiple: boolean;
1109
1109
  singleLimit: number;
1110
1110
  hideInnerBeforeUploadLoading: boolean;
@@ -1640,8 +1640,8 @@ declare const ProImageUpload: {
1640
1640
  cropperImgLoad: (value: File) => any;
1641
1641
  }, string, {
1642
1642
  name: string;
1643
- accept: string[];
1644
1643
  disabled: boolean;
1644
+ accept: string[];
1645
1645
  multiple: boolean;
1646
1646
  singleLimit: number;
1647
1647
  hideInnerBeforeUploadLoading: boolean;