@fmdevui/fm-dev 1.0.68 → 1.0.70

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/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- /*! fm-dev v1.0.68 */
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, resolveDirective, unref, resolveDynamicComponent, markRaw, toRaw as toRaw$1, hasInjectionContext, isReactive as isReactive$1, toRef, getCurrentScope, onScopeDispose, toRefs } from 'vue';
1
+ /*! fm-dev v1.0.70 */
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,180 @@ 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 = state.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_icon = resolveComponent("el-icon");
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
+ class: "fminputdropdown",
30032
+ placement: "bottom",
30033
+ trigger: "click",
30034
+ style: { "width": "100%" },
30035
+ onCommand: handCommand
30036
+ }, {
30037
+ dropdown: withCtx(() => [
30038
+ createVNode(_component_el_dropdown_menu, {
30039
+ style: normalizeStyle({ width: __props.dropWidth })
30040
+ }, {
30041
+ default: withCtx(() => [
30042
+ (openBlock(true), createElementBlock(
30043
+ Fragment,
30044
+ null,
30045
+ renderList(state.optionData, (item, index) => {
30046
+ return openBlock(), createBlock(_component_el_dropdown_item, {
30047
+ key: index,
30048
+ command: item[__props.bvalue],
30049
+ divided: ""
30050
+ }, {
30051
+ default: withCtx(() => [
30052
+ createTextVNode(
30053
+ toDisplayString$1(item[__props.blabel]),
30054
+ 1
30055
+ /* TEXT */
30056
+ )
30057
+ ]),
30058
+ _: 2
30059
+ /* DYNAMIC */
30060
+ }, 1032, ["command"]);
30061
+ }),
30062
+ 128
30063
+ /* KEYED_FRAGMENT */
30064
+ ))
30065
+ ]),
30066
+ _: 1
30067
+ /* STABLE */
30068
+ }, 8, ["style"])
30069
+ ]),
30070
+ default: withCtx(() => [
30071
+ createVNode(_component_el_input, {
30072
+ modelValue: modeValueName.value,
30073
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValueName.value = $event),
30074
+ placeholder: props.placeholder,
30075
+ style: normalizeStyle({ width: __props.inputWidth })
30076
+ }, {
30077
+ append: withCtx(() => [
30078
+ createVNode(_component_el_icon, {
30079
+ color: "#13c2c2",
30080
+ onClick: handRestdata
30081
+ }, {
30082
+ default: withCtx(() => [
30083
+ createVNode(unref(refresh_left_default))
30084
+ ]),
30085
+ _: 1
30086
+ /* STABLE */
30087
+ })
30088
+ ]),
30089
+ _: 1
30090
+ /* STABLE */
30091
+ }, 8, ["modelValue", "placeholder", "style"])
30092
+ ]),
30093
+ _: 1
30094
+ /* STABLE */
30095
+ });
30096
+ };
30097
+ }
30098
+ });
30099
+
30090
30100
  const _hoisted_1$1 = { style: { "padding": "5px" } };
30091
30101
  const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "8px", "flex-wrap": "nowrap", "overflow": "hidden" } };
30092
30102
  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({
@@ -85,7 +86,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
85
86
  });
86
87
  const emit = __emit;
87
88
  const handCommand = (command) => {
88
- const fitem = props.optionData.find((item) => item[props.bvalue] === command);
89
+ const fitem = state.optionData.find((item) => item[props.bvalue] === command);
89
90
  modeValueId.value = fitem != null ? [props.bvalue] : 0;
90
91
  modeValueName.value = fitem != null ? fitem[props.blabel] : "";
91
92
  emit("change", fitem);
@@ -93,17 +94,24 @@ 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
- const _component_el_button = vue.resolveComponent("el-button");
108
+ const _component_el_icon = vue.resolveComponent("el-icon");
102
109
  const _component_el_input = vue.resolveComponent("el-input");
103
110
  const _component_el_dropdown_item = vue.resolveComponent("el-dropdown-item");
104
111
  const _component_el_dropdown_menu = vue.resolveComponent("el-dropdown-menu");
105
112
  const _component_el_dropdown = vue.resolveComponent("el-dropdown");
106
113
  return vue.openBlock(), vue.createBlock(_component_el_dropdown, {
114
+ class: "fminputdropdown",
107
115
  placement: "bottom",
108
116
  trigger: "click",
109
117
  style: { "width": "100%" },
@@ -150,12 +158,15 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
150
158
  style: vue.normalizeStyle({ width: __props.inputWidth })
151
159
  }, {
152
160
  append: vue.withCtx(() => [
153
- vue.createVNode(_component_el_button, { text: "" }, {
154
- default: vue.withCtx(() => _cache[1] || (_cache[1] = [
155
- vue.createTextVNode("\u5237\u65B0")
156
- ])),
157
- _: 1,
158
- __: [1]
161
+ vue.createVNode(_component_el_icon, {
162
+ color: "#13c2c2",
163
+ onClick: handRestdata
164
+ }, {
165
+ default: vue.withCtx(() => [
166
+ vue.createVNode(vue.unref(svg.RefreshLeft))
167
+ ]),
168
+ _: 1
169
+ /* STABLE */
159
170
  })
160
171
  ]),
161
172
  _: 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fmdevui/fm-dev",
3
- "version": "1.0.68",
3
+ "version": "1.0.70",
4
4
  "description": "Page level components developed based on Element Plus.",
5
5
  "author": "fmdevui",
6
6
  "keywords": [
File without changes