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