@fmdevui/fm-dev 1.0.110 → 1.0.112

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.110 */
1
+ /*! fm-dev v1.0.112 */
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, createSlots, renderSlot, markRaw, hasInjectionContext, toRaw as toRaw$1, isReactive as isReactive$1, toRef, unref, getCurrentScope, onScopeDispose, toRefs, resolveDirective, mergeProps, resolveDynamicComponent, useSlots, toHandlers, onBeforeUnmount, onUpdated, useAttrs, normalizeProps, guardReactiveProps } from 'vue';
3
3
  import crypto from 'crypto';
4
4
  import require$$0 from 'url';
@@ -23688,6 +23688,17 @@ const useBaseApi = (module, options = {}) => {
23688
23688
  cancel
23689
23689
  );
23690
23690
  },
23691
+ download: function(params, action, cancel = false) {
23692
+ return request(
23693
+ {
23694
+ responseType: "arraybuffer",
23695
+ url: baseUrl + action,
23696
+ method: "post",
23697
+ params
23698
+ },
23699
+ cancel
23700
+ );
23701
+ },
23691
23702
  get: function(params, action, cancel = false) {
23692
23703
  return request(
23693
23704
  {
@@ -35497,7 +35508,9 @@ var _sfc_main$c = /* @__PURE__ */ defineComponent({
35497
35508
  emit("change", fitem);
35498
35509
  };
35499
35510
  onMounted(async () => {
35500
- state.optionData = props.optionData;
35511
+ if (props.optionData.length > 0) {
35512
+ state.optionData = props.optionData;
35513
+ }
35501
35514
  if (props.autoLoadData && props.basecode && props.basecode != "") {
35502
35515
  state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode);
35503
35516
  }
@@ -6,6 +6,7 @@ export declare const useBaseApi: (module: string, options?: CustomAxiosRequestCo
6
6
  pcomm: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
7
7
  post: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
8
8
  gcomm: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
9
+ download: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
9
10
  get: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
10
11
  page: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
11
12
  detail: (id: any, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
@@ -45,6 +45,17 @@ const useBaseApi = (module, options = {}) => {
45
45
  cancel
46
46
  );
47
47
  },
48
+ download: function(params, action, cancel = false) {
49
+ return request$1(
50
+ {
51
+ responseType: "arraybuffer",
52
+ url: baseUrl + action,
53
+ method: "post",
54
+ params
55
+ },
56
+ cancel
57
+ );
58
+ },
48
59
  get: function(params, action, cancel = false) {
49
60
  return request$1(
50
61
  {
@@ -111,7 +111,9 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
111
111
  emit("change", fitem);
112
112
  };
113
113
  vue.onMounted(async () => {
114
- state.optionData = props.optionData;
114
+ if (props.optionData.length > 0) {
115
+ state.optionData = props.optionData;
116
+ }
115
117
  if (props.autoLoadData && props.basecode && props.basecode != "") {
116
118
  state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode);
117
119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fmdevui/fm-dev",
3
- "version": "1.0.110",
3
+ "version": "1.0.112",
4
4
  "description": "Page level components developed based on Element Plus.",
5
5
  "author": "fmdevui",
6
6
  "keywords": [