@fmdevui/fm-dev 1.0.108 → 1.0.110
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/core/stores/ainputdropdow.d.ts +3 -3
- package/es/core/ui/components/index.d.ts +44 -0
- package/es/core/ui/components/inputdropdown/index.vue.d.ts +56 -0
- package/es/packages/core/stores/ainputdropdow.mjs +13 -3
- package/es/packages/core/ui/components/inputdropdown/index.vue2.mjs +17 -3
- package/index.js +31 -7
- package/index.min.js +20 -20
- package/index.min.mjs +32 -32
- package/index.mjs +31 -7
- package/lib/core/stores/ainputdropdow.d.ts +3 -3
- package/lib/core/ui/components/index.d.ts +44 -0
- package/lib/core/ui/components/inputdropdown/index.vue.d.ts +56 -0
- package/lib/packages/core/stores/ainputdropdow.js +13 -3
- package/lib/packages/core/ui/components/inputdropdown/index.vue2.js +17 -3
- package/package.json +1 -1
- /package/es/{component.css → make-installer.css} +0 -0
|
@@ -3,15 +3,15 @@ export declare const usefminputdropdownstore: StoreDefinition<"fminputdropdownst
|
|
|
3
3
|
state: {
|
|
4
4
|
optionsData: any;
|
|
5
5
|
};
|
|
6
|
-
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean) => Promise<any>;
|
|
6
|
+
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean, multibasecode?: Array<any>) => Promise<any>;
|
|
7
7
|
}, "state">, Pick<{
|
|
8
8
|
state: {
|
|
9
9
|
optionsData: any;
|
|
10
10
|
};
|
|
11
|
-
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean) => Promise<any>;
|
|
11
|
+
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean, multibasecode?: Array<any>) => Promise<any>;
|
|
12
12
|
}, never>, Pick<{
|
|
13
13
|
state: {
|
|
14
14
|
optionsData: any;
|
|
15
15
|
};
|
|
16
|
-
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean) => Promise<any>;
|
|
16
|
+
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean, multibasecode?: Array<any>) => Promise<any>;
|
|
17
17
|
}, "getOptionsData">>;
|
|
@@ -756,6 +756,27 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
|
|
|
756
756
|
type: StringConstructor;
|
|
757
757
|
default: string;
|
|
758
758
|
};
|
|
759
|
+
multibasecode: {
|
|
760
|
+
type: {
|
|
761
|
+
(arrayLength: number): any[];
|
|
762
|
+
(...items: any[]): any[];
|
|
763
|
+
new (arrayLength: number): any[];
|
|
764
|
+
new (...items: any[]): any[];
|
|
765
|
+
isArray(arg: any): arg is any[];
|
|
766
|
+
readonly prototype: any[];
|
|
767
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
768
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
769
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
770
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
771
|
+
of<T>(...items: T[]): T[];
|
|
772
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
773
|
+
};
|
|
774
|
+
default: never[];
|
|
775
|
+
};
|
|
776
|
+
autoLoadData: {
|
|
777
|
+
type: BooleanConstructor;
|
|
778
|
+
default: boolean;
|
|
779
|
+
};
|
|
759
780
|
id: {
|
|
760
781
|
type: PropType<any>;
|
|
761
782
|
};
|
|
@@ -820,6 +841,27 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
|
|
|
820
841
|
type: StringConstructor;
|
|
821
842
|
default: string;
|
|
822
843
|
};
|
|
844
|
+
multibasecode: {
|
|
845
|
+
type: {
|
|
846
|
+
(arrayLength: number): any[];
|
|
847
|
+
(...items: any[]): any[];
|
|
848
|
+
new (arrayLength: number): any[];
|
|
849
|
+
new (...items: any[]): any[];
|
|
850
|
+
isArray(arg: any): arg is any[];
|
|
851
|
+
readonly prototype: any[];
|
|
852
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
853
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
854
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
855
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
856
|
+
of<T>(...items: T[]): T[];
|
|
857
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
858
|
+
};
|
|
859
|
+
default: never[];
|
|
860
|
+
};
|
|
861
|
+
autoLoadData: {
|
|
862
|
+
type: BooleanConstructor;
|
|
863
|
+
default: boolean;
|
|
864
|
+
};
|
|
823
865
|
id: {
|
|
824
866
|
type: PropType<any>;
|
|
825
867
|
};
|
|
@@ -841,6 +883,8 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
|
|
|
841
883
|
dropWidth: string;
|
|
842
884
|
dropHeight: string;
|
|
843
885
|
basecode: string;
|
|
886
|
+
multibasecode: any[];
|
|
887
|
+
autoLoadData: boolean;
|
|
844
888
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
845
889
|
declare const Fminputtable: {
|
|
846
890
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
|
|
@@ -68,6 +68,33 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
68
68
|
type: StringConstructor;
|
|
69
69
|
default: string;
|
|
70
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
* 基础编码 多个编码合在一起调用
|
|
73
|
+
*/
|
|
74
|
+
multibasecode: {
|
|
75
|
+
type: {
|
|
76
|
+
(arrayLength: number): any[];
|
|
77
|
+
(...items: any[]): any[];
|
|
78
|
+
new (arrayLength: number): any[];
|
|
79
|
+
new (...items: any[]): any[];
|
|
80
|
+
isArray(arg: any): arg is any[];
|
|
81
|
+
readonly prototype: any[];
|
|
82
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
83
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
84
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
85
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
86
|
+
of<T>(...items: T[]): T[];
|
|
87
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
88
|
+
};
|
|
89
|
+
default: never[];
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* 是否默认加载数据
|
|
93
|
+
*/
|
|
94
|
+
autoLoadData: {
|
|
95
|
+
type: BooleanConstructor;
|
|
96
|
+
default: boolean;
|
|
97
|
+
};
|
|
71
98
|
id: {
|
|
72
99
|
type: PropType<any>;
|
|
73
100
|
};
|
|
@@ -147,6 +174,33 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
147
174
|
type: StringConstructor;
|
|
148
175
|
default: string;
|
|
149
176
|
};
|
|
177
|
+
/**
|
|
178
|
+
* 基础编码 多个编码合在一起调用
|
|
179
|
+
*/
|
|
180
|
+
multibasecode: {
|
|
181
|
+
type: {
|
|
182
|
+
(arrayLength: number): any[];
|
|
183
|
+
(...items: any[]): any[];
|
|
184
|
+
new (arrayLength: number): any[];
|
|
185
|
+
new (...items: any[]): any[];
|
|
186
|
+
isArray(arg: any): arg is any[];
|
|
187
|
+
readonly prototype: any[];
|
|
188
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
189
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
190
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
191
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
192
|
+
of<T>(...items: T[]): T[];
|
|
193
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
194
|
+
};
|
|
195
|
+
default: never[];
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* 是否默认加载数据
|
|
199
|
+
*/
|
|
200
|
+
autoLoadData: {
|
|
201
|
+
type: BooleanConstructor;
|
|
202
|
+
default: boolean;
|
|
203
|
+
};
|
|
150
204
|
id: {
|
|
151
205
|
type: PropType<any>;
|
|
152
206
|
};
|
|
@@ -168,5 +222,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
168
222
|
dropWidth: string;
|
|
169
223
|
dropHeight: string;
|
|
170
224
|
basecode: string;
|
|
225
|
+
multibasecode: any[];
|
|
226
|
+
autoLoadData: boolean;
|
|
171
227
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
172
228
|
export default _default;
|
|
@@ -6,14 +6,24 @@ const usefminputdropdownstore = defineStore("fminputdropdownstore", () => {
|
|
|
6
6
|
const state = reactive({
|
|
7
7
|
optionsData: {}
|
|
8
8
|
});
|
|
9
|
-
const getOptionsData = async (apiService, apiAction, basecode, reload = false) => {
|
|
9
|
+
const getOptionsData = async (apiService, apiAction, basecode, reload = false, multibasecode = []) => {
|
|
10
10
|
if (!reload) {
|
|
11
11
|
if (state.optionsData[basecode] && state.optionsData[basecode].length > 0) {
|
|
12
12
|
return state.optionsData[basecode];
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
const res = await useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode);
|
|
16
|
-
|
|
15
|
+
const res = await useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode + "&mcodes=" + multibasecode.join(","));
|
|
16
|
+
if (multibasecode.length > 0) {
|
|
17
|
+
const mdata = res.data.result ?? [];
|
|
18
|
+
multibasecode.forEach((p) => {
|
|
19
|
+
const tempdata = mdata.filter((x) => {
|
|
20
|
+
return x.code == p;
|
|
21
|
+
});
|
|
22
|
+
state.optionsData[p] = tempdata ?? [];
|
|
23
|
+
});
|
|
24
|
+
} else {
|
|
25
|
+
return state.optionsData[basecode] = res.data.result ?? [];
|
|
26
|
+
}
|
|
17
27
|
};
|
|
18
28
|
return {
|
|
19
29
|
state,
|
|
@@ -63,6 +63,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
63
63
|
basecode: {
|
|
64
64
|
type: String,
|
|
65
65
|
default: ""
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
* 基础编码 多个编码合在一起调用
|
|
69
|
+
*/
|
|
70
|
+
multibasecode: {
|
|
71
|
+
type: Array,
|
|
72
|
+
default: []
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* 是否默认加载数据
|
|
76
|
+
*/
|
|
77
|
+
autoLoadData: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: true
|
|
66
80
|
}
|
|
67
81
|
}, {
|
|
68
82
|
"id": {
|
|
@@ -94,13 +108,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
94
108
|
};
|
|
95
109
|
onMounted(async () => {
|
|
96
110
|
state.optionData = props.optionData;
|
|
97
|
-
if (props.basecode && props.basecode != "") {
|
|
98
|
-
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode);
|
|
111
|
+
if (props.autoLoadData && props.basecode && props.basecode != "") {
|
|
112
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode);
|
|
99
113
|
}
|
|
100
114
|
});
|
|
101
115
|
const handRestdata = async () => {
|
|
102
116
|
if (props.basecode && props.basecode != "") {
|
|
103
|
-
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true);
|
|
117
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true, []);
|
|
104
118
|
}
|
|
105
119
|
};
|
|
106
120
|
return (_ctx, _cache) => {
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fm-dev v1.0.
|
|
1
|
+
/*! fm-dev v1.0.110 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('crypto'), require('url'), require('http'), require('https'), require('util'), require('stream'), require('assert'), require('zlib'), require('element-plus')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vue', 'crypto', 'url', 'http', 'https', 'util', 'stream', 'assert', 'zlib', 'element-plus'], factory) :
|
|
@@ -35362,14 +35362,24 @@
|
|
|
35362
35362
|
const state = vue.reactive({
|
|
35363
35363
|
optionsData: {}
|
|
35364
35364
|
});
|
|
35365
|
-
const getOptionsData = async (apiService, apiAction, basecode, reload = false) => {
|
|
35365
|
+
const getOptionsData = async (apiService, apiAction, basecode, reload = false, multibasecode = []) => {
|
|
35366
35366
|
if (!reload) {
|
|
35367
35367
|
if (state.optionsData[basecode] && state.optionsData[basecode].length > 0) {
|
|
35368
35368
|
return state.optionsData[basecode];
|
|
35369
35369
|
}
|
|
35370
35370
|
}
|
|
35371
|
-
const res = await useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode);
|
|
35372
|
-
|
|
35371
|
+
const res = await useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode + "&mcodes=" + multibasecode.join(","));
|
|
35372
|
+
if (multibasecode.length > 0) {
|
|
35373
|
+
const mdata = res.data.result ?? [];
|
|
35374
|
+
multibasecode.forEach((p) => {
|
|
35375
|
+
const tempdata = mdata.filter((x) => {
|
|
35376
|
+
return x.code == p;
|
|
35377
|
+
});
|
|
35378
|
+
state.optionsData[p] = tempdata ?? [];
|
|
35379
|
+
});
|
|
35380
|
+
} else {
|
|
35381
|
+
return state.optionsData[basecode] = res.data.result ?? [];
|
|
35382
|
+
}
|
|
35373
35383
|
};
|
|
35374
35384
|
return {
|
|
35375
35385
|
state,
|
|
@@ -35438,6 +35448,20 @@
|
|
|
35438
35448
|
basecode: {
|
|
35439
35449
|
type: String,
|
|
35440
35450
|
default: ""
|
|
35451
|
+
},
|
|
35452
|
+
/**
|
|
35453
|
+
* 基础编码 多个编码合在一起调用
|
|
35454
|
+
*/
|
|
35455
|
+
multibasecode: {
|
|
35456
|
+
type: Array,
|
|
35457
|
+
default: []
|
|
35458
|
+
},
|
|
35459
|
+
/**
|
|
35460
|
+
* 是否默认加载数据
|
|
35461
|
+
*/
|
|
35462
|
+
autoLoadData: {
|
|
35463
|
+
type: Boolean,
|
|
35464
|
+
default: true
|
|
35441
35465
|
}
|
|
35442
35466
|
}, {
|
|
35443
35467
|
"id": {
|
|
@@ -35469,13 +35493,13 @@
|
|
|
35469
35493
|
};
|
|
35470
35494
|
vue.onMounted(async () => {
|
|
35471
35495
|
state.optionData = props.optionData;
|
|
35472
|
-
if (props.basecode && props.basecode != "") {
|
|
35473
|
-
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode);
|
|
35496
|
+
if (props.autoLoadData && props.basecode && props.basecode != "") {
|
|
35497
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode);
|
|
35474
35498
|
}
|
|
35475
35499
|
});
|
|
35476
35500
|
const handRestdata = async () => {
|
|
35477
35501
|
if (props.basecode && props.basecode != "") {
|
|
35478
|
-
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true);
|
|
35502
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true, []);
|
|
35479
35503
|
}
|
|
35480
35504
|
};
|
|
35481
35505
|
return (_ctx, _cache) => {
|