@fmdevui/fm-dev 1.0.56 → 1.0.58

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.
@@ -0,0 +1,127 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+
7
+ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
8
+ ...{
9
+ name: "Fminputdropdown"
10
+ },
11
+ __name: "index",
12
+ props: /* @__PURE__ */ vue.mergeModels({
13
+ //数据
14
+ optionData: {
15
+ type: Array,
16
+ default: []
17
+ },
18
+ /**
19
+ * 值的属性值
20
+ */
21
+ bvalue: {
22
+ type: String,
23
+ default: "id"
24
+ },
25
+ /**
26
+ * 值的属性标签
27
+ */
28
+ blabel: {
29
+ type: String,
30
+ default: "name"
31
+ },
32
+ placeholder: {
33
+ type: String,
34
+ default: "\u8BF7\u9009\u62E9"
35
+ },
36
+ inputWidth: {
37
+ type: String,
38
+ default: "40%"
39
+ },
40
+ dropWidth: {
41
+ type: String,
42
+ default: "90px"
43
+ }
44
+ }, {
45
+ "id": {
46
+ type: Number,
47
+ default: 0
48
+ },
49
+ "idModifiers": {},
50
+ "name": {
51
+ type: String,
52
+ default: ""
53
+ },
54
+ "nameModifiers": {}
55
+ }),
56
+ emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:id", "update:name"]),
57
+ setup(__props, { emit: __emit }) {
58
+ const modeValueId = vue.useModel(__props, "id");
59
+ const modeValueName = vue.useModel(__props, "name");
60
+ const props = __props;
61
+ const emit = __emit;
62
+ const handCommand = (command) => {
63
+ const fitem = props.optionData.find((item) => item[props.bvalue] === command);
64
+ modeValueId.value = fitem != null ? [props.bvalue] : 0;
65
+ modeValueName.value = fitem != null ? fitem[props.blabel] : "";
66
+ emit("change", fitem);
67
+ };
68
+ return (_ctx, _cache) => {
69
+ const _component_el_input = vue.resolveComponent("el-input");
70
+ const _component_el_dropdown_item = vue.resolveComponent("el-dropdown-item");
71
+ const _component_el_dropdown_menu = vue.resolveComponent("el-dropdown-menu");
72
+ const _component_el_dropdown = vue.resolveComponent("el-dropdown");
73
+ return vue.openBlock(), vue.createBlock(_component_el_dropdown, {
74
+ placement: "bottom",
75
+ trigger: "click",
76
+ style: { "width": "100%" },
77
+ onCommand: handCommand
78
+ }, {
79
+ dropdown: vue.withCtx(() => [
80
+ vue.createVNode(_component_el_dropdown_menu, {
81
+ style: vue.normalizeStyle({ width: __props.dropWidth })
82
+ }, {
83
+ default: vue.withCtx(() => [
84
+ (vue.openBlock(true), vue.createElementBlock(
85
+ vue.Fragment,
86
+ null,
87
+ vue.renderList(__props.optionData, (item, index) => {
88
+ return vue.openBlock(), vue.createBlock(_component_el_dropdown_item, {
89
+ key: index,
90
+ command: item[__props.bvalue],
91
+ divided: ""
92
+ }, {
93
+ default: vue.withCtx(() => [
94
+ vue.createTextVNode(
95
+ vue.toDisplayString(item[__props.blabel]),
96
+ 1
97
+ /* TEXT */
98
+ )
99
+ ]),
100
+ _: 2
101
+ /* DYNAMIC */
102
+ }, 1032, ["command"]);
103
+ }),
104
+ 128
105
+ /* KEYED_FRAGMENT */
106
+ ))
107
+ ]),
108
+ _: 1
109
+ /* STABLE */
110
+ }, 8, ["style"])
111
+ ]),
112
+ default: vue.withCtx(() => [
113
+ vue.createVNode(_component_el_input, {
114
+ modelValue: modeValueName.value,
115
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValueName.value = $event),
116
+ placeholder: props.placeholder,
117
+ style: vue.normalizeStyle({ width: __props.inputWidth })
118
+ }, null, 8, ["modelValue", "placeholder", "style"])
119
+ ]),
120
+ _: 1
121
+ /* STABLE */
122
+ });
123
+ };
124
+ }
125
+ });
126
+
127
+ exports.default = _sfc_main;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fmdevui/fm-dev",
3
- "version": "1.0.56",
3
+ "version": "1.0.58",
4
4
  "description": "Page level components developed based on Element Plus.",
5
5
  "author": "fmdevui",
6
6
  "keywords": [
File without changes