@panpanzhao/component-ui 0.0.10 → 0.0.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.
@@ -305,13 +305,13 @@ module.exports = require("element-ui/lib/checkbox-button");
305
305
  /* 36 */
306
306
  /***/ (function(module, exports) {
307
307
 
308
- module.exports = require("element-ui/lib/switch");
308
+ module.exports = require("element-ui/lib/cascader");
309
309
 
310
310
  /***/ }),
311
311
  /* 37 */
312
312
  /***/ (function(module, exports) {
313
313
 
314
- module.exports = require("element-ui/lib/cascader");
314
+ module.exports = require("element-ui/lib/switch");
315
315
 
316
316
  /***/ }),
317
317
  /* 38 */
@@ -472,8 +472,26 @@ module.exports = require("codemirror/addon/mode/multiplex");
472
472
  // ESM COMPAT FLAG
473
473
  __webpack_require__.r(__webpack_exports__);
474
474
 
475
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=26d7095f&
476
- var formvue_type_template_id_26d7095f_render = function render() {
475
+ // NAMESPACE OBJECT: ./src/utils/index.js
476
+ var utils_namespaceObject = {};
477
+ __webpack_require__.r(utils_namespaceObject);
478
+ __webpack_require__.d(utils_namespaceObject, "uuid", function() { return uuid; });
479
+ __webpack_require__.d(utils_namespaceObject, "mapTree", function() { return mapTree; });
480
+ __webpack_require__.d(utils_namespaceObject, "eachTree", function() { return eachTree; });
481
+ __webpack_require__.d(utils_namespaceObject, "findTree", function() { return findTree; });
482
+ __webpack_require__.d(utils_namespaceObject, "findTreeIndex", function() { return findTreeIndex; });
483
+ __webpack_require__.d(utils_namespaceObject, "getTree", function() { return getTree; });
484
+ __webpack_require__.d(utils_namespaceObject, "filterTree", function() { return filterTree; });
485
+ __webpack_require__.d(utils_namespaceObject, "everyTree", function() { return everyTree; });
486
+ __webpack_require__.d(utils_namespaceObject, "someTree", function() { return someTree; });
487
+ __webpack_require__.d(utils_namespaceObject, "spliceTree", function() { return spliceTree; });
488
+ __webpack_require__.d(utils_namespaceObject, "getTreeDepth", function() { return getTreeDepth; });
489
+ __webpack_require__.d(utils_namespaceObject, "getTreeAncestors", function() { return getTreeAncestors; });
490
+ __webpack_require__.d(utils_namespaceObject, "getTreeParent", function() { return getTreeParent; });
491
+ __webpack_require__.d(utils_namespaceObject, "spliceTreeSelf", function() { return spliceTreeSelf; });
492
+
493
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=dfeb985e&
494
+ var formvue_type_template_id_dfeb985e_render = function render() {
477
495
  var _vm = this,
478
496
  _c = _vm._self._c
479
497
  return _c(
@@ -540,10 +558,10 @@ var formvue_type_template_id_26d7095f_render = function render() {
540
558
  )
541
559
  }
542
560
  var staticRenderFns = []
543
- formvue_type_template_id_26d7095f_render._withStripped = true
561
+ formvue_type_template_id_dfeb985e_render._withStripped = true
544
562
 
545
563
 
546
- // CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=26d7095f&
564
+ // CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=dfeb985e&
547
565
 
548
566
  // EXTERNAL MODULE: external "element-ui/lib/form"
549
567
  var form_ = __webpack_require__(23);
@@ -676,6 +694,9 @@ var external_lodash_ = __webpack_require__(1);
676
694
  var _this2 = this;
677
695
  this.formItems.forEach(function (item) {
678
696
  _this2.formItemLayout[item.prop] = item;
697
+ if (typeof item.value === "function") {
698
+ item.value = item.value.call(_this2);
699
+ }
679
700
  _this2.defaultModel[item.prop] = item.value;
680
701
  //初始化值处理
681
702
  var formVal = Object(external_lodash_["get"])(_this2.formModel, item.prop);
@@ -846,7 +867,7 @@ function normalizeComponent(
846
867
 
847
868
  var component = normalizeComponent(
848
869
  src_formvue_type_script_lang_js_,
849
- formvue_type_template_id_26d7095f_render,
870
+ formvue_type_template_id_dfeb985e_render,
850
871
  staticRenderFns,
851
872
  false,
852
873
  null,
@@ -1074,8 +1095,8 @@ var option_default = /*#__PURE__*/__webpack_require__.n(option_);
1074
1095
  var option_group_ = __webpack_require__(30);
1075
1096
  var option_group_default = /*#__PURE__*/__webpack_require__.n(option_group_);
1076
1097
 
1077
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/SelectTree.vue?vue&type=template&id=626a2185&
1078
- var SelectTreevue_type_template_id_626a2185_render = function render() {
1098
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/SelectTree.vue?vue&type=template&id=b7fb5e4e&
1099
+ var SelectTreevue_type_template_id_b7fb5e4e_render = function render() {
1079
1100
  var _vm = this,
1080
1101
  _c = _vm._self._c
1081
1102
  return _c(
@@ -1145,11 +1166,11 @@ var SelectTreevue_type_template_id_626a2185_render = function render() {
1145
1166
  1
1146
1167
  )
1147
1168
  }
1148
- var SelectTreevue_type_template_id_626a2185_staticRenderFns = []
1149
- SelectTreevue_type_template_id_626a2185_render._withStripped = true
1169
+ var SelectTreevue_type_template_id_b7fb5e4e_staticRenderFns = []
1170
+ SelectTreevue_type_template_id_b7fb5e4e_render._withStripped = true
1150
1171
 
1151
1172
 
1152
- // CONCATENATED MODULE: ./src/components/form/src/item/SelectTree.vue?vue&type=template&id=626a2185&
1173
+ // CONCATENATED MODULE: ./src/components/form/src/item/SelectTree.vue?vue&type=template&id=b7fb5e4e&
1153
1174
 
1154
1175
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/SelectTree.vue?vue&type=script&lang=js&
1155
1176
  /* harmony default export */ var SelectTreevue_type_script_lang_js_ = ({
@@ -1206,6 +1227,17 @@ SelectTreevue_type_template_id_626a2185_render._withStripped = true
1206
1227
  },
1207
1228
 
1208
1229
  watch: {
1230
+ value: function value(val) {
1231
+ if (!val) {
1232
+ if (this.$refs.tree) {
1233
+ this.$refs.tree.setCurrentKey(null);
1234
+ this.$refs.tree.setCheckedKeys([]);
1235
+ }
1236
+ this.selectedData = null;
1237
+ return;
1238
+ }
1239
+ this.initData();
1240
+ },
1209
1241
  options: {
1210
1242
  handler: function handler() {
1211
1243
  var _this = this;
@@ -1318,9 +1350,11 @@ SelectTreevue_type_template_id_626a2185_render._withStripped = true
1318
1350
  },
1319
1351
  emitChange: function emitChange() {
1320
1352
  if (this.multiple) {
1353
+ this.$emit("input", this.checkedKeys, this.checkedData);
1321
1354
  this.$emit("change", this.checkedKeys, this.checkedData);
1322
1355
  return false;
1323
1356
  }
1357
+ this.$emit("input", this.checkedData && this.checkedData[this.optionProps.value], this.checkedData);
1324
1358
  this.$emit("change", this.checkedData && this.checkedData[this.optionProps.value], this.checkedData);
1325
1359
  },
1326
1360
  setSingleData: function setSingleData(data) {
@@ -1344,6 +1378,11 @@ SelectTreevue_type_template_id_626a2185_render._withStripped = true
1344
1378
  if (this.multiple) {
1345
1379
  return false;
1346
1380
  }
1381
+ if (data.disabled) {
1382
+ this.$refs.tree.setCurrentKey(this.value || null);
1383
+ console.warn("该节点数据disabled为true,不能选择");
1384
+ return false;
1385
+ }
1347
1386
  this.setSingleData(data);
1348
1387
  this.emitChange();
1349
1388
  this.$refs.select.handleClose();
@@ -1385,8 +1424,8 @@ SelectTreevue_type_template_id_626a2185_render._withStripped = true
1385
1424
 
1386
1425
  var SelectTree_component = normalizeComponent(
1387
1426
  item_SelectTreevue_type_script_lang_js_,
1388
- SelectTreevue_type_template_id_626a2185_render,
1389
- SelectTreevue_type_template_id_626a2185_staticRenderFns,
1427
+ SelectTreevue_type_template_id_b7fb5e4e_render,
1428
+ SelectTreevue_type_template_id_b7fb5e4e_staticRenderFns,
1390
1429
  false,
1391
1430
  null,
1392
1431
  null,
@@ -1414,16 +1453,18 @@ var SelectTree_component = normalizeComponent(
1414
1453
  },
1415
1454
  props: {
1416
1455
  selectMode: String,
1456
+ dictCode: String,
1417
1457
  options: {
1418
1458
  type: Array,
1419
1459
  default: function _default() {
1420
1460
  return null;
1421
1461
  }
1422
1462
  },
1463
+ optionRender: Function,
1423
1464
  api: {
1424
1465
  type: Object,
1425
1466
  default: function _default() {
1426
- return null;
1467
+ return {};
1427
1468
  }
1428
1469
  },
1429
1470
  apiOpen: {
@@ -1435,11 +1476,7 @@ var SelectTree_component = normalizeComponent(
1435
1476
  optionProps: {
1436
1477
  type: Object,
1437
1478
  default: function _default() {
1438
- return {
1439
- value: "value",
1440
- label: "label",
1441
- children: "children"
1442
- };
1479
+ return {};
1443
1480
  }
1444
1481
  }
1445
1482
  },
@@ -1452,8 +1489,15 @@ var SelectTree_component = normalizeComponent(
1452
1489
  attrs: function attrs() {
1453
1490
  return Object.assign({}, this.$attrs);
1454
1491
  },
1492
+ dictOption: function dictOption() {
1493
+ if (this.dictCode && this.$COMPONENT.dataSource && this.$COMPONENT.dataSource.dict) {
1494
+ return this.$COMPONENT.dataSource.dict[this.dictCode];
1495
+ }
1496
+ return [];
1497
+ },
1455
1498
  optionData: function optionData() {
1456
- return this.options || this.apiOptions || [];
1499
+ var options = this.options || this.apiOptions;
1500
+ return Array.isArray(options) ? options : this.dictOption;
1457
1501
  },
1458
1502
  _form: function _form() {
1459
1503
  var parent = this.$parent;
@@ -1466,6 +1510,13 @@ var SelectTree_component = normalizeComponent(
1466
1510
  }
1467
1511
  return false;
1468
1512
  },
1513
+ _optionProps: function _optionProps() {
1514
+ return Object.assign({
1515
+ value: "value",
1516
+ label: "label",
1517
+ children: "children"
1518
+ }, this.optionProps);
1519
+ },
1469
1520
  request: function request() {
1470
1521
  return this.api.request || this._form && this._form.request || (this.$COMPONENT || {}).request;
1471
1522
  }
@@ -1485,26 +1536,36 @@ var SelectTree_component = normalizeComponent(
1485
1536
  },
1486
1537
  methods: {
1487
1538
  transformOption: function transformOption(item) {
1488
- item.value = item[this.optionProps.value];
1489
- item.label = item[this.optionProps.label];
1490
- if (item[this.optionProps.children]) {
1491
- item.children = this.transformOption(item[this.optionProps.children]);
1539
+ item.value = item[this._optionProps.value];
1540
+ item.label = item[this._optionProps.label];
1541
+ if (item[this._optionProps.children]) {
1542
+ item.children = this.transformOption(item[this._optionProps.children]);
1492
1543
  }
1493
1544
  return item;
1494
1545
  },
1495
1546
  initApi: function initApi() {
1496
1547
  var _this = this;
1497
- if (!(this.api && this.request)) {
1548
+ if (!(this.api.url && this.request)) {
1498
1549
  return false;
1499
1550
  }
1551
+ var reqData = Object(external_lodash_["merge"])({}, this.api.data);
1552
+ if (typeof this.api.before === "function") {
1553
+ reqData = this.api.before.call(this, reqData, {
1554
+ form: this._form,
1555
+ formModel: this._form && this._form.formModel
1556
+ });
1557
+ }
1500
1558
  this.request({
1501
- url: Object(formula_["evaluate"])(this.api.url, this.api.data),
1559
+ url: Object(formula_["evaluate"])(this.api.url, reqData),
1502
1560
  method: this.api.method || "GET",
1503
- data: this.api.data
1561
+ headers: this.api.headers,
1562
+ data: reqData
1504
1563
  }).then(function (res) {
1505
- if (typeof _this.api.transform === "function") {
1506
- _this.apiOptions = _this.api.transform.call(_this, resData);
1507
- return false;
1564
+ if (typeof _this.api.after === "function") {
1565
+ res = _this.api.after.call(_this, res, {
1566
+ form: _this._form,
1567
+ formModel: _this._form && _this._form.formModel
1568
+ });
1508
1569
  }
1509
1570
  _this.apiOptions = _this.api.dataPath ? Object(external_lodash_["get"])(res, _this.api.dataPath, []) : res;
1510
1571
  }).catch(function (error) {
@@ -1515,19 +1576,22 @@ var SelectTree_component = normalizeComponent(
1515
1576
  var _this2 = this;
1516
1577
  return this.optionData.map(function (item) {
1517
1578
  return h("el-option-group", {
1518
- "key": item[_this2.optionProps.value],
1579
+ "key": item[_this2._optionProps.value],
1519
1580
  "attrs": {
1520
- "label": item[_this2.optionProps.label]
1581
+ "label": item[_this2._optionProps.label]
1521
1582
  }
1522
- }, [item[_this2.optionProps.children] && item[_this2.optionProps.children].map(function (itemOpt) {
1583
+ }, [item[_this2._optionProps.children] && item[_this2._optionProps.children].map(function (itemOpt) {
1523
1584
  return h("el-option", {
1524
- "key": itemOpt[_this2.optionProps.value],
1585
+ "key": itemOpt[_this2._optionProps.value],
1525
1586
  "attrs": {
1526
- "value": itemOpt[_this2.optionProps.value],
1527
- "label": itemOpt[_this2.optionProps.label],
1587
+ "value": itemOpt[_this2._optionProps.value],
1588
+ "label": itemOpt[_this2._optionProps.label],
1528
1589
  "disabled": itemOpt.disabled
1529
1590
  }
1530
- });
1591
+ }, [_this2.optionRender ? _this2.optionRender.call(_this2, h, itemOpt, {
1592
+ form: _this2._form,
1593
+ formModel: _this2._form && _this2._form.formModel
1594
+ }) : null]);
1531
1595
  })]);
1532
1596
  });
1533
1597
  },
@@ -1535,7 +1599,7 @@ var SelectTree_component = normalizeComponent(
1535
1599
  var param = {
1536
1600
  attrs: Object.assign({}, this.$attrs, {
1537
1601
  options: this.optionData,
1538
- optionProps: this.optionProps
1602
+ optionProps: this._optionProps
1539
1603
  }),
1540
1604
  slots: this.$slots,
1541
1605
  scopedSlots: this.$slots,
@@ -1548,14 +1612,17 @@ var SelectTree_component = normalizeComponent(
1548
1612
  if (this.selectMode === "group") {
1549
1613
  return this.renderGroup(h, scoped);
1550
1614
  }
1551
- return this.optionData.map(function (item) {
1615
+ return this.optionData.map(function (itemOpt) {
1552
1616
  return h("el-option", {
1553
- "key": item[_this3.optionProps.value],
1617
+ "key": itemOpt[_this3._optionProps.value],
1554
1618
  "attrs": {
1555
- "value": item[_this3.optionProps.value],
1556
- "label": item[_this3.optionProps.label]
1619
+ "value": itemOpt[_this3._optionProps.value],
1620
+ "label": itemOpt[_this3._optionProps.label]
1557
1621
  }
1558
- });
1622
+ }, [_this3.optionRender ? _this3.optionRender.call(_this3, h, itemOpt, {
1623
+ form: _this3._form,
1624
+ formModel: _this3._form && _this3._form.formModel
1625
+ }) : null]);
1559
1626
  });
1560
1627
  }
1561
1628
  },
@@ -1630,6 +1697,7 @@ var radio_button_default = /*#__PURE__*/__webpack_require__.n(radio_button_);
1630
1697
  },
1631
1698
  props: {
1632
1699
  size: String,
1700
+ dictCode: String,
1633
1701
  border: {
1634
1702
  type: Boolean,
1635
1703
  default: function _default() {
@@ -1678,8 +1746,14 @@ var radio_button_default = /*#__PURE__*/__webpack_require__.n(radio_button_);
1678
1746
  border: this.border
1679
1747
  });
1680
1748
  },
1749
+ dictOption: function dictOption() {
1750
+ if (this.dictCode && this.$COMPONENT.dataSource && this.$COMPONENT.dataSource.dict) {
1751
+ return this.$COMPONENT.dataSource.dict[this.dictCode];
1752
+ }
1753
+ return [];
1754
+ },
1681
1755
  optionData: function optionData() {
1682
- return this.options || this.apiOptions || [];
1756
+ return this.options || this.apiOptions || this.dictOption;
1683
1757
  },
1684
1758
  _form: function _form() {
1685
1759
  var parent = this.$parent;
@@ -1825,6 +1899,7 @@ var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button
1825
1899
  },
1826
1900
  props: {
1827
1901
  size: String,
1902
+ dictCode: String,
1828
1903
  border: {
1829
1904
  type: Boolean,
1830
1905
  default: function _default() {
@@ -1853,11 +1928,7 @@ var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button
1853
1928
  optionProps: {
1854
1929
  type: Object,
1855
1930
  default: function _default() {
1856
- return {
1857
- value: "value",
1858
- label: "label",
1859
- name: "name"
1860
- };
1931
+ return {};
1861
1932
  }
1862
1933
  }
1863
1934
  },
@@ -1873,8 +1944,14 @@ var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button
1873
1944
  border: this.border
1874
1945
  });
1875
1946
  },
1947
+ dictOption: function dictOption() {
1948
+ if (this.dictCode && this.$COMPONENT.dataSource && this.$COMPONENT.dataSource.dict) {
1949
+ return this.$COMPONENT.dataSource.dict[this.dictCode];
1950
+ }
1951
+ return [];
1952
+ },
1876
1953
  optionData: function optionData() {
1877
- return this.options || this.apiOptions || [];
1954
+ return this.options || this.apiOptions || this.dictOption;
1878
1955
  },
1879
1956
  _form: function _form() {
1880
1957
  var parent = this.$parent;
@@ -1887,6 +1964,13 @@ var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button
1887
1964
  }
1888
1965
  return false;
1889
1966
  },
1967
+ _optionProps: function _optionProps() {
1968
+ return Object.assign({
1969
+ value: "value",
1970
+ label: "label",
1971
+ children: "children"
1972
+ }, this.optionProps);
1973
+ },
1890
1974
  request: function request() {
1891
1975
  return this.api.request || this._form && this._form.request || (this.$COMPONENT || {}).request;
1892
1976
  }
@@ -1928,12 +2012,12 @@ var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button
1928
2012
  var _this2 = this;
1929
2013
  return this.optionData.map(function (item) {
1930
2014
  return h("el-checkbox-button", {
1931
- "key": item[_this2.optionProps.value],
2015
+ "key": item[_this2._optionProps.value],
1932
2016
  "attrs": {
1933
- "label": item[_this2.optionProps.value],
1934
- "disabled": item[_this2.optionProps.disabled]
2017
+ "label": item[_this2._optionProps.value],
2018
+ "disabled": item[_this2._optionProps.disabled]
1935
2019
  }
1936
- }, [item[_this2.optionProps.label]]);
2020
+ }, [item[_this2._optionProps.label]]);
1937
2021
  });
1938
2022
  },
1939
2023
  renderOptions: function renderOptions(h, scoped) {
@@ -1943,15 +2027,15 @@ var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button
1943
2027
  }
1944
2028
  return this.optionData.map(function (item) {
1945
2029
  return h("el-checkbox", {
1946
- "key": item[_this3.optionProps.value],
2030
+ "key": item[_this3._optionProps.value],
1947
2031
  "attrs": {
1948
- "value": item[_this3.optionProps.value],
1949
- "label": item[_this3.optionProps.value],
1950
- "disabled": item[_this3.optionProps.disabled],
2032
+ "value": item[_this3._optionProps.value],
2033
+ "label": item[_this3._optionProps.value],
2034
+ "disabled": item[_this3._optionProps.disabled],
1951
2035
  "border": _this3.border,
1952
2036
  "size": _this3.size
1953
2037
  }
1954
- }, [item[_this3.optionProps.label]]);
2038
+ }, [item[_this3._optionProps.label]]);
1955
2039
  });
1956
2040
  }
1957
2041
  },
@@ -2047,14 +2131,81 @@ var InputText_component = normalizeComponent(
2047
2131
  )
2048
2132
 
2049
2133
  /* harmony default export */ var InputText = (InputText_component.exports);
2050
- // EXTERNAL MODULE: external "element-ui/lib/switch"
2051
- var switch_ = __webpack_require__(36);
2052
- var switch_default = /*#__PURE__*/__webpack_require__.n(switch_);
2134
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/Cascader.vue?vue&type=template&id=1306b5bf&
2135
+ var Cascadervue_type_template_id_1306b5bf_render = function render() {
2136
+ var _vm = this,
2137
+ _c = _vm._self._c
2138
+ return _c(
2139
+ "el-cascader",
2140
+ _vm._g(
2141
+ _vm._b(
2142
+ { attrs: { options: _vm.options } },
2143
+ "el-cascader",
2144
+ _vm.attrs,
2145
+ false
2146
+ ),
2147
+ _vm.$listeners
2148
+ )
2149
+ )
2150
+ }
2151
+ var Cascadervue_type_template_id_1306b5bf_staticRenderFns = []
2152
+ Cascadervue_type_template_id_1306b5bf_render._withStripped = true
2153
+
2154
+
2155
+ // CONCATENATED MODULE: ./src/components/form/src/item/Cascader.vue?vue&type=template&id=1306b5bf&
2053
2156
 
2054
2157
  // EXTERNAL MODULE: external "element-ui/lib/cascader"
2055
- var cascader_ = __webpack_require__(37);
2158
+ var cascader_ = __webpack_require__(36);
2056
2159
  var cascader_default = /*#__PURE__*/__webpack_require__.n(cascader_);
2057
2160
 
2161
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/Cascader.vue?vue&type=script&lang=js&
2162
+
2163
+ /* harmony default export */ var Cascadervue_type_script_lang_js_ = ({
2164
+ name: "Cascader",
2165
+ components: {
2166
+ elCascader: cascader_default.a
2167
+ },
2168
+ props: {
2169
+ size: String,
2170
+ options: {
2171
+ type: Array,
2172
+ default: function _default() {
2173
+ return null;
2174
+ }
2175
+ }
2176
+ },
2177
+ computed: {
2178
+ attrs: function attrs() {
2179
+ return Object.assign({}, this.$attrs);
2180
+ }
2181
+ }
2182
+ });
2183
+ // CONCATENATED MODULE: ./src/components/form/src/item/Cascader.vue?vue&type=script&lang=js&
2184
+ /* harmony default export */ var item_Cascadervue_type_script_lang_js_ = (Cascadervue_type_script_lang_js_);
2185
+ // CONCATENATED MODULE: ./src/components/form/src/item/Cascader.vue
2186
+
2187
+
2188
+
2189
+
2190
+
2191
+ /* normalize component */
2192
+
2193
+ var Cascader_component = normalizeComponent(
2194
+ item_Cascadervue_type_script_lang_js_,
2195
+ Cascadervue_type_template_id_1306b5bf_render,
2196
+ Cascadervue_type_template_id_1306b5bf_staticRenderFns,
2197
+ false,
2198
+ null,
2199
+ null,
2200
+ null
2201
+
2202
+ )
2203
+
2204
+ /* harmony default export */ var Cascader = (Cascader_component.exports);
2205
+ // EXTERNAL MODULE: external "element-ui/lib/switch"
2206
+ var switch_ = __webpack_require__(37);
2207
+ var switch_default = /*#__PURE__*/__webpack_require__.n(switch_);
2208
+
2058
2209
  // EXTERNAL MODULE: external "element-ui/lib/slider"
2059
2210
  var slider_ = __webpack_require__(38);
2060
2211
  var slider_default = /*#__PURE__*/__webpack_require__.n(slider_);
@@ -2086,6 +2237,7 @@ var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
2086
2237
 
2087
2238
 
2088
2239
 
2240
+ // import elCascader from "element-ui/packages/cascader";
2089
2241
 
2090
2242
 
2091
2243
 
@@ -2095,7 +2247,7 @@ var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
2095
2247
  name: "FormInput",
2096
2248
  inheritAttrs: false,
2097
2249
  components: {
2098
- Cascader: cascader_default.a,
2250
+ Cascader: Cascader,
2099
2251
  Slider: slider_default.a,
2100
2252
  Transfer: transfer_default.a,
2101
2253
  Switchs: switch_default.a,
@@ -2192,7 +2344,11 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
2192
2344
  watch: {
2193
2345
  value: function value(val) {
2194
2346
  //监听form的formModel变化,处理config的value变化
2195
- this.config.value = val;
2347
+ if (this.config.value === val) {
2348
+ return false;
2349
+ }
2350
+ this.setValue(val);
2351
+ this.execEvent("input", val);
2196
2352
  if (this.form && this.form.formModel) {
2197
2353
  this.$emit("formItemChange", {
2198
2354
  itemConfig: this.config,
@@ -2252,8 +2408,9 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
2252
2408
  if (this.on && this.on[eventName]) {
2253
2409
  this.$emit.apply(this, [eventName, {
2254
2410
  trigger: this.form,
2411
+ triggerConfig: this.form.formItemLayout[this.prop],
2255
2412
  triggerForm: this.form.formModel,
2256
- triggerConfig: this.form.formItemLayout[this.prop]
2413
+ triggerFormConfig: this.form.formItemLayout
2257
2414
  }].concat(arg));
2258
2415
  }
2259
2416
  //联动配置事件
@@ -2275,6 +2432,16 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
2275
2432
  triggerConfig: this.form.formItemLayout[this.prop],
2276
2433
  targetConfig: targetConfig
2277
2434
  }].concat(arg));
2435
+ },
2436
+ setValue: function setValue(val) {
2437
+ if (this.form) {
2438
+ if (this.prop && this.prop.indexOf(".") != -1) {
2439
+ Object(external_lodash_["set"])(this.form.formModel, this.prop, val);
2440
+ } else {
2441
+ this.form.formModel[this.prop] = val;
2442
+ }
2443
+ }
2444
+ this.config.value = val;
2278
2445
  }
2279
2446
  },
2280
2447
  render: function render(h) {
@@ -2286,30 +2453,27 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
2286
2453
  config: this.config
2287
2454
  });
2288
2455
  }
2456
+ // disabled用的多,特殊处理下支持函数
2457
+ var disabled = this.config.disabled;
2458
+ if (typeof this.config.disabled === "function") {
2459
+ disabled = this.config.disabled.call(this, {
2460
+ form: this.form,
2461
+ formModel: this.form.formModel,
2462
+ config: this.config
2463
+ });
2464
+ }
2289
2465
  var itemProp = {
2290
- attrs: Object.assign({}, this.config),
2466
+ attrs: Object.assign({}, this.config, {
2467
+ disabled: disabled
2468
+ }),
2291
2469
  on: Object.assign({}, this.eventOn, this.actionEventOn, {
2292
2470
  input: function input(val) {
2471
+ _this2.setValue(val);
2293
2472
  _this2.execEvent("input", val);
2294
- if (_this2.form) {
2295
- if (_this2.prop && _this2.prop.indexOf(".") != -1) {
2296
- Object(external_lodash_["set"])(_this2.form.formModel, _this2.prop, val);
2297
- } else {
2298
- _this2.form.formModel[_this2.prop] = val;
2299
- }
2300
- }
2301
- _this2.config.value = val;
2302
2473
  },
2303
2474
  change: function change(val, selectOption) {
2475
+ _this2.setValue(val);
2304
2476
  _this2.execEvent("change", val, selectOption);
2305
- if (_this2.form) {
2306
- if (_this2.prop && _this2.prop.indexOf(".") != -1) {
2307
- Object(external_lodash_["set"])(_this2.form.formModel, _this2.prop, val);
2308
- } else {
2309
- _this2.form.formModel[_this2.prop] = val;
2310
- }
2311
- }
2312
- _this2.config.value = val;
2313
2477
  }
2314
2478
  })
2315
2479
  };
@@ -2772,6 +2936,10 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
2772
2936
  }
2773
2937
  },
2774
2938
  formMode: String,
2939
+ noApiClose: {
2940
+ type: Boolean,
2941
+ default: true
2942
+ },
2775
2943
  api: {
2776
2944
  type: Object,
2777
2945
  default: function _default() {
@@ -2802,6 +2970,7 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
2802
2970
  return {
2803
2971
  show: false,
2804
2972
  formModel: {},
2973
+ expandModel: null,
2805
2974
  defaultTools: [{
2806
2975
  label: this.dialog.cancelButtonText || "取消",
2807
2976
  type: this.confirmButtonType,
@@ -2825,10 +2994,14 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
2825
2994
  }
2826
2995
  },
2827
2996
  methods: {
2828
- open: function open(model) {
2997
+ open: function open(model, expandModel) {
2998
+ var _this2 = this;
2829
2999
  this.show = true;
3000
+ this.expandModel = expandModel;
2830
3001
  if (model) {
2831
- this.setFormModel(model);
3002
+ this.$nextTick(function () {
3003
+ _this2.setFormModel(model);
3004
+ });
2832
3005
  }
2833
3006
  },
2834
3007
  close: function close() {
@@ -2840,45 +3013,57 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
2840
3013
  reset: function reset() {
2841
3014
  this.$refs.form && this.$refs.form.reset();
2842
3015
  },
3016
+ closed: function closed() {
3017
+ this.reset();
3018
+ this.show = false;
3019
+ },
2843
3020
  submit: function submit(button) {
2844
- var _this2 = this;
3021
+ var _this3 = this;
2845
3022
  this.$refs.form.validate(function (isValidate, errorMessage) {
2846
3023
  if (!isValidate) {
2847
3024
  return false;
2848
3025
  }
2849
- var reqData = Object(external_lodash_["merge"])(_this2.api.data || {}, _this2.formModel);
2850
- if (typeof _this2.api.before === "function") {
2851
- reqData = _this2.api.before.call(_this2, reqData);
3026
+ var reqData = Object(external_lodash_["merge"])(_this3.api.data || {}, _this3.formModel);
3027
+ if (typeof _this3.api.before === "function") {
3028
+ reqData = _this3.api.before.call(_this3, reqData);
2852
3029
  }
2853
- if (!(_this2.api.url && _this2.requester)) {
2854
- _this2.close();
2855
- _this2.reset();
2856
- _this2.$emit("success", {
2857
- request: _this2.requester,
2858
- reqData: reqData
3030
+ if (!(_this3.api.url && _this3.requester)) {
3031
+ if (_this3.noApiClose) {
3032
+ _this3.reset();
3033
+ _this3.show = false;
3034
+ }
3035
+ _this3.$emit("success", {
3036
+ request: _this3.requester,
3037
+ reqData: reqData,
3038
+ expandData: _this3.expandModel
3039
+ }, {
3040
+ button: button
2859
3041
  });
2860
3042
  return false;
2861
3043
  }
2862
3044
  button.loading = true;
2863
- _this2.requester({
2864
- url: Object(formula_["evaluate"])(_this2.api.url, reqData),
2865
- method: _this2.api.method || "POST",
3045
+ _this3.requester({
3046
+ url: Object(formula_["evaluate"])(_this3.api.url, reqData),
3047
+ method: _this3.api.method || "POST",
3048
+ headers: _this3.api.headers,
2866
3049
  data: reqData
2867
3050
  }).then(function (res) {
2868
3051
  button.loading = false;
2869
- _this2.close();
2870
- _this2.reset();
2871
- _this2.$emit("success", {
2872
- request: _this2.requester,
3052
+ _this3.reset();
3053
+ _this3.show = false;
3054
+ _this3.$emit("success", {
3055
+ request: _this3.requester,
2873
3056
  reqData: reqData,
2874
- resData: res
3057
+ resData: res,
3058
+ expandData: _this3.expandModel
2875
3059
  });
2876
3060
  }).catch(function (error) {
2877
3061
  button.loading = false;
2878
- _this2.$emit("error", {
2879
- request: _this2.requester,
3062
+ _this3.$emit("error", {
3063
+ request: _this3.requester,
2880
3064
  reqData: reqData,
2881
- resError: error
3065
+ resError: error,
3066
+ expandData: _this3.expandModel
2882
3067
  });
2883
3068
  });
2884
3069
  });
@@ -2886,7 +3071,8 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
2886
3071
  renderForm: function renderForm(h) {
2887
3072
  var param = {
2888
3073
  attrs: Object.assign({
2889
- formModel: this.formModel
3074
+ formModel: this.formModel,
3075
+ request: this.request
2890
3076
  }, this.form)
2891
3077
  };
2892
3078
  if (this.formMode === "group") {
@@ -2918,7 +3104,7 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
2918
3104
  }
2919
3105
  },
2920
3106
  render: function render(h) {
2921
- var _this3 = this;
3107
+ var _this4 = this;
2922
3108
  var param = {
2923
3109
  attrs: Object.assign({
2924
3110
  visible: this.show,
@@ -2927,7 +3113,8 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
2927
3113
  }, this.dialog),
2928
3114
  on: Object.assign(this.on, {
2929
3115
  close: function close() {
2930
- _this3.close();
3116
+ _this4.reset();
3117
+ _this4.show = false;
2931
3118
  }
2932
3119
  })
2933
3120
  };
@@ -3851,8 +4038,8 @@ form_view_dialog_src.install = function (Vue) {
3851
4038
  Vue.component(form_view_dialog_src.name, form_view_dialog_src);
3852
4039
  };
3853
4040
  /* harmony default export */ var form_view_dialog = (form_view_dialog_src);
3854
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/table.vue?vue&type=template&id=189ef3b0&
3855
- var tablevue_type_template_id_189ef3b0_render = function render() {
4041
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/table.vue?vue&type=template&id=a8e62da6&
4042
+ var tablevue_type_template_id_a8e62da6_render = function render() {
3856
4043
  var _vm = this,
3857
4044
  _c = _vm._self._c
3858
4045
  return _c("div", { staticClass: "table" }, [
@@ -3930,11 +4117,11 @@ var tablevue_type_template_id_189ef3b0_render = function render() {
3930
4117
  : _vm._e(),
3931
4118
  ])
3932
4119
  }
3933
- var tablevue_type_template_id_189ef3b0_staticRenderFns = []
3934
- tablevue_type_template_id_189ef3b0_render._withStripped = true
4120
+ var tablevue_type_template_id_a8e62da6_staticRenderFns = []
4121
+ tablevue_type_template_id_a8e62da6_render._withStripped = true
3935
4122
 
3936
4123
 
3937
- // CONCATENATED MODULE: ./src/components/table/src/table.vue?vue&type=template&id=189ef3b0&
4124
+ // CONCATENATED MODULE: ./src/components/table/src/table.vue?vue&type=template&id=a8e62da6&
3938
4125
 
3939
4126
  // EXTERNAL MODULE: external "element-ui/lib/table"
3940
4127
  var table_ = __webpack_require__(15);
@@ -4044,7 +4231,10 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
4044
4231
  return {};
4045
4232
  }
4046
4233
  },
4047
- hasInit: Boolean,
4234
+ hasInit: {
4235
+ type: Boolean,
4236
+ default: true
4237
+ },
4048
4238
  remoteProp: {
4049
4239
  type: Object,
4050
4240
  default: function _default() {
@@ -4144,10 +4334,16 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
4144
4334
  }
4145
4335
 
4146
4336
  _this2.$emit("row-click", row);
4337
+ if (typeof _this2.on["row-click"] === "function") {
4338
+ _this2.on["row-click"].call(_this2, row);
4339
+ }
4147
4340
  },
4148
4341
  "selection-change": function selectionChange(selection) {
4149
4342
  _this2.selection = selection;
4150
4343
  _this2.$emit("selection-change", selection);
4344
+ if (typeof _this2.on["selection-change"] === "function") {
4345
+ _this2.on["selection-change"].call(_this2, row);
4346
+ }
4151
4347
  }
4152
4348
  });
4153
4349
  },
@@ -4197,7 +4393,7 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
4197
4393
  },
4198
4394
  search: function search() {
4199
4395
  var _this4 = this;
4200
- if (!this.requester) {
4396
+ if (!(this.requester && this.api.url)) {
4201
4397
  return false;
4202
4398
  }
4203
4399
  var reqData = Object.assign({}, this.api.data);
@@ -4215,6 +4411,7 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
4215
4411
  this.requester({
4216
4412
  url: Object(formula_["evaluate"])(this.api.url, reqData),
4217
4413
  method: this.api.method || "POST",
4414
+ headers: this.api.headers,
4218
4415
  data: reqData
4219
4416
  }).then(function (res) {
4220
4417
  if (typeof _this4.api.after === "function") {
@@ -4252,8 +4449,8 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
4252
4449
 
4253
4450
  var table_component = normalizeComponent(
4254
4451
  src_tablevue_type_script_lang_js_,
4255
- tablevue_type_template_id_189ef3b0_render,
4256
- tablevue_type_template_id_189ef3b0_staticRenderFns,
4452
+ tablevue_type_template_id_a8e62da6_render,
4453
+ tablevue_type_template_id_a8e62da6_staticRenderFns,
4257
4454
  false,
4258
4455
  null,
4259
4456
  null,
@@ -4579,8 +4776,8 @@ var date_component = normalizeComponent(
4579
4776
  )
4580
4777
 
4581
4778
  /* harmony default export */ var date = (date_component.exports);
4582
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/dict.vue?vue&type=template&id=1da75cb2&
4583
- var dictvue_type_template_id_1da75cb2_render = function render() {
4779
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/dict.vue?vue&type=template&id=512d00c0&
4780
+ var dictvue_type_template_id_512d00c0_render = function render() {
4584
4781
  var _vm = this,
4585
4782
  _c = _vm._self._c
4586
4783
  return _c(
@@ -4618,11 +4815,11 @@ var dictvue_type_template_id_1da75cb2_render = function render() {
4618
4815
  )
4619
4816
  )
4620
4817
  }
4621
- var dictvue_type_template_id_1da75cb2_staticRenderFns = []
4622
- dictvue_type_template_id_1da75cb2_render._withStripped = true
4818
+ var dictvue_type_template_id_512d00c0_staticRenderFns = []
4819
+ dictvue_type_template_id_512d00c0_render._withStripped = true
4623
4820
 
4624
4821
 
4625
- // CONCATENATED MODULE: ./src/components/table/src/column/dict.vue?vue&type=template&id=1da75cb2&
4822
+ // CONCATENATED MODULE: ./src/components/table/src/column/dict.vue?vue&type=template&id=512d00c0&
4626
4823
 
4627
4824
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/dict.vue?vue&type=script&lang=js&
4628
4825
 
@@ -4632,6 +4829,7 @@ dictvue_type_template_id_1da75cb2_render._withStripped = true
4632
4829
  elTableColumn: table_column_default.a
4633
4830
  },
4634
4831
  props: {
4832
+ dictCode: String,
4635
4833
  options: {
4636
4834
  type: Array,
4637
4835
  required: true
@@ -4655,11 +4853,18 @@ dictvue_type_template_id_1da75cb2_render._withStripped = true
4655
4853
  "show-overflow-tooltip": true
4656
4854
  }, this.$attrs);
4657
4855
  },
4856
+ dictOption: function dictOption() {
4857
+ if (this.dictCode && this.$COMPONENT.dataSource && this.$COMPONENT.dataSource.dict) {
4858
+ return this.$COMPONENT.dataSource.dict[this.dictCode];
4859
+ }
4860
+ return [];
4861
+ },
4658
4862
  optionMap: function optionMap() {
4659
4863
  var _this = this;
4660
- if (Array.isArray(this.options)) {
4864
+ var options = this.options || this.dictOption;
4865
+ if (Array.isArray(options)) {
4661
4866
  var map = {};
4662
- this.options.forEach(function (item) {
4867
+ options.forEach(function (item) {
4663
4868
  var valueKey = item[_this.optionProp.value || "value"];
4664
4869
  map[valueKey] = item;
4665
4870
  });
@@ -4693,8 +4898,8 @@ dictvue_type_template_id_1da75cb2_render._withStripped = true
4693
4898
 
4694
4899
  var dict_component = normalizeComponent(
4695
4900
  column_dictvue_type_script_lang_js_,
4696
- dictvue_type_template_id_1da75cb2_render,
4697
- dictvue_type_template_id_1da75cb2_staticRenderFns,
4901
+ dictvue_type_template_id_512d00c0_render,
4902
+ dictvue_type_template_id_512d00c0_staticRenderFns,
4698
4903
  false,
4699
4904
  null,
4700
4905
  null,
@@ -5086,7 +5291,7 @@ function spliceTreeSelf(tree, idx, deleteCount) {
5086
5291
  computed: {
5087
5292
  attrs: function attrs() {
5088
5293
  return Object.assign({
5089
- "show-overflow-tooltip": true
5294
+ "show-overflow-tooltip": false
5090
5295
  }, this.$attrs, this.$props);
5091
5296
  },
5092
5297
  defaultItem: function defaultItem() {
@@ -5135,9 +5340,7 @@ function spliceTreeSelf(tree, idx, deleteCount) {
5135
5340
  return template;
5136
5341
  },
5137
5342
  itemVNode: function itemVNode(h, itemRow, scoped) {
5138
- var cloneItem = Object.assign({
5139
- control: this.defaultItem.control
5140
- }, itemRow);
5343
+ var cloneItem = Object(external_lodash_["merge"])({}, this.defaultItem, itemRow);
5141
5344
  cloneItem.parentData = scoped;
5142
5345
  if (typeof cloneItem.render === "function") {
5143
5346
  return cloneItem.render.call(this, h, scoped, cloneItem);
@@ -5383,8 +5586,8 @@ table_column.install = function (Vue) {
5383
5586
  Vue.component(table_column.name, table_column);
5384
5587
  };
5385
5588
  /* harmony default export */ var components_table_column = (table_column);
5386
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table-search/src/index.vue?vue&type=template&id=08925b81&
5387
- var srcvue_type_template_id_08925b81_render = function render() {
5589
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table-search/src/index.vue?vue&type=template&id=36222536&
5590
+ var srcvue_type_template_id_36222536_render = function render() {
5388
5591
  var _vm = this,
5389
5592
  _c = _vm._self._c
5390
5593
  return _c("div", { staticClass: "table-search" }, [
@@ -5416,7 +5619,7 @@ var srcvue_type_template_id_08925b81_render = function render() {
5416
5619
  "el-button",
5417
5620
  {
5418
5621
  attrs: { icon: "el-icon-refresh-left" },
5419
- on: { click: _vm.reset },
5622
+ on: { click: _vm.resetForm },
5420
5623
  },
5421
5624
  [_vm._v("重置")]
5422
5625
  ),
@@ -5448,11 +5651,11 @@ var srcvue_type_template_id_08925b81_render = function render() {
5448
5651
  ),
5449
5652
  ])
5450
5653
  }
5451
- var srcvue_type_template_id_08925b81_staticRenderFns = []
5452
- srcvue_type_template_id_08925b81_render._withStripped = true
5654
+ var srcvue_type_template_id_36222536_staticRenderFns = []
5655
+ srcvue_type_template_id_36222536_render._withStripped = true
5453
5656
 
5454
5657
 
5455
- // CONCATENATED MODULE: ./src/components/table-search/src/index.vue?vue&type=template&id=08925b81&
5658
+ // CONCATENATED MODULE: ./src/components/table-search/src/index.vue?vue&type=template&id=36222536&
5456
5659
 
5457
5660
  // EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form"
5458
5661
  var components_form_ = __webpack_require__(50);
@@ -5543,8 +5746,8 @@ var components_table_default = /*#__PURE__*/__webpack_require__.n(components_tab
5543
5746
 
5544
5747
  var table_search_src_component = normalizeComponent(
5545
5748
  components_table_search_srcvue_type_script_lang_js_,
5546
- srcvue_type_template_id_08925b81_render,
5547
- srcvue_type_template_id_08925b81_staticRenderFns,
5749
+ srcvue_type_template_id_36222536_render,
5750
+ srcvue_type_template_id_36222536_staticRenderFns,
5548
5751
  false,
5549
5752
  null,
5550
5753
  null,
@@ -5561,8 +5764,8 @@ table_search_src.install = function (Vue) {
5561
5764
  Vue.component(table_search_src.name, table_search_src);
5562
5765
  };
5563
5766
  /* harmony default export */ var table_search = (table_search_src);
5564
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table-editable/src/index.vue?vue&type=template&id=2cd18efc&
5565
- var srcvue_type_template_id_2cd18efc_render = function render() {
5767
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table-editable/src/index.vue?vue&type=template&id=aabdd8e6&
5768
+ var srcvue_type_template_id_aabdd8e6_render = function render() {
5566
5769
  var _vm = this,
5567
5770
  _c = _vm._self._c
5568
5771
  return _c(
@@ -5604,11 +5807,11 @@ var srcvue_type_template_id_2cd18efc_render = function render() {
5604
5807
  1
5605
5808
  )
5606
5809
  }
5607
- var srcvue_type_template_id_2cd18efc_staticRenderFns = []
5608
- srcvue_type_template_id_2cd18efc_render._withStripped = true
5810
+ var srcvue_type_template_id_aabdd8e6_staticRenderFns = []
5811
+ srcvue_type_template_id_aabdd8e6_render._withStripped = true
5609
5812
 
5610
5813
 
5611
- // CONCATENATED MODULE: ./src/components/table-editable/src/index.vue?vue&type=template&id=2cd18efc&
5814
+ // CONCATENATED MODULE: ./src/components/table-editable/src/index.vue?vue&type=template&id=aabdd8e6&
5612
5815
 
5613
5816
  // EXTERNAL MODULE: external "element-ui/lib/popover"
5614
5817
  var popover_ = __webpack_require__(52);
@@ -6246,10 +6449,10 @@ var external_async_validator_default = /*#__PURE__*/__webpack_require__.n(extern
6246
6449
  deleteByIndex: function deleteByIndex(index) {
6247
6450
  this.data && this.data.splice(index, 1);
6248
6451
  },
6249
- deleteByRow: function deleteByRow(row) {
6250
- var _this4 = this;
6452
+ deleteByRow: function deleteByRow(row, id) {
6453
+ var refId = row[this.rowKey] ? this.rowKey : "id";
6251
6454
  spliceTreeSelf(this.data, findTreeIndex(this.data, function (item) {
6252
- return item[_this4.rowKey] === row[_this4.rowKey];
6455
+ return item[id || refId] === row[id || refId];
6253
6456
  }), 1);
6254
6457
  }
6255
6458
  }
@@ -6266,8 +6469,8 @@ var external_async_validator_default = /*#__PURE__*/__webpack_require__.n(extern
6266
6469
 
6267
6470
  var table_editable_src_component = normalizeComponent(
6268
6471
  components_table_editable_srcvue_type_script_lang_js_,
6269
- srcvue_type_template_id_2cd18efc_render,
6270
- srcvue_type_template_id_2cd18efc_staticRenderFns,
6472
+ srcvue_type_template_id_aabdd8e6_render,
6473
+ srcvue_type_template_id_aabdd8e6_staticRenderFns,
6271
6474
  false,
6272
6475
  null,
6273
6476
  null,
@@ -6581,8 +6784,8 @@ table_operate_src.install = function (Vue) {
6581
6784
  Vue.component(table_operate_src.name, table_operate_src);
6582
6785
  };
6583
6786
  /* harmony default export */ var table_operate = (table_operate_src);
6584
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=template&id=39c4f843&
6585
- var srcvue_type_template_id_39c4f843_render = function render() {
6787
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=template&id=34fe6a3b&
6788
+ var srcvue_type_template_id_34fe6a3b_render = function render() {
6586
6789
  var _vm = this,
6587
6790
  _c = _vm._self._c
6588
6791
  return _c("div", [
@@ -6648,11 +6851,11 @@ var srcvue_type_template_id_39c4f843_render = function render() {
6648
6851
  ),
6649
6852
  ])
6650
6853
  }
6651
- var srcvue_type_template_id_39c4f843_staticRenderFns = []
6652
- srcvue_type_template_id_39c4f843_render._withStripped = true
6854
+ var srcvue_type_template_id_34fe6a3b_staticRenderFns = []
6855
+ srcvue_type_template_id_34fe6a3b_render._withStripped = true
6653
6856
 
6654
6857
 
6655
- // CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=39c4f843&
6858
+ // CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=34fe6a3b&
6656
6859
 
6657
6860
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=script&lang=js&
6658
6861
 
@@ -6831,6 +7034,9 @@ srcvue_type_template_id_39c4f843_render._withStripped = true
6831
7034
  handleCreate: function handleCreate() {
6832
7035
  this.$refs.createFormDialog.open();
6833
7036
  },
7037
+ resetTable: function resetTable() {
7038
+ this.$refs.table.resetTable();
7039
+ },
6834
7040
  reloadTable: function reloadTable() {
6835
7041
  this.$refs.table.reloadTable();
6836
7042
  },
@@ -6959,8 +7165,8 @@ srcvue_type_template_id_39c4f843_render._withStripped = true
6959
7165
 
6960
7166
  var crud_src_component = normalizeComponent(
6961
7167
  components_crud_srcvue_type_script_lang_js_,
6962
- srcvue_type_template_id_39c4f843_render,
6963
- srcvue_type_template_id_39c4f843_staticRenderFns,
7168
+ srcvue_type_template_id_34fe6a3b_render,
7169
+ srcvue_type_template_id_34fe6a3b_staticRenderFns,
6964
7170
  false,
6965
7171
  null,
6966
7172
  null,
@@ -10119,8 +10325,9 @@ drawer_src.install = function (Vue) {
10119
10325
 
10120
10326
 
10121
10327
 
10328
+
10122
10329
  var components = [components_form, components_form_input, components_form_item, form_group, form_dialog, form_drawer, form_view, form_view_group, form_view_dialog, components_table, components_table_column, table_search, table_editable, table_operate, crud, formula, dialog, drawer];
10123
- var install = function install(Vue, opts) {
10330
+ var src_install = function install(Vue, opts) {
10124
10331
  if (opts === void 0) {
10125
10332
  opts = {};
10126
10333
  }
@@ -10128,6 +10335,7 @@ var install = function install(Vue, opts) {
10128
10335
  Vue.component(component.name, component);
10129
10336
  });
10130
10337
  Vue.prototype.$COMPONENT = opts;
10338
+ Vue.prototype.$API = utils_namespaceObject;
10131
10339
  Vue.prototype.$ELEMENT = {
10132
10340
  size: opts.size || 'small',
10133
10341
  zIndex: opts.zIndex || 2000
@@ -10136,11 +10344,12 @@ var install = function install(Vue, opts) {
10136
10344
 
10137
10345
  /* istanbul ignore if */
10138
10346
  if (typeof window !== 'undefined' && window.Vue) {
10139
- install(window.Vue);
10347
+ src_install(window.Vue);
10140
10348
  }
10141
10349
  /* harmony default export */ var src_0 = __webpack_exports__["default"] = ({
10142
10350
  version: '0.0.1',
10143
- install: install,
10351
+ install: src_install,
10352
+ API: utils_namespaceObject,
10144
10353
  Form: components_form,
10145
10354
  FormInput: components_form_input,
10146
10355
  FormItem: components_form_item,