vxe-pc-ui 4.14.26 → 4.14.27

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.
Files changed (57) hide show
  1. package/dist/all.esm.js +224 -181
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/form/src/form-config-item.js +10 -6
  5. package/es/form/src/form.js +55 -15
  6. package/es/form/style.css +2 -2
  7. package/es/form/style.min.css +1 -1
  8. package/es/radio/style.css +2 -2
  9. package/es/radio/style.min.css +1 -1
  10. package/es/style.css +1 -1
  11. package/es/style.min.css +1 -1
  12. package/es/ui/index.js +1 -1
  13. package/es/ui/src/log.js +1 -1
  14. package/es/vxe-form/style.css +2 -2
  15. package/es/vxe-form/style.min.css +1 -1
  16. package/es/vxe-radio/style.css +2 -2
  17. package/es/vxe-radio/style.min.css +1 -1
  18. package/lib/form/src/form-config-item.js +11 -4
  19. package/lib/form/src/form-config-item.min.js +1 -1
  20. package/lib/form/src/form.js +69 -17
  21. package/lib/form/src/form.min.js +1 -1
  22. package/lib/form/style/style.css +2 -2
  23. package/lib/form/style/style.min.css +1 -1
  24. package/lib/index.umd.js +256 -197
  25. package/lib/index.umd.min.js +1 -1
  26. package/lib/radio/style/style.css +2 -2
  27. package/lib/radio/style/style.min.css +1 -1
  28. package/lib/style.css +1 -1
  29. package/lib/style.min.css +1 -1
  30. package/lib/ui/index.js +1 -1
  31. package/lib/ui/index.min.js +1 -1
  32. package/lib/ui/src/log.js +1 -1
  33. package/lib/ui/src/log.min.js +1 -1
  34. package/lib/vxe-form/style/style.css +2 -2
  35. package/lib/vxe-form/style/style.min.css +1 -1
  36. package/lib/vxe-radio/style/style.css +2 -2
  37. package/lib/vxe-radio/style/style.min.css +1 -1
  38. package/package.json +1 -1
  39. package/packages/form/src/form-config-item.ts +12 -4
  40. package/packages/form/src/form.ts +58 -15
  41. package/packages/form/src/util.ts +1 -1
  42. package/styles/components/form.scss +2 -2
  43. package/styles/components/radio.scss +2 -2
  44. package/types/components/form.d.ts +22 -3
  45. package/types/components/notice-bar.d.ts +4 -0
  46. /package/es/icon/{iconfont.1780292459831.ttf → iconfont.1780477619002.ttf} +0 -0
  47. /package/es/icon/{iconfont.1780292459831.woff → iconfont.1780477619002.woff} +0 -0
  48. /package/es/icon/{iconfont.1780292459831.woff2 → iconfont.1780477619002.woff2} +0 -0
  49. /package/es/{iconfont.1780292459831.ttf → iconfont.1780477619002.ttf} +0 -0
  50. /package/es/{iconfont.1780292459831.woff → iconfont.1780477619002.woff} +0 -0
  51. /package/es/{iconfont.1780292459831.woff2 → iconfont.1780477619002.woff2} +0 -0
  52. /package/lib/icon/style/{iconfont.1780292459831.ttf → iconfont.1780477619002.ttf} +0 -0
  53. /package/lib/icon/style/{iconfont.1780292459831.woff → iconfont.1780477619002.woff} +0 -0
  54. /package/lib/icon/style/{iconfont.1780292459831.woff2 → iconfont.1780477619002.woff2} +0 -0
  55. /package/lib/{iconfont.1780292459831.ttf → iconfont.1780477619002.ttf} +0 -0
  56. /package/lib/{iconfont.1780292459831.woff → iconfont.1780477619002.woff} +0 -0
  57. /package/lib/{iconfont.1780292459831.woff2 → iconfont.1780477619002.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -4646,7 +4646,7 @@ function checkDynamic() {
4646
4646
  }
4647
4647
  ;// ./packages/ui/src/log.ts
4648
4648
 
4649
- const log_version = `ui v${"4.14.26"}`;
4649
+ const log_version = `ui v${"4.14.27"}`;
4650
4650
  const warnLog = log.create('warn', log_version);
4651
4651
  const errLog = log.create('error', log_version);
4652
4652
  ;// ./packages/ui/index.ts
@@ -4654,7 +4654,7 @@ const errLog = log.create('error', log_version);
4654
4654
 
4655
4655
 
4656
4656
 
4657
- const ui_version = "4.14.26";
4657
+ const ui_version = "4.14.27";
4658
4658
  VxeUI.uiVersion = ui_version;
4659
4659
  VxeUI.dynamicApp = dynamicApp;
4660
4660
  function config(options) {
@@ -25980,6 +25980,181 @@ function renderItemContent($xeForm, item) {
25980
25980
  class: 'vxe-form--item-inner'
25981
25981
  }, contentVNs);
25982
25982
  }
25983
+ ;// ./packages/form/src/form-item.ts
25984
+
25985
+
25986
+
25987
+
25988
+
25989
+
25990
+
25991
+ const formItemProps = {
25992
+ title: String,
25993
+ field: String,
25994
+ span: {
25995
+ type: [String, Number],
25996
+ default: null
25997
+ },
25998
+ align: {
25999
+ type: String,
26000
+ default: null
26001
+ },
26002
+ verticalAlign: {
26003
+ type: String,
26004
+ default: null
26005
+ },
26006
+ titleBackground: {
26007
+ type: Boolean,
26008
+ default: null
26009
+ },
26010
+ titleBold: {
26011
+ type: Boolean,
26012
+ default: null
26013
+ },
26014
+ titleAlign: {
26015
+ type: String,
26016
+ default: null
26017
+ },
26018
+ titleWidth: {
26019
+ type: [String, Number],
26020
+ default: null
26021
+ },
26022
+ titleColon: {
26023
+ type: Boolean,
26024
+ default: null
26025
+ },
26026
+ titleAsterisk: {
26027
+ type: Boolean,
26028
+ default: null
26029
+ },
26030
+ showTitle: {
26031
+ type: Boolean,
26032
+ default: true
26033
+ },
26034
+ vertical: {
26035
+ type: Boolean,
26036
+ default: null
26037
+ },
26038
+ padding: {
26039
+ type: Boolean,
26040
+ default: null
26041
+ },
26042
+ formatter: [String, Function],
26043
+ className: [String, Function],
26044
+ contentClassName: [String, Function],
26045
+ contentStyle: [Object, Function],
26046
+ titleClassName: [String, Function],
26047
+ titleStyle: [Object, Function],
26048
+ titleOverflow: {
26049
+ type: [Boolean, String],
26050
+ default: null
26051
+ },
26052
+ titlePrefix: Object,
26053
+ titleSuffix: Object,
26054
+ resetValue: {
26055
+ default: null
26056
+ },
26057
+ visibleMethod: Function,
26058
+ visible: {
26059
+ type: Boolean,
26060
+ default: null
26061
+ },
26062
+ showContent: {
26063
+ type: Boolean,
26064
+ default: null
26065
+ },
26066
+ folding: Boolean,
26067
+ collapseNode: Boolean,
26068
+ itemRender: Object,
26069
+ rules: Array,
26070
+ params: Object
26071
+ };
26072
+ /* harmony default export */ var form_item = (defineVxeComponent({
26073
+ name: 'VxeFormItem',
26074
+ props: formItemProps,
26075
+ setup(props, {
26076
+ slots
26077
+ }) {
26078
+ const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
26079
+ const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
26080
+ const $xeForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeForm', {});
26081
+ const $xeFormGroup = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeFormGroup', null);
26082
+ const formItem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(createItem($xeForm, props));
26083
+ formItem.slots = slots;
26084
+ const formItemInfo = {
26085
+ itemConfig: formItem
26086
+ };
26087
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('xeFormItemInfo', formItemInfo);
26088
+ const renderItem = ($xeForm, item) => {
26089
+ const formProps = $xeForm.props;
26090
+ const $xeGrid = $xeForm.xeGrid;
26091
+ const {
26092
+ data,
26093
+ readonly,
26094
+ disabled
26095
+ } = formProps;
26096
+ const {
26097
+ visible,
26098
+ field,
26099
+ itemRender,
26100
+ contentStyle,
26101
+ showContent
26102
+ } = item;
26103
+ const compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
26104
+ const itemStyle = compConf ? compConf.formItemStyle || compConf.itemStyle : null;
26105
+ const itemContentStyle = compConf ? compConf.formItemContentStyle || compConf.itemContentStyle : null;
26106
+ const params = {
26107
+ data,
26108
+ disabled,
26109
+ readonly,
26110
+ field,
26111
+ property: field,
26112
+ item,
26113
+ $form: $xeForm,
26114
+ $grid: $xeGrid
26115
+ };
26116
+ if (visible === false) {
26117
+ return renderEmptyElement($xeFormItem);
26118
+ }
26119
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
26120
+ ref: refElem,
26121
+ key: item.id,
26122
+ itemid: item.id,
26123
+ class: getItemClass($xeForm, item),
26124
+ style: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemStyle) ? itemStyle(params) : itemStyle
26125
+ }, [renderTitle($xeForm, item), showContent === false ? renderEmptyElement($xeFormItem) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
26126
+ class: getItemContentClass($xeForm, item),
26127
+ style: Object.assign({}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemContentStyle) ? itemContentStyle(params) : itemContentStyle, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(contentStyle) ? contentStyle(params) : contentStyle)
26128
+ }, [renderItemContent($xeForm, item), renderItemErrorIcon($xeForm, item)])]);
26129
+ };
26130
+ const renderVN = () => {
26131
+ const customLayout = $xeForm ? $xeForm.props.customLayout : false;
26132
+ const item = formItem;
26133
+ return customLayout ? renderItem($xeForm, item) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
26134
+ ref: refElem
26135
+ });
26136
+ };
26137
+ const $xeFormItem = {
26138
+ xID,
26139
+ formItem,
26140
+ renderVN
26141
+ };
26142
+ watchItem(props, formItem);
26143
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
26144
+ const elem = refElem.value;
26145
+ assembleItem($xeForm, elem, formItem, $xeFormGroup);
26146
+ });
26147
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
26148
+ destroyItem($xeForm, formItem);
26149
+ });
26150
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeFormItem', $xeFormItem);
26151
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeFormGroup', null);
26152
+ return $xeFormItem;
26153
+ },
26154
+ render() {
26155
+ return this.renderVN();
26156
+ }
26157
+ }));
25983
26158
  ;// ./packages/form/src/form-config-item.ts
25984
26159
 
25985
26160
 
@@ -25989,10 +26164,12 @@ function renderItemContent($xeForm, item) {
25989
26164
 
25990
26165
 
25991
26166
 
26167
+
25992
26168
  const VxeFormConfigItem = defineVxeComponent({
25993
26169
  name: 'VxeFormConfigItem',
25994
26170
  props: {
25995
- itemConfig: Object
26171
+ itemConfig: Object,
26172
+ ...formItemProps
25996
26173
  },
25997
26174
  setup(props) {
25998
26175
  const $xeForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeForm', {});
@@ -26000,6 +26177,12 @@ const VxeFormConfigItem = defineVxeComponent({
26000
26177
  itemConfig: props.itemConfig
26001
26178
  };
26002
26179
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('xeFormItemInfo', xeformiteminfo);
26180
+ const computeItemVisible = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
26181
+ const {
26182
+ visible
26183
+ } = props.itemConfig;
26184
+ return visible;
26185
+ });
26003
26186
  const renderItem = ($xeForm, item) => {
26004
26187
  const formProps = $xeForm.props;
26005
26188
  const $xeGrid = $xeForm.xeGrid;
@@ -26009,13 +26192,13 @@ const VxeFormConfigItem = defineVxeComponent({
26009
26192
  disabled
26010
26193
  } = formProps;
26011
26194
  const {
26012
- visible,
26013
26195
  field,
26014
26196
  itemRender,
26015
26197
  contentStyle,
26016
26198
  children,
26017
26199
  showContent
26018
26200
  } = item;
26201
+ const itemVisible = computeItemVisible.value;
26019
26202
  const compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
26020
26203
  const itemStyle = compConf ? compConf.formItemStyle || compConf.itemStyle : null;
26021
26204
  const itemContentStyle = compConf ? compConf.formItemContentStyle || compConf.itemContentStyle : null;
@@ -26030,7 +26213,7 @@ const VxeFormConfigItem = defineVxeComponent({
26030
26213
  $grid: $xeGrid
26031
26214
  };
26032
26215
  const hasGroup = children && children.length > 0;
26033
- if (visible === false) {
26216
+ if (itemVisible === false) {
26034
26217
  return renderEmptyElement($xeForm);
26035
26218
  }
26036
26219
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
@@ -26882,6 +27065,14 @@ function checkRuleStatus(rule, data, val) {
26882
27065
  }
26883
27066
  return true;
26884
27067
  }
27068
+ function form_createReactData() {
27069
+ return {
27070
+ collapseAll: false,
27071
+ staticItems: [],
27072
+ formItems: [],
27073
+ itemWidth: 0
27074
+ };
27075
+ }
26885
27076
  function form_createInternalData() {
26886
27077
  return {
26887
27078
  meTimeout: undefined,
@@ -26890,7 +27081,9 @@ function form_createInternalData() {
26890
27081
  item: null,
26891
27082
  visible: false
26892
27083
  },
26893
- itemFormatCache: {}
27084
+ itemFormatCache: {},
27085
+ fullItemIdData: {},
27086
+ fullItemFieldData: {}
26894
27087
  };
26895
27088
  }
26896
27089
  /* harmony default export */ var src_form = (defineVxeComponent({
@@ -26987,12 +27180,7 @@ function form_createInternalData() {
26987
27180
  const {
26988
27181
  computeSize
26989
27182
  } = useSize(props);
26990
- const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
26991
- collapseAll: props.collapseStatus,
26992
- staticItems: [],
26993
- formItems: [],
26994
- itemWidth: 0
26995
- });
27183
+ const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(form_createReactData());
26996
27184
  const internalData = form_createInternalData();
26997
27185
  const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
26998
27186
  const refTooltip = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
@@ -27065,7 +27253,7 @@ function form_createInternalData() {
27065
27253
  }
27066
27254
  return [];
27067
27255
  };
27068
- const loadItem = list => {
27256
+ const loadItems = list => {
27069
27257
  if (list.length) {
27070
27258
  list.forEach(item => {
27071
27259
  if (item.slots) {
@@ -27097,10 +27285,11 @@ function form_createInternalData() {
27097
27285
  return itemList;
27098
27286
  };
27099
27287
  const getItemByField = field => {
27100
- const rest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(reactData.formItems, item => item.field === field, {
27101
- children: 'children'
27102
- });
27103
- return rest ? rest.item : null;
27288
+ const {
27289
+ fullItemFieldData
27290
+ } = internalData;
27291
+ const itemRest = fullItemFieldData[field];
27292
+ return itemRest ? itemRest.item : null;
27104
27293
  };
27105
27294
  const getCollapseStatus = () => {
27106
27295
  return reactData.collapseAll;
@@ -27179,6 +27368,34 @@ function form_createInternalData() {
27179
27368
  }
27180
27369
  return resetValue;
27181
27370
  };
27371
+ const cacheItem = () => {
27372
+ const {
27373
+ formItems
27374
+ } = reactData;
27375
+ const itemIdData = {};
27376
+ const itemFieldData = {};
27377
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(formItems, (item, index, items) => {
27378
+ const {
27379
+ id,
27380
+ field
27381
+ } = item;
27382
+ const itemRest = {
27383
+ item,
27384
+ items,
27385
+ index
27386
+ };
27387
+ if (id) {
27388
+ itemIdData[id] = itemRest;
27389
+ }
27390
+ if (field) {
27391
+ itemFieldData[field] = itemRest;
27392
+ }
27393
+ }, {
27394
+ children: 'children'
27395
+ });
27396
+ internalData.fullItemFieldData = itemFieldData;
27397
+ internalData.fullItemIdData = itemIdData;
27398
+ };
27182
27399
  const reset = () => {
27183
27400
  const {
27184
27401
  data
@@ -27613,6 +27830,18 @@ function form_createInternalData() {
27613
27830
  const handleGlobalResizeEvent = () => {
27614
27831
  recalculate();
27615
27832
  };
27833
+ const handleItemVisible = visible => {
27834
+ return function (fieldOrItems) {
27835
+ const objs = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrItems) ? fieldOrItems : [fieldOrItems];
27836
+ objs.forEach(obj => {
27837
+ const item = handleFieldOrItem($xeForm, obj);
27838
+ if (item) {
27839
+ item.visible = visible;
27840
+ }
27841
+ });
27842
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
27843
+ };
27844
+ };
27616
27845
  formMethods = {
27617
27846
  dispatchEvent(type, params, evnt) {
27618
27847
  emit(type, createEvent(evnt, {
@@ -27620,6 +27849,9 @@ function form_createInternalData() {
27620
27849
  $grid: $xeGrid
27621
27850
  }, params));
27622
27851
  },
27852
+ loadItems,
27853
+ showItem: handleItemVisible(true),
27854
+ hideItem: handleItemVisible(false),
27623
27855
  reset,
27624
27856
  validate,
27625
27857
  validateField,
@@ -27679,11 +27911,11 @@ function form_createInternalData() {
27679
27911
  }, customLayout ? defaultSlot ? defaultSlot({}) : [] : formItems.map((item, index) => {
27680
27912
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(form_config_item, {
27681
27913
  key: index,
27682
- itemConfig: item
27914
+ itemConfig: item,
27915
+ visible: item.visible
27683
27916
  });
27684
27917
  })), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
27685
- class: 'vxe-form-slots',
27686
- ref: 'hideItem'
27918
+ class: 'vxe-form-slots'
27687
27919
  }, customLayout ? [] : defaultSlot ? defaultSlot({}) : []),
27688
27920
  /**
27689
27921
  * 加载中
@@ -27722,6 +27954,7 @@ function form_createInternalData() {
27722
27954
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(staticItemFlag, () => {
27723
27955
  reactData.formItems = reactData.staticItems;
27724
27956
  recalcFlag.value++;
27957
+ cacheItem();
27725
27958
  });
27726
27959
  const itemFlag = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);
27727
27960
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.items ? props.items.length : -1, () => {
@@ -27731,7 +27964,7 @@ function form_createInternalData() {
27731
27964
  itemFlag.value++;
27732
27965
  });
27733
27966
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(itemFlag, () => {
27734
- loadItem(props.items || []);
27967
+ loadItems(props.items || []);
27735
27968
  });
27736
27969
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.collapseStatus, value => {
27737
27970
  reactData.collapseAll = !!value;
@@ -27754,8 +27987,9 @@ function form_createInternalData() {
27754
27987
  globalEvents.off($xeForm, 'resize');
27755
27988
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, form_createInternalData());
27756
27989
  });
27990
+ reactData.collapseAll = !!props.collapseStatus;
27757
27991
  if (props.items) {
27758
- loadItem(props.items);
27992
+ loadItems(props.items);
27759
27993
  }
27760
27994
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('xeFormItemInfo', null);
27761
27995
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeForm', $xeForm);
@@ -27781,181 +28015,6 @@ dynamicApp.use(VxeForm);
27781
28015
  VxeUI.component(src_form);
27782
28016
  const Form = VxeForm;
27783
28017
  /* harmony default export */ var packages_form = (VxeForm);
27784
- ;// ./packages/form/src/form-item.ts
27785
-
27786
-
27787
-
27788
-
27789
-
27790
-
27791
-
27792
- const formItemProps = {
27793
- title: String,
27794
- field: String,
27795
- span: {
27796
- type: [String, Number],
27797
- default: null
27798
- },
27799
- align: {
27800
- type: String,
27801
- default: null
27802
- },
27803
- verticalAlign: {
27804
- type: String,
27805
- default: null
27806
- },
27807
- titleBackground: {
27808
- type: Boolean,
27809
- default: null
27810
- },
27811
- titleBold: {
27812
- type: Boolean,
27813
- default: null
27814
- },
27815
- titleAlign: {
27816
- type: String,
27817
- default: null
27818
- },
27819
- titleWidth: {
27820
- type: [String, Number],
27821
- default: null
27822
- },
27823
- titleColon: {
27824
- type: Boolean,
27825
- default: null
27826
- },
27827
- titleAsterisk: {
27828
- type: Boolean,
27829
- default: null
27830
- },
27831
- showTitle: {
27832
- type: Boolean,
27833
- default: true
27834
- },
27835
- vertical: {
27836
- type: Boolean,
27837
- default: null
27838
- },
27839
- padding: {
27840
- type: Boolean,
27841
- default: null
27842
- },
27843
- formatter: [String, Function],
27844
- className: [String, Function],
27845
- contentClassName: [String, Function],
27846
- contentStyle: [Object, Function],
27847
- titleClassName: [String, Function],
27848
- titleStyle: [Object, Function],
27849
- titleOverflow: {
27850
- type: [Boolean, String],
27851
- default: null
27852
- },
27853
- titlePrefix: Object,
27854
- titleSuffix: Object,
27855
- resetValue: {
27856
- default: null
27857
- },
27858
- visibleMethod: Function,
27859
- visible: {
27860
- type: Boolean,
27861
- default: null
27862
- },
27863
- showContent: {
27864
- type: Boolean,
27865
- default: null
27866
- },
27867
- folding: Boolean,
27868
- collapseNode: Boolean,
27869
- itemRender: Object,
27870
- rules: Array,
27871
- params: Object
27872
- };
27873
- /* harmony default export */ var form_item = (defineVxeComponent({
27874
- name: 'VxeFormItem',
27875
- props: formItemProps,
27876
- setup(props, {
27877
- slots
27878
- }) {
27879
- const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
27880
- const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
27881
- const $xeForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeForm', {});
27882
- const $xeFormGroup = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeFormGroup', null);
27883
- const formItem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(createItem($xeForm, props));
27884
- formItem.slots = slots;
27885
- const formItemInfo = {
27886
- itemConfig: formItem
27887
- };
27888
- (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('xeFormItemInfo', formItemInfo);
27889
- const renderItem = ($xeForm, item) => {
27890
- const formProps = $xeForm.props;
27891
- const $xeGrid = $xeForm.xeGrid;
27892
- const {
27893
- data,
27894
- readonly,
27895
- disabled
27896
- } = formProps;
27897
- const {
27898
- visible,
27899
- field,
27900
- itemRender,
27901
- contentStyle,
27902
- showContent
27903
- } = item;
27904
- const compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
27905
- const itemStyle = compConf ? compConf.formItemStyle || compConf.itemStyle : null;
27906
- const itemContentStyle = compConf ? compConf.formItemContentStyle || compConf.itemContentStyle : null;
27907
- const params = {
27908
- data,
27909
- disabled,
27910
- readonly,
27911
- field,
27912
- property: field,
27913
- item,
27914
- $form: $xeForm,
27915
- $grid: $xeGrid
27916
- };
27917
- if (visible === false) {
27918
- return renderEmptyElement($xeFormItem);
27919
- }
27920
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
27921
- ref: refElem,
27922
- key: item.id,
27923
- itemid: item.id,
27924
- class: getItemClass($xeForm, item),
27925
- style: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemStyle) ? itemStyle(params) : itemStyle
27926
- }, [renderTitle($xeForm, item), showContent === false ? renderEmptyElement($xeFormItem) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
27927
- class: getItemContentClass($xeForm, item),
27928
- style: Object.assign({}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemContentStyle) ? itemContentStyle(params) : itemContentStyle, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(contentStyle) ? contentStyle(params) : contentStyle)
27929
- }, [renderItemContent($xeForm, item), renderItemErrorIcon($xeForm, item)])]);
27930
- };
27931
- const renderVN = () => {
27932
- const customLayout = $xeForm ? $xeForm.props.customLayout : false;
27933
- const item = formItem;
27934
- return customLayout ? renderItem($xeForm, item) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
27935
- ref: refElem
27936
- });
27937
- };
27938
- const $xeFormItem = {
27939
- xID,
27940
- formItem,
27941
- renderVN
27942
- };
27943
- watchItem(props, formItem);
27944
- (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
27945
- const elem = refElem.value;
27946
- assembleItem($xeForm, elem, formItem, $xeFormGroup);
27947
- });
27948
- (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
27949
- destroyItem($xeForm, formItem);
27950
- });
27951
- (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeFormItem', $xeFormItem);
27952
- (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeFormGroup', null);
27953
- return $xeFormItem;
27954
- },
27955
- render() {
27956
- return this.renderVN();
27957
- }
27958
- }));
27959
28018
  ;// ./packages/form/src/form-group.ts
27960
28019
 
27961
28020