@keyblade/pro-components 1.13.8-alpha.16 → 1.13.8-alpha.17

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.
@@ -2,10 +2,12 @@ import { ProFooterBarProps } from './pro-footer-bar/inerface';
2
2
  import { ProTableProps } from './pro-table/interface';
3
3
  import { ProTextareaProps } from './pro-textarea';
4
4
  import { ProDateRangePickerProps } from './pro-date-range-picker/inerface';
5
+ import { ProCalendarProps } from './pro-calendar';
5
6
  export interface GlobalProps {
6
7
  footerBar?: ProFooterBarProps;
7
8
  dateRangePicker?: ProDateRangePickerProps;
8
9
  textarea?: ProTextareaProps;
9
10
  table?: ProTableProps;
11
+ calendar?: ProCalendarProps;
10
12
  }
11
13
  export declare const globalProps: GlobalProps;
@@ -1,4 +1,4 @@
1
- import { ProCalendarProps } from './inerface';
1
+ import { IProCalendarProps } from './inerface';
2
2
  import { EMode } from './enum';
3
3
  declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
@@ -45,15 +45,19 @@ declare function __VLS_template(): {
45
45
  rootEl: HTMLDivElement;
46
46
  };
47
47
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
48
- declare const __VLS_component: import('vue').DefineComponent<ProCalendarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
48
+ declare const __VLS_component: import('vue').DefineComponent<IProCalendarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
49
49
  change: (date: Date) => any;
50
50
  "update:modelValue": (date: Date) => any;
51
51
  panelChange: (date: Date) => any;
52
- }, string, import('vue').PublicProps, Readonly<ProCalendarProps> & Readonly<{
52
+ }, string, import('vue').PublicProps, Readonly<IProCalendarProps> & Readonly<{
53
53
  onChange?: ((date: Date) => any) | undefined;
54
54
  "onUpdate:modelValue"?: ((date: Date) => any) | undefined;
55
55
  onPanelChange?: ((date: Date) => any) | undefined;
56
56
  }>, {
57
+ header: boolean | {
58
+ hideLeft?: boolean;
59
+ hideRight?: boolean;
60
+ };
57
61
  dayStartOfWeek: 0 | 1;
58
62
  isWeek: boolean;
59
63
  panel: boolean;
@@ -1,21 +1,24 @@
1
- import { defineComponent as J, useSlots as K, ref as g, computed as r, watch as L, createElementBlock as v, openBlock as m, mergeProps as Q, createVNode as R, createCommentVNode as y, createSlots as $, withCtx as B, unref as u, renderSlot as b, normalizeClass as k, createBlock as O, toDisplayString as U } from "vue";
1
+ import { defineComponent as K, useSlots as L, ref as g, computed as r, watch as Q, createElementBlock as c, openBlock as m, mergeProps as R, createVNode as U, createCommentVNode as y, createSlots as Y, withCtx as $, unref as u, renderSlot as b, normalizeClass as k, createBlock as O, toDisplayString as X } from "vue";
2
2
  import "dayjs";
3
- import X from "./month.vue.js";
4
- import Z from "./year.vue.js";
5
- import x from "./header.vue.js";
6
- import { getDayjsValue as P, getNow as ee, pickDataAttributes as ae, methods as c } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/_utils/date.js";
7
- import { getPrefixCls as te } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/_utils/global-config.js";
8
- import { useI18n as oe } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/locale/index.js";
9
- import { getAllDaysByTime as le } from "./month.js";
10
- import { EMode as t } from "./enum.js";
11
- const ce = /* @__PURE__ */ J({
3
+ import Z from "./month.vue.js";
4
+ import x from "./year.vue.js";
5
+ import ee from "./header.vue.js";
6
+ import { getDayjsValue as P, getNow as ae, pickDataAttributes as te, methods as v } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/_utils/date.js";
7
+ import { getPrefixCls as oe } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/_utils/global-config.js";
8
+ import { useI18n as le } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/locale/index.js";
9
+ import { getAllDaysByTime as ne } from "./month.js";
10
+ import { EMode as o } from "./enum.js";
11
+ import { conclude as re } from "vue-global-config";
12
+ import { globalProps as ue } from "../global-props.js";
13
+ const we = /* @__PURE__ */ K({
12
14
  __name: "calendar",
13
15
  props: {
14
16
  modelValue: {},
15
17
  defaultValue: {},
16
18
  mode: {},
17
- defaultMode: { default: t.month },
18
- modes: { default: () => [t.month, t.year] },
19
+ defaultMode: { default: o.month },
20
+ modes: { default: () => [o.month, o.year] },
21
+ header: { type: [Boolean, Object], default: !0 },
19
22
  allowSelect: { type: Boolean, default: !0 },
20
23
  panel: { type: Boolean, default: !1 },
21
24
  panelWidth: {},
@@ -26,15 +29,15 @@ const ce = /* @__PURE__ */ J({
26
29
  emits: ["update:modelValue", "change", "panelChange"],
27
30
  setup(_, { emit: A }) {
28
31
  function N(e, l) {
29
- return e === t.month || e === t.year && !l ? "YYYY-MM-DD" : "YYYY-MM";
32
+ return e === o.month || e === o.year && !l ? "YYYY-MM-DD" : "YYYY-MM";
30
33
  }
31
- const o = _, s = A, w = K(), d = te("calendar"), { t: h } = oe(), S = g(o.defaultMode), n = r(() => o.mode ? o.mode : S.value), C = r(() => N(n.value, o.panel)), D = g(P(o.defaultValue || Date.now(), C.value)), p = r(() => o.modelValue ? P(o.modelValue, C.value) : D.value), a = g(p.value || ee());
32
- L(p, (e) => {
34
+ const t = _, s = A, w = L(), d = oe("calendar"), { t: h } = le(), S = g(t.defaultMode), n = r(() => t.mode ? t.mode : S.value), C = r(() => N(n.value, t.panel)), D = g(P(t.defaultValue || Date.now(), C.value)), p = r(() => t.modelValue ? P(t.modelValue, C.value) : D.value), a = g(p.value || ae());
35
+ Q(p, (e) => {
33
36
  a.value = e;
34
37
  });
35
- const V = r(() => le(a.value, {
36
- dayStartOfWeek: o.dayStartOfWeek,
37
- isWeek: o.isWeek
38
+ const V = r(() => ne(a.value, {
39
+ dayStartOfWeek: t.dayStartOfWeek,
40
+ isWeek: t.isWeek
38
41
  }));
39
42
  function T(e) {
40
43
  a.value = e, s("panelChange", e.toDate());
@@ -45,16 +48,16 @@ const ce = /* @__PURE__ */ J({
45
48
  function M(e, l = !1) {
46
49
  l || W(e);
47
50
  }
48
- const E = r(() => n.value === t.month ? h("calendar.formatMonth") : n.value === t.year ? h("calendar.formatYear") : "");
49
- function F(e, l) {
50
- e.includes("prev") && (a.value = c.subtract(a.value, 1, l)), e.includes("next") && (a.value = c.add(a.value, 1, l)), s("panelChange", a.value.toDate());
51
+ const j = r(() => n.value === o.month ? h("calendar.formatMonth") : n.value === o.year ? h("calendar.formatYear") : "");
52
+ function E(e, l) {
53
+ e.includes("prev") && (a.value = v.subtract(a.value, 1, l)), e.includes("next") && (a.value = v.add(a.value, 1, l)), s("panelChange", a.value.toDate());
51
54
  }
52
- function j(e) {
53
- const l = c.set(a.value, t.year, e);
55
+ function F(e) {
56
+ const l = v.set(a.value, o.year, e);
54
57
  a.value = l, s("panelChange", l.toDate());
55
58
  }
56
59
  function z(e) {
57
- const l = c.set(a.value, t.month, e - 1);
60
+ const l = v.set(a.value, o.month, e - 1);
58
61
  a.value = l, s("panelChange", l.toDate());
59
62
  }
60
63
  function H(e) {
@@ -62,31 +65,35 @@ const ce = /* @__PURE__ */ J({
62
65
  }
63
66
  const I = r(() => [
64
67
  d,
65
- n.value === t.month ? `${d}-mode-month` : `${d}-mode-year`,
68
+ n.value === o.month ? `${d}-mode-month` : `${d}-mode-year`,
66
69
  {
67
- [`${d}-panel`]: o.panel && (n.value === t.month || n.value === t.year)
70
+ [`${d}-panel`]: t.panel && (n.value === o.month || n.value === o.year)
68
71
  }
69
- ]), q = r(() => o.panel ? { width: o.panelWidth } : {}), G = r(() => ae(o));
70
- return (e, l) => (m(), v("div", Q({
72
+ ]), q = r(() => t.panel ? { width: t.panelWidth } : {}), G = r(() => te(t)), J = r(() => {
73
+ var e;
74
+ return re([t.header, ((e = ue.calendar) == null ? void 0 : e.header) || {}]);
75
+ });
76
+ return (e, l) => (m(), c("div", R({
71
77
  class: I.value,
72
78
  style: q.value
73
79
  }, G.value), [
74
- R(x, {
80
+ U(ee, {
81
+ header: J.value,
75
82
  move: W,
76
- "header-value-format": E.value,
83
+ "header-value-format": j.value,
77
84
  modes: e.modes,
78
85
  mode: n.value,
79
86
  "page-show-data": a.value,
80
87
  "day-start-of-week": e.dayStartOfWeek,
81
88
  "is-week": e.isWeek,
82
89
  onModeChange: H,
83
- onYearChange: j,
90
+ onYearChange: F,
84
91
  onMonthChange: z,
85
- onChangePageShowDate: F
86
- }, $({ _: 2 }, [
92
+ onChangePageShowDate: E
93
+ }, Y({ _: 2 }, [
87
94
  u(w).header ? {
88
95
  name: "default",
89
- fn: B(({ year: f, month: i }) => [
96
+ fn: $(({ year: f, month: i }) => [
90
97
  b(e.$slots, "header", {
91
98
  value: { year: f, month: i },
92
99
  year: f.toString(),
@@ -95,12 +102,12 @@ const ce = /* @__PURE__ */ J({
95
102
  ]),
96
103
  key: "0"
97
104
  } : void 0
98
- ]), 1032, ["header-value-format", "modes", "mode", "page-show-data", "day-start-of-week", "is-week"]),
99
- n.value === u(t).month ? (m(), v("div", {
105
+ ]), 1032, ["header", "header-value-format", "modes", "mode", "page-show-data", "day-start-of-week", "is-week"]),
106
+ n.value === u(o).month ? (m(), c("div", {
100
107
  key: 0,
101
108
  class: k(`${u(d)}-body`)
102
109
  }, [
103
- (m(), O(X, {
110
+ (m(), O(Z, {
104
111
  key: a.value.month(),
105
112
  "page-data": V.value,
106
113
  value: p.value,
@@ -109,26 +116,26 @@ const ce = /* @__PURE__ */ J({
109
116
  "is-week": e.isWeek,
110
117
  "day-start-of-week": e.dayStartOfWeek,
111
118
  "page-show-date": a.value
112
- }, $({ _: 2 }, [
119
+ }, Y({ _: 2 }, [
113
120
  u(w).default ? {
114
121
  name: "default",
115
- fn: B(({ year: f, month: i, date: Y }) => [
122
+ fn: $(({ year: f, month: i, date: B }) => [
116
123
  b(e.$slots, "default", {
117
124
  year: f.toString(),
118
125
  month: i.toString().padStart(2, "0"),
119
- date: Y.toString().padStart(2, "0"),
120
- value: { year: f, month: i, date: Y }
126
+ date: B.toString().padStart(2, "0"),
127
+ value: { year: f, month: i, date: B }
121
128
  })
122
129
  ]),
123
130
  key: "0"
124
131
  } : void 0
125
132
  ]), 1032, ["page-data", "value", "mode", "is-week", "day-start-of-week", "page-show-date"]))
126
133
  ], 2)) : y("", !0),
127
- n.value === u(t).year ? (m(), v("div", {
134
+ n.value === u(o).year ? (m(), c("div", {
128
135
  key: 1,
129
136
  class: k(`${u(d)}-body`)
130
137
  }, [
131
- (m(), O(Z, {
138
+ (m(), O(x, {
132
139
  key: a.value.year(),
133
140
  "page-data": V.value,
134
141
  "page-show-data": a.value,
@@ -139,13 +146,13 @@ const ce = /* @__PURE__ */ J({
139
146
  "select-handler": M
140
147
  }, null, 8, ["page-data", "page-show-data", "mode", "is-week", "value", "day-start-of-week"]))
141
148
  ], 2)) : y("", !0),
142
- e.panel && e.panelTodayBtn ? (m(), v("div", {
149
+ e.panel && e.panelTodayBtn ? (m(), c("div", {
143
150
  key: 2,
144
151
  class: k(`${u(d)}-footer-btn-wrapper`)
145
- }, U(u(h)("today")), 3)) : y("", !0)
152
+ }, X(u(h)("today")), 3)) : y("", !0)
146
153
  ], 16));
147
154
  }
148
155
  });
149
156
  export {
150
- ce as default
157
+ we as default
151
158
  };
@@ -17,18 +17,15 @@ interface Props {
17
17
  onChangePageShowDate: (type: 'prev' | 'next', unit: EMode) => void;
18
18
  onModeChange: (value: any, ev: Event) => void;
19
19
  headerValueFormat: string;
20
- }
21
- declare function __VLS_template(): {
22
- attrs: Partial<{}>;
23
- slots: {
24
- default?(_: {
25
- year: number;
26
- month: number;
27
- }): any;
20
+ /**
21
+ * @zh 隐藏头部
22
+ */
23
+ header?: boolean | {
24
+ hideLeft?: boolean;
25
+ hideRight?: boolean;
28
26
  };
29
- refs: {};
30
- rootEl: HTMLDivElement;
31
- };
27
+ }
28
+ declare function __VLS_template(): void;
32
29
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
33
30
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
34
31
  yearChange: (year: number) => any;
@@ -36,7 +33,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
36
33
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
37
34
  onYearChange?: ((year: number) => any) | undefined;
38
35
  onMonthChange?: ((month: number) => any) | undefined;
39
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
36
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
40
37
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
41
38
  export default _default;
42
39
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,16 +1,16 @@
1
- import { defineComponent as F, useSlots as M, computed as s, createElementBlock as u, openBlock as i, normalizeClass as n, unref as e, createElementVNode as p, createVNode as m, Fragment as h, createBlock as N, createCommentVNode as B, renderSlot as P, createTextVNode as c, toDisplayString as y, withCtx as V } from "vue";
1
+ import { defineComponent as P, useSlots as V, computed as s, withDirectives as h, createElementBlock as m, openBlock as i, normalizeClass as n, unref as o, createElementVNode as p, createVNode as d, Fragment as g, createBlock as z, createCommentVNode as T, renderSlot as Y, createTextVNode as k, toDisplayString as w, withCtx as E, vShow as f } from "vue";
2
2
  import "dayjs";
3
- import C from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/select/index.js";
4
- import z from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/button/index.js";
5
- import T from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/radio/index.js";
6
- import Y from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/icon/icon-left/index.js";
7
- import E from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/icon/icon-right/index.js";
8
- import { getNow as I } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/_utils/date.js";
9
- import { isArray as O } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/_utils/is.js";
10
- import { getPrefixCls as R } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/_utils/global-config.js";
11
- import { useI18n as W } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/locale/index.js";
12
- import { EMode as f } from "./enum.js";
13
- const x = /* @__PURE__ */ F({
3
+ import $ from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/select/index.js";
4
+ import I from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/button/index.js";
5
+ import O from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/radio/index.js";
6
+ import R from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/icon/icon-left/index.js";
7
+ import L from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/icon/icon-right/index.js";
8
+ import { getNow as W } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/_utils/date.js";
9
+ import { isArray as j } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/_utils/is.js";
10
+ import { getPrefixCls as A } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/_utils/global-config.js";
11
+ import { useI18n as G } from "../node_modules/.pnpm/@arco-design_web-vue@2.53.3_vue@3.5.13_typescript@5.8.2_/node_modules/@arco-design/web-vue/es/locale/index.js";
12
+ import { EMode as v } from "./enum.js";
13
+ const ae = /* @__PURE__ */ P({
14
14
  __name: "header",
15
15
  props: {
16
16
  mode: {},
@@ -25,98 +25,112 @@ const x = /* @__PURE__ */ F({
25
25
  onMonthChange: { type: Function },
26
26
  onChangePageShowDate: { type: Function },
27
27
  onModeChange: { type: Function },
28
- headerValueFormat: {}
28
+ headerValueFormat: {},
29
+ header: { type: [Boolean, Object] }
29
30
  },
30
31
  emits: ["yearChange", "monthChange"],
31
- setup(k) {
32
- const r = k, S = M(), t = R("calendar"), { t: g } = W(), w = s(() => O(r.modes) ? r.modes.map((o) => ({
33
- label: g(`datePicker.view.${o}`),
34
- value: o
35
- })) : []), $ = s(() => r.headerType === "select"), l = s(() => r.pageShowData.year()), v = s(() => r.pageShowData.month() + 1), D = s(() => {
36
- const o = [l.value];
32
+ setup(D) {
33
+ const r = D, b = V(), t = A("calendar"), { t: c } = G(), F = s(() => j(r.modes) ? r.modes.map((e) => ({
34
+ label: c(`datePicker.view.${e}`),
35
+ value: e
36
+ })) : []), B = s(() => r.headerType === "select"), l = s(() => r.pageShowData.year()), y = s(() => r.pageShowData.month() + 1), M = s(() => {
37
+ const e = [l.value];
37
38
  for (let a = 1; a <= 10; a++)
38
- o.unshift(l.value - a);
39
+ e.unshift(l.value - a);
39
40
  for (let a = 1; a < 10; a++)
40
- o.push(l.value + a);
41
- return o;
42
- }), b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
43
- return (o, a) => (i(), u("div", {
44
- class: n(`${e(t)}-header`)
45
- }, [
46
- p("div", {
47
- class: n(`${e(t)}-header-left`)
41
+ e.push(l.value + a);
42
+ return e;
43
+ }), N = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
44
+ return (e, a) => {
45
+ var C, S;
46
+ return h((i(), m("div", {
47
+ class: n(`${o(t)}-header`)
48
48
  }, [
49
- $.value ? (i(), u(h, { key: 0 }, [
50
- m(e(C), {
49
+ h(p("div", {
50
+ class: n(`${o(t)}-header-left`)
51
+ }, [
52
+ B.value ? (i(), m(g, { key: 0 }, [
53
+ d(o($), {
54
+ size: "small",
55
+ class: n(`${o(t)}-header-value-year`),
56
+ "default-value": l.value,
57
+ options: M.value,
58
+ onChange: a[0] || (a[0] = (u) => {
59
+ console.log("change"), e.onYearChange(Number(u));
60
+ }),
61
+ "popup-container": `${o(t)}-header`
62
+ }, null, 8, ["class", "default-value", "options", "popup-container"]),
63
+ e.mode === o(v).month ? (i(), z(o($), {
64
+ key: 0,
65
+ size: "small",
66
+ class: n(`${o(t)}-header-value-month`),
67
+ "default-value": y.value,
68
+ options: N,
69
+ onChange: a[1] || (a[1] = (u) => {
70
+ console.log("change"), e.onMonthChange(Number(u));
71
+ }),
72
+ "popup-container": `${o(t)}-header`
73
+ }, null, 8, ["class", "default-value", "popup-container"])) : T("", !0)
74
+ ], 64)) : (i(), m(g, { key: 1 }, [
75
+ p("div", {
76
+ class: n(`${o(t)}-header-icon`),
77
+ role: "button",
78
+ tabindex: "0",
79
+ onClick: a[2] || (a[2] = () => e.onChangePageShowDate("prev", e.mode || o(v).month))
80
+ }, [
81
+ d(o(R))
82
+ ], 2),
83
+ p("div", {
84
+ class: n(`${o(t)}-header-value`)
85
+ }, [
86
+ o(b).default ? Y(e.$slots, "default", {
87
+ key: 0,
88
+ year: l.value,
89
+ month: y.value
90
+ }) : (i(), m(g, { key: 1 }, [
91
+ k(w(e.pageShowData.format(e.headerValueFormat)), 1)
92
+ ], 64))
93
+ ], 2),
94
+ p("div", {
95
+ role: "button",
96
+ tabindex: "0",
97
+ class: n(`${o(t)}-header-icon`),
98
+ onClick: a[3] || (a[3] = () => e.onChangePageShowDate("next", e.mode || o(v).month))
99
+ }, [
100
+ d(o(L))
101
+ ], 2)
102
+ ], 64)),
103
+ d(o(I), {
51
104
  size: "small",
52
- class: n(`${e(t)}-header-value-year`),
53
- "default-value": l.value,
54
- options: D.value,
55
- onChange: a[0] || (a[0] = (d) => o.onYearChange(Number(d))),
56
- "popup-container": `${e(t)}-header`
57
- }, null, 8, ["class", "default-value", "options", "popup-container"]),
58
- o.mode === e(f).month ? (i(), N(e(C), {
59
- key: 0,
105
+ onClick: a[4] || (a[4] = () => e.move(o(W)()))
106
+ }, {
107
+ default: E(() => [
108
+ k(w(o(c)("datePicker.today")), 1)
109
+ ]),
110
+ _: 1
111
+ })
112
+ ], 2), [
113
+ [f, !((C = e.header) != null && C.hideLeft)]
114
+ ]),
115
+ h(p("div", {
116
+ class: n(`${o(t)}-header-right`)
117
+ }, [
118
+ d(o(O).Group, {
60
119
  size: "small",
61
- class: n(`${e(t)}-header-value-month`),
62
- "default-value": v.value,
63
- options: b,
64
- onChange: a[1] || (a[1] = (d) => o.onMonthChange(Number(d))),
65
- "popup-container": `${e(t)}-header`
66
- }, null, 8, ["class", "default-value", "popup-container"])) : B("", !0)
67
- ], 64)) : (i(), u(h, { key: 1 }, [
68
- p("div", {
69
- class: n(`${e(t)}-header-icon`),
70
- role: "button",
71
- tabindex: "0",
72
- onClick: a[2] || (a[2] = () => o.onChangePageShowDate("prev", o.mode || e(f).month))
73
- }, [
74
- m(e(Y))
75
- ], 2),
76
- p("div", {
77
- class: n(`${e(t)}-header-value`)
78
- }, [
79
- e(S).default ? P(o.$slots, "default", {
80
- key: 0,
81
- year: l.value,
82
- month: v.value
83
- }) : (i(), u(h, { key: 1 }, [
84
- c(y(o.pageShowData.format(o.headerValueFormat)), 1)
85
- ], 64))
86
- ], 2),
87
- p("div", {
88
- role: "button",
89
- tabindex: "0",
90
- class: n(`${e(t)}-header-icon`),
91
- onClick: a[3] || (a[3] = () => o.onChangePageShowDate("next", o.mode || e(f).month))
92
- }, [
93
- m(e(E))
94
- ], 2)
95
- ], 64)),
96
- m(e(z), {
97
- size: "small",
98
- onClick: a[4] || (a[4] = () => o.move(e(I)()))
99
- }, {
100
- default: V(() => [
101
- c(y(e(g)("datePicker.today")), 1)
102
- ]),
103
- _: 1
104
- })
105
- ], 2),
106
- p("div", {
107
- class: n(`${e(t)}-header-right`)
108
- }, [
109
- m(e(T).Group, {
110
- size: "small",
111
- type: "button",
112
- options: w.value,
113
- onChange: o.onModeChange,
114
- "model-value": o.mode
115
- }, null, 8, ["options", "onChange", "model-value"])
116
- ], 2)
117
- ], 2));
120
+ type: "button",
121
+ options: F.value,
122
+ onChange: e.onModeChange,
123
+ "model-value": e.mode
124
+ }, null, 8, ["options", "onChange", "model-value"])
125
+ ], 2), [
126
+ [f, !((S = e.header) != null && S.hideRight)]
127
+ ])
128
+ ], 2)), [
129
+ [f, e.header]
130
+ ]);
131
+ };
118
132
  }
119
133
  });
120
134
  export {
121
- x as default
135
+ ae as default
122
136
  };
@@ -3,7 +3,7 @@ import { ArcoOptions } from '@arco-design/web-vue/es/_utils/types';
3
3
  import { default as _ProCalendar } from './calendar.vue';
4
4
  import { ProCalendarProps } from './inerface';
5
5
  declare const ProCalendar: {
6
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<ProCalendarProps> & Readonly<{
6
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./inerface').IProCalendarProps> & Readonly<{
7
7
  onChange?: ((date: Date) => any) | undefined;
8
8
  "onUpdate:modelValue"?: ((date: Date) => any) | undefined;
9
9
  onPanelChange?: ((date: Date) => any) | undefined;
@@ -12,6 +12,10 @@ declare const ProCalendar: {
12
12
  "update:modelValue": (date: Date) => any;
13
13
  panelChange: (date: Date) => any;
14
14
  }, import('vue').PublicProps, {
15
+ header: boolean | {
16
+ hideLeft?: boolean;
17
+ hideRight?: boolean;
18
+ };
15
19
  dayStartOfWeek: 0 | 1;
16
20
  isWeek: boolean;
17
21
  panel: boolean;
@@ -26,11 +30,15 @@ declare const ProCalendar: {
26
30
  C: {};
27
31
  M: {};
28
32
  Defaults: {};
29
- }, Readonly<ProCalendarProps> & Readonly<{
33
+ }, Readonly<import('./inerface').IProCalendarProps> & Readonly<{
30
34
  onChange?: ((date: Date) => any) | undefined;
31
35
  "onUpdate:modelValue"?: ((date: Date) => any) | undefined;
32
36
  onPanelChange?: ((date: Date) => any) | undefined;
33
37
  }>, {}, {}, {}, {}, {
38
+ header: boolean | {
39
+ hideLeft?: boolean;
40
+ hideRight?: boolean;
41
+ };
34
42
  dayStartOfWeek: 0 | 1;
35
43
  isWeek: boolean;
36
44
  panel: boolean;
@@ -42,7 +50,7 @@ declare const ProCalendar: {
42
50
  __isFragment?: never;
43
51
  __isTeleport?: never;
44
52
  __isSuspense?: never;
45
- } & import('vue').ComponentOptionsBase<Readonly<ProCalendarProps> & Readonly<{
53
+ } & import('vue').ComponentOptionsBase<Readonly<import('./inerface').IProCalendarProps> & Readonly<{
46
54
  onChange?: ((date: Date) => any) | undefined;
47
55
  "onUpdate:modelValue"?: ((date: Date) => any) | undefined;
48
56
  onPanelChange?: ((date: Date) => any) | undefined;
@@ -51,6 +59,10 @@ declare const ProCalendar: {
51
59
  "update:modelValue": (date: Date) => any;
52
60
  panelChange: (date: Date) => any;
53
61
  }, string, {
62
+ header: boolean | {
63
+ hideLeft?: boolean;
64
+ hideRight?: boolean;
65
+ };
54
66
  dayStartOfWeek: 0 | 1;
55
67
  isWeek: boolean;
56
68
  panel: boolean;
@@ -1,5 +1,5 @@
1
1
  import { EMode } from './enum';
2
- export interface ProCalendarProps {
2
+ export interface IProCalendarProps {
3
3
  /**
4
4
  * @zh 绑定值
5
5
  * @en Value
@@ -25,6 +25,13 @@ export interface ProCalendarProps {
25
25
  * @en Displayed mode
26
26
  */
27
27
  modes?: (EMode.month | EMode.year)[];
28
+ /**
29
+ * @zh 隐藏头部
30
+ */
31
+ header?: boolean | {
32
+ hideLeft?: boolean;
33
+ hideRight?: boolean;
34
+ };
28
35
  allowSelect?: boolean;
29
36
  panel?: boolean;
30
37
  panelWidth?: number;
@@ -32,3 +39,4 @@ export interface ProCalendarProps {
32
39
  dayStartOfWeek?: 0 | 1;
33
40
  isWeek?: boolean;
34
41
  }
42
+ export type ProCalendarProps = Partial<IProCalendarProps>;
@@ -11,7 +11,7 @@ interface Props {
11
11
  mode?: EMode;
12
12
  pageShowDate: Dayjs;
13
13
  panel?: boolean;
14
- dayStartOfWeek: 0 | 1;
14
+ dayStartOfWeek?: 0 | 1;
15
15
  isWeek?: boolean;
16
16
  }
17
17
  declare function __VLS_template(): {
@@ -41,7 +41,7 @@ const M = ["onClick"], R = ["onClick"], J = /* @__PURE__ */ C({
41
41
  const $ = f(() => typeof l.current == "number" ? F(
42
42
  Y(`${h}-${H(l.current + 1, 2, "0")}-01`),
43
43
  {
44
- dayStartOfWeek: l.dayStartOfWeek,
44
+ dayStartOfWeek: l.dayStartOfWeek || 0,
45
45
  isWeek: l.isWeek
46
46
  }
47
47
  ) : l.pageData);
@@ -3,7 +3,7 @@ import { EMode } from './enum';
3
3
  interface Props {
4
4
  /** 模式 */
5
5
  mode: EMode.month | EMode.year;
6
- dayStartOfWeek: 0 | 1;
6
+ dayStartOfWeek?: 0 | 1;
7
7
  value: Dayjs;
8
8
  isWeek?: boolean;
9
9
  panel?: boolean;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@keyblade/pro-components",
3
3
  "description": "KeyBlade Pro Components",
4
4
  "author": "yangshuai <704807396@qq.com>",
5
- "version": "1.13.8-alpha.16",
5
+ "version": "1.13.8-alpha.17",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",