@fmdevui/fm-dev 1.0.109 → 1.0.111

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.
@@ -16,9 +16,10 @@ const usefminputdropdownstore = defineStore("fminputdropdownstore", () => {
16
16
  if (multibasecode.length > 0) {
17
17
  const mdata = res.data.result ?? [];
18
18
  multibasecode.forEach((p) => {
19
- state.optionsData[p] = mdata.filter((p2) => {
20
- return p2.code === p2;
21
- }) ?? [];
19
+ const tempdata = mdata.filter((x) => {
20
+ return x.code == p;
21
+ });
22
+ state.optionsData[p] = tempdata ?? [];
22
23
  });
23
24
  } else {
24
25
  return state.optionsData[basecode] = res.data.result ?? [];
@@ -107,7 +107,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
107
107
  emit("change", fitem);
108
108
  };
109
109
  onMounted(async () => {
110
- state.optionData = props.optionData;
110
+ if (props.optionData.length > 0) {
111
+ state.optionData = props.optionData;
112
+ }
111
113
  if (props.autoLoadData && props.basecode && props.basecode != "") {
112
114
  state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode);
113
115
  }
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fm-dev v1.0.109 */
1
+ /*! fm-dev v1.0.111 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('crypto'), require('url'), require('http'), require('https'), require('util'), require('stream'), require('assert'), require('zlib'), require('element-plus')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vue', 'crypto', 'url', 'http', 'https', 'util', 'stream', 'assert', 'zlib', 'element-plus'], factory) :
@@ -35372,9 +35372,10 @@
35372
35372
  if (multibasecode.length > 0) {
35373
35373
  const mdata = res.data.result ?? [];
35374
35374
  multibasecode.forEach((p) => {
35375
- state.optionsData[p] = mdata.filter((p2) => {
35376
- return p2.code === p2;
35377
- }) ?? [];
35375
+ const tempdata = mdata.filter((x) => {
35376
+ return x.code == p;
35377
+ });
35378
+ state.optionsData[p] = tempdata ?? [];
35378
35379
  });
35379
35380
  } else {
35380
35381
  return state.optionsData[basecode] = res.data.result ?? [];
@@ -35491,7 +35492,9 @@
35491
35492
  emit("change", fitem);
35492
35493
  };
35493
35494
  vue.onMounted(async () => {
35494
- state.optionData = props.optionData;
35495
+ if (props.optionData.length > 0) {
35496
+ state.optionData = props.optionData;
35497
+ }
35495
35498
  if (props.autoLoadData && props.basecode && props.basecode != "") {
35496
35499
  state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode);
35497
35500
  }