@form-create/element-ui 3.2.12 → 3.2.13

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @form-create/element-ui v3.2.12
2
+ * @form-create/element-ui v3.2.13
3
3
  * (c) 2018-2024 xaboy
4
4
  * Github https://github.com/xaboy/form-create
5
5
  * Released under the MIT License.
@@ -1321,13 +1321,25 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
1321
1321
  script$1.render = render$1;
1322
1322
 
1323
1323
  function parseFile(file, i) {
1324
+ if (_typeof(file) === 'object') {
1325
+ return file;
1326
+ }
1327
+
1324
1328
  return {
1325
1329
  url: file,
1330
+ is_string: true,
1326
1331
  name: getFileName(file),
1327
1332
  uid: i
1328
1333
  };
1329
1334
  }
1330
1335
 
1336
+ function parseUpload(file) {
1337
+ return _objectSpread2(_objectSpread2({}, file), {}, {
1338
+ file: file,
1339
+ value: file
1340
+ });
1341
+ }
1342
+
1331
1343
  function getFileName(file) {
1332
1344
  return ('' + file).split('/').pop();
1333
1345
  }
@@ -1360,11 +1372,11 @@ var Upload = defineComponent({
1360
1372
  };
1361
1373
  },
1362
1374
  created: function created() {
1363
- this.fileList = toArray(this.modelValue).map(parseFile);
1375
+ this.fileList = toArray(this.modelValue).map(parseFile).map(parseUpload);
1364
1376
  },
1365
1377
  watch: {
1366
1378
  modelValue: function modelValue(n) {
1367
- this.fileList = toArray(n).map(parseFile);
1379
+ this.fileList = toArray(n).map(parseFile).map(parseUpload);
1368
1380
  }
1369
1381
  },
1370
1382
  methods: {
@@ -1381,8 +1393,8 @@ var Upload = defineComponent({
1381
1393
  }
1382
1394
  },
1383
1395
  update: function update(fileList) {
1384
- var files = fileList.map(function (file) {
1385
- return file.url;
1396
+ var files = fileList.map(function (v) {
1397
+ return v.is_string ? v.url : v.value || v.url;
1386
1398
  }).filter(function (url) {
1387
1399
  return url !== undefined;
1388
1400
  });
@@ -5336,7 +5348,7 @@ function useInput(Handler) {
5336
5348
  this.syncValue();
5337
5349
  },
5338
5350
  isIgnore: function isIgnore(rule) {
5339
- return rule.ignore || this.options.ignoreHiddenFields && rule.hidden;
5351
+ return rule.ignore === true || rule.ignore === 'hidden' && rule.hidden || this.options.ignoreHiddenFields && rule.hidden;
5340
5352
  },
5341
5353
  appendValue: function appendValue(rule) {
5342
5354
  if ((!rule.field || !hasProperty(this.appendData, rule.field)) && !this.options.forceCoverValue) {
@@ -5587,7 +5599,7 @@ function useContext(Handler) {
5587
5599
  _this.$render.clearCacheAll();
5588
5600
  }
5589
5601
 
5590
- if (key === 'ignore' && ctx.input || key === 'hidden' && ctx.input && _this.options.ignoreHiddenFields) {
5602
+ if (key === 'ignore' && ctx.input || key === 'hidden' && ctx.input && (ctx.rule.ignore === 'hidden' || _this.options.ignoreHiddenFields)) {
5591
5603
  _this.syncForm();
5592
5604
  } else if (key === 'link') {
5593
5605
  ctx.link();
@@ -7508,6 +7520,7 @@ function FormCreateFactory(config) {
7508
7520
  var DEFAULT_FORMATS = {
7509
7521
  date: 'YYYY-MM-DD',
7510
7522
  month: 'YYYY-MM',
7523
+ week: 'YYYY-wo',
7511
7524
  datetime: 'YYYY-MM-DD HH:mm:ss',
7512
7525
  timerange: 'HH:mm:ss',
7513
7526
  daterange: 'YYYY-MM-DD',
@@ -7837,7 +7850,7 @@ var manager = {
7837
7850
  ref: ref
7838
7851
  });
7839
7852
  extend(this.rule.props, {
7840
- model: _objectSpread2({}, $handle.formData)
7853
+ model: $handle.formData
7841
7854
  });
7842
7855
  },
7843
7856
  render: function render(children) {
@@ -8133,7 +8146,7 @@ function useFrame(maker) {
8133
8146
  return maker;
8134
8147
  }
8135
8148
 
8136
- var css_248z = ".form-create .form-create .el-form-item{margin-bottom:22px}.form-create{width:100%}.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before,.form-create.is-preview .fc-clock{display:none!important}.fc-wrap-left .el-form-item__label{justify-content:flex-start;justify-content:flex-end}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item .el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left}.el-form--large .fc-wrap-top.el-form-item .el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item .el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item .el-form-item__label{line-height:20px;margin-bottom:4px}";
8149
+ var css_248z = ".form-create .form-create .el-form-item{margin-bottom:22px}.form-create{width:100%}.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before,.form-create.is-preview .fc-clock{display:none!important}.fc-wrap-right .el-form-item__label{justify-content:flex-end}.fc-wrap-left .el-form-item__label{justify-content:flex-start}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item .el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left}.el-form--large .fc-wrap-top.el-form-item .el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item .el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item .el-form-item__label{line-height:20px;margin-bottom:4px}";
8137
8150
  styleInject(css_248z);
8138
8151
 
8139
8152
  function tidyBtnProp(btn, def) {
@@ -8386,7 +8399,7 @@ function install(FormCreate) {
8386
8399
  function elmFormCreate() {
8387
8400
  return FormCreateFactory({
8388
8401
  ui: 'element-ui',
8389
- version: '3.2.12',
8402
+ version: '3.2.13',
8390
8403
  manager: manager,
8391
8404
  extendApi: extendApi,
8392
8405
  install: install,