@panpanzhao/component-ui 0.0.50 → 0.0.52

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.
@@ -2686,6 +2686,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2686
2686
 
2687
2687
 
2688
2688
 
2689
+
2689
2690
  /* harmony default export */ var form_query_src_formvue_type_script_lang_js_ = ({
2690
2691
  name: "FormQuery",
2691
2692
  componentName: "FormQuery",
@@ -2875,7 +2876,24 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2875
2876
  var itemLength = 0;
2876
2877
 
2877
2878
  // 处理过,包含是否需要隐藏的 数组
2878
- var processedList = this.formItems.map(function (item, index) {
2879
+ var processedList = this.formItems.filter(function (item) {
2880
+ if (item.show === false) {
2881
+ return false;
2882
+ }
2883
+ if (typeof item.show === "function" && !item.show.call(_this2, _this2.formModel, {
2884
+ form: _this2,
2885
+ formModel: _this2.formModel,
2886
+ config: item
2887
+ })) {
2888
+ return false;
2889
+ }
2890
+ if (typeof item.show === "string" && !Object(formula_["evaluate"])(item.show, _this2.formModel, {
2891
+ evalMode: true
2892
+ })) {
2893
+ return false;
2894
+ }
2895
+ return true;
2896
+ }).map(function (item, index) {
2879
2897
  // 如果 formItem 自己配置了 hidden,默认使用它自己的
2880
2898
  var colSize = item.colSize ? item.colSize : 1;
2881
2899
  var colSpan = item.span || Math.min(_this2.span * (colSize || 1), 24);
@@ -234,6 +234,13 @@ module.exports = require("lodash");
234
234
 
235
235
  /***/ }),
236
236
 
237
+ /***/ 3:
238
+ /***/ (function(module, exports) {
239
+
240
+ module.exports = require("@panpanzhao/component-ui/lib/utils/formula");
241
+
242
+ /***/ }),
243
+
237
244
  /***/ 79:
238
245
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
239
246
 
@@ -261,6 +268,9 @@ var col_default = /*#__PURE__*/__webpack_require__.n(col_);
261
268
  var form_item_ = __webpack_require__(16);
262
269
  var form_item_default = /*#__PURE__*/__webpack_require__.n(form_item_);
263
270
 
271
+ // EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/utils/formula"
272
+ var formula_ = __webpack_require__(3);
273
+
264
274
  // EXTERNAL MODULE: external "lodash"
265
275
  var external_lodash_ = __webpack_require__(2);
266
276
 
@@ -273,6 +283,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
273
283
 
274
284
 
275
285
 
286
+
276
287
  /* harmony default export */ var formvue_type_script_lang_js_ = ({
277
288
  name: "FormQuery",
278
289
  componentName: "FormQuery",
@@ -462,7 +473,24 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
462
473
  var itemLength = 0;
463
474
 
464
475
  // 处理过,包含是否需要隐藏的 数组
465
- var processedList = this.formItems.map(function (item, index) {
476
+ var processedList = this.formItems.filter(function (item) {
477
+ if (item.show === false) {
478
+ return false;
479
+ }
480
+ if (typeof item.show === "function" && !item.show.call(_this2, _this2.formModel, {
481
+ form: _this2,
482
+ formModel: _this2.formModel,
483
+ config: item
484
+ })) {
485
+ return false;
486
+ }
487
+ if (typeof item.show === "string" && !Object(formula_["evaluate"])(item.show, _this2.formModel, {
488
+ evalMode: true
489
+ })) {
490
+ return false;
491
+ }
492
+ return true;
493
+ }).map(function (item, index) {
466
494
  // 如果 formItem 自己配置了 hidden,默认使用它自己的
467
495
  var colSize = item.colSize ? item.colSize : 1;
468
496
  var colSpan = item.span || Math.min(_this2.span * (colSize || 1), 24);