@fmdeui/fmui 1.0.130 → 1.0.132

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.
@@ -32,8 +32,12 @@ function authDirective(app) {
32
32
  var _a, _b, _c, _d;
33
33
  const stores = useUserInfo();
34
34
  const config = typeof binding.value === "string" ? { path: binding.value, field: "" } : binding.value;
35
+ if (config.defaultvalue == null || config.defaultvalue === void 0 || config.defaultvalue === "") config.defaultvalue = true;
35
36
  const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
36
- if (itemField && itemField.isTable == 0) el.parentNode.removeChild(el);
37
+ if (itemField && itemField.isTable == 0)
38
+ el.parentNode.removeChild(el);
39
+ else if (!itemField && config.defaultvalue == false)
40
+ el.parentNode.removeChild(el);
37
41
  }
38
42
  });
39
43
  app.directive("hpquery", {
@@ -41,8 +45,12 @@ function authDirective(app) {
41
45
  var _a, _b, _c, _d;
42
46
  const stores = useUserInfo();
43
47
  const config = typeof binding.value === "string" ? { path: binding.value, field: "" } : binding.value;
48
+ if (config.defaultvalue == null || config.defaultvalue === void 0 || config.defaultvalue === "") config.defaultvalue = true;
44
49
  const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
45
- if (itemField && itemField.isQuery == 0) el.parentNode.removeChild(el);
50
+ if (itemField && itemField.isQuery == 0)
51
+ el.parentNode.removeChild(el);
52
+ else if (!itemField && config.defaultvalue == false)
53
+ el.parentNode.removeChild(el);
46
54
  }
47
55
  });
48
56
  app.directive("hpaddupdate", {
@@ -50,8 +58,12 @@ function authDirective(app) {
50
58
  var _a, _b, _c, _d;
51
59
  const stores = useUserInfo();
52
60
  const config = typeof binding.value === "string" ? { path: binding.value, field: "", flag: "main" } : binding.value;
61
+ if (config.defaultvalue == null || config.defaultvalue === void 0 || config.defaultvalue === "") config.defaultvalue = true;
53
62
  const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === (config.flag || "main"))) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
54
- if (itemField && itemField.isAddUpdate == 0) el.parentNode.removeChild(el);
63
+ if (itemField && itemField.isAddUpdate == 0)
64
+ el.parentNode.removeChild(el);
65
+ else if (!itemField && config.defaultvalue == false)
66
+ el.parentNode.removeChild(el);
55
67
  }
56
68
  });
57
69
  }
@@ -35,11 +35,7 @@ const showFileUrlByType = (url) => {
35
35
  return url;
36
36
  }
37
37
  } else {
38
- if (window.__env__.VITE_IMG_URL) {
39
- return window.__env__.VITE_IMG_URL + fileType;
40
- } else {
41
- return fileType;
42
- }
38
+ return "/" + fileType;
43
39
  }
44
40
  };
45
41
  const getFileDownloadUrl = (url) => {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fmdeui-fmui v1.0.130 */
1
+ /*! fmdeui-fmui v1.0.132 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vxe-table'), require('@vxe-ui/plugin-render-element'), require('@vxe-ui/plugin-export-xlsx'), require('vxe-pc-ui'), require('exceljs'), require('@element-plus/icons-vue'), require('vue'), require('element-plus'), require('lodash-es'), require('js-cookie'), require('pinia'), require('vue-router'), require('@vueuse/core'), require('crypto-js'), require('xlsx-js-style'), require('vue-i18n'), require('sortablejs'), require('screenfull'), require('push.js'), require('mitt'), require('@microsoft/signalr'), require('axios')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vxe-table', '@vxe-ui/plugin-render-element', '@vxe-ui/plugin-export-xlsx', 'vxe-pc-ui', 'exceljs', '@element-plus/icons-vue', 'vue', 'element-plus', 'lodash-es', 'js-cookie', 'pinia', 'vue-router', '@vueuse/core', 'crypto-js', 'xlsx-js-style', 'vue-i18n', 'sortablejs', 'screenfull', 'push.js', 'mitt', '@microsoft/signalr', 'axios'], factory) :
@@ -2271,11 +2271,7 @@
2271
2271
  return url;
2272
2272
  }
2273
2273
  } else {
2274
- if (window.__env__.VITE_IMG_URL) {
2275
- return window.__env__.VITE_IMG_URL + fileType;
2276
- } else {
2277
- return fileType;
2278
- }
2274
+ return "/" + fileType;
2279
2275
  }
2280
2276
  };
2281
2277
  const getFileDownloadUrl = (url) => {
@@ -4107,8 +4103,12 @@
4107
4103
  var _a, _b, _c, _d;
4108
4104
  const stores = useUserInfo();
4109
4105
  const config = typeof binding.value === "string" ? { path: binding.value, field: "" } : binding.value;
4106
+ if (config.defaultvalue == null || config.defaultvalue === void 0 || config.defaultvalue === "") config.defaultvalue = true;
4110
4107
  const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
4111
- if (itemField && itemField.isTable == 0) el.parentNode.removeChild(el);
4108
+ if (itemField && itemField.isTable == 0)
4109
+ el.parentNode.removeChild(el);
4110
+ else if (!itemField && config.defaultvalue == false)
4111
+ el.parentNode.removeChild(el);
4112
4112
  }
4113
4113
  });
4114
4114
  app.directive("hpquery", {
@@ -4116,8 +4116,12 @@
4116
4116
  var _a, _b, _c, _d;
4117
4117
  const stores = useUserInfo();
4118
4118
  const config = typeof binding.value === "string" ? { path: binding.value, field: "" } : binding.value;
4119
+ if (config.defaultvalue == null || config.defaultvalue === void 0 || config.defaultvalue === "") config.defaultvalue = true;
4119
4120
  const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
4120
- if (itemField && itemField.isQuery == 0) el.parentNode.removeChild(el);
4121
+ if (itemField && itemField.isQuery == 0)
4122
+ el.parentNode.removeChild(el);
4123
+ else if (!itemField && config.defaultvalue == false)
4124
+ el.parentNode.removeChild(el);
4121
4125
  }
4122
4126
  });
4123
4127
  app.directive("hpaddupdate", {
@@ -4125,8 +4129,12 @@
4125
4129
  var _a, _b, _c, _d;
4126
4130
  const stores = useUserInfo();
4127
4131
  const config = typeof binding.value === "string" ? { path: binding.value, field: "", flag: "main" } : binding.value;
4132
+ if (config.defaultvalue == null || config.defaultvalue === void 0 || config.defaultvalue === "") config.defaultvalue = true;
4128
4133
  const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === (config.flag || "main"))) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
4129
- if (itemField && itemField.isAddUpdate == 0) el.parentNode.removeChild(el);
4134
+ if (itemField && itemField.isAddUpdate == 0)
4135
+ el.parentNode.removeChild(el);
4136
+ else if (!itemField && config.defaultvalue == false)
4137
+ el.parentNode.removeChild(el);
4130
4138
  }
4131
4139
  });
4132
4140
  }