@fmdevui/fm-dev 1.0.67 → 1.0.69
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/packages/core/ui/components/inputdropdown/index.vue2.mjs +21 -3
- package/index.js +169 -152
- package/index.min.js +25 -25
- package/index.min.mjs +25 -25
- package/index.mjs +170 -153
- package/lib/packages/core/ui/components/inputdropdown/index.vue2.js +20 -2
- package/package.json +1 -1
- /package/es/{defaults.css → make-installer.css} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent, useModel, reactive, onMounted, resolveComponent, createBlock, openBlock, withCtx, createVNode, normalizeStyle, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, mergeModels } from 'vue';
|
|
1
|
+
import { defineComponent, useModel, reactive, onMounted, resolveComponent, createBlock, openBlock, withCtx, createVNode, normalizeStyle, unref, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, mergeModels } from 'vue';
|
|
2
|
+
import { Brush } from '@element-plus/icons-vue';
|
|
2
3
|
import { useBaseApi } from '../../../api/base/index.mjs';
|
|
3
4
|
|
|
4
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -89,11 +90,18 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
89
90
|
onMounted(async () => {
|
|
90
91
|
state.optionData = props.optionData;
|
|
91
92
|
if (props.basecode && props.basecode != "") {
|
|
92
|
-
const res = useBaseApi(props.apiService).get(null, props.apiAction + "
|
|
93
|
+
const res = await useBaseApi(props.apiService).get(null, props.apiAction + "/?codetype=" + props.basecode);
|
|
93
94
|
state.optionData = res.data.result ?? [];
|
|
94
95
|
}
|
|
95
96
|
});
|
|
97
|
+
const handRestdata = async () => {
|
|
98
|
+
if (props.basecode && props.basecode != "") {
|
|
99
|
+
const res = await useBaseApi(props.apiService).get(null, props.apiAction + "/?codetype=" + props.basecode);
|
|
100
|
+
state.optionData = res.data.result ?? [];
|
|
101
|
+
}
|
|
102
|
+
};
|
|
96
103
|
return (_ctx, _cache) => {
|
|
104
|
+
const _component_el_button = resolveComponent("el-button");
|
|
97
105
|
const _component_el_input = resolveComponent("el-input");
|
|
98
106
|
const _component_el_dropdown_item = resolveComponent("el-dropdown-item");
|
|
99
107
|
const _component_el_dropdown_menu = resolveComponent("el-dropdown-menu");
|
|
@@ -143,7 +151,17 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
143
151
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValueName.value = $event),
|
|
144
152
|
placeholder: props.placeholder,
|
|
145
153
|
style: normalizeStyle({ width: __props.inputWidth })
|
|
146
|
-
},
|
|
154
|
+
}, {
|
|
155
|
+
append: withCtx(() => [
|
|
156
|
+
createVNode(_component_el_button, {
|
|
157
|
+
type: "success",
|
|
158
|
+
icon: unref(Brush),
|
|
159
|
+
onClick: handRestdata
|
|
160
|
+
}, null, 8, ["icon"])
|
|
161
|
+
]),
|
|
162
|
+
_: 1
|
|
163
|
+
/* STABLE */
|
|
164
|
+
}, 8, ["modelValue", "placeholder", "style"])
|
|
147
165
|
]),
|
|
148
166
|
_: 1
|
|
149
167
|
/* STABLE */
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fm-dev v1.0.
|
|
1
|
+
/*! fm-dev v1.0.69 */
|
|
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) :
|
|
@@ -23860,157 +23860,6 @@
|
|
|
23860
23860
|
}
|
|
23861
23861
|
});
|
|
23862
23862
|
|
|
23863
|
-
var _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
23864
|
-
...{
|
|
23865
|
-
name: "Fminputdropdown"
|
|
23866
|
-
},
|
|
23867
|
-
__name: "index",
|
|
23868
|
-
props: /* @__PURE__ */ vue.mergeModels({
|
|
23869
|
-
//数据
|
|
23870
|
-
optionData: {
|
|
23871
|
-
type: Array,
|
|
23872
|
-
default: []
|
|
23873
|
-
},
|
|
23874
|
-
/**
|
|
23875
|
-
* 值的属性值
|
|
23876
|
-
*/
|
|
23877
|
-
bvalue: {
|
|
23878
|
-
type: String,
|
|
23879
|
-
default: "id"
|
|
23880
|
-
},
|
|
23881
|
-
/**
|
|
23882
|
-
* 值的属性标签
|
|
23883
|
-
*/
|
|
23884
|
-
blabel: {
|
|
23885
|
-
type: String,
|
|
23886
|
-
default: "name"
|
|
23887
|
-
},
|
|
23888
|
-
placeholder: {
|
|
23889
|
-
type: String,
|
|
23890
|
-
default: "\u8BF7\u9009\u62E9"
|
|
23891
|
-
},
|
|
23892
|
-
inputWidth: {
|
|
23893
|
-
type: String,
|
|
23894
|
-
default: "40%"
|
|
23895
|
-
},
|
|
23896
|
-
dropWidth: {
|
|
23897
|
-
type: String,
|
|
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: ""
|
|
23920
|
-
}
|
|
23921
|
-
}, {
|
|
23922
|
-
"id": {
|
|
23923
|
-
type: Number,
|
|
23924
|
-
default: 0
|
|
23925
|
-
},
|
|
23926
|
-
"idModifiers": {},
|
|
23927
|
-
"name": {
|
|
23928
|
-
type: String,
|
|
23929
|
-
default: ""
|
|
23930
|
-
},
|
|
23931
|
-
"nameModifiers": {}
|
|
23932
|
-
}),
|
|
23933
|
-
emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:id", "update:name"]),
|
|
23934
|
-
setup(__props, { emit: __emit }) {
|
|
23935
|
-
const modeValueId = vue.useModel(__props, "id");
|
|
23936
|
-
const modeValueName = vue.useModel(__props, "name");
|
|
23937
|
-
const props = __props;
|
|
23938
|
-
const state = vue.reactive({
|
|
23939
|
-
optionData: props.optionData
|
|
23940
|
-
});
|
|
23941
|
-
const emit = __emit;
|
|
23942
|
-
const handCommand = (command) => {
|
|
23943
|
-
const fitem = props.optionData.find((item) => item[props.bvalue] === command);
|
|
23944
|
-
modeValueId.value = fitem != null ? [props.bvalue] : 0;
|
|
23945
|
-
modeValueName.value = fitem != null ? fitem[props.blabel] : "";
|
|
23946
|
-
emit("change", fitem);
|
|
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 + "/" + props.basecode);
|
|
23952
|
-
state.optionData = res.data.result ?? [];
|
|
23953
|
-
}
|
|
23954
|
-
});
|
|
23955
|
-
return (_ctx, _cache) => {
|
|
23956
|
-
const _component_el_input = vue.resolveComponent("el-input");
|
|
23957
|
-
const _component_el_dropdown_item = vue.resolveComponent("el-dropdown-item");
|
|
23958
|
-
const _component_el_dropdown_menu = vue.resolveComponent("el-dropdown-menu");
|
|
23959
|
-
const _component_el_dropdown = vue.resolveComponent("el-dropdown");
|
|
23960
|
-
return vue.openBlock(), vue.createBlock(_component_el_dropdown, {
|
|
23961
|
-
placement: "bottom",
|
|
23962
|
-
trigger: "click",
|
|
23963
|
-
style: { "width": "100%" },
|
|
23964
|
-
onCommand: handCommand
|
|
23965
|
-
}, {
|
|
23966
|
-
dropdown: vue.withCtx(() => [
|
|
23967
|
-
vue.createVNode(_component_el_dropdown_menu, {
|
|
23968
|
-
style: vue.normalizeStyle({ width: __props.dropWidth })
|
|
23969
|
-
}, {
|
|
23970
|
-
default: vue.withCtx(() => [
|
|
23971
|
-
(vue.openBlock(true), vue.createElementBlock(
|
|
23972
|
-
vue.Fragment,
|
|
23973
|
-
null,
|
|
23974
|
-
vue.renderList(state.optionData, (item, index) => {
|
|
23975
|
-
return vue.openBlock(), vue.createBlock(_component_el_dropdown_item, {
|
|
23976
|
-
key: index,
|
|
23977
|
-
command: item[__props.bvalue],
|
|
23978
|
-
divided: ""
|
|
23979
|
-
}, {
|
|
23980
|
-
default: vue.withCtx(() => [
|
|
23981
|
-
vue.createTextVNode(
|
|
23982
|
-
vue.toDisplayString(item[__props.blabel]),
|
|
23983
|
-
1
|
|
23984
|
-
/* TEXT */
|
|
23985
|
-
)
|
|
23986
|
-
]),
|
|
23987
|
-
_: 2
|
|
23988
|
-
/* DYNAMIC */
|
|
23989
|
-
}, 1032, ["command"]);
|
|
23990
|
-
}),
|
|
23991
|
-
128
|
|
23992
|
-
/* KEYED_FRAGMENT */
|
|
23993
|
-
))
|
|
23994
|
-
]),
|
|
23995
|
-
_: 1
|
|
23996
|
-
/* STABLE */
|
|
23997
|
-
}, 8, ["style"])
|
|
23998
|
-
]),
|
|
23999
|
-
default: vue.withCtx(() => [
|
|
24000
|
-
vue.createVNode(_component_el_input, {
|
|
24001
|
-
modelValue: modeValueName.value,
|
|
24002
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValueName.value = $event),
|
|
24003
|
-
placeholder: props.placeholder,
|
|
24004
|
-
style: vue.normalizeStyle({ width: __props.inputWidth })
|
|
24005
|
-
}, null, 8, ["modelValue", "placeholder", "style"])
|
|
24006
|
-
]),
|
|
24007
|
-
_: 1
|
|
24008
|
-
/* STABLE */
|
|
24009
|
-
});
|
|
24010
|
-
};
|
|
24011
|
-
}
|
|
24012
|
-
});
|
|
24013
|
-
|
|
24014
23863
|
/*! Element Plus Icons Vue v2.3.1 */
|
|
24015
23864
|
|
|
24016
23865
|
var add_location_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -30069,6 +29918,174 @@
|
|
|
30069
29918
|
ZoomOut: zoom_out_default
|
|
30070
29919
|
});
|
|
30071
29920
|
|
|
29921
|
+
var _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
29922
|
+
...{
|
|
29923
|
+
name: "Fminputdropdown"
|
|
29924
|
+
},
|
|
29925
|
+
__name: "index",
|
|
29926
|
+
props: /* @__PURE__ */ vue.mergeModels({
|
|
29927
|
+
//数据
|
|
29928
|
+
optionData: {
|
|
29929
|
+
type: Array,
|
|
29930
|
+
default: []
|
|
29931
|
+
},
|
|
29932
|
+
/**
|
|
29933
|
+
* 值的属性值
|
|
29934
|
+
*/
|
|
29935
|
+
bvalue: {
|
|
29936
|
+
type: String,
|
|
29937
|
+
default: "id"
|
|
29938
|
+
},
|
|
29939
|
+
/**
|
|
29940
|
+
* 值的属性标签
|
|
29941
|
+
*/
|
|
29942
|
+
blabel: {
|
|
29943
|
+
type: String,
|
|
29944
|
+
default: "name"
|
|
29945
|
+
},
|
|
29946
|
+
placeholder: {
|
|
29947
|
+
type: String,
|
|
29948
|
+
default: "\u8BF7\u9009\u62E9"
|
|
29949
|
+
},
|
|
29950
|
+
inputWidth: {
|
|
29951
|
+
type: String,
|
|
29952
|
+
default: "40%"
|
|
29953
|
+
},
|
|
29954
|
+
dropWidth: {
|
|
29955
|
+
type: String,
|
|
29956
|
+
default: "90px"
|
|
29957
|
+
},
|
|
29958
|
+
/**
|
|
29959
|
+
* api service name
|
|
29960
|
+
*/
|
|
29961
|
+
apiService: {
|
|
29962
|
+
type: String,
|
|
29963
|
+
default: "baseData"
|
|
29964
|
+
},
|
|
29965
|
+
/**
|
|
29966
|
+
* api service 下的方法
|
|
29967
|
+
*/
|
|
29968
|
+
apiAction: {
|
|
29969
|
+
type: String,
|
|
29970
|
+
default: "baseDataList"
|
|
29971
|
+
},
|
|
29972
|
+
/**
|
|
29973
|
+
* 基础编码 自动获取数据
|
|
29974
|
+
*/
|
|
29975
|
+
basecode: {
|
|
29976
|
+
type: String,
|
|
29977
|
+
default: ""
|
|
29978
|
+
}
|
|
29979
|
+
}, {
|
|
29980
|
+
"id": {
|
|
29981
|
+
type: Number,
|
|
29982
|
+
default: 0
|
|
29983
|
+
},
|
|
29984
|
+
"idModifiers": {},
|
|
29985
|
+
"name": {
|
|
29986
|
+
type: String,
|
|
29987
|
+
default: ""
|
|
29988
|
+
},
|
|
29989
|
+
"nameModifiers": {}
|
|
29990
|
+
}),
|
|
29991
|
+
emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:id", "update:name"]),
|
|
29992
|
+
setup(__props, { emit: __emit }) {
|
|
29993
|
+
const modeValueId = vue.useModel(__props, "id");
|
|
29994
|
+
const modeValueName = vue.useModel(__props, "name");
|
|
29995
|
+
const props = __props;
|
|
29996
|
+
const state = vue.reactive({
|
|
29997
|
+
optionData: props.optionData
|
|
29998
|
+
});
|
|
29999
|
+
const emit = __emit;
|
|
30000
|
+
const handCommand = (command) => {
|
|
30001
|
+
const fitem = props.optionData.find((item) => item[props.bvalue] === command);
|
|
30002
|
+
modeValueId.value = fitem != null ? [props.bvalue] : 0;
|
|
30003
|
+
modeValueName.value = fitem != null ? fitem[props.blabel] : "";
|
|
30004
|
+
emit("change", fitem);
|
|
30005
|
+
};
|
|
30006
|
+
vue.onMounted(async () => {
|
|
30007
|
+
state.optionData = props.optionData;
|
|
30008
|
+
if (props.basecode && props.basecode != "") {
|
|
30009
|
+
const res = await useBaseApi(props.apiService).get(null, props.apiAction + "/?codetype=" + props.basecode);
|
|
30010
|
+
state.optionData = res.data.result ?? [];
|
|
30011
|
+
}
|
|
30012
|
+
});
|
|
30013
|
+
const handRestdata = async () => {
|
|
30014
|
+
if (props.basecode && props.basecode != "") {
|
|
30015
|
+
const res = await useBaseApi(props.apiService).get(null, props.apiAction + "/?codetype=" + props.basecode);
|
|
30016
|
+
state.optionData = res.data.result ?? [];
|
|
30017
|
+
}
|
|
30018
|
+
};
|
|
30019
|
+
return (_ctx, _cache) => {
|
|
30020
|
+
const _component_el_button = vue.resolveComponent("el-button");
|
|
30021
|
+
const _component_el_input = vue.resolveComponent("el-input");
|
|
30022
|
+
const _component_el_dropdown_item = vue.resolveComponent("el-dropdown-item");
|
|
30023
|
+
const _component_el_dropdown_menu = vue.resolveComponent("el-dropdown-menu");
|
|
30024
|
+
const _component_el_dropdown = vue.resolveComponent("el-dropdown");
|
|
30025
|
+
return vue.openBlock(), vue.createBlock(_component_el_dropdown, {
|
|
30026
|
+
placement: "bottom",
|
|
30027
|
+
trigger: "click",
|
|
30028
|
+
style: { "width": "100%" },
|
|
30029
|
+
onCommand: handCommand
|
|
30030
|
+
}, {
|
|
30031
|
+
dropdown: vue.withCtx(() => [
|
|
30032
|
+
vue.createVNode(_component_el_dropdown_menu, {
|
|
30033
|
+
style: vue.normalizeStyle({ width: __props.dropWidth })
|
|
30034
|
+
}, {
|
|
30035
|
+
default: vue.withCtx(() => [
|
|
30036
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
30037
|
+
vue.Fragment,
|
|
30038
|
+
null,
|
|
30039
|
+
vue.renderList(state.optionData, (item, index) => {
|
|
30040
|
+
return vue.openBlock(), vue.createBlock(_component_el_dropdown_item, {
|
|
30041
|
+
key: index,
|
|
30042
|
+
command: item[__props.bvalue],
|
|
30043
|
+
divided: ""
|
|
30044
|
+
}, {
|
|
30045
|
+
default: vue.withCtx(() => [
|
|
30046
|
+
vue.createTextVNode(
|
|
30047
|
+
vue.toDisplayString(item[__props.blabel]),
|
|
30048
|
+
1
|
|
30049
|
+
/* TEXT */
|
|
30050
|
+
)
|
|
30051
|
+
]),
|
|
30052
|
+
_: 2
|
|
30053
|
+
/* DYNAMIC */
|
|
30054
|
+
}, 1032, ["command"]);
|
|
30055
|
+
}),
|
|
30056
|
+
128
|
|
30057
|
+
/* KEYED_FRAGMENT */
|
|
30058
|
+
))
|
|
30059
|
+
]),
|
|
30060
|
+
_: 1
|
|
30061
|
+
/* STABLE */
|
|
30062
|
+
}, 8, ["style"])
|
|
30063
|
+
]),
|
|
30064
|
+
default: vue.withCtx(() => [
|
|
30065
|
+
vue.createVNode(_component_el_input, {
|
|
30066
|
+
modelValue: modeValueName.value,
|
|
30067
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValueName.value = $event),
|
|
30068
|
+
placeholder: props.placeholder,
|
|
30069
|
+
style: vue.normalizeStyle({ width: __props.inputWidth })
|
|
30070
|
+
}, {
|
|
30071
|
+
append: vue.withCtx(() => [
|
|
30072
|
+
vue.createVNode(_component_el_button, {
|
|
30073
|
+
type: "success",
|
|
30074
|
+
icon: vue.unref(brush_default),
|
|
30075
|
+
onClick: handRestdata
|
|
30076
|
+
}, null, 8, ["icon"])
|
|
30077
|
+
]),
|
|
30078
|
+
_: 1
|
|
30079
|
+
/* STABLE */
|
|
30080
|
+
}, 8, ["modelValue", "placeholder", "style"])
|
|
30081
|
+
]),
|
|
30082
|
+
_: 1
|
|
30083
|
+
/* STABLE */
|
|
30084
|
+
});
|
|
30085
|
+
};
|
|
30086
|
+
}
|
|
30087
|
+
});
|
|
30088
|
+
|
|
30072
30089
|
const _hoisted_1$1 = { style: { "padding": "5px" } };
|
|
30073
30090
|
const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "8px", "flex-wrap": "nowrap", "overflow": "hidden" } };
|
|
30074
30091
|
const _hoisted_3 = { style: { "flex": "1 1 200px", "min-width": "0", "overflow": "hidden" } };
|