@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
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,157 +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 + "/" + props.basecode);
|
|
23957
|
-
state.optionData = res.data.result ?? [];
|
|
23958
|
-
}
|
|
23959
|
-
});
|
|
23960
|
-
return (_ctx, _cache) => {
|
|
23961
|
-
const _component_el_input = resolveComponent("el-input");
|
|
23962
|
-
const _component_el_dropdown_item = resolveComponent("el-dropdown-item");
|
|
23963
|
-
const _component_el_dropdown_menu = resolveComponent("el-dropdown-menu");
|
|
23964
|
-
const _component_el_dropdown = resolveComponent("el-dropdown");
|
|
23965
|
-
return openBlock(), createBlock(_component_el_dropdown, {
|
|
23966
|
-
placement: "bottom",
|
|
23967
|
-
trigger: "click",
|
|
23968
|
-
style: { "width": "100%" },
|
|
23969
|
-
onCommand: handCommand
|
|
23970
|
-
}, {
|
|
23971
|
-
dropdown: withCtx(() => [
|
|
23972
|
-
createVNode(_component_el_dropdown_menu, {
|
|
23973
|
-
style: normalizeStyle({ width: __props.dropWidth })
|
|
23974
|
-
}, {
|
|
23975
|
-
default: withCtx(() => [
|
|
23976
|
-
(openBlock(true), createElementBlock(
|
|
23977
|
-
Fragment,
|
|
23978
|
-
null,
|
|
23979
|
-
renderList(state.optionData, (item, index) => {
|
|
23980
|
-
return openBlock(), createBlock(_component_el_dropdown_item, {
|
|
23981
|
-
key: index,
|
|
23982
|
-
command: item[__props.bvalue],
|
|
23983
|
-
divided: ""
|
|
23984
|
-
}, {
|
|
23985
|
-
default: withCtx(() => [
|
|
23986
|
-
createTextVNode(
|
|
23987
|
-
toDisplayString$1(item[__props.blabel]),
|
|
23988
|
-
1
|
|
23989
|
-
/* TEXT */
|
|
23990
|
-
)
|
|
23991
|
-
]),
|
|
23992
|
-
_: 2
|
|
23993
|
-
/* DYNAMIC */
|
|
23994
|
-
}, 1032, ["command"]);
|
|
23995
|
-
}),
|
|
23996
|
-
128
|
|
23997
|
-
/* KEYED_FRAGMENT */
|
|
23998
|
-
))
|
|
23999
|
-
]),
|
|
24000
|
-
_: 1
|
|
24001
|
-
/* STABLE */
|
|
24002
|
-
}, 8, ["style"])
|
|
24003
|
-
]),
|
|
24004
|
-
default: withCtx(() => [
|
|
24005
|
-
createVNode(_component_el_input, {
|
|
24006
|
-
modelValue: modeValueName.value,
|
|
24007
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValueName.value = $event),
|
|
24008
|
-
placeholder: props.placeholder,
|
|
24009
|
-
style: normalizeStyle({ width: __props.inputWidth })
|
|
24010
|
-
}, null, 8, ["modelValue", "placeholder", "style"])
|
|
24011
|
-
]),
|
|
24012
|
-
_: 1
|
|
24013
|
-
/* STABLE */
|
|
24014
|
-
});
|
|
24015
|
-
};
|
|
24016
|
-
}
|
|
24017
|
-
});
|
|
24018
|
-
|
|
24019
23868
|
/*! Element Plus Icons Vue v2.3.1 */
|
|
24020
23869
|
|
|
24021
23870
|
var add_location_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
@@ -30074,6 +29923,174 @@ var svg = /*#__PURE__*/Object.freeze({
|
|
|
30074
29923
|
ZoomOut: zoom_out_default
|
|
30075
29924
|
});
|
|
30076
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
|
+
|
|
30077
30094
|
const _hoisted_1$1 = { style: { "padding": "5px" } };
|
|
30078
30095
|
const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "8px", "flex-wrap": "nowrap", "overflow": "hidden" } };
|
|
30079
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,11 +94,18 @@ 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 + "
|
|
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) => {
|
|
108
|
+
const _component_el_button = vue.resolveComponent("el-button");
|
|
101
109
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
102
110
|
const _component_el_dropdown_item = vue.resolveComponent("el-dropdown-item");
|
|
103
111
|
const _component_el_dropdown_menu = vue.resolveComponent("el-dropdown-menu");
|
|
@@ -147,7 +155,17 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
147
155
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValueName.value = $event),
|
|
148
156
|
placeholder: props.placeholder,
|
|
149
157
|
style: vue.normalizeStyle({ width: __props.inputWidth })
|
|
150
|
-
},
|
|
158
|
+
}, {
|
|
159
|
+
append: vue.withCtx(() => [
|
|
160
|
+
vue.createVNode(_component_el_button, {
|
|
161
|
+
type: "success",
|
|
162
|
+
icon: vue.unref(svg.Brush),
|
|
163
|
+
onClick: handRestdata
|
|
164
|
+
}, null, 8, ["icon"])
|
|
165
|
+
]),
|
|
166
|
+
_: 1
|
|
167
|
+
/* STABLE */
|
|
168
|
+
}, 8, ["modelValue", "placeholder", "style"])
|
|
151
169
|
]),
|
|
152
170
|
_: 1
|
|
153
171
|
/* STABLE */
|
package/package.json
CHANGED
|
File without changes
|