@aplus-frontend/ui 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.mjs +158 -152
- package/es/src/ap-field/date/helper.d.ts +1 -1
- package/es/src/ap-field/date/helper.mjs +9 -9
- package/es/src/ap-field/date/index.vue.mjs +33 -25
- package/es/src/ap-field/date-range/index.vue.mjs +44 -43
- package/es/src/ap-field/interface.d.ts +0 -6
- package/es/src/ap-field/segmented/index.vue.d.ts +7 -1
- package/es/src/ap-field/select/index.vue.d.ts +4 -20
- package/es/src/ap-field/select/index.vue.mjs +11 -11
- package/es/src/ap-field/text/index.vue.d.ts +13 -1
- package/es/src/ap-form/items/text/index.vue.d.ts +26 -2
- package/es/src/ap-table/constants.d.ts +28 -12
- package/es/src/ap-table/utils.d.ts +13 -1
- package/es/src/business/ap-batch-action/ApBatchAction.vue.d.ts +8 -4
- package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +45 -55
- package/es/src/business/ap-batch-action/index.d.ts +5 -3
- package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +12 -12
- package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +7 -7
- package/es/src/business/ap-group-search/index.d.ts +8 -34
- package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +2 -10
- package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +15 -15
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +8 -4
- package/es/src/business/batch-input-group/index.vue.d.ts +13 -1
- package/es/src/config-provider/hooks/use-namespace.d.ts +1 -1
- package/es/src/config-provider/hooks/use-namespace.mjs +3 -3
- package/es/src/hooks/index.d.ts +2 -0
- package/es/src/hooks/index.mjs +7 -3
- package/es/src/hooks/useManualRef.d.ts +6 -0
- package/es/src/hooks/useManualRef.mjs +27 -0
- package/es/src/hooks/useThrottleRef.d.ts +2 -0
- package/es/src/hooks/useThrottleRef.mjs +31 -0
- package/es/src/index.d.ts +1 -1
- package/es/src/index.mjs +231 -228
- package/es/src/path-map.mjs +1 -1
- package/es/src/scroll-bar/hooks/use-track.d.ts +30 -0
- package/es/src/scroll-bar/hooks/use-track.mjs +76 -0
- package/es/src/scroll-bar/index.d.ts +4 -0
- package/es/src/scroll-bar/index.mjs +3 -0
- package/es/src/scroll-bar/index.vue.d.ts +52 -0
- package/es/src/scroll-bar/index.vue.mjs +77 -0
- package/es/src/scroll-bar/index.vue2.mjs +4 -0
- package/es/src/scroll-bar/interface.d.ts +66 -0
- package/es/src/scroll-bar/internal.vue.d.ts +22 -0
- package/es/src/scroll-bar/internal.vue.mjs +132 -0
- package/es/src/scroll-bar/internal.vue2.mjs +4 -0
- package/es/src/scroll-bar/style/css.js +1 -0
- package/es/src/scroll-bar/style/index.js +1 -0
- package/es/src/scroll-bar/utils/index.d.ts +22 -0
- package/es/src/scroll-bar/utils/index.mjs +17 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-field/date/helper.d.ts +1 -1
- package/lib/src/ap-field/date/helper.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +0 -6
- package/lib/src/ap-field/segmented/index.vue.d.ts +7 -1
- package/lib/src/ap-field/select/index.vue.d.ts +4 -20
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue.d.ts +13 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +26 -2
- package/lib/src/ap-table/constants.d.ts +28 -12
- package/lib/src/ap-table/utils.d.ts +13 -1
- package/lib/src/business/ap-batch-action/ApBatchAction.vue.d.ts +8 -4
- package/lib/src/business/ap-batch-action/ApBatchAction.vue2.js +1 -1
- package/lib/src/business/ap-batch-action/index.d.ts +5 -3
- package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -1
- package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -1
- package/lib/src/business/ap-group-search/index.d.ts +8 -34
- package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +2 -10
- package/lib/src/business/ap-group-search/popover-select/index.vue2.js +2 -2
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +13 -1
- package/lib/src/config-provider/hooks/use-namespace.d.ts +1 -1
- package/lib/src/config-provider/hooks/use-namespace.js +1 -1
- package/lib/src/hooks/index.d.ts +2 -0
- package/lib/src/hooks/index.js +1 -1
- package/lib/src/hooks/useManualRef.d.ts +6 -0
- package/lib/src/hooks/useManualRef.js +1 -0
- package/lib/src/hooks/useThrottleRef.d.ts +2 -0
- package/lib/src/hooks/useThrottleRef.js +1 -0
- package/lib/src/index.d.ts +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/lib/src/scroll-bar/hooks/use-track.d.ts +30 -0
- package/lib/src/scroll-bar/hooks/use-track.js +1 -0
- package/lib/src/scroll-bar/index.d.ts +4 -0
- package/lib/src/scroll-bar/index.js +1 -0
- package/lib/src/scroll-bar/index.vue.d.ts +52 -0
- package/lib/src/scroll-bar/index.vue.js +1 -0
- package/lib/src/scroll-bar/index.vue2.js +1 -0
- package/lib/src/scroll-bar/interface.d.ts +66 -0
- package/lib/src/scroll-bar/internal.vue.d.ts +22 -0
- package/lib/src/scroll-bar/internal.vue.js +1 -0
- package/lib/src/scroll-bar/internal.vue2.js +1 -0
- package/lib/src/scroll-bar/style/css.cjs +1 -0
- package/lib/src/scroll-bar/style/index.cjs +1 -0
- package/lib/src/scroll-bar/utils/index.d.ts +22 -0
- package/lib/src/scroll-bar/utils/index.js +1 -0
- package/package.json +3 -3
- package/theme/index.css +36 -21
- package/theme/index.less +1 -1
- package/theme/scroll-bar/index.css +46 -0
- package/theme/scroll-bar/index.less +62 -0
- package/es/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +0 -8
- package/es/src/ap-scroll-bar/ap-scroll-bar.vue.mjs +0 -4
- package/es/src/ap-scroll-bar/ap-scroll-bar.vue2.mjs +0 -116
- package/es/src/ap-scroll-bar/index.d.ts +0 -29
- package/es/src/ap-scroll-bar/index.mjs +0 -8
- package/es/src/ap-scroll-bar/interface.d.ts +0 -4
- package/es/src/ap-scroll-bar/style/css.js +0 -1
- package/es/src/ap-scroll-bar/style/index.js +0 -1
- package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +0 -8
- package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.js +0 -1
- package/lib/src/ap-scroll-bar/ap-scroll-bar.vue2.js +0 -1
- package/lib/src/ap-scroll-bar/index.d.ts +0 -29
- package/lib/src/ap-scroll-bar/index.js +0 -1
- package/lib/src/ap-scroll-bar/interface.d.ts +0 -4
- package/lib/src/ap-scroll-bar/style/css.cjs +0 -1
- package/lib/src/ap-scroll-bar/style/index.cjs +0 -1
- /package/es/src/{ap-scroll-bar → scroll-bar}/interface.mjs +0 -0
- /package/es/src/{ap-scroll-bar → scroll-bar}/style/css.d.ts +0 -0
- /package/es/src/{ap-scroll-bar → scroll-bar}/style/index.d.ts +0 -0
- /package/lib/src/{ap-scroll-bar → scroll-bar}/interface.js +0 -0
- /package/lib/src/{ap-scroll-bar → scroll-bar}/style/css.d.ts +0 -0
- /package/lib/src/{ap-scroll-bar → scroll-bar}/style/index.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../date/constant.js");require("../../hooks/index.js");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../date/constant.js");require("../../hooks/index.js");const l=require("lodash-unified"),d=require("dayjs"),w=require("@aplus-frontend/antdv"),N=require("../date/helper.js"),q=require("@ant-design/icons-vue"),A=require("../../utils/index.js"),v=require("@aplus-frontend/utils"),V=require("../hooks/use-default-placeholder.js"),x=require("../../hooks/useControllableValue.js"),E=e.defineComponent({__name:"index",props:{mode:{default:"edit"},class:{},style:{},id:{},defaultPickerValue:{},placeholder:{},disabled:{type:[Boolean,Array],default:void 0},disabledTime:{},presets:{},ranges:{},separator:{type:[Object,String,Number,Boolean,null,Array],default:void 0},allowEmpty:{},onCalendarChange:{},onFocus:{},onBlur:{},onMousedown:{},onMouseup:{},onMouseenter:{},onMouseleave:{},onClick:{},direction:{},autocomplete:{},activePickerIndex:{},dateRender:{},panelRender:{},dropdownClassName:{},dropdownAlign:{},popupStyle:{},transitionName:{},allowClear:{type:Boolean,default:!0},autofocus:{type:Boolean,default:void 0},tabindex:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},inputReadOnly:{type:Boolean,default:void 0},suffixIcon:{type:[Object,String,Number,Boolean,null,Array],default:void 0},clearIcon:{type:[Object,String,Number,Boolean,null,Array],default:void 0},getPopupContainer:{},inputRender:{},onOpenChange:{},onContextmenu:{},onKeydown:{},role:{},name:{},picker:{},prefixCls:{},disabledDate:{},monthCellRender:{},locale:{},size:{},bordered:{type:Boolean,default:void 0},showTime:{type:Boolean,default:void 0},showNow:{type:Boolean,default:void 0},order:{type:Boolean,default:void 0},defaultOpenValue:{},showHour:{type:Boolean,default:void 0},showMinute:{type:Boolean,default:void 0},showSecond:{type:Boolean,default:void 0},use12Hours:{type:Boolean,default:void 0},hourStep:{},minuteStep:{},secondStep:{},hideDisabledOptions:{type:Boolean,default:void 0},disabledHours:{},disabledMinutes:{},disabledSeconds:{},valueFormat:{},emptyText:{default:"--"},value:{},defaultValue:{},onChange:{},onOk:{},format:{default:"Y-D"},timezone:{},readModeSeparator:{}},emits:["update:value"],setup(P,{emit:T}){const t=P,C=T,S=e.useSlots(),i=e.computed(()=>g.ApFieldDatePresetFormats.indexOf(t.format)>-1),s=e.computed(()=>i.value?g.PRESET_FORMAT_MAP[t.format]:t.format),{value:m,updateValue:h}=x.useControllableValue(t,C),D=V.useDefaultPlaceholder("DateRange",t),c=N.formatDayWithTimezone(t.timezone),y=e.computed(()=>{var a,u;const n=e.unref(m);if(l.isNil(n)||!(n!=null&&n.length))return n;const r=t.timezone?v.getTimeFormatToZone(e.unref(m)[0],t.timezone):(a=e.unref(m))==null?void 0:a[0],o=t.timezone?v.getTimeFormatToZone(e.unref(m)[1],t.timezone):(u=e.unref(m))==null?void 0:u[1];return[d(r),d(o)]}),M=e.computed(()=>e.unref(i)?t.picker??g.PRESET_FORMAT_PICK_MAP[t.format]:t.picker),b=e.computed(()=>{const n=e.unref(i)?g.PRESET_FORMAT_TIME_MAP[t.format]:{};return{...A.omitUndefined(l.omit(t,["value","onUpdate:value","onChange","onOk","format","mode"])),placeholder:e.unref(D),...n}});function O(n){if(!n){h(n);return}let r=l.isString(n[0])?d(n[0]):n[0],o=l.isString(n[1])?d(n[1]):n[1];const a=e.unref(i)?e.unref(s):void 0;h([c(r,a),c(o,a,!1)])}function F(n){var p;const r=l.isString(n[0])?d(n[0]):n[0],o=l.isString(n[1])?d(n[1]):n[1],a=e.unref(i)?e.unref(s):void 0,u=n[0]?c(r,a):null,f=n[1]?c(o,a,!1):null;(p=t.onOk)==null||p.call(t,[u,f])}function R(n,r){var k,B;if(l.isNil(n)){(k=t.onChange)==null||k.call(t,n,r);return}const o=l.isString(n[0])?d(n[0]):n[0],a=l.isString(n[1])?d(n[1]):n[1],u=e.unref(i)?e.unref(s):void 0,f=n[0]?c(o,u):null,p=n[1]?c(a,u,!1):null;(B=t.onChange)==null||B.call(t,[f,p],r)}const _=e.computed(()=>{var o;const n=t.readModeSeparator;if(n)return e.isVNode(n)||l.isFunction(n)?t.readModeSeparator:e.createVNode(e.Fragment,null,[t.readModeSeparator]);const r=(o=S.readModeSeparator)==null?void 0:o.call(S);return r?e.createVNode(e.Fragment,null,[r]):q.SwapRightOutlined});return(n,r)=>{var o,a;return n.mode==="read"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[y.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString((o=y.value[0])==null?void 0:o.format(s.value))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_.value))),e.createTextVNode(" "+e.toDisplayString((a=y.value[1])==null?void 0:a.format(s.value)),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(n.emptyText),1)],64))],64)):(e.openBlock(),e.createBlock(e.unref(w.DatePicker).RangePicker,e.mergeProps({key:1},b.value,{value:y.value,picker:M.value,format:s.value,"onUpdate:value":O,onChange:R,onOk:F}),e.createSlots({_:2},[e.renderList(e.unref(l.omit)(n.$slots,"readModeSeparator"),(u,f)=>({name:f,fn:e.withCtx(p=>[e.renderSlot(n.$slots,f,e.normalizeProps(e.guardReactiveProps(p||{})))])}))]),1040,["value","picker","format"]))}}});exports.default=E;
|
|
@@ -6,7 +6,6 @@ import { RangePickerProps } from '@aplus-frontend/antdv/es/date-picker/dayjs';
|
|
|
6
6
|
import { LiteralUnion } from '../type';
|
|
7
7
|
import { InputPasswordProps } from './text/input-password-props';
|
|
8
8
|
import { ZoneAlias } from '@aplus-frontend/utils';
|
|
9
|
-
import { SelectValue } from '@aplus-frontend/antdv/es/select';
|
|
10
9
|
export type FieldMode = 'read' | 'edit';
|
|
11
10
|
export type BasicApFieldProps<FieldPropsType = any> = {
|
|
12
11
|
mode?: FieldMode;
|
|
@@ -119,11 +118,6 @@ export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'v
|
|
|
119
118
|
* 是否延迟请求选项列表
|
|
120
119
|
*/
|
|
121
120
|
lazy?: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* 选中之前调用,如果返回false,则不更新值,支持异步
|
|
124
|
-
* @returns
|
|
125
|
-
*/
|
|
126
|
-
onBeforeSelect?: (newVal: SelectValue) => boolean | Promise<boolean>;
|
|
127
121
|
};
|
|
128
122
|
export type ApFieldSelectExpose = {
|
|
129
123
|
focus: () => void;
|
|
@@ -4,7 +4,13 @@ import { FieldMode } from '..';
|
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
5
|
attrs: Partial<{}>;
|
|
6
6
|
slots: {
|
|
7
|
-
label?(_:
|
|
7
|
+
label?(_: {
|
|
8
|
+
value: string | number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
payload?: any;
|
|
11
|
+
title?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}): any;
|
|
8
14
|
};
|
|
9
15
|
refs: {};
|
|
10
16
|
rootEl: any;
|
|
@@ -72,10 +72,6 @@ declare function __VLS_template(): {
|
|
|
72
72
|
type: PropType<(val: SelectValue) => void>;
|
|
73
73
|
default: (val: SelectValue) => void;
|
|
74
74
|
};
|
|
75
|
-
onBeforeSelect: {
|
|
76
|
-
type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
|
|
77
|
-
default: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
78
|
-
};
|
|
79
75
|
children: PropType< VueNode[]>;
|
|
80
76
|
listHeight: NumberConstructor;
|
|
81
77
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
@@ -195,6 +191,7 @@ declare function __VLS_template(): {
|
|
|
195
191
|
type: BooleanConstructor;
|
|
196
192
|
default: any;
|
|
197
193
|
};
|
|
194
|
+
onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
|
|
198
195
|
labelInValue: {
|
|
199
196
|
type: BooleanConstructor;
|
|
200
197
|
default: any;
|
|
@@ -223,7 +220,6 @@ declare function __VLS_template(): {
|
|
|
223
220
|
filterOption: boolean | FilterFunc<DefaultOptionType>;
|
|
224
221
|
defaultActiveFirstOption: boolean;
|
|
225
222
|
labelInValue: boolean;
|
|
226
|
-
onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
227
223
|
}, true, {}, CustomSlotsType<{
|
|
228
224
|
notFoundContent: any;
|
|
229
225
|
suffixIcon: any;
|
|
@@ -287,10 +283,6 @@ declare function __VLS_template(): {
|
|
|
287
283
|
type: PropType<(val: SelectValue) => void>;
|
|
288
284
|
default: (val: SelectValue) => void;
|
|
289
285
|
};
|
|
290
|
-
onBeforeSelect: {
|
|
291
|
-
type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
|
|
292
|
-
default: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
293
|
-
};
|
|
294
286
|
children: PropType< VueNode[]>;
|
|
295
287
|
listHeight: NumberConstructor;
|
|
296
288
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
@@ -410,6 +402,7 @@ declare function __VLS_template(): {
|
|
|
410
402
|
type: BooleanConstructor;
|
|
411
403
|
default: any;
|
|
412
404
|
};
|
|
405
|
+
onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
|
|
413
406
|
labelInValue: {
|
|
414
407
|
type: BooleanConstructor;
|
|
415
408
|
default: any;
|
|
@@ -438,7 +431,6 @@ declare function __VLS_template(): {
|
|
|
438
431
|
filterOption: boolean | FilterFunc<DefaultOptionType>;
|
|
439
432
|
defaultActiveFirstOption: boolean;
|
|
440
433
|
labelInValue: boolean;
|
|
441
|
-
onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
442
434
|
}> | null;
|
|
443
435
|
};
|
|
444
436
|
rootEl: any;
|
|
@@ -516,10 +508,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
516
508
|
type: PropType<(val: SelectValue) => void>;
|
|
517
509
|
default: (val: SelectValue) => void;
|
|
518
510
|
};
|
|
519
|
-
onBeforeSelect: {
|
|
520
|
-
type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
|
|
521
|
-
default: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
522
|
-
};
|
|
523
511
|
children: PropType< VueNode[]>;
|
|
524
512
|
listHeight: NumberConstructor;
|
|
525
513
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
@@ -639,6 +627,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
639
627
|
type: BooleanConstructor;
|
|
640
628
|
default: any;
|
|
641
629
|
};
|
|
630
|
+
onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
|
|
642
631
|
labelInValue: {
|
|
643
632
|
type: BooleanConstructor;
|
|
644
633
|
default: any;
|
|
@@ -667,7 +656,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
667
656
|
filterOption: boolean | FilterFunc<DefaultOptionType>;
|
|
668
657
|
defaultActiveFirstOption: boolean;
|
|
669
658
|
labelInValue: boolean;
|
|
670
|
-
onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
671
659
|
}, true, {}, CustomSlotsType<{
|
|
672
660
|
notFoundContent: any;
|
|
673
661
|
suffixIcon: any;
|
|
@@ -731,10 +719,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
731
719
|
type: PropType<(val: SelectValue) => void>;
|
|
732
720
|
default: (val: SelectValue) => void;
|
|
733
721
|
};
|
|
734
|
-
onBeforeSelect: {
|
|
735
|
-
type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
|
|
736
|
-
default: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
737
|
-
};
|
|
738
722
|
children: PropType< VueNode[]>;
|
|
739
723
|
listHeight: NumberConstructor;
|
|
740
724
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
@@ -854,6 +838,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
854
838
|
type: BooleanConstructor;
|
|
855
839
|
default: any;
|
|
856
840
|
};
|
|
841
|
+
onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
|
|
857
842
|
labelInValue: {
|
|
858
843
|
type: BooleanConstructor;
|
|
859
844
|
default: any;
|
|
@@ -882,7 +867,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
882
867
|
filterOption: boolean | FilterFunc<DefaultOptionType>;
|
|
883
868
|
defaultActiveFirstOption: boolean;
|
|
884
869
|
labelInValue: boolean;
|
|
885
|
-
onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
886
870
|
}> | null;
|
|
887
871
|
}, any>;
|
|
888
872
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),i=require("lodash-unified"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),i=require("lodash-unified"),w=require("@aplus-frontend/antdv");require("../../hooks/index.js");const M=require("../../utils/index.js"),T=require("../hooks/use-default-placeholder.js"),_=require("../hooks/use-options.js"),A=require("../../hooks/useControllableValue.js"),D={key:0},L=o.defineComponent({name:"ApFieldSelect",__name:"index",props:{mode:{default:"edit"},class:{},style:{},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},bordered:{type:Boolean,default:void 0},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},autofocus:{type:Boolean,default:void 0},getPopupContainer:{},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{},options:{},showAction:{},onDeselect:{},loading:{type:Boolean,default:void 0},placeholder:{},clearIcon:{},allowClear:{type:Boolean,default:!0},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean,default:void 0},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{},showArrow:{type:Boolean,default:void 0},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean,default:void 0},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean,default:void 0},onClickOption:{},labelInValue:{type:Boolean,default:void 0},emptyText:{default:"--"},request:{},multiple:{type:Boolean,default:void 0},value:{},"onUpdate:value":{},searchMode:{default:"filter"},refetchOnFocus:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},emits:["update:value"],setup(S,{expose:g,emit:B}){let r=0;const C=i.debounce(t=>{if(!i.isFunction(e.request))return;r+=1;const n=r;s([]),u.value=!0,e.request(t).then(l=>{r===n&&s(l)}).finally(()=>{u.value=!1})},300),e=S,b=(t,n)=>{var a;const l=((a=e.fieldNames)==null?void 0:a.label)||"label";return typeof(n==null?void 0:n[l])=="string"&&n[l].toLowerCase().indexOf(t.toLowerCase())>-1},{options:c,updateOptions:s}=_.default(e),f=o.ref(),u=o.ref((e==null?void 0:e.loading)||!1),F=B;async function p(t=!0){if(!i.isFunction(e.request))return;u.value=!0,r+=1;const n=r;try{t&&s([]);const l=await e.request();if(n!==r)return;s(l)}finally{u.value=!1}}function q(t){var n;(n=e.onFocus)==null||n.call(e,t),e.refetchOnFocus&&r>0&&!u.value&&p(!0)}o.onMounted(()=>{if(e.lazy){r+=1;return}p()});const{value:v,updateValue:O}=A.useControllableValue(e,F),x=T.useDefaultPlaceholder("Select",e),N=o.computed(()=>{var d,h;const t=o.unref(v);if(!t)return e.emptyText;const n=((d=e.fieldNames)==null?void 0:d.label)||"label",l=((h=e.fieldNames)==null?void 0:h.value)||"value";if(i.isArray(t))return t.map(m=>{var y;return(y=o.unref(c).find(k=>k[l]===m))==null?void 0:y[n]}).filter(Boolean).join("、")||e.emptyText;const a=o.unref(c).find(m=>m[l]===t);return(a==null?void 0:a[n])||e.emptyText}),I=o.computed(()=>{const t=!!(e!=null&&e.showSearch),n=e.searchMode;let l={};return t&&(l=n==="request"?{showArrow:!1,defaultActiveFirstOption:!1,onSearch:C,notFoundContent:u.value?void 0:null}:{showArrow:!0,filterOption:i.isNil(e==null?void 0:e.filterOption)?b:e==null?void 0:e.filterOption}),{...M.omitUndefined(i.omit(e,["mode","value","onUpdate:value","onSearch","request","searchMode","onFocus","onBeforeSelect"])),placeholder:o.unref(x),...l}});function P(){var t;(t=f.value)==null||t.focus()}function V(){var t;(t=f.value)==null||t.blur()}return g({focus:P,blur:V,request:p}),(t,n)=>t.mode==="read"?(o.openBlock(),o.createElementBlock("span",D,o.toDisplayString(N.value),1)):(o.openBlock(),o.createBlock(o.unref(w.Select),o.mergeProps({key:1,ref_key:"selectRef",ref:f,"allow-clear":""},I.value,{mode:t.multiple?"multiple":void 0,value:o.unref(v),options:o.unref(c),loading:u.value,"onUpdate:value":o.unref(O),onFocus:q}),o.createSlots({_:2},[o.renderList(t.$slots,(l,a)=>({name:a,fn:o.withCtx(d=>[o.renderSlot(t.$slots,a,o.normalizeProps(o.guardReactiveProps(d||{})))])})),u.value?{name:"notFoundContent",fn:o.withCtx(()=>[o.createVNode(o.unref(w.Spin),{size:"small"})]),key:"0"}:void 0]),1040,["mode","value","options","loading","onUpdate:value"]))}});exports.default=L;
|
|
@@ -2,7 +2,19 @@ import { ApFieldTextProps } from '../interface';
|
|
|
2
2
|
import { InputFocusOptions } from '@aplus-frontend/antdv/es/vc-input/utils/commonUtils';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
4
|
import { FieldMode } from '..';
|
|
5
|
-
|
|
5
|
+
type ApFieldTextSlots = {
|
|
6
|
+
addonAfter?: any;
|
|
7
|
+
addonBefore?: any;
|
|
8
|
+
prefix?: any;
|
|
9
|
+
suffix?: any;
|
|
10
|
+
clearIcon?: any;
|
|
11
|
+
};
|
|
12
|
+
declare function __VLS_template(): {
|
|
13
|
+
attrs: Partial<{}>;
|
|
14
|
+
slots: Readonly<ApFieldTextSlots> & ApFieldTextSlots;
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
6
18
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
7
19
|
declare const __VLS_component: DefineComponent<ApFieldTextProps, {
|
|
8
20
|
focus: (options?: InputFocusOptions) => void;
|
|
@@ -145,7 +145,19 @@ declare function __VLS_template(): {
|
|
|
145
145
|
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
146
146
|
select: () => void;
|
|
147
147
|
}> & {} & ComponentCustomProperties & {} & {
|
|
148
|
-
$slots:
|
|
148
|
+
$slots: Readonly<{
|
|
149
|
+
addonAfter?: any;
|
|
150
|
+
addonBefore?: any;
|
|
151
|
+
prefix?: any;
|
|
152
|
+
suffix?: any;
|
|
153
|
+
clearIcon?: any;
|
|
154
|
+
}> & {
|
|
155
|
+
addonAfter?: any;
|
|
156
|
+
addonBefore?: any;
|
|
157
|
+
prefix?: any;
|
|
158
|
+
suffix?: any;
|
|
159
|
+
clearIcon?: any;
|
|
160
|
+
};
|
|
149
161
|
}) | null;
|
|
150
162
|
};
|
|
151
163
|
rootEl: any;
|
|
@@ -288,7 +300,19 @@ declare const __VLS_component: DefineComponent<ApFormItemTextProps, {
|
|
|
288
300
|
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
289
301
|
select: () => void;
|
|
290
302
|
}> & {} & ComponentCustomProperties & {} & {
|
|
291
|
-
$slots:
|
|
303
|
+
$slots: Readonly<{
|
|
304
|
+
addonAfter?: any;
|
|
305
|
+
addonBefore?: any;
|
|
306
|
+
prefix?: any;
|
|
307
|
+
suffix?: any;
|
|
308
|
+
clearIcon?: any;
|
|
309
|
+
}> & {
|
|
310
|
+
addonAfter?: any;
|
|
311
|
+
addonBefore?: any;
|
|
312
|
+
prefix?: any;
|
|
313
|
+
suffix?: any;
|
|
314
|
+
clearIcon?: any;
|
|
315
|
+
};
|
|
292
316
|
}) | null;
|
|
293
317
|
}, any>;
|
|
294
318
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1117,7 +1117,19 @@ export declare const apTableFormItemMap: {
|
|
|
1117
1117
|
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
1118
1118
|
select: () => void;
|
|
1119
1119
|
}> & {} & ComponentCustomProperties & {} & {
|
|
1120
|
-
$slots:
|
|
1120
|
+
$slots: Readonly<{
|
|
1121
|
+
addonAfter?: any;
|
|
1122
|
+
addonBefore?: any;
|
|
1123
|
+
prefix?: any;
|
|
1124
|
+
suffix?: any;
|
|
1125
|
+
clearIcon?: any;
|
|
1126
|
+
}> & {
|
|
1127
|
+
addonAfter?: any;
|
|
1128
|
+
addonBefore?: any;
|
|
1129
|
+
prefix?: any;
|
|
1130
|
+
suffix?: any;
|
|
1131
|
+
clearIcon?: any;
|
|
1132
|
+
};
|
|
1121
1133
|
}) | null;
|
|
1122
1134
|
}, any, ComponentProvideOptions, {
|
|
1123
1135
|
P: {};
|
|
@@ -2645,10 +2657,6 @@ export declare const apTableRenderItemMap: {
|
|
|
2645
2657
|
type: PropType<(val: SelectValue) => void>;
|
|
2646
2658
|
default: (val: SelectValue) => void;
|
|
2647
2659
|
};
|
|
2648
|
-
onBeforeSelect: {
|
|
2649
|
-
type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
|
|
2650
|
-
default: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
2651
|
-
};
|
|
2652
2660
|
children: PropType< VueNode[]>;
|
|
2653
2661
|
listHeight: NumberConstructor;
|
|
2654
2662
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
@@ -2768,6 +2776,7 @@ export declare const apTableRenderItemMap: {
|
|
|
2768
2776
|
type: BooleanConstructor;
|
|
2769
2777
|
default: any;
|
|
2770
2778
|
};
|
|
2779
|
+
onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
|
|
2771
2780
|
labelInValue: {
|
|
2772
2781
|
type: BooleanConstructor;
|
|
2773
2782
|
default: any;
|
|
@@ -2796,7 +2805,6 @@ export declare const apTableRenderItemMap: {
|
|
|
2796
2805
|
filterOption: boolean | FilterFunc<DefaultOptionType>;
|
|
2797
2806
|
defaultActiveFirstOption: boolean;
|
|
2798
2807
|
labelInValue: boolean;
|
|
2799
|
-
onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
2800
2808
|
}, true, {}, CustomSlotsType<{
|
|
2801
2809
|
notFoundContent: any;
|
|
2802
2810
|
suffixIcon: any;
|
|
@@ -2860,10 +2868,6 @@ export declare const apTableRenderItemMap: {
|
|
|
2860
2868
|
type: PropType<(val: SelectValue) => void>;
|
|
2861
2869
|
default: (val: SelectValue) => void;
|
|
2862
2870
|
};
|
|
2863
|
-
onBeforeSelect: {
|
|
2864
|
-
type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
|
|
2865
|
-
default: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
2866
|
-
};
|
|
2867
2871
|
children: PropType< VueNode[]>;
|
|
2868
2872
|
listHeight: NumberConstructor;
|
|
2869
2873
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
@@ -2983,6 +2987,7 @@ export declare const apTableRenderItemMap: {
|
|
|
2983
2987
|
type: BooleanConstructor;
|
|
2984
2988
|
default: any;
|
|
2985
2989
|
};
|
|
2990
|
+
onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
|
|
2986
2991
|
labelInValue: {
|
|
2987
2992
|
type: BooleanConstructor;
|
|
2988
2993
|
default: any;
|
|
@@ -3011,7 +3016,6 @@ export declare const apTableRenderItemMap: {
|
|
|
3011
3016
|
filterOption: boolean | FilterFunc<DefaultOptionType>;
|
|
3012
3017
|
defaultActiveFirstOption: boolean;
|
|
3013
3018
|
labelInValue: boolean;
|
|
3014
|
-
onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
3015
3019
|
}> | null;
|
|
3016
3020
|
}, any, ComponentProvideOptions, {
|
|
3017
3021
|
P: {};
|
|
@@ -3226,7 +3230,19 @@ export declare const apTableRenderItemMap: {
|
|
|
3226
3230
|
allowClear: boolean;
|
|
3227
3231
|
emptyText: string;
|
|
3228
3232
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
3229
|
-
$slots:
|
|
3233
|
+
$slots: Readonly<{
|
|
3234
|
+
addonAfter?: any;
|
|
3235
|
+
addonBefore?: any;
|
|
3236
|
+
prefix?: any;
|
|
3237
|
+
suffix?: any;
|
|
3238
|
+
clearIcon?: any;
|
|
3239
|
+
}> & {
|
|
3240
|
+
addonAfter?: any;
|
|
3241
|
+
addonBefore?: any;
|
|
3242
|
+
prefix?: any;
|
|
3243
|
+
suffix?: any;
|
|
3244
|
+
clearIcon?: any;
|
|
3245
|
+
};
|
|
3230
3246
|
}) & {
|
|
3231
3247
|
Password: typeof ApFieldPassword;
|
|
3232
3248
|
};
|
|
@@ -428,7 +428,19 @@ export declare function getSearchFormItemRenderNode(item: any, extraRenderMap?:
|
|
|
428
428
|
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
429
429
|
select: () => void;
|
|
430
430
|
}> & {} & ComponentCustomProperties & {} & {
|
|
431
|
-
$slots:
|
|
431
|
+
$slots: Readonly<{
|
|
432
|
+
addonAfter?: any;
|
|
433
|
+
addonBefore?: any;
|
|
434
|
+
prefix?: any;
|
|
435
|
+
suffix?: any;
|
|
436
|
+
clearIcon?: any;
|
|
437
|
+
}> & {
|
|
438
|
+
addonAfter?: any;
|
|
439
|
+
addonBefore?: any;
|
|
440
|
+
prefix?: any;
|
|
441
|
+
suffix?: any;
|
|
442
|
+
clearIcon?: any;
|
|
443
|
+
};
|
|
432
444
|
}) | null;
|
|
433
445
|
}, any, ComponentProvideOptions, {
|
|
434
446
|
P: {};
|
|
@@ -3,19 +3,23 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
|
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
4
|
attrs: Partial<{}>;
|
|
5
5
|
slots: Readonly<{
|
|
6
|
-
header: () =>
|
|
6
|
+
header: () => any[];
|
|
7
7
|
prefix: () => void;
|
|
8
8
|
suffix: () => void;
|
|
9
9
|
}> & {
|
|
10
|
-
header: () =>
|
|
10
|
+
header: () => any[];
|
|
11
11
|
prefix: () => void;
|
|
12
12
|
suffix: () => void;
|
|
13
13
|
};
|
|
14
|
-
refs: {
|
|
14
|
+
refs: {
|
|
15
|
+
headerRef: HTMLDivElement;
|
|
16
|
+
};
|
|
15
17
|
rootEl: HTMLDivElement;
|
|
16
18
|
};
|
|
17
19
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
-
declare const __VLS_component: DefineComponent<ApBatchActionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
20
|
+
declare const __VLS_component: DefineComponent<ApBatchActionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
21
|
+
headerRef: HTMLDivElement;
|
|
22
|
+
}, HTMLDivElement>;
|
|
19
23
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
24
|
export default _default;
|
|
21
25
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -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"),V=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const B=require("../../config-provider/hooks/use-namespace.js"),C=require("../../config-provider/hooks/use-locale.js"),E={class:"selected-desc"},w={class:"selected-desc-conut"},D={class:"selected-desc-clean"},b=e.defineComponent({__name:"ApBatchAction",props:{selectedRowKeys:{},clearAll:{type:Function}},setup(_){const{b:c}=B.useNamespace("ap-batch-action"),{t:r}=C.useLocale(),s=_,n=e.useSlots(),A=e.computed(()=>{var t;return((t=s.selectedRowKeys)==null?void 0:t.length)||0}),o=e.ref(!1),i=e.ref();return e.watch(()=>n.header,()=>{setTimeout(()=>{var l,d,p,h,f,v,a,m,y,S,N;const t=(l=n.header)==null?void 0:l.call(n);(t==null?void 0:t.length)===1&&((p=(d=t==null?void 0:t[0])==null?void 0:d.type)==null?void 0:p.name)==="ASpace"?o.value=!!((y=(m=(a=Array.prototype.slice.call((v=(f=(h=i.value)==null?void 0:h.children)==null?void 0:f[0])==null?void 0:v.children))==null?void 0:a.filter)==null?void 0:m.call(a,u=>{var g;return(g=u==null?void 0:u.children)==null?void 0:g.length}))!=null&&y.length):o.value=!!((N=(S=i.value)==null?void 0:S.children)!=null&&N.length)})},{immediate:!0}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(c)()])},[e.withDirectives(e.createElementVNode("div",{ref_key:"headerRef",ref:i,class:e.normalizeClass(e.unref(c)("header"))},[e.renderSlot(t.$slots,"header")],2),[[e.vShow,o.value]]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(c)("body"))},[e.renderSlot(t.$slots,"prefix"),e.createElementVNode("div",E,[e.createElementVNode("div",w,[e.createTextVNode(e.toDisplayString(e.unref(r)("ap.apBatchAction.selected"))+" ",1),e.createElementVNode("span",null,e.toDisplayString(A.value),1),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("ap.apBatchAction.piecesOfData")),1)]),e.createElementVNode("div",D,[e.createVNode(e.unref(V.Button),{type:"link",onClick:l[0]||(l[0]=d=>s.clearAll&&s.clearAll())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("ap.apBatchAction.empty")),1)]),_:1})])]),e.renderSlot(t.$slots,"suffix")],2)],2))}});exports.default=b;
|
|
@@ -2,7 +2,9 @@ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicP
|
|
|
2
2
|
import { ApBatchActionProps } from './interface';
|
|
3
3
|
export * from './interface';
|
|
4
4
|
declare const ApBatchAction: {
|
|
5
|
-
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
5
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
6
|
+
headerRef: HTMLDivElement;
|
|
7
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
6
8
|
P: {};
|
|
7
9
|
B: {};
|
|
8
10
|
D: {};
|
|
@@ -15,11 +17,11 @@ declare const ApBatchAction: {
|
|
|
15
17
|
__isSuspense?: never;
|
|
16
18
|
} & ComponentOptionsBase<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
17
19
|
$slots: Readonly<{
|
|
18
|
-
header: () =>
|
|
20
|
+
header: () => any[];
|
|
19
21
|
prefix: () => void;
|
|
20
22
|
suffix: () => void;
|
|
21
23
|
}> & {
|
|
22
|
-
header: () =>
|
|
24
|
+
header: () => any[];
|
|
23
25
|
prefix: () => void;
|
|
24
26
|
suffix: () => void;
|
|
25
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("@aplus-frontend/antdv"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("@aplus-frontend/antdv"),V=require("./images/icon-down.vue.js");require("./extension-select/index.vue.js");const x=require("../../hooks/useControllableValue.js");require("../../config-provider/index.js");const N=require("../../config-provider/hooks/use-locale.js"),q=require("../../config-provider/hooks/use-global-config.js"),I=require("../../config-provider/hooks/use-namespace.js"),L=require("./extension-select/index.vue2.js"),i="GROUP_SEARCH_ALL",M=e.defineComponent({__name:"ap-group-search",props:{value:{},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},mode:{},bordered:{type:Boolean},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},"onUpdate:value":{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean},animation:{},direction:{},disabled:{type:Boolean},prefixCls:{},id:{},autofocus:{type:Boolean},getPopupContainer:{},virtual:{type:Boolean},dropdownMatchSelectWidth:{default:!1},options:{},showAction:{},onDeselect:{},loading:{type:Boolean},placeholder:{},clearIcon:{},allowClear:{type:Boolean},onSearch:{},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean},onDropdownVisibleChange:{},showArrow:{type:Boolean},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean},onClickOption:{},labelInValue:{type:Boolean},hasAll:{type:Boolean,default:!0},style:{}},emits:["update:value"],setup(v,{emit:g}){const{t:p}=N.useLocale(),d=q.useGlobalConfig("uiMode","aplus"),f=e.ref(),a=v,C=e.computed(()=>({width:"auto",...a.style})),_=g,{value:n,updateValue:c}=x.useControllableValue(a,_),w=o=>{let t=o;o===i?t=a.options.map(l=>l.value):t=toString.call(t)==="[object Array]"?o:[o],c({...n.value,key:t})},S=e.computed(()=>{let o=[];return a.hasAll&&(o=[{value:i,label:p("ap.apGroupSearch.all")}]),[...o,...a.options]}),b=e.computed(()=>{var u,s;const o=(u=n==null?void 0:n.value)==null?void 0:u.key,t=toString.call(o)==="[object Array]"?o:[o],l=p("ap.apGroupSearch.defaultPlaceholder");return!t||t.length===1?l:((s=a.options)==null?void 0:s.filter(r=>t.includes(r.value)).map(r=>r.label).join("/"))||l});e.onMounted(()=>{e.watch(()=>{var o;return[a.hasAll,(o=e.unref(n))==null?void 0:o.key]},()=>{var o,t;a.hasAll&&!((o=e.unref(n))!=null&&o.key)&&c({...e.unref(n),key:(t=a.options)==null?void 0:t.map(l=>l.value)})},{immediate:!0})});const B=e.computed(()=>{var t,l;const o=(t=e.unref(n))==null?void 0:t.key;if(o)return toString.call(o)==="[object Array]"?(o==null?void 0:o.length)===((l=a.options)==null?void 0:l.length)?i:o==null?void 0:o[0]:o}),h=o=>{var t;o!==((t=e.unref(n))==null?void 0:t.value)&&c({...n.value,value:o})},{b:k,e:m,em:A}=I.useNamespace("ap-group-search");return(o,t)=>{const l=e.resolveComponent("Divider");return e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:f,class:e.normalizeClass(e.unref(k)())},[e.createVNode(e.unref(y.Flex),null,{default:e.withCtx(()=>{var u,s;return[e.createVNode(e.unref(y.Select),{value:B.value,style:e.normalizeStyle(C.value),class:e.normalizeClass(`${o.$attrs.class} ${e.unref(d)==="admin"?e.unref(A)("search","admin"):e.unref(m)("search")}`),options:S.value,bordered:!1,"dropdown-match-select-width":a.dropdownMatchSelectWidth,onChange:w},{suffixIcon:e.withCtx(()=>[e.createVNode(V.default)]),_:1},8,["value","style","class","options","dropdown-match-select-width"]),e.unref(d)==="aplus"?(e.openBlock(),e.createBlock(l,{key:0,class:e.normalizeClass(e.unref(m)("divider")),type:"vertical",style:{}},null,8,["class"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"search",{key:(u=e.unref(n))==null?void 0:u.key,value:(s=e.unref(n))==null?void 0:s.value,change:h},()=>{var r;return[e.createVNode(L.default,{style:{width:"100%"},"max-tag-count":"responsive",value:(r=e.unref(n))==null?void 0:r.value,placeholder:b.value,"__parent-ref":f.value,onChange:h},null,8,["value","placeholder","__parent-ref"])]})]}),_:3})],2)}}});exports.default=M;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("@aplus-frontend/antdv");require("../popover-select/index.vue.js");require("../../../config-provider/index.js");const g=require("../../../config-provider/hooks/use-global-config.js"),y=require("../../../config-provider/hooks/use-namespace.js"),C=require("../popover-select/index.vue2.js"),_=e.defineComponent({__name:"index",props:{value:{},defaultValue:{},notFoundContent:{},itemIcon:{},size:{},bordered:{type:Boolean},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},"onUpdate:value":{},
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("@aplus-frontend/antdv");require("../popover-select/index.vue.js");require("../../../config-provider/index.js");const g=require("../../../config-provider/hooks/use-global-config.js"),y=require("../../../config-provider/hooks/use-namespace.js"),C=require("../popover-select/index.vue2.js"),_=e.defineComponent({__name:"index",props:{value:{},defaultValue:{},notFoundContent:{},itemIcon:{},size:{},bordered:{type:Boolean},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},"onUpdate:value":{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean},animation:{},direction:{},disabled:{type:Boolean},prefixCls:{},id:{},autofocus:{type:Boolean},getPopupContainer:{},virtual:{type:Boolean},dropdownMatchSelectWidth:{},options:{},showAction:{},onDeselect:{},loading:{type:Boolean},placeholder:{},clearIcon:{},allowClear:{type:Boolean},onSearch:{},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean},onDropdownVisibleChange:{},showArrow:{type:Boolean},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean},onClickOption:{},labelInValue:{type:Boolean},__parentRef:{}},emits:["change"],setup(i,{emit:s}){const p=g.useGlobalConfig("uiMode","aplus"),n=i,l=e.ref(),t=e.ref(),a=e.ref(!1),c=e.computed(()=>n.__parentRef||l.value),d=s,f=o=>{o&&(a.value=!1)};e.watch(()=>n.value,()=>{t.value=n.value},{immediate:!0});const r=o=>{t.value=o,d("change",o)},{b:m}=y.useNamespace("ap-extension-select");return(o,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:l},[e.createVNode(e.unref(v.Select),{class:e.normalizeClass(e.unref(m)()),value:t.value,style:e.normalizeStyle(o.$attrs.style),bordered:e.unref(p)==="admin",mode:"tags","show-arrow":!0,"not-found-content":!0,open:a.value,"max-tag-count":n.maxTagCount,placeholder:n.placeholder,onDropdownVisibleChange:u[0]||(u[0]=h=>a.value=h),onChange:r},{suffixIcon:e.withCtx(()=>[e.createVNode(C.default,{value:t.value,"__parent-ref":c.value,onSubmit:r,onOpenChange:f},null,8,["value","__parent-ref"])]),_:1},8,["class","value","style","bordered","open","max-tag-count","placeholder"])],512))}});exports.default=_;
|