@fmdevui/fm-dev 1.0.66 → 1.0.67

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,4 +1,4 @@
1
- /*! fm-dev v1.0.66 */
1
+ /*! fm-dev v1.0.67 */
2
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';
3
3
  import crypto from 'crypto';
4
4
  import require$$0 from 'url';
@@ -23901,6 +23901,27 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
23901
23901
  dropWidth: {
23902
23902
  type: String,
23903
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: ""
23904
23925
  }
23905
23926
  }, {
23906
23927
  "id": {
@@ -23919,6 +23940,9 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
23919
23940
  const modeValueId = useModel(__props, "id");
23920
23941
  const modeValueName = useModel(__props, "name");
23921
23942
  const props = __props;
23943
+ const state = reactive({
23944
+ optionData: props.optionData
23945
+ });
23922
23946
  const emit = __emit;
23923
23947
  const handCommand = (command) => {
23924
23948
  const fitem = props.optionData.find((item) => item[props.bvalue] === command);
@@ -23926,6 +23950,13 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
23926
23950
  modeValueName.value = fitem != null ? fitem[props.blabel] : "";
23927
23951
  emit("change", fitem);
23928
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
+ });
23929
23960
  return (_ctx, _cache) => {
23930
23961
  const _component_el_input = resolveComponent("el-input");
23931
23962
  const _component_el_dropdown_item = resolveComponent("el-dropdown-item");
@@ -23945,7 +23976,7 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
23945
23976
  (openBlock(true), createElementBlock(
23946
23977
  Fragment,
23947
23978
  null,
23948
- renderList(__props.optionData, (item, index) => {
23979
+ renderList(state.optionData, (item, index) => {
23949
23980
  return openBlock(), createBlock(_component_el_dropdown_item, {
23950
23981
  key: index,
23951
23982
  command: item[__props.bvalue],
@@ -624,6 +624,18 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
624
624
  type: StringConstructor;
625
625
  default: string;
626
626
  };
627
+ apiService: {
628
+ type: StringConstructor;
629
+ default: string;
630
+ };
631
+ apiAction: {
632
+ type: StringConstructor;
633
+ default: string;
634
+ };
635
+ basecode: {
636
+ type: StringConstructor;
637
+ default: string;
638
+ };
627
639
  id: {
628
640
  type: PropType<any>;
629
641
  };
@@ -672,6 +684,18 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
672
684
  type: StringConstructor;
673
685
  default: string;
674
686
  };
687
+ apiService: {
688
+ type: StringConstructor;
689
+ default: string;
690
+ };
691
+ apiAction: {
692
+ type: StringConstructor;
693
+ default: string;
694
+ };
695
+ basecode: {
696
+ type: StringConstructor;
697
+ default: string;
698
+ };
675
699
  id: {
676
700
  type: PropType<any>;
677
701
  };
@@ -687,8 +711,11 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
687
711
  optionData: any[];
688
712
  bvalue: string;
689
713
  blabel: string;
714
+ apiService: string;
715
+ apiAction: string;
690
716
  inputWidth: string;
691
717
  dropWidth: string;
718
+ basecode: string;
692
719
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
693
720
  declare const FmTree: DefineComponent<ExtractPropTypes<{
694
721
  checkStrictly: {
@@ -43,6 +43,27 @@ declare const _default: DefineComponent<ExtractPropTypes<{
43
43
  type: StringConstructor;
44
44
  default: string;
45
45
  };
46
+ /**
47
+ * api service name
48
+ */
49
+ apiService: {
50
+ type: StringConstructor;
51
+ default: string;
52
+ };
53
+ /**
54
+ * api service 下的方法
55
+ */
56
+ apiAction: {
57
+ type: StringConstructor;
58
+ default: string;
59
+ };
60
+ /**
61
+ * 基础编码 自动获取数据
62
+ */
63
+ basecode: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
46
67
  id: {
47
68
  type: PropType<any>;
48
69
  };
@@ -97,6 +118,27 @@ declare const _default: DefineComponent<ExtractPropTypes<{
97
118
  type: StringConstructor;
98
119
  default: string;
99
120
  };
121
+ /**
122
+ * api service name
123
+ */
124
+ apiService: {
125
+ type: StringConstructor;
126
+ default: string;
127
+ };
128
+ /**
129
+ * api service 下的方法
130
+ */
131
+ apiAction: {
132
+ type: StringConstructor;
133
+ default: string;
134
+ };
135
+ /**
136
+ * 基础编码 自动获取数据
137
+ */
138
+ basecode: {
139
+ type: StringConstructor;
140
+ default: string;
141
+ };
100
142
  id: {
101
143
  type: PropType<any>;
102
144
  };
@@ -112,7 +154,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
112
154
  optionData: any[];
113
155
  bvalue: string;
114
156
  blabel: string;
157
+ apiService: string;
158
+ apiAction: string;
115
159
  inputWidth: string;
116
160
  dropWidth: string;
161
+ basecode: string;
117
162
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
118
163
  export default _default;
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
+ var index = require('../../../api/base/index.js');
6
7
 
7
8
  var _sfc_main = /* @__PURE__ */ vue.defineComponent({
8
9
  ...{
@@ -40,6 +41,27 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
40
41
  dropWidth: {
41
42
  type: String,
42
43
  default: "90px"
44
+ },
45
+ /**
46
+ * api service name
47
+ */
48
+ apiService: {
49
+ type: String,
50
+ default: "baseData"
51
+ },
52
+ /**
53
+ * api service 下的方法
54
+ */
55
+ apiAction: {
56
+ type: String,
57
+ default: "baseDataList"
58
+ },
59
+ /**
60
+ * 基础编码 自动获取数据
61
+ */
62
+ basecode: {
63
+ type: String,
64
+ default: ""
43
65
  }
44
66
  }, {
45
67
  "id": {
@@ -58,6 +80,9 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
58
80
  const modeValueId = vue.useModel(__props, "id");
59
81
  const modeValueName = vue.useModel(__props, "name");
60
82
  const props = __props;
83
+ const state = vue.reactive({
84
+ optionData: props.optionData
85
+ });
61
86
  const emit = __emit;
62
87
  const handCommand = (command) => {
63
88
  const fitem = props.optionData.find((item) => item[props.bvalue] === command);
@@ -65,6 +90,13 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
65
90
  modeValueName.value = fitem != null ? fitem[props.blabel] : "";
66
91
  emit("change", fitem);
67
92
  };
93
+ vue.onMounted(async () => {
94
+ state.optionData = props.optionData;
95
+ if (props.basecode && props.basecode != "") {
96
+ const res = index.useBaseApi(props.apiService).get(null, props.apiAction + "/" + props.basecode);
97
+ state.optionData = res.data.result ?? [];
98
+ }
99
+ });
68
100
  return (_ctx, _cache) => {
69
101
  const _component_el_input = vue.resolveComponent("el-input");
70
102
  const _component_el_dropdown_item = vue.resolveComponent("el-dropdown-item");
@@ -84,7 +116,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
84
116
  (vue.openBlock(true), vue.createElementBlock(
85
117
  vue.Fragment,
86
118
  null,
87
- vue.renderList(__props.optionData, (item, index) => {
119
+ vue.renderList(state.optionData, (item, index) => {
88
120
  return vue.openBlock(), vue.createBlock(_component_el_dropdown_item, {
89
121
  key: index,
90
122
  command: item[__props.bvalue],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fmdevui/fm-dev",
3
- "version": "1.0.66",
3
+ "version": "1.0.67",
4
4
  "description": "Page level components developed based on Element Plus.",
5
5
  "author": "fmdevui",
6
6
  "keywords": [
File without changes