@v2coding/ui 0.1.53 → 0.1.54

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.
@@ -7755,30 +7755,50 @@ var script$g = {
7755
7755
  * (函数节流. 600ms内只执行一次, 防止 form 表单多次提交)
7756
7756
  * @private
7757
7757
  */
7758
- onSubmit: lodash.throttle(function () {
7758
+ onSubmit: lodash.throttle( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7759
7759
  var _this = this;
7760
7760
 
7761
- var formData = this.getValues();
7762
- var allow = this.beforeSubmit(formData);
7761
+ var formData, allow;
7762
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
7763
+ while (1) {
7764
+ switch (_context.prev = _context.next) {
7765
+ case 0:
7766
+ formData = this.getValues();
7767
+ _context.next = 3;
7768
+ return this.beforeSubmit(formData);
7763
7769
 
7764
- if (typeof allow === 'boolean' && allow === false) {
7765
- return;
7766
- }
7770
+ case 3:
7771
+ allow = _context.sent;
7767
7772
 
7768
- if (_typeof(allow) === 'object') {
7769
- formData = allow;
7770
- }
7773
+ if (!(typeof allow === 'boolean' && allow === false)) {
7774
+ _context.next = 6;
7775
+ break;
7776
+ }
7771
7777
 
7772
- this.validate(function (valid) {
7773
- if (!valid) {
7774
- return;
7775
- }
7778
+ return _context.abrupt("return");
7779
+
7780
+ case 6:
7781
+ if (_typeof(allow) === 'object') {
7782
+ formData = allow;
7783
+ }
7784
+
7785
+ this.validate(function (valid) {
7786
+ if (!valid) {
7787
+ return;
7788
+ }
7776
7789
 
7777
- _this.$emit('submit', formData);
7790
+ _this.$emit('submit', formData);
7778
7791
 
7779
- _this.doAction(formData);
7780
- });
7781
- }, 600, {
7792
+ _this.doAction(formData);
7793
+ });
7794
+
7795
+ case 8:
7796
+ case "end":
7797
+ return _context.stop();
7798
+ }
7799
+ }
7800
+ }, _callee, this);
7801
+ })), 600, {
7782
7802
  trailing: false
7783
7803
  }),
7784
7804
  doAction: function doAction(data) {
@@ -7968,8 +7988,8 @@ var __vue_staticRenderFns__$f = [];
7968
7988
 
7969
7989
  var __vue_inject_styles__$g = function __vue_inject_styles__(inject) {
7970
7990
  if (!inject) return;
7971
- inject("data-v-a797a0b6_0", {
7972
- source: ".el-form--inline[data-v-a797a0b6] .el-form-item{display:inline-flex}",
7991
+ inject("data-v-3dfdaaf7_0", {
7992
+ source: ".el-form--inline[data-v-3dfdaaf7] .el-form-item{display:inline-flex}",
7973
7993
  map: undefined,
7974
7994
  media: undefined
7975
7995
  });
@@ -7977,10 +7997,10 @@ var __vue_inject_styles__$g = function __vue_inject_styles__(inject) {
7977
7997
  /* scoped */
7978
7998
 
7979
7999
 
7980
- var __vue_scope_id__$g = "data-v-a797a0b6";
8000
+ var __vue_scope_id__$g = "data-v-3dfdaaf7";
7981
8001
  /* module identifier */
7982
8002
 
7983
- var __vue_module_identifier__$g = "data-v-a797a0b6";
8003
+ var __vue_module_identifier__$g = "data-v-3dfdaaf7";
7984
8004
  /* functional template */
7985
8005
 
7986
8006
  var __vue_is_functional_template__$g = false;
@@ -8181,48 +8201,78 @@ var script$f = {
8181
8201
  onSubmit: function onSubmit(formData) {
8182
8202
  var _this2 = this;
8183
8203
 
8184
- if (!this.ready) {
8185
- return;
8186
- }
8204
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
8205
+ var allow, def;
8206
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
8207
+ while (1) {
8208
+ switch (_context2.prev = _context2.next) {
8209
+ case 0:
8210
+ if (_this2.ready) {
8211
+ _context2.next = 2;
8212
+ break;
8213
+ }
8187
8214
 
8188
- this.$emit('submit', _objectSpread2({}, formData));
8189
- var allow = this.beforeSubmit(formData);
8215
+ return _context2.abrupt("return");
8190
8216
 
8191
- if (typeof allow === 'boolean' && allow === false) {
8192
- return;
8193
- }
8217
+ case 2:
8218
+ _this2.$emit('submit', _objectSpread2({}, formData));
8194
8219
 
8195
- if (_typeof(allow) === 'object') {
8196
- formData = allow;
8197
- }
8220
+ _context2.next = 5;
8221
+ return _this2.beforeSubmit(formData);
8198
8222
 
8199
- if (!this.url) {
8200
- return;
8201
- }
8223
+ case 5:
8224
+ allow = _context2.sent;
8202
8225
 
8203
- var def;
8204
- this.submitting = true;
8226
+ if (!(typeof allow === 'boolean' && allow === false)) {
8227
+ _context2.next = 8;
8228
+ break;
8229
+ }
8205
8230
 
8206
- if (this.method === 'get') {
8207
- def = this.getWithMessage(this.url, {
8208
- params: formData
8209
- });
8210
- } else {
8211
- def = this.postWithMessage(this.url, formData);
8212
- }
8231
+ return _context2.abrupt("return");
8213
8232
 
8214
- def.then(function () {
8215
- _this2.submitting = false;
8233
+ case 8:
8234
+ if (_typeof(allow) === 'object') {
8235
+ formData = allow;
8236
+ }
8216
8237
 
8217
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
8218
- args[_key] = arguments[_key];
8219
- }
8238
+ if (_this2.url) {
8239
+ _context2.next = 11;
8240
+ break;
8241
+ }
8220
8242
 
8221
- _this2.$emit.apply(_this2, ['after-submit'].concat(args));
8222
- }).catch(function () {
8223
- _this2.submitting = false;
8224
- return Promise.reject.apply(Promise, arguments);
8225
- });
8243
+ return _context2.abrupt("return");
8244
+
8245
+ case 11:
8246
+ _this2.submitting = true;
8247
+
8248
+ if (_this2.method === 'get') {
8249
+ def = _this2.getWithMessage(_this2.url, {
8250
+ params: formData
8251
+ });
8252
+ } else {
8253
+ def = _this2.postWithMessage(_this2.url, formData);
8254
+ }
8255
+
8256
+ def.then(function () {
8257
+ _this2.submitting = false;
8258
+
8259
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
8260
+ args[_key] = arguments[_key];
8261
+ }
8262
+
8263
+ _this2.$emit.apply(_this2, ['after-submit'].concat(args));
8264
+ }).catch(function () {
8265
+ _this2.submitting = false;
8266
+ return Promise.reject.apply(Promise, arguments);
8267
+ });
8268
+
8269
+ case 14:
8270
+ case "end":
8271
+ return _context2.stop();
8272
+ }
8273
+ }
8274
+ }, _callee2);
8275
+ }))();
8226
8276
  },
8227
8277
  onOpen: function onOpen() {},
8228
8278
  onOpened: function onOpened() {},
@@ -8296,8 +8346,8 @@ var __vue_staticRenderFns__$e = [];
8296
8346
 
8297
8347
  var __vue_inject_styles__$f = function __vue_inject_styles__(inject) {
8298
8348
  if (!inject) return;
8299
- inject("data-v-fd63290a_0", {
8300
- source: ".action-button[data-v-fd63290a]{text-align:right;margin:0 -20px -20px;padding:10px 20px;border-top:1px solid #e8e8e8}",
8349
+ inject("data-v-42a629ae_0", {
8350
+ source: ".action-button[data-v-42a629ae]{text-align:right;margin:0 -20px -20px;padding:10px 20px;border-top:1px solid #e8e8e8}",
8301
8351
  map: undefined,
8302
8352
  media: undefined
8303
8353
  });
@@ -8305,10 +8355,10 @@ var __vue_inject_styles__$f = function __vue_inject_styles__(inject) {
8305
8355
  /* scoped */
8306
8356
 
8307
8357
 
8308
- var __vue_scope_id__$f = "data-v-fd63290a";
8358
+ var __vue_scope_id__$f = "data-v-42a629ae";
8309
8359
  /* module identifier */
8310
8360
 
8311
- var __vue_module_identifier__$f = "data-v-fd63290a";
8361
+ var __vue_module_identifier__$f = "data-v-42a629ae";
8312
8362
  /* functional template */
8313
8363
 
8314
8364
  var __vue_is_functional_template__$f = false;
@@ -8623,47 +8673,73 @@ var script$d = {
8623
8673
  onSubmit: function onSubmit(formData) {
8624
8674
  var _this2 = this;
8625
8675
 
8626
- // if (!this.ready) {
8627
- // return;
8628
- // }
8629
- this.$emit('submit', _objectSpread2({}, formData));
8630
- var allow = this.beforeSubmit(formData);
8676
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
8677
+ var allow, def;
8678
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
8679
+ while (1) {
8680
+ switch (_context2.prev = _context2.next) {
8681
+ case 0:
8682
+ // if (!this.ready) {
8683
+ // return;
8684
+ // }
8685
+ _this2.$emit('submit', _objectSpread2({}, formData));
8631
8686
 
8632
- if (typeof allow === 'boolean' && allow === false) {
8633
- return;
8634
- }
8687
+ _context2.next = 3;
8688
+ return _this2.beforeSubmit(formData);
8635
8689
 
8636
- if (_typeof(allow) === 'object') {
8637
- formData = allow;
8638
- }
8690
+ case 3:
8691
+ allow = _context2.sent;
8639
8692
 
8640
- if (!this.url) {
8641
- return;
8642
- }
8693
+ if (!(typeof allow === 'boolean' && allow === false)) {
8694
+ _context2.next = 6;
8695
+ break;
8696
+ }
8643
8697
 
8644
- var def;
8645
- this.submitting = true;
8698
+ return _context2.abrupt("return");
8646
8699
 
8647
- if (this.method === 'get') {
8648
- def = this.getWithMessage(this.url, {
8649
- params: formData
8650
- });
8651
- } else {
8652
- def = this.postWithMessage(this.url, formData);
8653
- }
8700
+ case 6:
8701
+ if (_typeof(allow) === 'object') {
8702
+ formData = allow;
8703
+ }
8654
8704
 
8655
- def.then(function () {
8656
- _this2.submitting = false;
8705
+ if (_this2.url) {
8706
+ _context2.next = 9;
8707
+ break;
8708
+ }
8657
8709
 
8658
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
8659
- args[_key] = arguments[_key];
8660
- }
8710
+ return _context2.abrupt("return");
8661
8711
 
8662
- _this2.$emit.apply(_this2, ['after-submit'].concat(args));
8663
- }).catch(function () {
8664
- _this2.submitting = false;
8665
- return Promise.reject.apply(Promise, arguments);
8666
- });
8712
+ case 9:
8713
+ _this2.submitting = true;
8714
+
8715
+ if (_this2.method === 'get') {
8716
+ def = _this2.getWithMessage(_this2.url, {
8717
+ params: formData
8718
+ });
8719
+ } else {
8720
+ def = _this2.postWithMessage(_this2.url, formData);
8721
+ }
8722
+
8723
+ def.then(function () {
8724
+ _this2.submitting = false;
8725
+
8726
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
8727
+ args[_key] = arguments[_key];
8728
+ }
8729
+
8730
+ _this2.$emit.apply(_this2, ['after-submit'].concat(args));
8731
+ }).catch(function () {
8732
+ _this2.submitting = false;
8733
+ return Promise.reject.apply(Promise, arguments);
8734
+ });
8735
+
8736
+ case 12:
8737
+ case "end":
8738
+ return _context2.stop();
8739
+ }
8740
+ }
8741
+ }, _callee2);
8742
+ }))();
8667
8743
  }
8668
8744
  }
8669
8745
  };/* script */
@@ -8734,7 +8810,7 @@ var __vue_staticRenderFns__$c = [];
8734
8810
 
8735
8811
  var __vue_inject_styles__$d = function __vue_inject_styles__(inject) {
8736
8812
  if (!inject) return;
8737
- inject("data-v-35f09272_0", {
8813
+ inject("data-v-0dd33ec0_0", {
8738
8814
  source: ".ui-form-drawer{display:flex;flex-direction:column;padding:0;outline:0}.ui-form-drawer .el-drawer-body{flex:1;padding:0;overflow:hidden;display:flex;flex-direction:column}.ui-form-drawer .el-drawer-body>.el-form{flex:1;overflow:auto}.ui-form-drawer .el-drawer-body>.action-button{flex:none}.ui-form-drawer .ui-form-drawer-wrapper{flex:1;overflow:hidden}.ui-form-drawer .ui-form-drawer-wrapper .el-form{width:100%;height:100%;overflow:auto;padding:16px;box-sizing:border-box}.ui-form-drawer .action-button{flex:none;padding:16px;border-top:1px solid #e8eaec;display:flex;flex-direction:row-reverse}.ui-form-drawer .action-button button+button{margin-right:16px}.ui-form-drawer .action-button::after{content:'';clear:both}",
8739
8815
  map: undefined,
8740
8816
  media: undefined
@@ -8746,7 +8822,7 @@ var __vue_inject_styles__$d = function __vue_inject_styles__(inject) {
8746
8822
  var __vue_scope_id__$d = undefined;
8747
8823
  /* module identifier */
8748
8824
 
8749
- var __vue_module_identifier__$d = "data-v-35f09272";
8825
+ var __vue_module_identifier__$d = "data-v-0dd33ec0";
8750
8826
  /* functional template */
8751
8827
 
8752
8828
  var __vue_is_functional_template__$d = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v2coding/ui",
3
- "version": "0.1.53",
3
+ "version": "0.1.54",
4
4
  "description": "",
5
5
 
6
6
  "main": "dist/v2coding-ui.ssr.js",