@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
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fm-dev v1.0.
|
|
1
|
+
/*! fm-dev v1.0.110 */
|
|
2
2
|
import { defineComponent, reactive, computed, watch, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, createTextVNode, toDisplayString as toDisplayString$1, withDirectives, createElementBlock, Fragment, renderList, vShow, ref, onMounted, nextTick, normalizeStyle, createCommentVNode, normalizeClass, withModifiers, mergeModels, useModel, effectScope, getCurrentInstance, shallowRef, isRef as isRef$1, inject, onUnmounted, h, Text, createSlots, renderSlot, markRaw, hasInjectionContext, toRaw as toRaw$1, isReactive as isReactive$1, toRef, unref, getCurrentScope, onScopeDispose, toRefs, resolveDirective, mergeProps, resolveDynamicComponent, useSlots, toHandlers, onBeforeUnmount, onUpdated, useAttrs, normalizeProps, guardReactiveProps } from 'vue';
|
|
3
3
|
import crypto from 'crypto';
|
|
4
4
|
import require$$0 from 'url';
|
|
@@ -35367,14 +35367,24 @@ const usefminputdropdownstore = defineStore("fminputdropdownstore", () => {
|
|
|
35367
35367
|
const state = reactive({
|
|
35368
35368
|
optionsData: {}
|
|
35369
35369
|
});
|
|
35370
|
-
const getOptionsData = async (apiService, apiAction, basecode, reload = false) => {
|
|
35370
|
+
const getOptionsData = async (apiService, apiAction, basecode, reload = false, multibasecode = []) => {
|
|
35371
35371
|
if (!reload) {
|
|
35372
35372
|
if (state.optionsData[basecode] && state.optionsData[basecode].length > 0) {
|
|
35373
35373
|
return state.optionsData[basecode];
|
|
35374
35374
|
}
|
|
35375
35375
|
}
|
|
35376
|
-
const res = await useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode);
|
|
35377
|
-
|
|
35376
|
+
const res = await useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode + "&mcodes=" + multibasecode.join(","));
|
|
35377
|
+
if (multibasecode.length > 0) {
|
|
35378
|
+
const mdata = res.data.result ?? [];
|
|
35379
|
+
multibasecode.forEach((p) => {
|
|
35380
|
+
const tempdata = mdata.filter((x) => {
|
|
35381
|
+
return x.code == p;
|
|
35382
|
+
});
|
|
35383
|
+
state.optionsData[p] = tempdata ?? [];
|
|
35384
|
+
});
|
|
35385
|
+
} else {
|
|
35386
|
+
return state.optionsData[basecode] = res.data.result ?? [];
|
|
35387
|
+
}
|
|
35378
35388
|
};
|
|
35379
35389
|
return {
|
|
35380
35390
|
state,
|
|
@@ -35443,6 +35453,20 @@ var _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
35443
35453
|
basecode: {
|
|
35444
35454
|
type: String,
|
|
35445
35455
|
default: ""
|
|
35456
|
+
},
|
|
35457
|
+
/**
|
|
35458
|
+
* 基础编码 多个编码合在一起调用
|
|
35459
|
+
*/
|
|
35460
|
+
multibasecode: {
|
|
35461
|
+
type: Array,
|
|
35462
|
+
default: []
|
|
35463
|
+
},
|
|
35464
|
+
/**
|
|
35465
|
+
* 是否默认加载数据
|
|
35466
|
+
*/
|
|
35467
|
+
autoLoadData: {
|
|
35468
|
+
type: Boolean,
|
|
35469
|
+
default: true
|
|
35446
35470
|
}
|
|
35447
35471
|
}, {
|
|
35448
35472
|
"id": {
|
|
@@ -35474,13 +35498,13 @@ var _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
35474
35498
|
};
|
|
35475
35499
|
onMounted(async () => {
|
|
35476
35500
|
state.optionData = props.optionData;
|
|
35477
|
-
if (props.basecode && props.basecode != "") {
|
|
35478
|
-
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode);
|
|
35501
|
+
if (props.autoLoadData && props.basecode && props.basecode != "") {
|
|
35502
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode);
|
|
35479
35503
|
}
|
|
35480
35504
|
});
|
|
35481
35505
|
const handRestdata = async () => {
|
|
35482
35506
|
if (props.basecode && props.basecode != "") {
|
|
35483
|
-
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true);
|
|
35507
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true, []);
|
|
35484
35508
|
}
|
|
35485
35509
|
};
|
|
35486
35510
|
return (_ctx, _cache) => {
|
|
@@ -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;
|
|
@@ -8,14 +8,24 @@ const usefminputdropdownstore = pinia.defineStore("fminputdropdownstore", () =>
|
|
|
8
8
|
const state = vue.reactive({
|
|
9
9
|
optionsData: {}
|
|
10
10
|
});
|
|
11
|
-
const getOptionsData = async (apiService, apiAction, basecode, reload = false) => {
|
|
11
|
+
const getOptionsData = async (apiService, apiAction, basecode, reload = false, multibasecode = []) => {
|
|
12
12
|
if (!reload) {
|
|
13
13
|
if (state.optionsData[basecode] && state.optionsData[basecode].length > 0) {
|
|
14
14
|
return state.optionsData[basecode];
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
const res = await index.useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode);
|
|
18
|
-
|
|
17
|
+
const res = await index.useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode + "&mcodes=" + multibasecode.join(","));
|
|
18
|
+
if (multibasecode.length > 0) {
|
|
19
|
+
const mdata = res.data.result ?? [];
|
|
20
|
+
multibasecode.forEach((p) => {
|
|
21
|
+
const tempdata = mdata.filter((x) => {
|
|
22
|
+
return x.code == p;
|
|
23
|
+
});
|
|
24
|
+
state.optionsData[p] = tempdata ?? [];
|
|
25
|
+
});
|
|
26
|
+
} else {
|
|
27
|
+
return state.optionsData[basecode] = res.data.result ?? [];
|
|
28
|
+
}
|
|
19
29
|
};
|
|
20
30
|
return {
|
|
21
31
|
state,
|
|
@@ -67,6 +67,20 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
67
67
|
basecode: {
|
|
68
68
|
type: String,
|
|
69
69
|
default: ""
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* 基础编码 多个编码合在一起调用
|
|
73
|
+
*/
|
|
74
|
+
multibasecode: {
|
|
75
|
+
type: Array,
|
|
76
|
+
default: []
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* 是否默认加载数据
|
|
80
|
+
*/
|
|
81
|
+
autoLoadData: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: true
|
|
70
84
|
}
|
|
71
85
|
}, {
|
|
72
86
|
"id": {
|
|
@@ -98,13 +112,13 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
98
112
|
};
|
|
99
113
|
vue.onMounted(async () => {
|
|
100
114
|
state.optionData = props.optionData;
|
|
101
|
-
if (props.basecode && props.basecode != "") {
|
|
102
|
-
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode);
|
|
115
|
+
if (props.autoLoadData && props.basecode && props.basecode != "") {
|
|
116
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode);
|
|
103
117
|
}
|
|
104
118
|
});
|
|
105
119
|
const handRestdata = async () => {
|
|
106
120
|
if (props.basecode && props.basecode != "") {
|
|
107
|
-
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true);
|
|
121
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true, []);
|
|
108
122
|
}
|
|
109
123
|
};
|
|
110
124
|
return (_ctx, _cache) => {
|
package/package.json
CHANGED
|
File without changes
|