@aplus-frontend/ui 0.4.4 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/es/index.mjs +51 -49
  2. package/es/src/ap-field/date/index.vue.d.ts +1 -0
  3. package/es/src/ap-field/date/index.vue.mjs +22 -15
  4. package/es/src/ap-field/interface.d.ts +5 -0
  5. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +55 -55
  6. package/es/src/ap-table/constants.d.ts +3 -0
  7. package/es/src/ap-table/hooks/use-table-column-state.d.ts +2 -2
  8. package/es/src/ap-table/hooks/use-table-column-state.mjs +92 -92
  9. package/es/src/business/ap-select-layout/select-layout.vue2.mjs +52 -56
  10. package/es/src/business/ap-summary/ap-summary.vue.d.ts +0 -1
  11. package/es/src/business/ap-summary/ap-summary.vue2.mjs +36 -35
  12. package/es/src/business/ap-summary/index.d.ts +0 -3
  13. package/es/src/business/batch-input-group/form-item.vue.d.ts +10 -1
  14. package/es/src/business/batch-input-group/form-item.vue.mjs +50 -49
  15. package/es/src/business/batch-input-group/interface.d.ts +5 -0
  16. package/es/src/index.mjs +48 -46
  17. package/es/src/locale/lang/en.mjs +3 -0
  18. package/es/src/locale/lang/zh-cn.mjs +3 -0
  19. package/es/src/scroll-bar/index.d.ts +1 -0
  20. package/es/src/scroll-bar/index.mjs +4 -0
  21. package/es/src/scroll-bar/index.vue.d.ts +6 -5
  22. package/es/src/scroll-bar/index.vue.mjs +51 -38
  23. package/es/src/scroll-bar/interface.d.ts +1 -1
  24. package/es/src/scroll-bar/internal.vue.d.ts +1 -1
  25. package/es/src/scroll-bar/utils/index.d.ts +7 -0
  26. package/es/src/scroll-bar/utils/index.mjs +16 -11
  27. package/lib/index.js +1 -1
  28. package/lib/src/ap-field/date/index.vue.d.ts +1 -0
  29. package/lib/src/ap-field/date/index.vue.js +1 -1
  30. package/lib/src/ap-field/interface.d.ts +5 -0
  31. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  32. package/lib/src/ap-table/constants.d.ts +3 -0
  33. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +2 -2
  34. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  35. package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
  36. package/lib/src/business/ap-summary/ap-summary.vue.d.ts +0 -1
  37. package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
  38. package/lib/src/business/ap-summary/index.d.ts +0 -3
  39. package/lib/src/business/batch-input-group/form-item.vue.d.ts +10 -1
  40. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  41. package/lib/src/business/batch-input-group/interface.d.ts +5 -0
  42. package/lib/src/index.js +1 -1
  43. package/lib/src/locale/lang/en.js +1 -1
  44. package/lib/src/locale/lang/zh-cn.js +1 -1
  45. package/lib/src/scroll-bar/index.d.ts +1 -0
  46. package/lib/src/scroll-bar/index.js +1 -1
  47. package/lib/src/scroll-bar/index.vue.d.ts +6 -5
  48. package/lib/src/scroll-bar/index.vue.js +1 -1
  49. package/lib/src/scroll-bar/interface.d.ts +1 -1
  50. package/lib/src/scroll-bar/internal.vue.d.ts +1 -1
  51. package/lib/src/scroll-bar/utils/index.d.ts +7 -0
  52. package/lib/src/scroll-bar/utils/index.js +1 -1
  53. package/package.json +1 -1
  54. package/theme/ap-table/ap-table.css +4 -4
  55. package/theme/ap-table/ap-table.less +4 -4
  56. package/theme/ap-table-modal/index.css +4 -4
  57. package/theme/index.css +4 -4
@@ -1,11 +1,12 @@
1
- import { defineComponent as B, computed as n, openBlock as b, createBlock as _, mergeProps as u, unref as f, withCtx as g, createVNode as x } from "vue";
1
+ import { defineComponent as g, computed as i, openBlock as _, createBlock as x, mergeProps as u, unref as m, withCtx as p, createVNode as s } from "vue";
2
2
  import "./index.vue2.mjs";
3
3
  import "../../ap-form/item/index.vue2.mjs";
4
- import { isValid as d } from "@aplus-frontend/utils";
5
- import { omit as p } from "lodash-unified";
6
- import V from "../../ap-form/item/index.vue.mjs";
7
- import k from "./index.vue.mjs";
8
- const A = /* @__PURE__ */ B({
4
+ import { isValid as c } from "@aplus-frontend/utils";
5
+ import { isEmpty as C, merge as k, omit as y } from "lodash-unified";
6
+ import { ApForm as F } from "../../ap-form/index.mjs";
7
+ import S from "../../ap-form/item/index.vue.mjs";
8
+ import V from "./index.vue.mjs";
9
+ const R = /* @__PURE__ */ g({
9
10
  __name: "form-item",
10
11
  props: {
11
12
  htmlFor: {},
@@ -15,15 +16,15 @@ const A = /* @__PURE__ */ B({
15
16
  extra: {},
16
17
  labelCol: {},
17
18
  wrapperCol: {},
18
- hasFeedback: { type: Boolean },
19
- colon: { type: Boolean },
19
+ hasFeedback: { type: Boolean, default: !1 },
20
+ colon: { type: Boolean, default: void 0 },
20
21
  labelAlign: {},
21
22
  prop: {},
22
23
  name: {},
23
24
  rules: {},
24
- autoLink: { type: Boolean },
25
- required: { type: Boolean },
26
- validateFirst: { type: Boolean },
25
+ autoLink: { type: Boolean, default: !0 },
26
+ required: { type: Boolean, default: void 0 },
27
+ validateFirst: { type: Boolean, default: void 0 },
27
28
  validateStatus: {},
28
29
  validateTrigger: {},
29
30
  messageVariables: {},
@@ -42,60 +43,60 @@ const A = /* @__PURE__ */ B({
42
43
  xl: {},
43
44
  xxl: {},
44
45
  flex: {},
45
- bordered: { type: Boolean },
46
+ bordered: { type: Boolean, default: !1 },
46
47
  valuePropName: {},
47
48
  initialValue: {},
48
49
  _signal: {},
49
50
  transform: {},
50
- field: {},
51
- disabled: { type: Boolean },
51
+ field: { default: () => ({}) },
52
+ disabled: { type: Boolean, default: void 0 },
52
53
  placeholer: {},
53
- trim: { type: Boolean, default: !0 }
54
+ trim: { type: Boolean, default: !0 },
55
+ defaultSelectedAllKey: { type: Boolean, default: !0 }
54
56
  },
55
- setup(c) {
56
- const l = c, y = n(() => (l == null ? void 0 : l.transform) || {
57
+ setup(v) {
58
+ const l = v, h = i(() => (l == null ? void 0 : l.transform) || {
57
59
  flat: !1,
58
60
  transformer: (e) => {
59
- var o, a, i, r, m, s;
61
+ var o, a, r, d, n, f;
60
62
  if (e)
61
63
  return !(e != null && e.value) || ((o = e == null ? void 0 : e.value) == null ? void 0 : o.length) < 1 ? void 0 : (a = l == null ? void 0 : l.field) != null && a.options ? {
62
64
  ...e,
63
- value: (r = (i = e == null ? void 0 : e.value) == null ? void 0 : i.filter((t) => d(t == null ? void 0 : t.trim()))) == null ? void 0 : r.map((t) => l.trim ? t == null ? void 0 : t.trim() : t)
64
- } : (s = (m = e == null ? void 0 : e.value) == null ? void 0 : m.filter((t) => d(t == null ? void 0 : t.trim()))) == null ? void 0 : s.map((t) => l.trim ? t == null ? void 0 : t.trim() : t);
65
+ value: (d = (r = e == null ? void 0 : e.value) == null ? void 0 : r.filter((t) => c(t == null ? void 0 : t.trim()))) == null ? void 0 : d.map((t) => l.trim ? t == null ? void 0 : t.trim() : t)
66
+ } : (f = (n = e == null ? void 0 : e.value) == null ? void 0 : n.filter((t) => c(t == null ? void 0 : t.trim()))) == null ? void 0 : f.map((t) => l.trim ? t == null ? void 0 : t.trim() : t);
65
67
  }
66
- }), v = n(() => {
68
+ }), b = (e, o) => {
69
+ var a, r, d;
70
+ return !(l != null && l.initialValue) && l.defaultSelectedAllKey && C(o.value) && ((d = o["onUpdate:value"]) == null || d.call(o, {
71
+ key: (r = (a = l == null ? void 0 : l.field) == null ? void 0 : a.options) == null ? void 0 : r.map((n) => n.value)
72
+ })), k(y(e, ["style"]), o);
73
+ }, B = i(() => {
67
74
  var e;
68
75
  return ((e = l.field) == null ? void 0 : e.style) || "width:auto";
69
- }), h = n(() => {
70
- var e, o;
71
- return (l == null ? void 0 : l.initialValue) || {
72
- key: (o = (e = l == null ? void 0 : l.field) == null ? void 0 : e.options) == null ? void 0 : o.map((a) => a.value)
73
- };
74
76
  });
75
- return (e, o) => (b(), _(V, u(
76
- f(p)(l, [
77
- "field",
78
- "initialValue",
79
- "transform",
80
- "placeholder",
81
- "disabled"
82
- ]),
83
- {
84
- "initial-value": h.value,
85
- transform: y.value
86
- }
87
- ), {
88
- default: g(() => [
89
- x(k, u(f(p)(l.field, ["style"]), {
90
- style: v.value,
91
- disabled: e.disabled,
92
- placeholer: e.placeholer
93
- }), null, 16, ["style", "disabled", "placeholer"])
94
- ]),
95
- _: 1
96
- }, 16, ["initial-value", "transform"]));
77
+ return (e, o) => {
78
+ var a, r;
79
+ return _(), x(S, u(m(y)(l, ["field", "transform", "placeholder", "disabled"]), {
80
+ transform: h.value,
81
+ bordered: (r = (a = e.field) == null ? void 0 : a.options) != null && r.length ? !1 : e.bordered
82
+ }), {
83
+ default: p(() => [
84
+ s(m(F).ControlRender, null, {
85
+ default: p(({ ...d }) => [
86
+ s(V, u(b(l.field, d), {
87
+ style: B.value,
88
+ disabled: e.disabled,
89
+ placeholer: e.placeholer
90
+ }), null, 16, ["style", "disabled", "placeholer"])
91
+ ]),
92
+ _: 1
93
+ })
94
+ ]),
95
+ _: 1
96
+ }, 16, ["transform", "bordered"]);
97
+ };
97
98
  }
98
99
  });
99
100
  export {
100
- A as default
101
+ R as default
101
102
  };
@@ -39,4 +39,9 @@ export type ApFormItemBatchInputProps = ApFormItemProps & {
39
39
  disabled?: boolean;
40
40
  placeholer?: string;
41
41
  trim?: boolean;
42
+ /**
43
+ * 是否默认选择所有的key
44
+ * @default true
45
+ */
46
+ defaultSelectedAllKey?: boolean;
42
47
  };
package/es/src/index.mjs CHANGED
@@ -19,16 +19,16 @@ import "./editable-table/index.mjs";
19
19
  import "./ap-descriptions/index.mjs";
20
20
  import "./scroll-bar/index.mjs";
21
21
  import { configProviderProps as M } from "./config-provider/config-provider-props.mjs";
22
- import { DEFAULT_NAMESPACE as R, DEFAULT_UIMODE as k, configProviderContextKey as v } from "./config-provider/constants.mjs";
22
+ import { DEFAULT_NAMESPACE as w, DEFAULT_UIMODE as k, configProviderContextKey as v } from "./config-provider/constants.mjs";
23
23
  import { keysOf as K, provideGlobalConfig as U, useGlobalConfig as O } from "./config-provider/hooks/use-global-config.mjs";
24
- import { buildLocaleContext as _, buildTranslator as z, localeContextKey as H, translate as j, useLocale as q } from "./config-provider/hooks/use-locale.mjs";
25
- import { defaultNamespace as Q, namespaceContextKey as V, useGetDerivedNamespace as X, useNamespace as Y } from "./config-provider/hooks/use-namespace.mjs";
24
+ import { buildLocaleContext as _, buildTranslator as z, localeContextKey as H, translate as V, useLocale as j } from "./config-provider/hooks/use-locale.mjs";
25
+ import { defaultNamespace as J, namespaceContextKey as Q, useGetDerivedNamespace as X, useNamespace as Y } from "./config-provider/hooks/use-namespace.mjs";
26
26
  import { ConfigProvider as $, globalConfigCached as oo } from "./config-provider/config-provider.mjs";
27
27
  import { ApFormItemText as ro } from "./ap-form/items/text/index.mjs";
28
28
  import { default as po } from "./ap-form/items/text-area/index.vue.mjs";
29
29
  import { default as mo } from "./ap-form/items/number/index.vue.mjs";
30
30
  import { default as lo } from "./ap-form/items/date/index.vue.mjs";
31
- import { default as Ao } from "./ap-form/items/date-range/index.vue.mjs";
31
+ import { default as uo } from "./ap-form/items/date-range/index.vue.mjs";
32
32
  import { default as so } from "./ap-form/items/radio/index.vue.mjs";
33
33
  import { default as no } from "./ap-form/items/select/index.vue.mjs";
34
34
  import { default as Fo } from "./ap-form/items/switch/index.vue.mjs";
@@ -39,23 +39,23 @@ import { default as ho } from "./ap-form/item-group/index.vue.mjs";
39
39
  import { default as Po } from "./ap-form/list/index.vue.mjs";
40
40
  import { default as Lo } from "./ap-form/search-form/index.vue.mjs";
41
41
  import { default as yo } from "./ap-form/modal-form/index.vue.mjs";
42
- import { default as wo } from "./ap-form/dependency/index.vue.mjs";
42
+ import { default as Ro } from "./ap-form/dependency/index.vue.mjs";
43
43
  import { default as ko } from "./ap-form/set/index.vue.mjs";
44
44
  import { default as Bo } from "./ap-form/drawer-form/index.vue.mjs";
45
45
  import { default as Uo } from "./ap-form/render/control.vue.mjs";
46
46
  import { default as Wo } from "./ap-form/render/item.vue.mjs";
47
47
  import { default as zo } from "./ap-form/provider/index.vue.mjs";
48
- import { ApFieldText as jo } from "./ap-field/text/index.mjs";
49
- import { default as Jo } from "./ap-field/checkbox/index.vue.mjs";
50
- import { default as Vo } from "./ap-field/date/index.vue.mjs";
48
+ import { ApFieldText as Vo } from "./ap-field/text/index.mjs";
49
+ import { default as qo } from "./ap-field/checkbox/index.vue.mjs";
50
+ import { default as Qo } from "./ap-field/date/index.vue.mjs";
51
51
  import { default as Yo } from "./ap-field/number/index.vue.mjs";
52
52
  import { default as $o } from "./ap-field/radio/index.vue.mjs";
53
53
  import { default as ee } from "./ap-field/switch/index.vue.mjs";
54
54
  import { default as te } from "./ap-field/text-area/index.vue.mjs";
55
55
  import { default as ae } from "./ap-field/date-range/index.vue.mjs";
56
56
  import { default as fe } from "./ap-field/select/index.vue.mjs";
57
- import { default as de } from "./ap-field/text/password.vue.mjs";
58
- import { default as Ae } from "./ap-field/slider/index.vue.mjs";
57
+ import { default as xe } from "./ap-field/text/password.vue.mjs";
58
+ import { default as ue } from "./ap-field/slider/index.vue.mjs";
59
59
  import { default as se } from "./ap-field/segmented/index.vue.mjs";
60
60
  import { default as ne } from "./ap-field/rate/index.vue.mjs";
61
61
  import { default as Fe } from "./ap-action/item-modal/index.vue.mjs";
@@ -66,14 +66,14 @@ import { DictCode as he, langMap as Ge } from "./work-order-modal/interfaces.mjs
66
66
  import { createWorkOrderModal as Ee } from "./work-order-modal/createWorkOrder.mjs";
67
67
  import { default as Ne } from "./work-order-modal/work-order-modal.vue.mjs";
68
68
  import { default as Me } from "./ap-tag/ap-tag.vue.mjs";
69
- import { default as Re } from "./ap-tag/ap-tag-group.vue.mjs";
69
+ import { default as we } from "./ap-tag/ap-tag-group.vue.mjs";
70
70
  import { default as ve } from "./ap-info-layout/ApInfoLayout.vue.mjs";
71
71
  import { NeedNameKeyDefault as Ke } from "./ap-upload/apUploadTypes.mjs";
72
72
  import { default as Oe } from "./ap-upload/apUpload.vue.mjs";
73
73
  import { ApDownLoadNeedNameKeyDefault as _e } from "./ap-download/interface.mjs";
74
74
  import { default as He } from "./ap-download/ap-download.vue.mjs";
75
- import { default as qe } from "./check-card/group.vue.mjs";
76
- import { default as Qe } from "./ap-list/index.vue.mjs";
75
+ import { default as je } from "./check-card/group.vue.mjs";
76
+ import { default as Je } from "./ap-list/index.vue.mjs";
77
77
  import { default as Xe } from "./ap-button/ap-button.vue.mjs";
78
78
  import { default as Ze } from "./ap-button/ap-action-button.vue.mjs";
79
79
  import { ApTransformDataHelper as or } from "./utils/ap-trans-data/index.mjs";
@@ -81,8 +81,8 @@ import { default as rr } from "./business/ap-table-modal/index.mjs";
81
81
  import { useTableModal as pr } from "./business/ap-table-modal/hooks/use-table-modal.mjs";
82
82
  import { useTableSelectModal as mr } from "./business/ap-table-modal/hooks/use-table-select-modal.mjs";
83
83
  import { ApAttachment as lr } from "./business/ap-attachment/index.mjs";
84
- import { ApBatchAction as xr } from "./business/ap-batch-action/index.mjs";
85
- import { ApBatchActionGroup as ur } from "./business/ap-batch-action-group/index.mjs";
84
+ import { ApBatchAction as dr } from "./business/ap-batch-action/index.mjs";
85
+ import { ApBatchActionGroup as Ar } from "./business/ap-batch-action-group/index.mjs";
86
86
  import { ApButtonGroup as ir } from "./business/ap-button-group/index.mjs";
87
87
  import { ApCard as cr } from "./business/ap-card/index.mjs";
88
88
  import { ApExpandAlert as Ir } from "./business/ap-expand-alert/index.mjs";
@@ -92,20 +92,20 @@ import { handleExportDownload as gr } from "./business/ap-export-group/handleExp
92
92
  import { convertExportField as Gr } from "./business/ap-export-group/convertExportField.mjs";
93
93
  import { ApImage as Er } from "./business/ap-image/index.mjs";
94
94
  import { ApInputRadio as Nr } from "./business/ap-input-radio/index.mjs";
95
- import { ApLabel as Mr, ApLabelGroup as wr } from "./business/ap-label/index.mjs";
95
+ import { ApLabel as Mr, ApLabelGroup as Rr } from "./business/ap-label/index.mjs";
96
96
  import { locales as kr } from "./business/ap-ladder/interface.mjs";
97
97
  import { ApLadder as Br } from "./business/ap-ladder/index.mjs";
98
98
  import { ApSelectLayout as Ur } from "./business/ap-select-layout/index.mjs";
99
99
  import { ApStatus as Wr, ApStatusGroup as _r } from "./business/ap-status/index.mjs";
100
100
  import { ApTitle as Hr } from "./business/ap-title/index.mjs";
101
- import { usePageListApTable as qr } from "./business/hooks/usePageListApTable.mjs";
102
- import { useTableRefresh as Qr } from "./business/hooks/useTableRefresh.mjs";
101
+ import { usePageListApTable as jr } from "./business/hooks/usePageListApTable.mjs";
102
+ import { useTableRefresh as Jr } from "./business/hooks/useTableRefresh.mjs";
103
103
  import { computedRecords as Xr, flattenColumns as Yr, formatDataIndex as Zr, formatNumber as $r } from "./business/ap-summary/utils.mjs";
104
104
  import { ApSummary as et } from "./business/ap-summary/index.mjs";
105
105
  import { ApNeedNameKeyDefault as tt } from "./business/ap-appendix/interface.mjs";
106
106
  import { ApAppendix as at } from "./business/ap-appendix/index.mjs";
107
- import { ApExtensionSelect as ft, ApGroupSearch as lt, ApPopoverSelect as dt } from "./business/ap-group-search/index.mjs";
108
- import { default as At } from "./business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs";
107
+ import { ApExtensionSelect as ft, ApGroupSearch as lt, ApPopoverSelect as xt } from "./business/ap-group-search/index.mjs";
108
+ import { default as ut } from "./business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs";
109
109
  import { default as st } from "./business/batch-input-group/index.vue.mjs";
110
110
  import { default as nt } from "./business/batch-input-group/form-item.vue.mjs";
111
111
  import { ApSizeInput as Ft } from "./business/ap-size-input/index.mjs";
@@ -113,8 +113,9 @@ import { useTablePaging as Tt } from "./ap-table/hooks/use-table-paging.mjs";
113
113
  import { default as Dt } from "./editable-table/index.vue.mjs";
114
114
  import { default as St } from "./editable-table/form-item.vue.mjs";
115
115
  import { default as ht } from "./ap-descriptions/ap-descriptions.vue.mjs";
116
- import { default as Pt } from "./scroll-bar/index.vue.mjs";
117
- import { default as Lt } from "./scroll-bar/internal.vue.mjs";
116
+ import { ensureRangeValue as Pt } from "./scroll-bar/utils/index.mjs";
117
+ import { default as Lt } from "./scroll-bar/index.vue.mjs";
118
+ import { default as yt } from "./scroll-bar/internal.vue.mjs";
118
119
  export {
119
120
  s as APConfigProvider,
120
121
  Ze as ApActionButton,
@@ -125,8 +126,8 @@ export {
125
126
  Te as ApActionItemPopconfirm,
126
127
  at as ApAppendix,
127
128
  lr as ApAttachment,
128
- xr as ApBatchAction,
129
- ur as ApBatchActionGroup,
129
+ dr as ApBatchAction,
130
+ Ar as ApBatchActionGroup,
130
131
  Xe as ApButton,
131
132
  ir as ApButtonGroup,
132
133
  cr as ApCard,
@@ -139,28 +140,28 @@ export {
139
140
  br as ApExportGroupActionType,
140
141
  ft as ApExtensionSelect,
141
142
  F as ApField,
142
- Jo as ApFieldCheckbox,
143
- Vo as ApFieldDate,
143
+ qo as ApFieldCheckbox,
144
+ Qo as ApFieldDate,
144
145
  ae as ApFieldDateRange,
145
146
  Yo as ApFieldNumber,
146
- de as ApFieldPassword,
147
+ xe as ApFieldPassword,
147
148
  $o as ApFieldRadio,
148
149
  ne as ApFieldRate,
149
150
  se as ApFieldSegmented,
150
151
  fe as ApFieldSelect,
151
- Ae as ApFieldSlider,
152
+ ue as ApFieldSlider,
152
153
  ee as ApFieldSwitch,
153
- jo as ApFieldText,
154
+ Vo as ApFieldText,
154
155
  te as ApFieldTextArea,
155
156
  n as ApForm,
156
157
  Uo as ApFormControlRender,
157
- wo as ApFormDependency,
158
+ Ro as ApFormDependency,
158
159
  Bo as ApFormDrawerForm,
159
160
  So as ApFormItem,
160
161
  nt as ApFormItemBatchInput,
161
162
  To as ApFormItemCheckbox,
162
163
  lo as ApFormItemDate,
163
- Ao as ApFormItemDateRange,
164
+ uo as ApFormItemDateRange,
164
165
  ho as ApFormItemGroup,
165
166
  mo as ApFormItemNumber,
166
167
  so as ApFormItemRadio,
@@ -180,12 +181,12 @@ export {
180
181
  ve as ApInfoLayout,
181
182
  Nr as ApInputRadio,
182
183
  Mr as ApLabel,
183
- wr as ApLabelGroup,
184
+ Rr as ApLabelGroup,
184
185
  Br as ApLadder,
185
- Qe as ApList,
186
+ Je as ApList,
186
187
  G as ApModal,
187
188
  tt as ApNeedNameKeyDefault,
188
- dt as ApPopoverSelect,
189
+ xt as ApPopoverSelect,
189
190
  Ur as ApSelectLayout,
190
191
  Ft as ApSizeInput,
191
192
  Wr as ApStatus,
@@ -194,23 +195,23 @@ export {
194
195
  N as ApTable,
195
196
  rr as ApTableModal,
196
197
  Me as ApTag,
197
- Re as ApTagGroup,
198
+ we as ApTagGroup,
198
199
  Hr as ApTitle,
199
200
  or as ApTransformDataHelper,
200
201
  Oe as ApUpload,
201
- At as ApUploadSingle,
202
+ ut as ApUploadSingle,
202
203
  st as BatchInputGroup,
203
204
  g as CheckCard,
204
- qe as CheckCardGroup,
205
+ je as CheckCardGroup,
205
206
  $ as ConfigProvider,
206
- R as DEFAULT_NAMESPACE,
207
+ w as DEFAULT_NAMESPACE,
207
208
  k as DEFAULT_UIMODE,
208
209
  he as DictCode,
209
210
  Dt as EditableTable,
210
211
  St as EditableTableFormItem,
211
- Lt as InternalScrollBar,
212
+ yt as InternalScrollBar,
212
213
  Ke as NeedNameKeyDefault,
213
- Pt as ScrollBar,
214
+ Lt as ScrollBar,
214
215
  Ne as WorkOrderModal,
215
216
  T as adminToken,
216
217
  b as aplusToken,
@@ -221,7 +222,8 @@ export {
221
222
  M as configProviderProps,
222
223
  Gr as convertExportField,
223
224
  Ee as createWorkOrderModal,
224
- Q as defaultNamespace,
225
+ J as defaultNamespace,
226
+ Pt as ensureRangeValue,
225
227
  Yr as flattenColumns,
226
228
  Zr as formatDataIndex,
227
229
  $r as formatNumber,
@@ -231,16 +233,16 @@ export {
231
233
  Ge as langMap,
232
234
  H as localeContextKey,
233
235
  kr as locales,
234
- V as namespaceContextKey,
236
+ Q as namespaceContextKey,
235
237
  U as provideGlobalConfig,
236
- j as translate,
238
+ V as translate,
237
239
  X as useGetDerivedNamespace,
238
240
  O as useGlobalConfig,
239
- q as useLocale,
241
+ j as useLocale,
240
242
  Y as useNamespace,
241
- qr as usePageListApTable,
243
+ jr as usePageListApTable,
242
244
  pr as useTableModal,
243
245
  Tt as useTablePaging,
244
- Qr as useTableRefresh,
246
+ Jr as useTableRefresh,
245
247
  mr as useTableSelectModal
246
248
  };
@@ -139,6 +139,9 @@ const e = {
139
139
  },
140
140
  batchInputGroup: {
141
141
  popoverInputPlaceholder: "A maximum of 200 entries can be entered in batches, separated by newlines"
142
+ },
143
+ apSummary: {
144
+ total: "Total"
142
145
  }
143
146
  }
144
147
  };
@@ -148,6 +148,9 @@ const e = {
148
148
  },
149
149
  batchInputGroup: {
150
150
  popoverInputPlaceholder: "支持批量输入,可用换行符分隔,最多输入200条"
151
+ },
152
+ apSummary: {
153
+ total: "合计"
151
154
  }
152
155
  }
153
156
  };
@@ -1,4 +1,5 @@
1
1
  import { default as ScrollBar } from './index.vue';
2
2
  import { default as InternalScrollBar } from './internal.vue';
3
3
  export { ScrollBar, InternalScrollBar };
4
+ export { ensureRangeValue } from './utils';
4
5
  export * from './interface';
@@ -1,3 +1,7 @@
1
1
  import "./index.vue2.mjs";
2
2
  import "./internal.vue2.mjs";
3
+ import { ensureRangeValue as t } from "./utils/index.mjs";
3
4
  import "./interface.mjs";
5
+ export {
6
+ t as ensureRangeValue
7
+ };
@@ -6,9 +6,10 @@ declare const _default: DefineComponent<ScrollBarProps, {
6
6
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ScrollBarProps> & Readonly<{}>, {
7
7
  disabled: boolean;
8
8
  direction: ScrollBarDirection;
9
- showTrack: boolean;
10
- trackSpeed: number;
11
9
  extraSize: number;
10
+ trackSpeed: number;
11
+ barLength: number;
12
+ showTrack: boolean;
12
13
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
13
14
  barRef: CreateComponentPublicInstanceWithMixins<Readonly< InternalScrollBarProps> & Readonly<{}>, {
14
15
  currentScroll: Ref<number, number>;
@@ -20,9 +21,9 @@ declare const _default: DefineComponent<ScrollBarProps, {
20
21
  scroll: number;
21
22
  disabled: boolean;
22
23
  direction: ScrollBarDirection;
24
+ trackSpeed: number;
23
25
  barLength: number;
24
26
  showTrack: boolean;
25
- trackSpeed: number;
26
27
  }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
27
28
  container: HTMLDivElement;
28
29
  track: HTMLDivElement;
@@ -44,9 +45,9 @@ declare const _default: DefineComponent<ScrollBarProps, {
44
45
  scroll: number;
45
46
  disabled: boolean;
46
47
  direction: ScrollBarDirection;
48
+ trackSpeed: number;
47
49
  barLength: number;
48
50
  showTrack: boolean;
49
- trackSpeed: number;
50
51
  }> | null;
51
- }, HTMLDivElement>;
52
+ }, any>;
52
53
  export default _default;
@@ -1,9 +1,10 @@
1
- import { defineComponent as b, toRef as z, ref as f, watchEffect as x, unref as c, computed as _, openBlock as k, createBlock as C, mergeProps as g } from "vue";
1
+ import { defineComponent as z, toRef as g, ref as d, watchEffect as k, unref as c, watch as x, computed as C, openBlock as L, createBlock as _, mergeProps as B, createCommentVNode as R } from "vue";
2
2
  import "./internal.vue2.mjs";
3
- import { omit as B } from "lodash-unified";
4
- import { getScrollable as i, ensureRangeValue as R } from "./utils/index.mjs";
5
- import w from "./internal.vue.mjs";
6
- const N = /* @__PURE__ */ b({
3
+ import { omit as w } from "lodash-unified";
4
+ import { getScrollable as s, ensureRangeValue as y } from "./utils/index.mjs";
5
+ import { useResizeObserver as E } from "@vueuse/core";
6
+ import N from "./internal.vue.mjs";
7
+ const W = /* @__PURE__ */ z({
7
8
  name: "ScrollBar",
8
9
  __name: "index",
9
10
  props: {
@@ -11,6 +12,7 @@ const N = /* @__PURE__ */ b({
11
12
  extraSize: { default: 0 },
12
13
  direction: { default: "vertical" },
13
14
  scroll: {},
15
+ barLength: { default: 30 },
14
16
  width: {},
15
17
  barColor: {},
16
18
  trackColor: {},
@@ -22,56 +24,67 @@ const N = /* @__PURE__ */ b({
22
24
  onScroll: {},
23
25
  onScrollEnd: {}
24
26
  },
25
- setup(d, { expose: p }) {
26
- var u;
27
- const r = d, n = z(r, "scrollContainer"), l = f(), s = f(30);
28
- function S() {
29
- if (!n.value || !l.value) return;
30
- const { totalSize: e, visibleSize: t, distance: o } = i(
31
- n.value,
27
+ setup(p, { expose: S }) {
28
+ var f;
29
+ const r = p, o = g(r, "scrollContainer"), l = d(), i = d(r.barLength);
30
+ function m() {
31
+ if (!o.value || !l.value) return;
32
+ const { totalSize: e, visibleSize: t, distance: n } = s(
33
+ o.value,
32
34
  r.direction
33
- ), a = o / (e + r.extraSize - t || 1) * 100;
35
+ ), a = n / (e + r.extraSize - t || 1) * 100;
34
36
  l.value.scroll(a);
35
37
  }
36
- x(
38
+ function u() {
39
+ const { visibleSize: e, totalSize: t } = s(
40
+ o.value,
41
+ r.direction
42
+ );
43
+ i.value = y(
44
+ Math.min(e / (t + r.extraSize || 1) * 100)
45
+ );
46
+ }
47
+ E(o, () => {
48
+ u();
49
+ }), k(
37
50
  () => {
38
- const e = c(n.value);
39
- if (!e)
40
- return;
41
- const { visibleSize: t, totalSize: o } = i(
42
- e,
43
- r.direction
44
- );
45
- s.value = R(
46
- Math.min(t / (o + r.extraSize || 1) * 100)
47
- ), e.addEventListener("scroll", S);
51
+ const e = c(o.value);
52
+ e && (u(), e.addEventListener("scroll", m));
48
53
  },
49
54
  { flush: "post" }
55
+ ), x(
56
+ () => r.barLength,
57
+ (e) => {
58
+ i.value = e;
59
+ }
50
60
  );
51
- function m(e) {
52
- const t = c(n);
61
+ function h(e) {
62
+ const t = c(o);
53
63
  if (!t) return;
54
- const { totalSize: o, visibleSize: a, topOrLeft: v } = i(
64
+ const { totalSize: n, visibleSize: a, topOrLeft: v } = s(
55
65
  t,
56
66
  r.direction
57
67
  );
58
- if (o <= a) return;
59
- const h = `scroll${v}`;
60
- t[h] = e * (o + r.extraSize - a) / 100;
68
+ if (n <= a) return;
69
+ const b = `scroll${v}`;
70
+ t[b] = e * (n + r.extraSize - a) / 100;
61
71
  }
62
- return p({
63
- currentScroll: _(() => {
72
+ return S({
73
+ currentScroll: C(() => {
64
74
  var e;
65
75
  return c((e = l.value) == null ? void 0 : e.currentScroll);
66
76
  }),
67
- scroll: (u = l.value) == null ? void 0 : u.scroll
68
- }), (e, t) => (k(), C(w, g({
77
+ scroll: (f = l.value) == null ? void 0 : f.scroll
78
+ }), (e, t) => e.barLength !== 100 ? (L(), _(N, B({
79
+ key: 0,
69
80
  ref_key: "barRef",
70
- ref: l,
71
- "bar-length": s.value
72
- }, c(B)(r, ["onScroll", "extraSize", "scrollContainer"]), { onScroll: m }), null, 16, ["bar-length"]));
81
+ ref: l
82
+ }, c(w)(r, ["onScroll", "extraSize", "scrollContainer"]), {
83
+ "bar-length": i.value,
84
+ onScroll: h
85
+ }), null, 16, ["bar-length"])) : R("", !0);
73
86
  }
74
87
  });
75
88
  export {
76
- N as default
89
+ W as default
77
90
  };
@@ -46,7 +46,7 @@ export interface InternalScrollBarProps {
46
46
  onScroll?: (percent: number) => void;
47
47
  onScrollEnd?: (percent: number) => void;
48
48
  }
49
- export interface ScrollBarProps extends Omit<InternalScrollBarProps, 'barLength'> {
49
+ export interface ScrollBarProps extends InternalScrollBarProps {
50
50
  /**
51
51
  * 可滚动容器
52
52
  */
@@ -11,9 +11,9 @@ declare const _default: DefineComponent<InternalScrollBarProps, {
11
11
  scroll: number;
12
12
  disabled: boolean;
13
13
  direction: ScrollBarDirection;
14
+ trackSpeed: number;
14
15
  barLength: number;
15
16
  showTrack: boolean;
16
- trackSpeed: number;
17
17
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
18
18
  container: HTMLDivElement;
19
19
  track: HTMLDivElement;
@@ -20,3 +20,10 @@ export declare function getScrollable(dom: HTMLElement, direction: ScrollBarDire
20
20
  topOrLeft: string;
21
21
  widthOrHeight: string;
22
22
  };
23
+ /**
24
+ * 某个元素是否在某个方向上可滚动
25
+ * @param dom
26
+ * @param direction
27
+ * @returns
28
+ */
29
+ export declare function isScrollable(dom: HTMLElement, direction: ScrollBarDirection): boolean;