@fmdevui/fm-dev 1.0.50 → 1.0.52
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 +4 -2
- package/es/core/ui/components/fmautocomplete/index.vue.d.ts +110 -0
- package/es/core/ui/components/fmselect/index.vue.d.ts +91 -0
- package/es/core/ui/components/index.d.ts +163 -2
- package/es/index.mjs +1 -1
- package/es/packages/core/index.mjs +1 -1
- package/es/packages/core/ui/components/fmautocomplete/index.vue.mjs +5 -0
- package/es/packages/core/ui/components/fmautocomplete/index.vue2.mjs +117 -0
- package/es/packages/core/ui/components/fmselect/index.vue.mjs +5 -0
- package/es/packages/core/ui/components/fmselect/index.vue2.mjs +86 -0
- package/es/packages/core/ui/components/index.mjs +7 -1
- package/index.js +26152 -25950
- package/index.min.js +38 -38
- package/index.min.mjs +38 -38
- package/index.mjs +26152 -25952
- package/lib/component.js +3 -1
- package/lib/core/ui/components/fmautocomplete/index.vue.d.ts +110 -0
- package/lib/core/ui/components/fmselect/index.vue.d.ts +91 -0
- package/lib/core/ui/components/index.d.ts +163 -2
- package/lib/index.js +2 -0
- package/lib/packages/core/index.js +2 -0
- package/lib/packages/core/ui/components/fmautocomplete/index.vue.js +9 -0
- package/lib/packages/core/ui/components/fmautocomplete/index.vue2.js +121 -0
- package/lib/packages/core/ui/components/fmselect/index.vue.js +9 -0
- package/lib/packages/core/ui/components/fmselect/index.vue2.js +90 -0
- package/lib/packages/core/ui/components/index.js +8 -0
- package/package.json +1 -1
- /package/es/{make-installer.css → component.css} +0 -0
package/es/component.mjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { FmLogin } from './packages/core/ui/login/index.mjs';
|
|
2
|
-
import { FmTransfer, FmNoticeBar } from './packages/core/ui/components/index.mjs';
|
|
2
|
+
import { FmTransfer, FmNoticeBar, Fmselect, FmAutocomplete } from './packages/core/ui/components/index.mjs';
|
|
3
3
|
|
|
4
4
|
const plugins = [
|
|
5
5
|
FmLogin,
|
|
6
6
|
FmTransfer,
|
|
7
|
-
FmNoticeBar
|
|
7
|
+
FmNoticeBar,
|
|
8
|
+
Fmselect,
|
|
9
|
+
FmAutocomplete
|
|
8
10
|
];
|
|
9
11
|
|
|
10
12
|
export { plugins as default };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
placeholder: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* api service name
|
|
9
|
+
*/
|
|
10
|
+
apiService: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* api service 下的方法
|
|
16
|
+
*/
|
|
17
|
+
apiAction: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
top: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 值的属性值
|
|
27
|
+
*/
|
|
28
|
+
fId: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* 值的属性标签
|
|
34
|
+
*/
|
|
35
|
+
fName: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
name: {
|
|
40
|
+
type: PropType<string>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
id: {
|
|
44
|
+
type: PropType<Number>;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
48
|
+
reset: (...args: any[]) => void;
|
|
49
|
+
select: (...args: any[]) => void;
|
|
50
|
+
"update:id": (value: Number) => void;
|
|
51
|
+
"update:name": (value: string) => void;
|
|
52
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
53
|
+
placeholder: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* api service name
|
|
59
|
+
*/
|
|
60
|
+
apiService: {
|
|
61
|
+
type: StringConstructor;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* api service 下的方法
|
|
66
|
+
*/
|
|
67
|
+
apiAction: {
|
|
68
|
+
type: StringConstructor;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
top: {
|
|
72
|
+
type: NumberConstructor;
|
|
73
|
+
default: number;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* 值的属性值
|
|
77
|
+
*/
|
|
78
|
+
fId: {
|
|
79
|
+
type: StringConstructor;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* 值的属性标签
|
|
84
|
+
*/
|
|
85
|
+
fName: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
name: {
|
|
90
|
+
type: PropType<string>;
|
|
91
|
+
required: true;
|
|
92
|
+
};
|
|
93
|
+
id: {
|
|
94
|
+
type: PropType<Number>;
|
|
95
|
+
required: true;
|
|
96
|
+
};
|
|
97
|
+
}>> & Readonly<{
|
|
98
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
99
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
100
|
+
"onUpdate:id"?: ((value: Number) => any) | undefined;
|
|
101
|
+
"onUpdate:name"?: ((value: string) => any) | undefined;
|
|
102
|
+
}>, {
|
|
103
|
+
placeholder: string;
|
|
104
|
+
top: number;
|
|
105
|
+
apiService: string;
|
|
106
|
+
apiAction: string;
|
|
107
|
+
fId: string;
|
|
108
|
+
fName: string;
|
|
109
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
110
|
+
export default _default;
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
id: {
|
|
35
|
+
type: PropType<any>;
|
|
36
|
+
};
|
|
37
|
+
name: {
|
|
38
|
+
type: PropType<any>;
|
|
39
|
+
};
|
|
40
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
41
|
+
change: (...args: any[]) => void;
|
|
42
|
+
"update:id": (value: any) => void;
|
|
43
|
+
"update:name": (value: any) => void;
|
|
44
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
45
|
+
optionData: {
|
|
46
|
+
type: {
|
|
47
|
+
(arrayLength: number): any[];
|
|
48
|
+
(...items: any[]): any[];
|
|
49
|
+
new (arrayLength: number): any[];
|
|
50
|
+
new (...items: any[]): any[];
|
|
51
|
+
isArray(arg: any): arg is any[];
|
|
52
|
+
readonly prototype: any[];
|
|
53
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
54
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
55
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
56
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
57
|
+
of<T>(...items: T[]): T[];
|
|
58
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
59
|
+
};
|
|
60
|
+
default: never[];
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* 值的属性值
|
|
64
|
+
*/
|
|
65
|
+
bvalue: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* 值的属性标签
|
|
71
|
+
*/
|
|
72
|
+
blabel: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
id: {
|
|
77
|
+
type: PropType<any>;
|
|
78
|
+
};
|
|
79
|
+
name: {
|
|
80
|
+
type: PropType<any>;
|
|
81
|
+
};
|
|
82
|
+
}>> & Readonly<{
|
|
83
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
84
|
+
"onUpdate:id"?: ((value: any) => any) | undefined;
|
|
85
|
+
"onUpdate:name"?: ((value: any) => any) | undefined;
|
|
86
|
+
}>, {
|
|
87
|
+
optionData: any[];
|
|
88
|
+
bvalue: string;
|
|
89
|
+
blabel: string;
|
|
90
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
91
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { elSvg } from './svgIcon';
|
|
2
|
-
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
|
|
3
3
|
declare const FmTransfer: DefineComponent<ExtractPropTypes<{
|
|
4
4
|
leftTitle: StringConstructor;
|
|
5
5
|
rightTitle: StringConstructor;
|
|
@@ -414,4 +414,165 @@ declare const FmDragImg: DefineComponent<ExtractPropTypes<{
|
|
|
414
414
|
minDegree: number;
|
|
415
415
|
maxDegree: number;
|
|
416
416
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
417
|
-
|
|
417
|
+
declare const Fmselect: DefineComponent<ExtractPropTypes<{
|
|
418
|
+
optionData: {
|
|
419
|
+
type: {
|
|
420
|
+
(arrayLength: number): any[];
|
|
421
|
+
(...items: any[]): any[];
|
|
422
|
+
new (arrayLength: number): any[];
|
|
423
|
+
new (...items: any[]): any[];
|
|
424
|
+
isArray(arg: any): arg is any[];
|
|
425
|
+
readonly prototype: any[];
|
|
426
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
427
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
428
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
429
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
430
|
+
of<T>(...items: T[]): T[];
|
|
431
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
432
|
+
};
|
|
433
|
+
default: never[];
|
|
434
|
+
};
|
|
435
|
+
bvalue: {
|
|
436
|
+
type: StringConstructor;
|
|
437
|
+
default: string;
|
|
438
|
+
};
|
|
439
|
+
blabel: {
|
|
440
|
+
type: StringConstructor;
|
|
441
|
+
default: string;
|
|
442
|
+
};
|
|
443
|
+
id: {
|
|
444
|
+
type: PropType<any>;
|
|
445
|
+
};
|
|
446
|
+
name: {
|
|
447
|
+
type: PropType<any>;
|
|
448
|
+
};
|
|
449
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
450
|
+
change: (...args: any[]) => void;
|
|
451
|
+
"update:id": (value: any) => void;
|
|
452
|
+
"update:name": (value: any) => void;
|
|
453
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
454
|
+
optionData: {
|
|
455
|
+
type: {
|
|
456
|
+
(arrayLength: number): any[];
|
|
457
|
+
(...items: any[]): any[];
|
|
458
|
+
new (arrayLength: number): any[];
|
|
459
|
+
new (...items: any[]): any[];
|
|
460
|
+
isArray(arg: any): arg is any[];
|
|
461
|
+
readonly prototype: any[];
|
|
462
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
463
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
464
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
465
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
466
|
+
of<T>(...items: T[]): T[];
|
|
467
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
468
|
+
};
|
|
469
|
+
default: never[];
|
|
470
|
+
};
|
|
471
|
+
bvalue: {
|
|
472
|
+
type: StringConstructor;
|
|
473
|
+
default: string;
|
|
474
|
+
};
|
|
475
|
+
blabel: {
|
|
476
|
+
type: StringConstructor;
|
|
477
|
+
default: string;
|
|
478
|
+
};
|
|
479
|
+
id: {
|
|
480
|
+
type: PropType<any>;
|
|
481
|
+
};
|
|
482
|
+
name: {
|
|
483
|
+
type: PropType<any>;
|
|
484
|
+
};
|
|
485
|
+
}>> & Readonly<{
|
|
486
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
487
|
+
"onUpdate:id"?: ((value: any) => any) | undefined;
|
|
488
|
+
"onUpdate:name"?: ((value: any) => any) | undefined;
|
|
489
|
+
}>, {
|
|
490
|
+
optionData: any[];
|
|
491
|
+
bvalue: string;
|
|
492
|
+
blabel: string;
|
|
493
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
494
|
+
declare const FmAutocomplete: DefineComponent<ExtractPropTypes<{
|
|
495
|
+
placeholder: {
|
|
496
|
+
type: StringConstructor;
|
|
497
|
+
default: string;
|
|
498
|
+
};
|
|
499
|
+
apiService: {
|
|
500
|
+
type: StringConstructor;
|
|
501
|
+
default: string;
|
|
502
|
+
};
|
|
503
|
+
apiAction: {
|
|
504
|
+
type: StringConstructor;
|
|
505
|
+
default: string;
|
|
506
|
+
};
|
|
507
|
+
top: {
|
|
508
|
+
type: NumberConstructor;
|
|
509
|
+
default: number;
|
|
510
|
+
};
|
|
511
|
+
fId: {
|
|
512
|
+
type: StringConstructor;
|
|
513
|
+
default: string;
|
|
514
|
+
};
|
|
515
|
+
fName: {
|
|
516
|
+
type: StringConstructor;
|
|
517
|
+
default: string;
|
|
518
|
+
};
|
|
519
|
+
name: {
|
|
520
|
+
type: PropType<string>;
|
|
521
|
+
required: true;
|
|
522
|
+
};
|
|
523
|
+
id: {
|
|
524
|
+
type: PropType<Number>;
|
|
525
|
+
required: true;
|
|
526
|
+
};
|
|
527
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
528
|
+
reset: (...args: any[]) => void;
|
|
529
|
+
select: (...args: any[]) => void;
|
|
530
|
+
"update:id": (value: Number) => void;
|
|
531
|
+
"update:name": (value: string) => void;
|
|
532
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
533
|
+
placeholder: {
|
|
534
|
+
type: StringConstructor;
|
|
535
|
+
default: string;
|
|
536
|
+
};
|
|
537
|
+
apiService: {
|
|
538
|
+
type: StringConstructor;
|
|
539
|
+
default: string;
|
|
540
|
+
};
|
|
541
|
+
apiAction: {
|
|
542
|
+
type: StringConstructor;
|
|
543
|
+
default: string;
|
|
544
|
+
};
|
|
545
|
+
top: {
|
|
546
|
+
type: NumberConstructor;
|
|
547
|
+
default: number;
|
|
548
|
+
};
|
|
549
|
+
fId: {
|
|
550
|
+
type: StringConstructor;
|
|
551
|
+
default: string;
|
|
552
|
+
};
|
|
553
|
+
fName: {
|
|
554
|
+
type: StringConstructor;
|
|
555
|
+
default: string;
|
|
556
|
+
};
|
|
557
|
+
name: {
|
|
558
|
+
type: PropType<string>;
|
|
559
|
+
required: true;
|
|
560
|
+
};
|
|
561
|
+
id: {
|
|
562
|
+
type: PropType<Number>;
|
|
563
|
+
required: true;
|
|
564
|
+
};
|
|
565
|
+
}>> & Readonly<{
|
|
566
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
567
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
568
|
+
"onUpdate:id"?: ((value: Number) => any) | undefined;
|
|
569
|
+
"onUpdate:name"?: ((value: string) => any) | undefined;
|
|
570
|
+
}>, {
|
|
571
|
+
placeholder: string;
|
|
572
|
+
top: number;
|
|
573
|
+
apiService: string;
|
|
574
|
+
apiAction: string;
|
|
575
|
+
fId: string;
|
|
576
|
+
fName: string;
|
|
577
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
578
|
+
export { FmTransfer, FmNoticeBar, FmDragImg, Fmselect, FmAutocomplete, elSvg };
|
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 { FmDragImg, FmNoticeBar, FmTransfer } from './packages/core/ui/components/index.mjs';
|
|
6
|
+
export { FmAutocomplete, FmDragImg, FmNoticeBar, FmTransfer, 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 { FmDragImg, FmNoticeBar, FmTransfer } from './ui/components/index.mjs';
|
|
1
|
+
export { FmAutocomplete, FmDragImg, FmNoticeBar, FmTransfer, 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';
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { defineComponent, useModel, resolveComponent, createBlock, openBlock, withCtx, createElementVNode, toDisplayString, mergeModels } from 'vue';
|
|
2
|
+
import { useBaseApi } from '../../../api/base/index.mjs';
|
|
3
|
+
|
|
4
|
+
const _hoisted_1 = { style: { "font-size": "14px", "line-height": "30px" } };
|
|
5
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
...{
|
|
7
|
+
name: "FmAutocomplete"
|
|
8
|
+
},
|
|
9
|
+
__name: "index",
|
|
10
|
+
props: /* @__PURE__ */ mergeModels({
|
|
11
|
+
placeholder: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "\u8BF7\u8F93\u5165\u5FEB\u901F\u641C\u7D22\u9009\u62E9"
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* api service name
|
|
17
|
+
*/
|
|
18
|
+
apiService: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "planOrder"
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* api service 下的方法
|
|
24
|
+
*/
|
|
25
|
+
apiAction: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "autoQuerySearch"
|
|
28
|
+
},
|
|
29
|
+
top: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: 15
|
|
32
|
+
},
|
|
33
|
+
/**
|
|
34
|
+
* 值的属性值
|
|
35
|
+
*/
|
|
36
|
+
fId: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "id"
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* 值的属性标签
|
|
42
|
+
*/
|
|
43
|
+
fName: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "name"
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
48
|
+
"name": {
|
|
49
|
+
required: true,
|
|
50
|
+
default: ""
|
|
51
|
+
},
|
|
52
|
+
"nameModifiers": {},
|
|
53
|
+
"id": {
|
|
54
|
+
required: true,
|
|
55
|
+
default: 0
|
|
56
|
+
},
|
|
57
|
+
"idModifiers": {}
|
|
58
|
+
}),
|
|
59
|
+
emits: /* @__PURE__ */ mergeModels(["select", "reset"], ["update:name", "update:id"]),
|
|
60
|
+
setup(__props, { emit: __emit }) {
|
|
61
|
+
const autoName = useModel(__props, "name");
|
|
62
|
+
const autoId = useModel(__props, "id");
|
|
63
|
+
const props = __props;
|
|
64
|
+
const emit = __emit;
|
|
65
|
+
const querySearchAsync = async (queryString, cb) => {
|
|
66
|
+
resetValue();
|
|
67
|
+
const res = await useBaseApi(props.apiService).post({ top: props.top, keywork: queryString }, props.apiAction);
|
|
68
|
+
const data = res.data.result ?? [];
|
|
69
|
+
if (data.length === 0) {
|
|
70
|
+
return cb([]);
|
|
71
|
+
}
|
|
72
|
+
const results = data.map((item) => ({
|
|
73
|
+
...item,
|
|
74
|
+
displayText: `${item[props.fName]}`
|
|
75
|
+
// 自定义展示格式
|
|
76
|
+
//fullData: item // 保留原始对象
|
|
77
|
+
}));
|
|
78
|
+
cb(results);
|
|
79
|
+
};
|
|
80
|
+
const handleSelect = (item) => {
|
|
81
|
+
autoName.value = item[props.fName];
|
|
82
|
+
autoId.value = item[props.fId];
|
|
83
|
+
emit("select", item);
|
|
84
|
+
};
|
|
85
|
+
const resetValue = () => {
|
|
86
|
+
autoId.value = 0;
|
|
87
|
+
emit("reset");
|
|
88
|
+
};
|
|
89
|
+
return (_ctx, _cache) => {
|
|
90
|
+
const _component_el_autocomplete = resolveComponent("el-autocomplete");
|
|
91
|
+
return openBlock(), createBlock(_component_el_autocomplete, {
|
|
92
|
+
modelValue: autoName.value,
|
|
93
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => autoName.value = $event),
|
|
94
|
+
debounce: 500,
|
|
95
|
+
"fetch-suggestions": querySearchAsync,
|
|
96
|
+
placeholder: props.placeholder,
|
|
97
|
+
"trigger-on-focus": false,
|
|
98
|
+
onSelect: handleSelect,
|
|
99
|
+
style: { "margin-top": "-2px" }
|
|
100
|
+
}, {
|
|
101
|
+
default: withCtx(({ item }) => [
|
|
102
|
+
createElementVNode(
|
|
103
|
+
"div",
|
|
104
|
+
_hoisted_1,
|
|
105
|
+
toDisplayString(item[__props.fName]),
|
|
106
|
+
1
|
|
107
|
+
/* TEXT */
|
|
108
|
+
)
|
|
109
|
+
]),
|
|
110
|
+
_: 1
|
|
111
|
+
/* STABLE */
|
|
112
|
+
}, 8, ["modelValue", "placeholder"]);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { defineComponent, useModel, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementBlock, Fragment, renderList, mergeModels } from 'vue';
|
|
2
|
+
|
|
3
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
...{
|
|
5
|
+
name: "Fmselect"
|
|
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
|
+
}, {
|
|
29
|
+
"id": {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: 0
|
|
32
|
+
},
|
|
33
|
+
"idModifiers": {},
|
|
34
|
+
"name": {
|
|
35
|
+
type: String,
|
|
36
|
+
default: ""
|
|
37
|
+
},
|
|
38
|
+
"nameModifiers": {}
|
|
39
|
+
}),
|
|
40
|
+
emits: /* @__PURE__ */ mergeModels(["change"], ["update:id", "update:name"]),
|
|
41
|
+
setup(__props, { emit: __emit }) {
|
|
42
|
+
const modeValueId = useModel(__props, "id");
|
|
43
|
+
const modeValueName = useModel(__props, "name");
|
|
44
|
+
const props = __props;
|
|
45
|
+
const emit = __emit;
|
|
46
|
+
const handleSelectChange = () => {
|
|
47
|
+
const fitem = props.optionData.find((item) => item.id == modeValueId.value);
|
|
48
|
+
modeValueName.value = fitem[props.blabel];
|
|
49
|
+
emit("change", fitem);
|
|
50
|
+
};
|
|
51
|
+
return (_ctx, _cache) => {
|
|
52
|
+
const _component_el_option = resolveComponent("el-option");
|
|
53
|
+
const _component_el_select = resolveComponent("el-select");
|
|
54
|
+
return openBlock(), createBlock(_component_el_select, {
|
|
55
|
+
modelValue: modeValueId.value,
|
|
56
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValueId.value = $event),
|
|
57
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
58
|
+
onChange: handleSelectChange
|
|
59
|
+
}, {
|
|
60
|
+
default: withCtx(() => [
|
|
61
|
+
createVNode(_component_el_option, {
|
|
62
|
+
value: 0,
|
|
63
|
+
label: ""
|
|
64
|
+
}),
|
|
65
|
+
(openBlock(true), createElementBlock(
|
|
66
|
+
Fragment,
|
|
67
|
+
null,
|
|
68
|
+
renderList(__props.optionData, (item, index) => {
|
|
69
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
70
|
+
key: index,
|
|
71
|
+
value: item[__props.bvalue],
|
|
72
|
+
label: item[__props.blabel]
|
|
73
|
+
}, null, 8, ["value", "label"]);
|
|
74
|
+
}),
|
|
75
|
+
128
|
|
76
|
+
/* KEYED_FRAGMENT */
|
|
77
|
+
))
|
|
78
|
+
]),
|
|
79
|
+
_: 1
|
|
80
|
+
/* STABLE */
|
|
81
|
+
}, 8, ["modelValue"]);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export { _sfc_main as default };
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import './transfer/index.vue.mjs';
|
|
2
2
|
import './noticeBar/index.vue.mjs';
|
|
3
3
|
import dragimg from './dragVerify/dragVerifyImgRotate.vue.mjs';
|
|
4
|
+
import './fmselect/index.vue.mjs';
|
|
5
|
+
import './fmautocomplete/index.vue.mjs';
|
|
4
6
|
export { elSvg } from './svgIcon/index.mjs';
|
|
5
7
|
import _sfc_main from './transfer/index.vue2.mjs';
|
|
6
8
|
import _sfc_main$1 from './noticeBar/index.vue2.mjs';
|
|
9
|
+
import _sfc_main$2 from './fmselect/index.vue2.mjs';
|
|
10
|
+
import _sfc_main$3 from './fmautocomplete/index.vue2.mjs';
|
|
7
11
|
|
|
8
12
|
const FmTransfer = _sfc_main;
|
|
9
13
|
const FmNoticeBar = _sfc_main$1;
|
|
10
14
|
const FmDragImg = dragimg;
|
|
15
|
+
const Fmselect = _sfc_main$2;
|
|
16
|
+
const FmAutocomplete = _sfc_main$3;
|
|
11
17
|
|
|
12
|
-
export { FmDragImg, FmNoticeBar, FmTransfer };
|
|
18
|
+
export { FmAutocomplete, FmDragImg, FmNoticeBar, FmTransfer, Fmselect };
|