@fmdevui/fm-dev 1.0.66 → 1.0.68
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/ui/components/index.d.ts +27 -0
- package/es/core/ui/components/inputdropdown/index.vue.d.ts +45 -0
- package/es/packages/core/ui/components/inputdropdown/index.vue2.mjs +48 -3
- package/index.js +47 -3
- package/index.min.js +22 -22
- package/index.min.mjs +25 -25
- package/index.mjs +47 -3
- package/lib/core/ui/components/index.d.ts +27 -0
- package/lib/core/ui/components/inputdropdown/index.vue.d.ts +45 -0
- package/lib/packages/core/ui/components/inputdropdown/index.vue2.js +47 -2
- package/package.json +1 -1
- /package/es/{index.css → make-installer.css} +0 -0
|
@@ -624,6 +624,18 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
|
|
|
624
624
|
type: StringConstructor;
|
|
625
625
|
default: string;
|
|
626
626
|
};
|
|
627
|
+
apiService: {
|
|
628
|
+
type: StringConstructor;
|
|
629
|
+
default: string;
|
|
630
|
+
};
|
|
631
|
+
apiAction: {
|
|
632
|
+
type: StringConstructor;
|
|
633
|
+
default: string;
|
|
634
|
+
};
|
|
635
|
+
basecode: {
|
|
636
|
+
type: StringConstructor;
|
|
637
|
+
default: string;
|
|
638
|
+
};
|
|
627
639
|
id: {
|
|
628
640
|
type: PropType<any>;
|
|
629
641
|
};
|
|
@@ -672,6 +684,18 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
|
|
|
672
684
|
type: StringConstructor;
|
|
673
685
|
default: string;
|
|
674
686
|
};
|
|
687
|
+
apiService: {
|
|
688
|
+
type: StringConstructor;
|
|
689
|
+
default: string;
|
|
690
|
+
};
|
|
691
|
+
apiAction: {
|
|
692
|
+
type: StringConstructor;
|
|
693
|
+
default: string;
|
|
694
|
+
};
|
|
695
|
+
basecode: {
|
|
696
|
+
type: StringConstructor;
|
|
697
|
+
default: string;
|
|
698
|
+
};
|
|
675
699
|
id: {
|
|
676
700
|
type: PropType<any>;
|
|
677
701
|
};
|
|
@@ -687,8 +711,11 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
|
|
|
687
711
|
optionData: any[];
|
|
688
712
|
bvalue: string;
|
|
689
713
|
blabel: string;
|
|
714
|
+
apiService: string;
|
|
715
|
+
apiAction: string;
|
|
690
716
|
inputWidth: string;
|
|
691
717
|
dropWidth: string;
|
|
718
|
+
basecode: string;
|
|
692
719
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
693
720
|
declare const FmTree: DefineComponent<ExtractPropTypes<{
|
|
694
721
|
checkStrictly: {
|
|
@@ -43,6 +43,27 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
43
43
|
type: StringConstructor;
|
|
44
44
|
default: string;
|
|
45
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* api service name
|
|
48
|
+
*/
|
|
49
|
+
apiService: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* api service 下的方法
|
|
55
|
+
*/
|
|
56
|
+
apiAction: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* 基础编码 自动获取数据
|
|
62
|
+
*/
|
|
63
|
+
basecode: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
46
67
|
id: {
|
|
47
68
|
type: PropType<any>;
|
|
48
69
|
};
|
|
@@ -97,6 +118,27 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
97
118
|
type: StringConstructor;
|
|
98
119
|
default: string;
|
|
99
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* api service name
|
|
123
|
+
*/
|
|
124
|
+
apiService: {
|
|
125
|
+
type: StringConstructor;
|
|
126
|
+
default: string;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* api service 下的方法
|
|
130
|
+
*/
|
|
131
|
+
apiAction: {
|
|
132
|
+
type: StringConstructor;
|
|
133
|
+
default: string;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* 基础编码 自动获取数据
|
|
137
|
+
*/
|
|
138
|
+
basecode: {
|
|
139
|
+
type: StringConstructor;
|
|
140
|
+
default: string;
|
|
141
|
+
};
|
|
100
142
|
id: {
|
|
101
143
|
type: PropType<any>;
|
|
102
144
|
};
|
|
@@ -112,7 +154,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
112
154
|
optionData: any[];
|
|
113
155
|
bvalue: string;
|
|
114
156
|
blabel: string;
|
|
157
|
+
apiService: string;
|
|
158
|
+
apiAction: string;
|
|
115
159
|
inputWidth: string;
|
|
116
160
|
dropWidth: string;
|
|
161
|
+
basecode: string;
|
|
117
162
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
118
163
|
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent, useModel, resolveComponent, createBlock, openBlock, withCtx, createVNode, normalizeStyle, createElementBlock, Fragment, renderList,
|
|
1
|
+
import { defineComponent, useModel, reactive, onMounted, resolveComponent, createBlock, openBlock, withCtx, createVNode, normalizeStyle, createTextVNode, createElementBlock, Fragment, renderList, toDisplayString, mergeModels } from 'vue';
|
|
2
|
+
import { useBaseApi } from '../../../api/base/index.mjs';
|
|
2
3
|
|
|
3
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
5
|
...{
|
|
@@ -36,6 +37,27 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
37
|
dropWidth: {
|
|
37
38
|
type: String,
|
|
38
39
|
default: "90px"
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* api service name
|
|
43
|
+
*/
|
|
44
|
+
apiService: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: "baseData"
|
|
47
|
+
},
|
|
48
|
+
/**
|
|
49
|
+
* api service 下的方法
|
|
50
|
+
*/
|
|
51
|
+
apiAction: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: "baseDataList"
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* 基础编码 自动获取数据
|
|
57
|
+
*/
|
|
58
|
+
basecode: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: ""
|
|
39
61
|
}
|
|
40
62
|
}, {
|
|
41
63
|
"id": {
|
|
@@ -54,6 +76,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
76
|
const modeValueId = useModel(__props, "id");
|
|
55
77
|
const modeValueName = useModel(__props, "name");
|
|
56
78
|
const props = __props;
|
|
79
|
+
const state = reactive({
|
|
80
|
+
optionData: props.optionData
|
|
81
|
+
});
|
|
57
82
|
const emit = __emit;
|
|
58
83
|
const handCommand = (command) => {
|
|
59
84
|
const fitem = props.optionData.find((item) => item[props.bvalue] === command);
|
|
@@ -61,7 +86,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
86
|
modeValueName.value = fitem != null ? fitem[props.blabel] : "";
|
|
62
87
|
emit("change", fitem);
|
|
63
88
|
};
|
|
89
|
+
onMounted(async () => {
|
|
90
|
+
state.optionData = props.optionData;
|
|
91
|
+
if (props.basecode && props.basecode != "") {
|
|
92
|
+
const res = useBaseApi(props.apiService).get(null, props.apiAction + "/?codetype=" + props.basecode);
|
|
93
|
+
state.optionData = res.data.result ?? [];
|
|
94
|
+
}
|
|
95
|
+
});
|
|
64
96
|
return (_ctx, _cache) => {
|
|
97
|
+
const _component_el_button = resolveComponent("el-button");
|
|
65
98
|
const _component_el_input = resolveComponent("el-input");
|
|
66
99
|
const _component_el_dropdown_item = resolveComponent("el-dropdown-item");
|
|
67
100
|
const _component_el_dropdown_menu = resolveComponent("el-dropdown-menu");
|
|
@@ -80,7 +113,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
113
|
(openBlock(true), createElementBlock(
|
|
81
114
|
Fragment,
|
|
82
115
|
null,
|
|
83
|
-
renderList(
|
|
116
|
+
renderList(state.optionData, (item, index) => {
|
|
84
117
|
return openBlock(), createBlock(_component_el_dropdown_item, {
|
|
85
118
|
key: index,
|
|
86
119
|
command: item[__props.bvalue],
|
|
@@ -111,7 +144,19 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
111
144
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValueName.value = $event),
|
|
112
145
|
placeholder: props.placeholder,
|
|
113
146
|
style: normalizeStyle({ width: __props.inputWidth })
|
|
114
|
-
},
|
|
147
|
+
}, {
|
|
148
|
+
append: withCtx(() => [
|
|
149
|
+
createVNode(_component_el_button, { text: "" }, {
|
|
150
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
151
|
+
createTextVNode("\u5237\u65B0")
|
|
152
|
+
])),
|
|
153
|
+
_: 1,
|
|
154
|
+
__: [1]
|
|
155
|
+
})
|
|
156
|
+
]),
|
|
157
|
+
_: 1
|
|
158
|
+
/* STABLE */
|
|
159
|
+
}, 8, ["modelValue", "placeholder", "style"])
|
|
115
160
|
]),
|
|
116
161
|
_: 1
|
|
117
162
|
/* STABLE */
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fm-dev v1.0.
|
|
1
|
+
/*! fm-dev v1.0.68 */
|
|
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) :
|
|
@@ -23896,6 +23896,27 @@
|
|
|
23896
23896
|
dropWidth: {
|
|
23897
23897
|
type: String,
|
|
23898
23898
|
default: "90px"
|
|
23899
|
+
},
|
|
23900
|
+
/**
|
|
23901
|
+
* api service name
|
|
23902
|
+
*/
|
|
23903
|
+
apiService: {
|
|
23904
|
+
type: String,
|
|
23905
|
+
default: "baseData"
|
|
23906
|
+
},
|
|
23907
|
+
/**
|
|
23908
|
+
* api service 下的方法
|
|
23909
|
+
*/
|
|
23910
|
+
apiAction: {
|
|
23911
|
+
type: String,
|
|
23912
|
+
default: "baseDataList"
|
|
23913
|
+
},
|
|
23914
|
+
/**
|
|
23915
|
+
* 基础编码 自动获取数据
|
|
23916
|
+
*/
|
|
23917
|
+
basecode: {
|
|
23918
|
+
type: String,
|
|
23919
|
+
default: ""
|
|
23899
23920
|
}
|
|
23900
23921
|
}, {
|
|
23901
23922
|
"id": {
|
|
@@ -23914,6 +23935,9 @@
|
|
|
23914
23935
|
const modeValueId = vue.useModel(__props, "id");
|
|
23915
23936
|
const modeValueName = vue.useModel(__props, "name");
|
|
23916
23937
|
const props = __props;
|
|
23938
|
+
const state = vue.reactive({
|
|
23939
|
+
optionData: props.optionData
|
|
23940
|
+
});
|
|
23917
23941
|
const emit = __emit;
|
|
23918
23942
|
const handCommand = (command) => {
|
|
23919
23943
|
const fitem = props.optionData.find((item) => item[props.bvalue] === command);
|
|
@@ -23921,7 +23945,15 @@
|
|
|
23921
23945
|
modeValueName.value = fitem != null ? fitem[props.blabel] : "";
|
|
23922
23946
|
emit("change", fitem);
|
|
23923
23947
|
};
|
|
23948
|
+
vue.onMounted(async () => {
|
|
23949
|
+
state.optionData = props.optionData;
|
|
23950
|
+
if (props.basecode && props.basecode != "") {
|
|
23951
|
+
const res = useBaseApi(props.apiService).get(null, props.apiAction + "/?codetype=" + props.basecode);
|
|
23952
|
+
state.optionData = res.data.result ?? [];
|
|
23953
|
+
}
|
|
23954
|
+
});
|
|
23924
23955
|
return (_ctx, _cache) => {
|
|
23956
|
+
const _component_el_button = vue.resolveComponent("el-button");
|
|
23925
23957
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
23926
23958
|
const _component_el_dropdown_item = vue.resolveComponent("el-dropdown-item");
|
|
23927
23959
|
const _component_el_dropdown_menu = vue.resolveComponent("el-dropdown-menu");
|
|
@@ -23940,7 +23972,7 @@
|
|
|
23940
23972
|
(vue.openBlock(true), vue.createElementBlock(
|
|
23941
23973
|
vue.Fragment,
|
|
23942
23974
|
null,
|
|
23943
|
-
vue.renderList(
|
|
23975
|
+
vue.renderList(state.optionData, (item, index) => {
|
|
23944
23976
|
return vue.openBlock(), vue.createBlock(_component_el_dropdown_item, {
|
|
23945
23977
|
key: index,
|
|
23946
23978
|
command: item[__props.bvalue],
|
|
@@ -23971,7 +24003,19 @@
|
|
|
23971
24003
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValueName.value = $event),
|
|
23972
24004
|
placeholder: props.placeholder,
|
|
23973
24005
|
style: vue.normalizeStyle({ width: __props.inputWidth })
|
|
23974
|
-
},
|
|
24006
|
+
}, {
|
|
24007
|
+
append: vue.withCtx(() => [
|
|
24008
|
+
vue.createVNode(_component_el_button, { text: "" }, {
|
|
24009
|
+
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
24010
|
+
vue.createTextVNode("\u5237\u65B0")
|
|
24011
|
+
])),
|
|
24012
|
+
_: 1,
|
|
24013
|
+
__: [1]
|
|
24014
|
+
})
|
|
24015
|
+
]),
|
|
24016
|
+
_: 1
|
|
24017
|
+
/* STABLE */
|
|
24018
|
+
}, 8, ["modelValue", "placeholder", "style"])
|
|
23975
24019
|
]),
|
|
23976
24020
|
_: 1
|
|
23977
24021
|
/* STABLE */
|