@fmdevui/fm-dev 1.0.56 → 1.0.58
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/component.mjs +3 -2
- package/es/core/ui/components/fmautocomplete/index.vue.d.ts +15 -0
- package/es/core/ui/components/index.d.ts +114 -1
- package/es/core/ui/components/inputdropdown/index.vue.d.ts +118 -0
- package/es/index.mjs +1 -1
- package/es/packages/core/index.mjs +1 -1
- package/es/packages/core/ui/components/fmautocomplete/index.vue2.mjs +8 -1
- package/es/packages/core/ui/components/index.mjs +4 -1
- package/es/packages/core/ui/components/inputdropdown/index.vue.mjs +5 -0
- package/es/packages/core/ui/components/inputdropdown/index.vue2.mjs +123 -0
- package/index.js +143 -13
- package/index.min.js +24 -24
- package/index.min.mjs +24 -24
- package/index.mjs +143 -14
- package/lib/component.js +2 -1
- package/lib/core/ui/components/fmautocomplete/index.vue.d.ts +15 -0
- package/lib/core/ui/components/index.d.ts +114 -1
- package/lib/core/ui/components/inputdropdown/index.vue.d.ts +118 -0
- package/lib/index.js +1 -0
- package/lib/packages/core/index.js +1 -0
- package/lib/packages/core/ui/components/fmautocomplete/index.vue2.js +8 -1
- package/lib/packages/core/ui/components/index.js +4 -0
- package/lib/packages/core/ui/components/inputdropdown/index.vue.js +9 -0
- package/lib/packages/core/ui/components/inputdropdown/index.vue2.js +127 -0
- package/package.json +1 -1
- /package/es/{version.css → defaults.css} +0 -0
package/es/component.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { FmLogin } from './packages/core/ui/login/index.mjs';
|
|
2
|
-
import { FmTransfer, FmNoticeBar, Fmselect, FmAutocomplete } from './packages/core/ui/components/index.mjs';
|
|
2
|
+
import { FmTransfer, FmNoticeBar, Fmselect, FmAutocomplete, Fminputdropdown } from './packages/core/ui/components/index.mjs';
|
|
3
3
|
|
|
4
4
|
const plugins = [
|
|
5
5
|
FmLogin,
|
|
6
6
|
FmTransfer,
|
|
7
7
|
FmNoticeBar,
|
|
8
8
|
Fmselect,
|
|
9
|
-
FmAutocomplete
|
|
9
|
+
FmAutocomplete,
|
|
10
|
+
Fminputdropdown
|
|
10
11
|
];
|
|
11
12
|
|
|
12
13
|
export { plugins as default };
|
|
@@ -36,6 +36,13 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
36
36
|
type: StringConstructor;
|
|
37
37
|
default: string;
|
|
38
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* 查询业务表ID
|
|
41
|
+
*/
|
|
42
|
+
qId: {
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
default: number;
|
|
45
|
+
};
|
|
39
46
|
name: {
|
|
40
47
|
type: PropType<string>;
|
|
41
48
|
required: true;
|
|
@@ -86,6 +93,13 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
86
93
|
type: StringConstructor;
|
|
87
94
|
default: string;
|
|
88
95
|
};
|
|
96
|
+
/**
|
|
97
|
+
* 查询业务表ID
|
|
98
|
+
*/
|
|
99
|
+
qId: {
|
|
100
|
+
type: NumberConstructor;
|
|
101
|
+
default: number;
|
|
102
|
+
};
|
|
89
103
|
name: {
|
|
90
104
|
type: PropType<string>;
|
|
91
105
|
required: true;
|
|
@@ -106,5 +120,6 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
106
120
|
apiAction: string;
|
|
107
121
|
fId: string;
|
|
108
122
|
fName: string;
|
|
123
|
+
qId: number;
|
|
109
124
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
110
125
|
export default _default;
|
|
@@ -516,6 +516,10 @@ declare const FmAutocomplete: DefineComponent<ExtractPropTypes<{
|
|
|
516
516
|
type: StringConstructor;
|
|
517
517
|
default: string;
|
|
518
518
|
};
|
|
519
|
+
qId: {
|
|
520
|
+
type: NumberConstructor;
|
|
521
|
+
default: number;
|
|
522
|
+
};
|
|
519
523
|
name: {
|
|
520
524
|
type: PropType<string>;
|
|
521
525
|
required: true;
|
|
@@ -554,6 +558,10 @@ declare const FmAutocomplete: DefineComponent<ExtractPropTypes<{
|
|
|
554
558
|
type: StringConstructor;
|
|
555
559
|
default: string;
|
|
556
560
|
};
|
|
561
|
+
qId: {
|
|
562
|
+
type: NumberConstructor;
|
|
563
|
+
default: number;
|
|
564
|
+
};
|
|
557
565
|
name: {
|
|
558
566
|
type: PropType<string>;
|
|
559
567
|
required: true;
|
|
@@ -574,5 +582,110 @@ declare const FmAutocomplete: DefineComponent<ExtractPropTypes<{
|
|
|
574
582
|
apiAction: string;
|
|
575
583
|
fId: string;
|
|
576
584
|
fName: string;
|
|
585
|
+
qId: number;
|
|
586
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
587
|
+
declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
|
|
588
|
+
optionData: {
|
|
589
|
+
type: {
|
|
590
|
+
(arrayLength: number): any[];
|
|
591
|
+
(...items: any[]): any[];
|
|
592
|
+
new (arrayLength: number): any[];
|
|
593
|
+
new (...items: any[]): any[];
|
|
594
|
+
isArray(arg: any): arg is any[];
|
|
595
|
+
readonly prototype: any[];
|
|
596
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
597
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
598
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
599
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
600
|
+
of<T>(...items: T[]): T[];
|
|
601
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
602
|
+
};
|
|
603
|
+
default: never[];
|
|
604
|
+
};
|
|
605
|
+
bvalue: {
|
|
606
|
+
type: StringConstructor;
|
|
607
|
+
default: string;
|
|
608
|
+
};
|
|
609
|
+
blabel: {
|
|
610
|
+
type: StringConstructor;
|
|
611
|
+
default: string;
|
|
612
|
+
};
|
|
613
|
+
placeholder: {
|
|
614
|
+
type: StringConstructor;
|
|
615
|
+
default: string;
|
|
616
|
+
};
|
|
617
|
+
inputWidth: {
|
|
618
|
+
type: StringConstructor;
|
|
619
|
+
default: string;
|
|
620
|
+
};
|
|
621
|
+
dropWidth: {
|
|
622
|
+
type: StringConstructor;
|
|
623
|
+
default: string;
|
|
624
|
+
};
|
|
625
|
+
id: {
|
|
626
|
+
type: PropType<any>;
|
|
627
|
+
};
|
|
628
|
+
name: {
|
|
629
|
+
type: PropType<any>;
|
|
630
|
+
};
|
|
631
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
632
|
+
change: (...args: any[]) => void;
|
|
633
|
+
"update:id": (value: any) => void;
|
|
634
|
+
"update:name": (value: any) => void;
|
|
635
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
636
|
+
optionData: {
|
|
637
|
+
type: {
|
|
638
|
+
(arrayLength: number): any[];
|
|
639
|
+
(...items: any[]): any[];
|
|
640
|
+
new (arrayLength: number): any[];
|
|
641
|
+
new (...items: any[]): any[];
|
|
642
|
+
isArray(arg: any): arg is any[];
|
|
643
|
+
readonly prototype: any[];
|
|
644
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
645
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
646
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
647
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
648
|
+
of<T>(...items: T[]): T[];
|
|
649
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
650
|
+
};
|
|
651
|
+
default: never[];
|
|
652
|
+
};
|
|
653
|
+
bvalue: {
|
|
654
|
+
type: StringConstructor;
|
|
655
|
+
default: string;
|
|
656
|
+
};
|
|
657
|
+
blabel: {
|
|
658
|
+
type: StringConstructor;
|
|
659
|
+
default: string;
|
|
660
|
+
};
|
|
661
|
+
placeholder: {
|
|
662
|
+
type: StringConstructor;
|
|
663
|
+
default: string;
|
|
664
|
+
};
|
|
665
|
+
inputWidth: {
|
|
666
|
+
type: StringConstructor;
|
|
667
|
+
default: string;
|
|
668
|
+
};
|
|
669
|
+
dropWidth: {
|
|
670
|
+
type: StringConstructor;
|
|
671
|
+
default: string;
|
|
672
|
+
};
|
|
673
|
+
id: {
|
|
674
|
+
type: PropType<any>;
|
|
675
|
+
};
|
|
676
|
+
name: {
|
|
677
|
+
type: PropType<any>;
|
|
678
|
+
};
|
|
679
|
+
}>> & Readonly<{
|
|
680
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
681
|
+
"onUpdate:id"?: ((value: any) => any) | undefined;
|
|
682
|
+
"onUpdate:name"?: ((value: any) => any) | undefined;
|
|
683
|
+
}>, {
|
|
684
|
+
placeholder: string;
|
|
685
|
+
optionData: any[];
|
|
686
|
+
bvalue: string;
|
|
687
|
+
blabel: string;
|
|
688
|
+
inputWidth: string;
|
|
689
|
+
dropWidth: string;
|
|
577
690
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
578
|
-
export { FmTransfer, FmNoticeBar, FmDragImg, Fmselect, FmAutocomplete, elSvg };
|
|
691
|
+
export { FmTransfer, FmNoticeBar, FmDragImg, Fmselect, FmAutocomplete, Fminputdropdown, elSvg };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
optionData: {
|
|
4
|
+
type: {
|
|
5
|
+
(arrayLength: number): any[];
|
|
6
|
+
(...items: any[]): any[];
|
|
7
|
+
new (arrayLength: number): any[];
|
|
8
|
+
new (...items: any[]): any[];
|
|
9
|
+
isArray(arg: any): arg is any[];
|
|
10
|
+
readonly prototype: any[];
|
|
11
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
12
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
13
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
14
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
15
|
+
of<T>(...items: T[]): T[];
|
|
16
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
17
|
+
};
|
|
18
|
+
default: never[];
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 值的属性值
|
|
22
|
+
*/
|
|
23
|
+
bvalue: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* 值的属性标签
|
|
29
|
+
*/
|
|
30
|
+
blabel: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
placeholder: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
inputWidth: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
dropWidth: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
id: {
|
|
47
|
+
type: PropType<any>;
|
|
48
|
+
};
|
|
49
|
+
name: {
|
|
50
|
+
type: PropType<any>;
|
|
51
|
+
};
|
|
52
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
53
|
+
change: (...args: any[]) => void;
|
|
54
|
+
"update:id": (value: any) => void;
|
|
55
|
+
"update:name": (value: any) => void;
|
|
56
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
57
|
+
optionData: {
|
|
58
|
+
type: {
|
|
59
|
+
(arrayLength: number): any[];
|
|
60
|
+
(...items: any[]): any[];
|
|
61
|
+
new (arrayLength: number): any[];
|
|
62
|
+
new (...items: any[]): any[];
|
|
63
|
+
isArray(arg: any): arg is any[];
|
|
64
|
+
readonly prototype: any[];
|
|
65
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
66
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
67
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
68
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
69
|
+
of<T>(...items: T[]): T[];
|
|
70
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
71
|
+
};
|
|
72
|
+
default: never[];
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* 值的属性值
|
|
76
|
+
*/
|
|
77
|
+
bvalue: {
|
|
78
|
+
type: StringConstructor;
|
|
79
|
+
default: string;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* 值的属性标签
|
|
83
|
+
*/
|
|
84
|
+
blabel: {
|
|
85
|
+
type: StringConstructor;
|
|
86
|
+
default: string;
|
|
87
|
+
};
|
|
88
|
+
placeholder: {
|
|
89
|
+
type: StringConstructor;
|
|
90
|
+
default: string;
|
|
91
|
+
};
|
|
92
|
+
inputWidth: {
|
|
93
|
+
type: StringConstructor;
|
|
94
|
+
default: string;
|
|
95
|
+
};
|
|
96
|
+
dropWidth: {
|
|
97
|
+
type: StringConstructor;
|
|
98
|
+
default: string;
|
|
99
|
+
};
|
|
100
|
+
id: {
|
|
101
|
+
type: PropType<any>;
|
|
102
|
+
};
|
|
103
|
+
name: {
|
|
104
|
+
type: PropType<any>;
|
|
105
|
+
};
|
|
106
|
+
}>> & Readonly<{
|
|
107
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
108
|
+
"onUpdate:id"?: ((value: any) => any) | undefined;
|
|
109
|
+
"onUpdate:name"?: ((value: any) => any) | undefined;
|
|
110
|
+
}>, {
|
|
111
|
+
placeholder: string;
|
|
112
|
+
optionData: any[];
|
|
113
|
+
bvalue: string;
|
|
114
|
+
blabel: string;
|
|
115
|
+
inputWidth: string;
|
|
116
|
+
dropWidth: string;
|
|
117
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
118
|
+
export default _default;
|
package/es/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ export { default as emitter } from './packages/core/utils/emit/index.mjs';
|
|
|
3
3
|
export { default as setIntroduction } from './packages/core/utils/comm/setIconfont.mjs';
|
|
4
4
|
import './packages/core/index.mjs';
|
|
5
5
|
export { version } from './version.mjs';
|
|
6
|
-
export { FmAutocomplete, FmDragImg, FmNoticeBar, FmTransfer, Fmselect } from './packages/core/ui/components/index.mjs';
|
|
6
|
+
export { FmAutocomplete, FmDragImg, FmNoticeBar, FmTransfer, Fminputdropdown, Fmselect } from './packages/core/ui/components/index.mjs';
|
|
7
7
|
export { elSvg } from './packages/core/ui/components/svgIcon/index.mjs';
|
|
8
8
|
export { FmLogin } from './packages/core/ui/login/index.mjs';
|
|
9
9
|
export { NextLoading } from './packages/core/ui/loading/index.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { FmAutocomplete, FmDragImg, FmNoticeBar, FmTransfer, Fmselect } from './ui/components/index.mjs';
|
|
1
|
+
export { FmAutocomplete, FmDragImg, FmNoticeBar, FmTransfer, Fminputdropdown, Fmselect } from './ui/components/index.mjs';
|
|
2
2
|
export { FmLogin } from './ui/login/index.mjs';
|
|
3
3
|
export { NextLoading } from './ui/loading/index.mjs';
|
|
4
4
|
export { AccountTypeEnum, HttpMethodEnum, JobCreateTypeEnum } from './api/index.mjs';
|
|
@@ -43,6 +43,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
43
43
|
fName: {
|
|
44
44
|
type: String,
|
|
45
45
|
default: "name"
|
|
46
|
+
},
|
|
47
|
+
/**
|
|
48
|
+
* 查询业务表ID
|
|
49
|
+
*/
|
|
50
|
+
qId: {
|
|
51
|
+
type: Number,
|
|
52
|
+
default: 0
|
|
46
53
|
}
|
|
47
54
|
}, {
|
|
48
55
|
"name": {
|
|
@@ -64,7 +71,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
64
71
|
const emit = __emit;
|
|
65
72
|
const querySearchAsync = async (queryString, cb) => {
|
|
66
73
|
resetValue();
|
|
67
|
-
const res = await useBaseApi(props.apiService).post({ top: props.top, keywork: queryString }, props.apiAction);
|
|
74
|
+
const res = await useBaseApi(props.apiService).post({ top: props.top, keywork: queryString, id: props.qId }, props.apiAction);
|
|
68
75
|
const data = res.data.result ?? [];
|
|
69
76
|
if (data.length === 0) {
|
|
70
77
|
return cb([]);
|
|
@@ -3,16 +3,19 @@ import './noticeBar/index.vue.mjs';
|
|
|
3
3
|
import dragimg from './dragVerify/dragVerifyImgRotate.vue.mjs';
|
|
4
4
|
import './fmselect/index.vue.mjs';
|
|
5
5
|
import './fmautocomplete/index.vue.mjs';
|
|
6
|
+
import './inputdropdown/index.vue.mjs';
|
|
6
7
|
export { elSvg } from './svgIcon/index.mjs';
|
|
7
8
|
import _sfc_main from './transfer/index.vue2.mjs';
|
|
8
9
|
import _sfc_main$1 from './noticeBar/index.vue2.mjs';
|
|
9
10
|
import _sfc_main$2 from './fmselect/index.vue2.mjs';
|
|
10
11
|
import _sfc_main$3 from './fmautocomplete/index.vue2.mjs';
|
|
12
|
+
import _sfc_main$4 from './inputdropdown/index.vue2.mjs';
|
|
11
13
|
|
|
12
14
|
const FmTransfer = _sfc_main;
|
|
13
15
|
const FmNoticeBar = _sfc_main$1;
|
|
14
16
|
const FmDragImg = dragimg;
|
|
15
17
|
const Fmselect = _sfc_main$2;
|
|
16
18
|
const FmAutocomplete = _sfc_main$3;
|
|
19
|
+
const Fminputdropdown = _sfc_main$4;
|
|
17
20
|
|
|
18
|
-
export { FmAutocomplete, FmDragImg, FmNoticeBar, FmTransfer, Fmselect };
|
|
21
|
+
export { FmAutocomplete, FmDragImg, FmNoticeBar, FmTransfer, Fminputdropdown, Fmselect };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { defineComponent, useModel, resolveComponent, createBlock, openBlock, withCtx, createVNode, normalizeStyle, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, mergeModels } from 'vue';
|
|
2
|
+
|
|
3
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
...{
|
|
5
|
+
name: "Fminputdropdown"
|
|
6
|
+
},
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: /* @__PURE__ */ mergeModels({
|
|
9
|
+
//数据
|
|
10
|
+
optionData: {
|
|
11
|
+
type: Array,
|
|
12
|
+
default: []
|
|
13
|
+
},
|
|
14
|
+
/**
|
|
15
|
+
* 值的属性值
|
|
16
|
+
*/
|
|
17
|
+
bvalue: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "id"
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* 值的属性标签
|
|
23
|
+
*/
|
|
24
|
+
blabel: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "name"
|
|
27
|
+
},
|
|
28
|
+
placeholder: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "\u8BF7\u9009\u62E9"
|
|
31
|
+
},
|
|
32
|
+
inputWidth: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "40%"
|
|
35
|
+
},
|
|
36
|
+
dropWidth: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "90px"
|
|
39
|
+
}
|
|
40
|
+
}, {
|
|
41
|
+
"id": {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 0
|
|
44
|
+
},
|
|
45
|
+
"idModifiers": {},
|
|
46
|
+
"name": {
|
|
47
|
+
type: String,
|
|
48
|
+
default: ""
|
|
49
|
+
},
|
|
50
|
+
"nameModifiers": {}
|
|
51
|
+
}),
|
|
52
|
+
emits: /* @__PURE__ */ mergeModels(["change"], ["update:id", "update:name"]),
|
|
53
|
+
setup(__props, { emit: __emit }) {
|
|
54
|
+
const modeValueId = useModel(__props, "id");
|
|
55
|
+
const modeValueName = useModel(__props, "name");
|
|
56
|
+
const props = __props;
|
|
57
|
+
const emit = __emit;
|
|
58
|
+
const handCommand = (command) => {
|
|
59
|
+
const fitem = props.optionData.find((item) => item[props.bvalue] === command);
|
|
60
|
+
modeValueId.value = fitem != null ? [props.bvalue] : 0;
|
|
61
|
+
modeValueName.value = fitem != null ? fitem[props.blabel] : "";
|
|
62
|
+
emit("change", fitem);
|
|
63
|
+
};
|
|
64
|
+
return (_ctx, _cache) => {
|
|
65
|
+
const _component_el_input = resolveComponent("el-input");
|
|
66
|
+
const _component_el_dropdown_item = resolveComponent("el-dropdown-item");
|
|
67
|
+
const _component_el_dropdown_menu = resolveComponent("el-dropdown-menu");
|
|
68
|
+
const _component_el_dropdown = resolveComponent("el-dropdown");
|
|
69
|
+
return openBlock(), createBlock(_component_el_dropdown, {
|
|
70
|
+
placement: "bottom",
|
|
71
|
+
trigger: "click",
|
|
72
|
+
style: { "width": "100%" },
|
|
73
|
+
onCommand: handCommand
|
|
74
|
+
}, {
|
|
75
|
+
dropdown: withCtx(() => [
|
|
76
|
+
createVNode(_component_el_dropdown_menu, {
|
|
77
|
+
style: normalizeStyle({ width: __props.dropWidth })
|
|
78
|
+
}, {
|
|
79
|
+
default: withCtx(() => [
|
|
80
|
+
(openBlock(true), createElementBlock(
|
|
81
|
+
Fragment,
|
|
82
|
+
null,
|
|
83
|
+
renderList(__props.optionData, (item, index) => {
|
|
84
|
+
return openBlock(), createBlock(_component_el_dropdown_item, {
|
|
85
|
+
key: index,
|
|
86
|
+
command: item[__props.bvalue],
|
|
87
|
+
divided: ""
|
|
88
|
+
}, {
|
|
89
|
+
default: withCtx(() => [
|
|
90
|
+
createTextVNode(
|
|
91
|
+
toDisplayString(item[__props.blabel]),
|
|
92
|
+
1
|
|
93
|
+
/* TEXT */
|
|
94
|
+
)
|
|
95
|
+
]),
|
|
96
|
+
_: 2
|
|
97
|
+
/* DYNAMIC */
|
|
98
|
+
}, 1032, ["command"]);
|
|
99
|
+
}),
|
|
100
|
+
128
|
|
101
|
+
/* KEYED_FRAGMENT */
|
|
102
|
+
))
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
/* STABLE */
|
|
106
|
+
}, 8, ["style"])
|
|
107
|
+
]),
|
|
108
|
+
default: withCtx(() => [
|
|
109
|
+
createVNode(_component_el_input, {
|
|
110
|
+
modelValue: modeValueName.value,
|
|
111
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValueName.value = $event),
|
|
112
|
+
placeholder: props.placeholder,
|
|
113
|
+
style: normalizeStyle({ width: __props.inputWidth })
|
|
114
|
+
}, null, 8, ["modelValue", "placeholder", "style"])
|
|
115
|
+
]),
|
|
116
|
+
_: 1
|
|
117
|
+
/* STABLE */
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
export { _sfc_main as default };
|