@aplus-frontend/ui 0.5.20 → 0.5.22
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/src/ap-field/interface.d.ts +12 -0
- package/es/src/ap-field/text/index.vue2.mjs +45 -39
- package/es/src/ap-field/text-area/index.vue.mjs +31 -25
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -0
- package/es/src/ap-table/constants.d.ts +1 -0
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -0
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +106 -102
- package/es/src/ap-table/interface.d.ts +3 -0
- package/es/src/ap-table/utils.d.ts +1 -0
- package/es/src/business/ap-ladder/components/ValueGroupMode.vue2.mjs +74 -67
- package/es/src/business/ap-ladder/interface.d.ts +4 -0
- package/es/src/business/batch-input-group/index.vue.d.ts +1 -0
- package/es/src/business/batch-input-group/index.vue.mjs +2 -1
- package/lib/src/ap-field/interface.d.ts +12 -0
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -0
- package/lib/src/ap-table/constants.d.ts +1 -0
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -0
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/interface.d.ts +3 -0
- package/lib/src/ap-table/utils.d.ts +1 -0
- package/lib/src/business/ap-ladder/components/ValueGroupMode.vue2.js +1 -1
- package/lib/src/business/ap-ladder/interface.d.ts +4 -0
- package/lib/src/business/batch-input-group/index.vue.d.ts +1 -0
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/package.json +1 -1
- package/theme/ap-ladder/ap-ladder.css +16 -2
- package/theme/ap-ladder/ap-ladder.less +16 -3
- package/theme/index.css +16 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Tooltip as
|
|
1
|
+
import { defineComponent as P, isVNode as g, h as C, ref as x, createBlock as h, openBlock as r, unref as n, normalizeProps as A, guardReactiveProps as B, createSlots as w, withCtx as v, createElementVNode as d, normalizeClass as s, createElementBlock as i, Fragment as f, renderList as j, createCommentVNode as p, normalizeStyle as u, createTextVNode as O, toDisplayString as a, withModifiers as z, renderSlot as M, createVNode as R } from "vue";
|
|
2
|
+
import { Tooltip as Y } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../../config-provider/index.mjs";
|
|
4
|
-
import { locales as
|
|
5
|
-
import { useNamespace as
|
|
6
|
-
const
|
|
4
|
+
import { locales as E } from "../interface.mjs";
|
|
5
|
+
import { useNamespace as G } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
6
|
+
const T = { key: 0 }, D = ["href", "onClick"], U = ["onClick"], b = { key: 0 }, q = { key: 0 }, W = /* @__PURE__ */ P({
|
|
7
7
|
name: "ApLadderValueGroupMode",
|
|
8
8
|
__name: "ValueGroupMode",
|
|
9
9
|
props: {
|
|
@@ -49,18 +49,18 @@ const E = { key: 0 }, G = ["href", "onClick"], T = { key: 0 }, D = { key: 0 }, Q
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
emits: ["update:valueRefs", "handleClick"],
|
|
52
|
-
setup(
|
|
53
|
-
const $ = N, { e:
|
|
54
|
-
const { value:
|
|
55
|
-
return g(
|
|
52
|
+
setup(c, { emit: N }) {
|
|
53
|
+
const $ = N, { e: l } = G("ap-ladder"), m = (e) => g(e) || typeof e == "function", S = (e) => {
|
|
54
|
+
const { value: o, style: t } = e;
|
|
55
|
+
return g(o) ? C(o, {
|
|
56
56
|
style: t
|
|
57
|
-
}) : typeof
|
|
58
|
-
ref:
|
|
57
|
+
}) : typeof o == "function" ? C(o(), {
|
|
58
|
+
ref: x,
|
|
59
59
|
style: {
|
|
60
60
|
...t
|
|
61
61
|
}
|
|
62
62
|
}) : null;
|
|
63
|
-
}, k = (e,
|
|
63
|
+
}, k = (e, o = {
|
|
64
64
|
rawValue: !0,
|
|
65
65
|
precision: 2,
|
|
66
66
|
thousand: !0,
|
|
@@ -71,85 +71,92 @@ const E = { key: 0 }, G = ["href", "onClick"], T = { key: 0 }, D = { key: 0 }, Q
|
|
|
71
71
|
if (Object.prototype.toString.call(e) === "[object Null]" || Object.prototype.toString.call(e) === "[object Undefined]" || Object.prototype.toString.call(e) === "[object Object]" || Object.prototype.toString.call(e) === "[object Function]")
|
|
72
72
|
return "--";
|
|
73
73
|
if (typeof e == "number") {
|
|
74
|
-
if (
|
|
75
|
-
return `${e.toFixed(
|
|
76
|
-
if (
|
|
74
|
+
if (o.percent)
|
|
75
|
+
return `${e.toFixed(o.precision)}%`;
|
|
76
|
+
if (o.currency)
|
|
77
77
|
return e.toLocaleString(
|
|
78
|
-
|
|
78
|
+
E[o.currency ? o.currency : "CNY"],
|
|
79
79
|
{
|
|
80
80
|
style: "currency",
|
|
81
|
-
currency:
|
|
81
|
+
currency: o.currency ? o.currency : "CNY"
|
|
82
82
|
}
|
|
83
83
|
);
|
|
84
|
-
if (
|
|
85
|
-
const [t,
|
|
84
|
+
if (o.thousand) {
|
|
85
|
+
const [t, y] = e.toFixed(o.precision ? o.precision : 2).split(".");
|
|
86
86
|
return `${t.replace(
|
|
87
87
|
/(\d)(?=(\d{3})+(?!\d))/g,
|
|
88
|
-
`$1${
|
|
89
|
-
)}.${
|
|
88
|
+
`$1${o.thousandSeparator ? o.thousandSeparator : ","}`
|
|
89
|
+
)}.${y}`;
|
|
90
90
|
}
|
|
91
|
-
return e.toFixed(
|
|
91
|
+
return e.toFixed(o.precision ? o.precision : 2);
|
|
92
92
|
}
|
|
93
93
|
return e;
|
|
94
94
|
}, F = (e) => {
|
|
95
95
|
$("handleClick", e);
|
|
96
96
|
};
|
|
97
|
-
return (e,
|
|
97
|
+
return (e, o) => (r(), h(n(Y), A(B(c.tooltipProps)), w({
|
|
98
98
|
default: v(() => [
|
|
99
99
|
d("div", {
|
|
100
|
-
class: s(
|
|
100
|
+
class: s(n(l)("value-group"))
|
|
101
101
|
}, [
|
|
102
|
-
(
|
|
103
|
-
key:
|
|
104
|
-
class: s(
|
|
102
|
+
(r(!0), i(f, null, j(c.labelValues, (t, y) => (r(), i("div", {
|
|
103
|
+
key: y,
|
|
104
|
+
class: s([
|
|
105
|
+
n(l)("value-group-item"),
|
|
106
|
+
t.label === "" && n(l)("value-group-value-end")
|
|
107
|
+
])
|
|
105
108
|
}, [
|
|
106
|
-
t.label ? (
|
|
109
|
+
t.label ? (r(), i("div", {
|
|
107
110
|
key: 0,
|
|
108
111
|
class: s([
|
|
109
|
-
|
|
110
|
-
|
|
112
|
+
n(l)("value-group-label"),
|
|
113
|
+
c.labelAlign && n(l)(`label-align-${c.labelAlign}`)
|
|
111
114
|
]),
|
|
112
115
|
style: u(t.labelStyles)
|
|
113
116
|
}, [
|
|
114
|
-
O(
|
|
115
|
-
t.label ? (
|
|
117
|
+
O(a(t.label), 1),
|
|
118
|
+
t.label ? (r(), i("span", T, ":")) : p("", !0)
|
|
116
119
|
], 6)) : p("", !0),
|
|
117
120
|
d("div", {
|
|
118
|
-
class: s(
|
|
121
|
+
class: s(n(l)("value-group-value"))
|
|
119
122
|
}, [
|
|
120
|
-
m(t.value) ? (
|
|
123
|
+
m(t.value) ? (r(), h(S, {
|
|
121
124
|
key: 0,
|
|
122
125
|
value: t.value,
|
|
123
126
|
style: u([t.labelColor, t.valueStyles])
|
|
124
|
-
}, null, 8, ["value", "style"])) : (
|
|
125
|
-
t.link ? (
|
|
127
|
+
}, null, 8, ["value", "style"])) : (r(), i(f, { key: 1 }, [
|
|
128
|
+
t.link ? (r(), i("a", {
|
|
126
129
|
key: 0,
|
|
127
130
|
href: t.link,
|
|
128
131
|
target: "_blank",
|
|
129
|
-
class: s(
|
|
132
|
+
class: s(n(l)("value-group-link")),
|
|
130
133
|
style: u([
|
|
131
|
-
|
|
134
|
+
c.linkStyles,
|
|
132
135
|
t.linkStyles,
|
|
133
136
|
t.linkColor ? { color: t.linkColor } : void 0
|
|
134
137
|
]),
|
|
135
|
-
onClick:
|
|
136
|
-
},
|
|
138
|
+
onClick: z((L) => F(t), ["prevent"])
|
|
139
|
+
}, a(k(t.value, { ...t })), 15, D)) : (r(), i(f, { key: 1 }, [
|
|
137
140
|
d("span", {
|
|
138
141
|
style: u([
|
|
139
|
-
|
|
142
|
+
c.valueStyles,
|
|
140
143
|
t.valueStyles,
|
|
141
144
|
t.valueColor ? { color: t.valueColor } : void 0
|
|
142
|
-
])
|
|
143
|
-
|
|
144
|
-
|
|
145
|
+
]),
|
|
146
|
+
class: s(
|
|
147
|
+
t.handleValueClick ? n(l)("value-group-link") : void 0
|
|
148
|
+
),
|
|
149
|
+
onClick: (L) => t.handleValueClick && t.handleValueClick(c.labelValues)
|
|
150
|
+
}, a(k(t.value, { ...t })), 15, U),
|
|
151
|
+
t.unit ? (r(), i("span", {
|
|
145
152
|
key: 0,
|
|
146
|
-
class: s(
|
|
153
|
+
class: s(n(l)("value-group-unit")),
|
|
147
154
|
style: u([
|
|
148
|
-
|
|
155
|
+
c.unitStyles,
|
|
149
156
|
t.unitStyles,
|
|
150
157
|
t.unitColor ? { color: t.unitColor } : void 0
|
|
151
158
|
])
|
|
152
|
-
},
|
|
159
|
+
}, a(t.unit), 7)) : p("", !0)
|
|
153
160
|
], 64))
|
|
154
161
|
], 64))
|
|
155
162
|
], 2)
|
|
@@ -161,40 +168,40 @@ const E = { key: 0 }, G = ["href", "onClick"], T = { key: 0 }, D = { key: 0 }, Q
|
|
|
161
168
|
e.$slots.title ? {
|
|
162
169
|
name: "title",
|
|
163
170
|
fn: v(() => [
|
|
164
|
-
|
|
171
|
+
M(e.$slots, "title")
|
|
165
172
|
]),
|
|
166
173
|
key: "0"
|
|
167
|
-
} :
|
|
174
|
+
} : c.tooltip ? {
|
|
168
175
|
name: "title",
|
|
169
176
|
fn: v(() => [
|
|
170
177
|
d("div", {
|
|
171
|
-
class: s(
|
|
178
|
+
class: s(n(l)("tooltip"))
|
|
172
179
|
}, [
|
|
173
|
-
(
|
|
174
|
-
key:
|
|
175
|
-
class: s(
|
|
180
|
+
(r(!0), i(f, null, j(c.labelValues, (t, y) => (r(), i("div", {
|
|
181
|
+
key: y,
|
|
182
|
+
class: s(n(l)("tooltip-item"))
|
|
176
183
|
}, [
|
|
177
184
|
d("span", {
|
|
178
|
-
class: s(
|
|
179
|
-
style: u(
|
|
180
|
-
},
|
|
181
|
-
m(t.value) ? (
|
|
185
|
+
class: s(n(l)("tooltip-label")),
|
|
186
|
+
style: u(c.tooltipLabelStyles)
|
|
187
|
+
}, a(t.label ? t.label : "--") + ": ", 7),
|
|
188
|
+
m(t.value) ? (r(), i("span", {
|
|
182
189
|
key: 0,
|
|
183
|
-
class: s(
|
|
184
|
-
style: u(
|
|
190
|
+
class: s(n(l)("tooltip-value")),
|
|
191
|
+
style: u(c.tooltipValueStyles)
|
|
185
192
|
}, [
|
|
186
|
-
|
|
193
|
+
R(S, {
|
|
187
194
|
value: t.value,
|
|
188
195
|
style: u([t.tooltipValueStyles])
|
|
189
196
|
}, null, 8, ["value", "style"]),
|
|
190
|
-
t.unit ? (
|
|
191
|
-
], 6)) : (
|
|
197
|
+
t.unit ? (r(), i("span", b, a(t.unit), 1)) : p("", !0)
|
|
198
|
+
], 6)) : (r(), i("span", {
|
|
192
199
|
key: 1,
|
|
193
|
-
class: s(
|
|
194
|
-
style: u(
|
|
200
|
+
class: s(n(l)("tooltip-value")),
|
|
201
|
+
style: u(c.tooltipValueStyles)
|
|
195
202
|
}, [
|
|
196
|
-
O(
|
|
197
|
-
t.unit ? (
|
|
203
|
+
O(a(k(t.value, { ...t })) + " ", 1),
|
|
204
|
+
t.unit ? (r(), i("span", q, a(t.unit), 1)) : p("", !0)
|
|
198
205
|
], 6))
|
|
199
206
|
], 2))), 128))
|
|
200
207
|
], 2)
|
|
@@ -205,5 +212,5 @@ const E = { key: 0 }, G = ["href", "onClick"], T = { key: 0 }, D = { key: 0 }, Q
|
|
|
205
212
|
}
|
|
206
213
|
});
|
|
207
214
|
export {
|
|
208
|
-
|
|
215
|
+
W as default
|
|
209
216
|
};
|
|
@@ -68,6 +68,10 @@ export interface ApLadderLabelValue {
|
|
|
68
68
|
* 跳转第三方链接 - 回调
|
|
69
69
|
*/
|
|
70
70
|
handleClickLink?: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* value值-点击事件
|
|
73
|
+
*/
|
|
74
|
+
handleValueClick?: (labelValueRecord: ApLadderLabelValue[]) => void;
|
|
71
75
|
/**
|
|
72
76
|
* label 标签的文本对齐方式 仅支持健值对(labelValues)类型
|
|
73
77
|
* @default `right`
|
|
@@ -73,6 +73,7 @@ declare const _default: DefineComponent<BatchInputGroupProps, {}, {}, {}, {}, Co
|
|
|
73
73
|
readonly clearIcon?: any;
|
|
74
74
|
readonly allowClear?: boolean | undefined;
|
|
75
75
|
readonly emptyText?: string | undefined;
|
|
76
|
+
readonly beforeInput?: ((nextVal: string) => string) | undefined;
|
|
76
77
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
77
78
|
$attrs: {
|
|
78
79
|
[x: string]: unknown;
|
|
@@ -67,7 +67,8 @@ const d = "GROUP_SEARCH_ALL", ge = /* @__PURE__ */ N({
|
|
|
67
67
|
suffix: {},
|
|
68
68
|
clearIcon: {},
|
|
69
69
|
allowClear: { type: Boolean, default: !0 },
|
|
70
|
-
emptyText: { default: "--" }
|
|
70
|
+
emptyText: { default: "--" },
|
|
71
|
+
beforeInput: {}
|
|
71
72
|
},
|
|
72
73
|
emits: ["update:value"],
|
|
73
74
|
setup(V, { emit: C }) {
|
|
@@ -15,6 +15,12 @@ export type BasicApFieldProps<FieldPropsType = any> = {
|
|
|
15
15
|
} & FieldPropsType;
|
|
16
16
|
export type ApFieldTextProps = BasicApFieldProps<InputProps> & {
|
|
17
17
|
emptyText?: string;
|
|
18
|
+
/**
|
|
19
|
+
* 输入生效前的事件,受控输入拦截
|
|
20
|
+
* @param nextVal
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
beforeInput?: (nextVal: string) => string;
|
|
18
24
|
};
|
|
19
25
|
export type ApFieldTextPasswordProps = BasicApFieldProps<InputPasswordProps> & {
|
|
20
26
|
emptyText?: string;
|
|
@@ -91,6 +97,12 @@ export type ApFieldSwitchProps = BasicApFieldProps<Omit<SwitchProps, 'onClick'>>
|
|
|
91
97
|
};
|
|
92
98
|
export type ApFieldTextAreaProps = BasicApFieldProps<Omit<TextAreaProps, 'autosize'>> & {
|
|
93
99
|
emptyText?: string;
|
|
100
|
+
/**
|
|
101
|
+
* 输入生效前的事件,受控输入拦截
|
|
102
|
+
* @param nextVal
|
|
103
|
+
* @returns
|
|
104
|
+
*/
|
|
105
|
+
beforeInput?: (nextVal: string) => string;
|
|
94
106
|
};
|
|
95
107
|
export type ApFieldTextAreaExpose = {
|
|
96
108
|
focus: (options?: InputFocusOptions) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),B=require("@aplus-frontend/antdv");require("../../hooks/index.js");const g=require("lodash-unified"),I=require("../hooks/use-default-placeholder.js"),C=require("../../hooks/useControllableValue.js");function S(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Object]"&&!t.isVNode(a)}const _=t.defineComponent({name:"ApFieldText",__name:"index",props:{mode:{default:"edit"},class:{},style:{},id:{},placeholder:{},autocomplete:{},type:{default:"text"},name:{},size:{},autofocus:{type:Boolean},lazy:{type:Boolean,default:!0},maxlength:{},loading:{type:Boolean},bordered:{type:Boolean,default:!0},showCount:{type:[Boolean,Object]},htmlSize:{},onPressEnter:{},onKeydown:{},onKeyup:{},onMousedown:{},onMouseUp:{},onFocus:{},onBlur:{},onChange:{},onInput:{},onRawInput:{},"onUpdate:value":{},onCompositionstart:{},onCompositionend:{},valueModifiers:{},hidden:{type:Boolean},status:{},value:{},defaultValue:{},inputElement:{},prefixCls:{},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},triggerFocus:{},readonly:{type:Boolean},handleReset:{},addonBefore:{},addonAfter:{},prefix:{},suffix:{},clearIcon:{},allowClear:{type:Boolean,default:!0},emptyText:{default:"--"},beforeInput:{}},emits:["update:value"],setup(a,{expose:f,emit:m}){const l=t.ref(),o=t.useSlots();f({focus:e=>{var u;(u=l.value)==null||u.focus(e)},blur:()=>{var e;(e=l.value)==null||e.blur()},setSelectionRange:(e,u,c)=>{var r;(r=l.value)==null||r.setSelectionRange(e,u,c)},select:()=>{var e;(e=l.value)==null||e.select()},input:t.computed(()=>{var e;return(e=l.value)==null?void 0:e.input})});const y=m,n=a,{value:i,updateValue:v}=C.useControllableValue(n,y),b=I.useDefaultPlaceholder("Text",n);function x(e){var d,p,s;const u=e.target.value||"",c=n.beforeInput?(d=n.beforeInput)==null?void 0:d.call(n,u):u,r=(s=(p=l.value)==null?void 0:p.$el)==null?void 0:s.querySelector("input");r&&(r.value=c),v(c)}function h(){var e,u;return n.mode==="edit"?t.createVNode(B.Input,t.mergeProps(g.omit(n,["mode","emptyText","value","onUpdate:value","beforeInput"]),{placeholder:t.unref(b),value:t.unref(i),onInput:x,ref:l}),S(o)?o:{default:()=>[o]}):t.createVNode("span",null,[n.prefix||((e=o==null?void 0:o.prefix)==null?void 0:e.call(o)),t.unref(i)||n.emptyText,n.suffix||((u=o==null?void 0:o.suffix)==null?void 0:u.call(o))])}return(e,u)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(h())))}});exports.default=_;
|
|
@@ -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"),d=require("lodash-unified");require("../../hooks/index.js");require("../../config-provider/index.js");const h=require("@aplus-frontend/antdv"),I=require("../hooks/use-default-placeholder.js"),g=require("../../hooks/useControllableValue.js"),C=require("../../config-provider/hooks/use-namespace.js"),q=e.defineComponent({name:"ApFieldTextArea",__name:"index",props:{mode:{default:"edit"},class:{},style:{},rows:{},autoSize:{type:[Boolean,Object]},onResize:{},onCompositionstart:{},onCompositionend:{},valueModifiers:{},size:{},value:{},name:{},type:{default:"text"},onFocus:{},onBlur:{},onChange:{},onInput:{},onKeydown:{},onKeyup:{},onMousedown:{},focused:{type:Boolean},hidden:{type:Boolean},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},autofocus:{type:Boolean},autocomplete:{},readonly:{type:Boolean},status:{},defaultValue:{},"onUpdate:value":{},loading:{type:Boolean},placeholder:{},lazy:{type:Boolean,default:!0},maxlength:{},bordered:{type:Boolean,default:!0},showCount:{type:[Boolean,Object]},htmlSize:{},onPressEnter:{},onMouseUp:{},onRawInput:{},inputElement:{},triggerFocus:{},handleReset:{},clearIcon:{},allowClear:{type:Boolean,default:!0},emptyText:{default:"--"},beforeInput:{}},emits:["update:value"],setup(c,{expose:f,emit:m}){const n=e.ref(),o=c,y=m,{value:l,updateValue:v}=g.useControllableValue(o,y),{b}=C.useNamespace("field-text-area"),x=I.useDefaultPlaceholder("TextArea",o);function B(t){var s,p,i;const a=t.target.value||"",u=o.beforeInput?(s=o.beforeInput)==null?void 0:s.call(o,a):a,r=(i=(p=n.value)==null?void 0:p.$el)==null?void 0:i.querySelector("textarea");r&&(r.value=u),v(u)}return f({focus:t=>{var a;(a=n.value)==null||a.focus(t)},blur:()=>{var t;(t=n.value)==null||t.blur()},resizableTextArea:e.computed(()=>{var t;return(t=n.value)==null?void 0:t.resizableTextArea})}),(t,a)=>t.mode==="read"?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(b)())},e.toDisplayString(e.unref(d.isNil)(e.unref(l))||e.unref(l)===""?t.emptyText:e.unref(l)),3)):(e.openBlock(),e.createBlock(e.unref(h.Input).TextArea,e.mergeProps({key:1},e.unref(d.omit)(o,["onUpdate:value","value","beforeInput"]),{ref_key:"textAreaRef",ref:n,placeholder:e.unref(x),value:e.unref(l),onInput:B}),null,16,["placeholder","value"]))}});exports.default=q;
|
|
@@ -75,6 +75,7 @@ declare function __VLS_template(): {
|
|
|
75
75
|
readonly clearIcon?: any;
|
|
76
76
|
readonly allowClear?: boolean | undefined;
|
|
77
77
|
readonly emptyText?: string | undefined;
|
|
78
|
+
readonly beforeInput?: ((nextVal: string) => string) | undefined;
|
|
78
79
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
79
80
|
$attrs: {
|
|
80
81
|
[x: string]: unknown;
|
|
@@ -230,6 +231,7 @@ declare const __VLS_component: DefineComponent<ApFormItemTextProps, {
|
|
|
230
231
|
readonly clearIcon?: any;
|
|
231
232
|
readonly allowClear?: boolean | undefined;
|
|
232
233
|
readonly emptyText?: string | undefined;
|
|
234
|
+
readonly beforeInput?: ((nextVal: string) => string) | undefined;
|
|
233
235
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
234
236
|
$attrs: {
|
|
235
237
|
[x: string]: unknown;
|
|
@@ -1666,6 +1666,7 @@ export declare const apTableFormItemMap: {
|
|
|
1666
1666
|
readonly clearIcon?: any;
|
|
1667
1667
|
readonly allowClear?: boolean | undefined;
|
|
1668
1668
|
readonly emptyText?: string | undefined;
|
|
1669
|
+
readonly beforeInput?: ((nextVal: string) => string) | undefined;
|
|
1669
1670
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1670
1671
|
$attrs: {
|
|
1671
1672
|
[x: string]: unknown;
|
|
@@ -81,6 +81,7 @@ export declare const useTablePaging: <DataType = any, ParamsType = Record<string
|
|
|
81
81
|
showQuickJumper: boolean;
|
|
82
82
|
showLessItems: boolean | undefined;
|
|
83
83
|
size: "default" | "small";
|
|
84
|
+
pageSizeOptions: (string | number)[];
|
|
84
85
|
showTotal: ((total: number) => import("vue/jsx-runtime").JSX.Element) | undefined;
|
|
85
86
|
};
|
|
86
87
|
onChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),re=require("./use-sorted-filtered.js");require("../../config-provider/index.js");const A=require("../utils.js"),b=require("lodash-unified"),_=require("../../utils/index.js"),ne=require("../../config-provider/hooks/use-locale.js"),ae=require("../../config-provider/hooks/use-namespace.js"),S=1,C=10;function oe(g){const f={};return g&&(g===!0?(f.current=S,f.pageSize=C):(f.current=g.defaultCurrent||S,f.pageSize=g.defaultPageSize||C)),f}const se=({manual:g=!1,request:f,defaultParams:D={},defaultData:L=[],formatParams:v,paramsValueTypeMap:y,resetFieldsIgnores:N,filterFields:I,sortFields:j,namespace:M="ap-table",pagination:p={defaultCurrent:S,defaultPageSize:C,showLessItems:!1,showTotal:!0}})=>{let q=0,i={};const B=p??{},G=e=>v?v(e):e,T=a.ref(),c=a.reactive(oe(p)),{getColumnSFConfig:J,setSF:K,clearAll:Q,sortedInfo:Z,filteredInfo:$}=re.useTableSortedAndFiltered(),{t:z}=ne.useLocale(),{b:P}=ae.useNamespace(M),s=a.reactive({total:L.length,records:L,loading:!1}),F=()=>{var e,t;return((t=(e=T.value)==null?void 0:e.apForm)==null?void 0:t.getFieldsValueTransformed(!0))||{}},R=async e=>{var n;const t=G(e),r=Date.now();q=r,s.loading=!0;try{const o=await f({...a.unref(D),...t});q===r&&(s.total=o.total||((n=o.data)==null?void 0:n.length)||0,s.records=[...o.data||[]])}catch{q===r&&(s.records=[],s.total=0)}finally{s.loading=!1}},U=e=>{const t={};return Object.entries(e).forEach(([r,n])=>{if(t[r]=n,y&&n){const o=y[r];o&&(t[r]=A.parseFieldValue(o,n))}}),t},W=async e=>{var n,o,l,d,h;const t=F(),r={};Object.entries(t).forEach(([m,E])=>{N&&N.indexOf(m)>-1&&(r[m]=E)}),await((o=(n=T.value)==null?void 0:n.apForm)==null?void 0:o.resetFields()),(h=(d=(l=T.value)==null?void 0:l.apForm)==null?void 0:d.setFieldsValue)==null||h.call(d,r),a.nextTick(()=>{e==null||e()})},w=e=>{i=e;const t=U(e);R(t)},H=e=>{w({...i,...e})},x=()=>{const e=F();p&&(c.current=S),w({...e,filter:i.filter,sort:i.sort,current:p?S:void 0,pageSize:p?i.pageSize||c.pageSize:void 0})},X=()=>{Q(),i.sort={},i.filter={},W(x)},V=()=>{w(i)},Y=e=>{if(!p)V();else{const{current:t,pageSize:r}=c,n=s.total-e,o=Math.ceil(n/r),l=t>o?o:t;H({current:l>0?l:1})}},O=(e,t,r)=>{var m,E;const n=F();c.current=e.current,c.pageSize=e.pageSize,K(t,r);const o=b.isArray(r)?[...r]:[r],l={};for(const u of o)(m=a.unref(j))!=null&&m.includes(u.columnKey||u.field)&&u.order&&(l[A.dataIndexToStr(u.columnKey||u.field)]=u.order);const d={};for(const u of Object.keys(t))(E=a.unref(I))!=null&&E.includes(u)&&t[u]&&(d[u]=t[u]);const h={...n,filter:d,sort:l,current:e.current,pageSize:e.pageSize};b.isEqualWith(i,h,A.isEqualCustom)||w(h)};a.onMounted(()=>{const e=F(),{current:t,pageSize:r}=c;if(i={current:t,pageSize:r,filter:{},sort:{},...e},!g){const n=U(i);R(n)}}),a.watch(()=>a.unref(D),()=>{x()},{deep:!0});const k=a.computed(()=>{if(s.total===0)return"-";const{current:e,pageSize:t}=c;return`${e}/${Math.ceil(s.total/t)}`});function ee(e){b.isArray(e)&&(s.records=e,s.total=e.length)}const te=a.computed(()=>{const{showLessItems:e,showTotal:t,showQuickJumper:r,showSizeChanger:n,pageSizeOptions:o}=B;return{loading:s.loading,pagination:{current:c.current,pageSize:c.pageSize,total:s.total,showSizeChanger:_.isDef(n)?n:!e,showQuickJumper:_.isDef(r)?r:!e,showLessItems:e,size:"default",pageSizeOptions:b.isUndefined(o)?["10","20","50","100"]:o,showTotal:t?l=>a.createVNode("span",{class:P("pagination-total-wrapper")},[z("ap.apTable.pagination.totalLeftPrefix")," ",a.createVNode("span",{class:P("pagination-count-text")},[l])," ",z("ap.apTable.pagination.totalLeftSuffix"),a.createVNode("span",{class:P("pagination--total-right")},[z("ap.apTable.pagination.totalRightPrefix")," ",a.createVNode("span",{class:P("pagination-count-text")},[a.unref(k)])," ",z("ap.apTable.pagination.totalRightSuffix")])]):void 0},onChange:O,dataSource:s.records}});return{formRef:T,submit:x,reset:X,refresh:V,refreshByDelete:Y,data:s,current:c.current,pageSize:c.pageSize,handleTableChange:O,tableProps:te,dataSource:a.computed(()=>s.records),setDataSource:ee,getColumnSFConfig:J,sortedInfo:Z,filteredInfo:$}};exports.DEFAULT_CURRENT=S;exports.DEFAULT_PAGE_SIZE=C;exports.useTablePaging=se;
|
|
@@ -8,6 +8,7 @@ import { ApActionGroupProps } from '../ap-action';
|
|
|
8
8
|
import { ApTableIndexProps } from './components/interface';
|
|
9
9
|
import { EllipsisConfig } from '@aplus-frontend/antdv/es/typography/Base';
|
|
10
10
|
import { RowSelectionReturnType } from './hooks/use-table-row-selection';
|
|
11
|
+
import { PaginationProps } from '@aplus-frontend/antdv';
|
|
11
12
|
export type ValueEnumType = {
|
|
12
13
|
text: string;
|
|
13
14
|
/**
|
|
@@ -238,6 +239,8 @@ export type ApTablePaginationConfig = {
|
|
|
238
239
|
* 是否显示快速跳转
|
|
239
240
|
*/
|
|
240
241
|
showQuickJumper?: boolean;
|
|
242
|
+
} & {
|
|
243
|
+
pageSizeOptions?: PaginationProps['pageSizeOptions'];
|
|
241
244
|
};
|
|
242
245
|
export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size' | 'rowSelection'> & {
|
|
243
246
|
/**
|
|
@@ -374,6 +374,7 @@ export declare function getSearchFormItemRenderNode(item: any, extraRenderMap?:
|
|
|
374
374
|
readonly clearIcon?: any;
|
|
375
375
|
readonly allowClear?: boolean | undefined;
|
|
376
376
|
readonly emptyText?: string | undefined;
|
|
377
|
+
readonly beforeInput?: ((nextVal: string) => string) | undefined;
|
|
377
378
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
378
379
|
$attrs: {
|
|
379
380
|
[x: string]: unknown;
|
|
@@ -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"),p=require("@aplus-frontend/antdv");require("../../../config-provider/index.js");const k=require("../interface.js"),f=require("../../../config-provider/hooks/use-namespace.js"),S={key:0},v=["href","onClick"],C=["onClick"],g={key:0},B={key:0},h=e.defineComponent({name:"ApLadderValueGroupMode",__name:"ValueGroupMode",props:{labelValues:{type:Array,default:()=>[]},labelAlign:{type:String,default:""},labelStyles:{type:Object,default:()=>({})},valueStyles:{type:Object,default:()=>({})},linkStyles:{type:Object,default:()=>({})},unitStyles:{type:Object,default:()=>({})},tooltipLabelStyles:{type:Object,default:()=>({})},tooltipValueStyles:{type:Object,default:()=>({})},tooltipProps:{type:Object,default:()=>({})},tooltip:{type:Boolean,default:!1}},emits:["update:valueRefs","handleClick"],setup(r,{emit:u}){const y=u,{e:l}=f.useNamespace("ap-ladder"),a=n=>e.isVNode(n)||typeof n=="function",s=n=>{const{value:o,style:t}=n;return e.isVNode(o)?e.h(o,{style:t}):typeof o=="function"?e.h(o(),{ref:e.ref,style:{...t}}):null},i=(n,o={rawValue:!0,precision:2,thousand:!0,thousandSeparator:",",currency:"CNY",percent:!1})=>{if(Object.prototype.toString.call(n)==="[object Null]"||Object.prototype.toString.call(n)==="[object Undefined]"||Object.prototype.toString.call(n)==="[object Object]"||Object.prototype.toString.call(n)==="[object Function]")return"--";if(typeof n=="number"){if(o.percent)return`${n.toFixed(o.precision)}%`;if(o.currency)return n.toLocaleString(k.locales[o.currency?o.currency:"CNY"],{style:"currency",currency:o.currency?o.currency:"CNY"});if(o.thousand){const[t,c]=n.toFixed(o.precision?o.precision:2).split(".");return`${t.replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${o.thousandSeparator?o.thousandSeparator:","}`)}.${c}`}return n.toFixed(o.precision?o.precision:2)}return n},d=n=>{y("handleClick",n)};return(n,o)=>(e.openBlock(),e.createBlock(e.unref(p.Tooltip),e.normalizeProps(e.guardReactiveProps(r.tooltipProps)),e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l)("value-group"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.labelValues,(t,c)=>(e.openBlock(),e.createElementBlock("div",{key:c,class:e.normalizeClass([e.unref(l)("value-group-item"),t.label===""&&e.unref(l)("value-group-value-end")])},[t.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(l)("value-group-label"),r.labelAlign&&e.unref(l)(`label-align-${r.labelAlign}`)]),style:e.normalizeStyle(t.labelStyles)},[e.createTextVNode(e.toDisplayString(t.label),1),t.label?(e.openBlock(),e.createElementBlock("span",S,":")):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l)("value-group-value"))},[a(t.value)?(e.openBlock(),e.createBlock(s,{key:0,value:t.value,style:e.normalizeStyle([t.labelColor,t.valueStyles])},null,8,["value","style"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.link?(e.openBlock(),e.createElementBlock("a",{key:0,href:t.link,target:"_blank",class:e.normalizeClass(e.unref(l)("value-group-link")),style:e.normalizeStyle([r.linkStyles,t.linkStyles,t.linkColor?{color:t.linkColor}:void 0]),onClick:e.withModifiers(m=>d(t),["prevent"])},e.toDisplayString(i(t.value,{...t})),15,v)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",{style:e.normalizeStyle([r.valueStyles,t.valueStyles,t.valueColor?{color:t.valueColor}:void 0]),class:e.normalizeClass(t.handleValueClick?e.unref(l)("value-group-link"):void 0),onClick:m=>t.handleValueClick&&t.handleValueClick(r.labelValues)},e.toDisplayString(i(t.value,{...t})),15,C),t.unit?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l)("value-group-unit")),style:e.normalizeStyle([r.unitStyles,t.unitStyles,t.unitColor?{color:t.unitColor}:void 0])},e.toDisplayString(t.unit),7)):e.createCommentVNode("",!0)],64))],64))],2)],2))),128))],2)]),_:2},[n.$slots.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"title")]),key:"0"}:r.tooltip?{name:"title",fn:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l)("tooltip"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.labelValues,(t,c)=>(e.openBlock(),e.createElementBlock("div",{key:c,class:e.normalizeClass(e.unref(l)("tooltip-item"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("tooltip-label")),style:e.normalizeStyle(r.tooltipLabelStyles)},e.toDisplayString(t.label?t.label:"--")+": ",7),a(t.value)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l)("tooltip-value")),style:e.normalizeStyle(r.tooltipValueStyles)},[e.createVNode(s,{value:t.value,style:e.normalizeStyle([t.tooltipValueStyles])},null,8,["value","style"]),t.unit?(e.openBlock(),e.createElementBlock("span",g,e.toDisplayString(t.unit),1)):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(l)("tooltip-value")),style:e.normalizeStyle(r.tooltipValueStyles)},[e.createTextVNode(e.toDisplayString(i(t.value,{...t}))+" ",1),t.unit?(e.openBlock(),e.createElementBlock("span",B,e.toDisplayString(t.unit),1)):e.createCommentVNode("",!0)],6))],2))),128))],2)]),key:"1"}:void 0]),1040))}});exports.default=h;
|
|
@@ -68,6 +68,10 @@ export interface ApLadderLabelValue {
|
|
|
68
68
|
* 跳转第三方链接 - 回调
|
|
69
69
|
*/
|
|
70
70
|
handleClickLink?: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* value值-点击事件
|
|
73
|
+
*/
|
|
74
|
+
handleValueClick?: (labelValueRecord: ApLadderLabelValue[]) => void;
|
|
71
75
|
/**
|
|
72
76
|
* label 标签的文本对齐方式 仅支持健值对(labelValues)类型
|
|
73
77
|
* @default `right`
|
|
@@ -73,6 +73,7 @@ declare const _default: DefineComponent<BatchInputGroupProps, {}, {}, {}, {}, Co
|
|
|
73
73
|
readonly clearIcon?: any;
|
|
74
74
|
readonly allowClear?: boolean | undefined;
|
|
75
75
|
readonly emptyText?: string | undefined;
|
|
76
|
+
readonly beforeInput?: ((nextVal: string) => string) | undefined;
|
|
76
77
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
77
78
|
$attrs: {
|
|
78
79
|
[x: string]: unknown;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue");require("../../ap-field/index.js");const L=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const y=require("lodash-unified");require("./popover-input/index.vue.js");require("../../hooks/index.js");const N=require("../../utils/index.js"),O=require("../../ap-field/hooks/use-default-placeholder.js"),z=require("../../hooks/useControllableValue.js"),E=require("../../config-provider/hooks/use-locale.js"),F=require("../../config-provider/hooks/use-namespace.js"),T=require("../../ap-field/select/index.vue.js"),M=require("../../ap-field/text/index.js"),$=require("./popover-input/index.vue2.js"),p="GROUP_SEARCH_ALL",D=t.defineComponent({__name:"index",props:{style:{type:[Boolean,null,String,Object,Array]},inputStyle:{type:[Boolean,null,String,Object,Array]},options:{},hasAll:{type:Boolean,default:!0},value:{},"onUpdate:value":{},popoverPlacement:{default:"left"},mode:{default:"edit"},class:{},id:{},placeholder:{},autocomplete:{},type:{default:"text"},name:{},size:{},autofocus:{type:Boolean},lazy:{type:Boolean,default:!0},maxlength:{},loading:{type:Boolean},bordered:{type:Boolean,default:!0},showCount:{type:[Boolean,Object]},htmlSize:{},onPressEnter:{},onKeydown:{},onKeyup:{},onMousedown:{},onMouseUp:{},onFocus:{},onBlur:{},onChange:{},onInput:{},onRawInput:{},onCompositionstart:{},onCompositionend:{},valueModifiers:{},hidden:{type:Boolean},status:{},defaultValue:{},inputElement:{},prefixCls:{},disabled:{type:Boolean},focused:{type:Boolean},triggerFocus:{},readonly:{type:Boolean},handleReset:{},addonBefore:{},addonAfter:{},prefix:{},suffix:{},clearIcon:{},allowClear:{type:Boolean,default:!0},emptyText:{default:"--"}},emits:["update:value"],setup(h,{emit:g}){const l=h,B=O.useDefaultPlaceholder("Text",l),b=g,{value:u,updateValue:
|
|
2
|
-
`):""}),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue");require("../../ap-field/index.js");const L=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const y=require("lodash-unified");require("./popover-input/index.vue.js");require("../../hooks/index.js");const N=require("../../utils/index.js"),O=require("../../ap-field/hooks/use-default-placeholder.js"),z=require("../../hooks/useControllableValue.js"),E=require("../../config-provider/hooks/use-locale.js"),F=require("../../config-provider/hooks/use-namespace.js"),T=require("../../ap-field/select/index.vue.js"),M=require("../../ap-field/text/index.js"),$=require("./popover-input/index.vue2.js"),p="GROUP_SEARCH_ALL",D=t.defineComponent({__name:"index",props:{style:{type:[Boolean,null,String,Object,Array]},inputStyle:{type:[Boolean,null,String,Object,Array]},options:{},hasAll:{type:Boolean,default:!0},value:{},"onUpdate:value":{},popoverPlacement:{default:"left"},mode:{default:"edit"},class:{},id:{},placeholder:{},autocomplete:{},type:{default:"text"},name:{},size:{},autofocus:{type:Boolean},lazy:{type:Boolean,default:!0},maxlength:{},loading:{type:Boolean},bordered:{type:Boolean,default:!0},showCount:{type:[Boolean,Object]},htmlSize:{},onPressEnter:{},onKeydown:{},onKeyup:{},onMousedown:{},onMouseUp:{},onFocus:{},onBlur:{},onChange:{},onInput:{},onRawInput:{},onCompositionstart:{},onCompositionend:{},valueModifiers:{},hidden:{type:Boolean},status:{},defaultValue:{},inputElement:{},prefixCls:{},disabled:{type:Boolean},focused:{type:Boolean},triggerFocus:{},readonly:{type:Boolean},handleReset:{},addonBefore:{},addonAfter:{},prefix:{},suffix:{},clearIcon:{},allowClear:{type:Boolean,default:!0},emptyText:{default:"--"},beforeInput:{}},emits:["update:value"],setup(h,{emit:g}){const l=h,B=O.useDefaultPlaceholder("Text",l),b=g,{value:u,updateValue:a}=z.useControllableValue(l,b),i=t.ref(),c=t.ref(),{t:V}=E.useLocale(),{b:_,cssVar:A}=F.useNamespace("batch-input-group"),C=t.computed(()=>{const e=l.popoverPlacement;return{"popover-left":y.isNumber(e)?`${e}px`:e==="left"?"0px":"unset","popover-right":e==="right"?"0px":"unset"}}),q=t.computed(()=>l.options?l.options.length>1&&l.hasAll?[{value:p,label:V("ap.common.all")},...l.options]:l.options:[]),S=t.computed(()=>l.options?l.options.map(e=>e.value):[]),x=t.computed(()=>{var e,n;return(n=(e=t.unref(u))==null?void 0:e.value)!=null&&n.length?t.unref(u).value.join(","):""}),I=t.computed(()=>{var e,n;return(n=(e=t.unref(u))==null?void 0:e.value)!=null&&n.length?t.unref(u).value.join(`
|
|
2
|
+
`):""}),P=t.computed(()=>{var n;const e=(n=t.unref(u))==null?void 0:n.key;if(e!=null&&e.length)return e.length===1?e[0]:p}),U=t.computed(()=>{var o;const e=(o=t.unref(u))==null?void 0:o.key;return!e||(e==null?void 0:e.length)<=1?t.unref(B):(l.options||[]).filter(r=>e.includes(r.value)).map(r=>r.label).join("/")});function w(e){const n=t.unref(u)||{},o=e===p?t.unref(S):N.isDef(e)?[e]:[];a({...n,key:o})}function k(e){var f,v;const n=t.unref(u)||{},o=e.target.value||"",r=o.replace(/[,]+/g,",");if(o!==r){const m=(v=(f=c.value)==null?void 0:f.$el)==null?void 0:v.querySelector("input");m&&(m.value=r)}let s=r.split(",");s.length===1&&s[0]===""&&(s=[]),a({...n,value:s})}function R(e){const n=t.unref(u)||{};let o=e.split(/,|\n/);a({...n,value:o})}function d(){var o;const e=t.unref(u)||{},n=(o=e.value)==null?void 0:o.filter(Boolean);a({...e,value:n})}function j(e){var n;d(),(n=l.onBlur)==null||n.call(l,e)}return(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"containerRef",ref:i,class:t.normalizeClass(t.unref(_)()),style:t.normalizeStyle(t.unref(A)(C.value)),onFocus:n[0]||(n[0]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[1]||(n[1]=(...o)=>e.onBlur&&e.onBlur(...o))},[t.createVNode(t.unref(L.Space).Compact,{block:""},{default:t.withCtx(()=>{var o;return[(o=e.options)!=null&&o.length?(t.openBlock(),t.createBlock(t.unref(T.default),{key:0,style:t.normalizeStyle(e.style),options:q.value,value:P.value,"allow-clear":!1,"dropdown-match-select-width":!1,disabled:e.disabled,"get-popup-container":()=>i.value,"onUpdate:value":w},null,8,["style","options","value","disabled","get-popup-container"])):t.createCommentVNode("",!0),t.createVNode(t.unref(M.ApFieldText),t.mergeProps(t.unref(y.omit)(l,["style","value","onUpdate:value","inputStyle","hasAll","options","onBlur"]),{ref_key:"inputRef",ref:c,style:e.inputStyle,value:x.value,placeholder:U.value,onInput:k,onBlur:j}),{suffix:t.withCtx(()=>[t.createVNode($.default,{_parent:i.value,value:I.value,disabled:e.disabled,placement:l.popoverPlacement,"onUpdate:value":R,onClose:d},null,8,["_parent","value","disabled","placement"])]),_:1},16,["style","value","placeholder"])]}),_:1})],38))}});exports.default=D;
|
package/package.json
CHANGED
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
white-space: nowrap;
|
|
14
14
|
min-width: 0;
|
|
15
15
|
}
|
|
16
|
+
.aplus-ap-ladder__value-group-value-end {
|
|
17
|
+
justify-content: flex-end;
|
|
18
|
+
}
|
|
16
19
|
.aplus-ap-ladder__value-group-label {
|
|
17
20
|
display: inline-block;
|
|
18
21
|
color: #8896B0;
|
|
19
22
|
word-break: break-all;
|
|
20
|
-
min-width: 50px;
|
|
21
23
|
}
|
|
22
24
|
.aplus-ap-ladder__value-group-value {
|
|
23
25
|
color: #182948;
|
|
@@ -31,6 +33,12 @@
|
|
|
31
33
|
color: #0070ff !important;
|
|
32
34
|
text-decoration: none !important;
|
|
33
35
|
}
|
|
36
|
+
.aplus-ap-ladder__label-align-left {
|
|
37
|
+
text-align: left;
|
|
38
|
+
}
|
|
39
|
+
.aplus-ap-ladder__label-align-right {
|
|
40
|
+
text-align: right;
|
|
41
|
+
}
|
|
34
42
|
.aplus-ap-ladder-base {
|
|
35
43
|
display: flex;
|
|
36
44
|
}
|
|
@@ -62,7 +70,7 @@
|
|
|
62
70
|
display: flex;
|
|
63
71
|
}
|
|
64
72
|
.aplus-ap-ladder__tooltip-label {
|
|
65
|
-
|
|
73
|
+
white-space: nowrap;
|
|
66
74
|
word-break: break-all;
|
|
67
75
|
}
|
|
68
76
|
.aplus-ap-ladder__tooltip-value {
|
|
@@ -112,6 +120,12 @@
|
|
|
112
120
|
color: #0070ff;
|
|
113
121
|
text-decoration: none;
|
|
114
122
|
}
|
|
123
|
+
.aplus-ap-ladder--admin .aplus-ap-ladder__value-group-label {
|
|
124
|
+
color: #999999;
|
|
125
|
+
}
|
|
126
|
+
.aplus-ap-ladder--admin .aplus-ap-ladder__value-group-value {
|
|
127
|
+
color: #333333;
|
|
128
|
+
}
|
|
115
129
|
.aplus-ap-ladder--admin .aplus-ap-ladder__major {
|
|
116
130
|
color: #333333;
|
|
117
131
|
}
|
|
@@ -15,12 +15,14 @@
|
|
|
15
15
|
white-space: nowrap;
|
|
16
16
|
min-width: 0; // Import
|
|
17
17
|
}
|
|
18
|
+
&__value-group-value-end{
|
|
19
|
+
justify-content: flex-end;
|
|
20
|
+
}
|
|
18
21
|
|
|
19
22
|
&__value-group-label{
|
|
20
23
|
display: inline-block;
|
|
21
24
|
color: #8896B0;
|
|
22
25
|
word-break: break-all;
|
|
23
|
-
min-width: 50px;
|
|
24
26
|
}
|
|
25
27
|
&__value-group-value{
|
|
26
28
|
color: #182948;
|
|
@@ -34,7 +36,12 @@
|
|
|
34
36
|
color: @aplus-primary-color !important;
|
|
35
37
|
text-decoration: none !important;
|
|
36
38
|
}
|
|
37
|
-
|
|
39
|
+
&__label-align-left{
|
|
40
|
+
text-align: left;
|
|
41
|
+
}
|
|
42
|
+
&__label-align-right{
|
|
43
|
+
text-align: right;
|
|
44
|
+
}
|
|
38
45
|
&-base{
|
|
39
46
|
display: flex;
|
|
40
47
|
}
|
|
@@ -66,7 +73,7 @@
|
|
|
66
73
|
display: flex;
|
|
67
74
|
}
|
|
68
75
|
&__tooltip-label{
|
|
69
|
-
|
|
76
|
+
white-space: nowrap;
|
|
70
77
|
word-break: break-all;
|
|
71
78
|
}
|
|
72
79
|
&__tooltip-value{
|
|
@@ -122,6 +129,12 @@
|
|
|
122
129
|
/** Admin端样式 */
|
|
123
130
|
&--admin {
|
|
124
131
|
.@{root-cls} {
|
|
132
|
+
&__value-group-label{
|
|
133
|
+
color: #999999;
|
|
134
|
+
}
|
|
135
|
+
&__value-group-value{
|
|
136
|
+
color: #333333;
|
|
137
|
+
}
|
|
125
138
|
&__major {
|
|
126
139
|
color: #333333;
|
|
127
140
|
}
|