el-plus 0.0.18 → 0.0.19

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 (144) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +227 -104
  4. package/dist/index.full.min.js +1 -1
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +1 -1
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +226 -104
  9. package/es/components/date-picker-range/index.d.ts +3 -3
  10. package/es/components/date-picker-range/src/date-picker-range.vue.d.ts +1 -1
  11. package/es/components/form/src/form-item-vue.d.ts +2 -2
  12. package/es/components/form/src/form-item.d.ts +1 -1
  13. package/es/components/form/src/form-item.mjs.map +1 -1
  14. package/es/components/form/src/hooks/use-form-item.mjs +3 -1
  15. package/es/components/form/src/hooks/use-form-item.mjs.map +1 -1
  16. package/es/components/index.d.ts +1 -0
  17. package/es/components/index.mjs +2 -0
  18. package/es/components/index.mjs.map +1 -1
  19. package/es/components/input/style/css.d.ts +1 -1
  20. package/es/components/input/style/css.mjs +1 -1
  21. package/es/components/input/style/index.d.ts +1 -1
  22. package/es/components/input/style/index.mjs +1 -1
  23. package/es/components/link/index.d.ts +118 -0
  24. package/es/components/link/index.mjs +8 -0
  25. package/es/components/link/index.mjs.map +1 -0
  26. package/es/components/link/src/link.d.ts +30 -0
  27. package/es/components/link/src/link.mjs +19 -0
  28. package/es/components/link/src/link.mjs.map +1 -0
  29. package/es/components/link/src/link.vue.d.ts +73 -0
  30. package/es/components/link/src/link.vue.mjs +6 -0
  31. package/es/components/link/src/link.vue.mjs.map +1 -0
  32. package/es/components/link/src/link.vue2.mjs +52 -0
  33. package/es/components/link/src/link.vue2.mjs.map +1 -0
  34. package/es/components/link/style/css.d.ts +2 -0
  35. package/es/components/link/style/css.mjs +5 -0
  36. package/es/components/link/style/css.mjs.map +1 -0
  37. package/es/components/link/style/index.d.ts +2 -0
  38. package/es/components/link/style/index.mjs +5 -0
  39. package/es/components/link/style/index.mjs.map +1 -0
  40. package/es/components/search-list-page/index.d.ts +51 -30
  41. package/es/components/search-list-page/src/search-list-page.d.ts +1 -1
  42. package/es/components/search-list-page/src/search-list-page.mjs +3 -3
  43. package/es/components/search-list-page/src/search-list-page.mjs.map +1 -1
  44. package/es/components/search-list-page/src/search-list-page.vue.d.ts +16 -11
  45. package/es/components/search-list-page/src/search-list-page.vue2.mjs +4 -3
  46. package/es/components/search-list-page/src/search-list-page.vue2.mjs.map +1 -1
  47. package/es/components/search-list-page/src/use-search-list-page.d.ts +15 -9
  48. package/es/components/search-list-page/src/use-search-list-page.mjs +4 -4
  49. package/es/components/search-list-page/src/use-search-list-page.mjs.map +1 -1
  50. package/es/components/table/index.d.ts +11 -6
  51. package/es/components/table/src/table.d.ts +2 -1
  52. package/es/components/table/src/table.mjs +2 -2
  53. package/es/components/table/src/table.mjs.map +1 -1
  54. package/es/components/table/src/table.vue.d.ts +4 -3
  55. package/es/components/table/src/table.vue2.mjs +4 -3
  56. package/es/components/table/src/table.vue2.mjs.map +1 -1
  57. package/es/components/table/src/use-table.d.ts +71 -12
  58. package/es/components/table/src/use-table.mjs +84 -27
  59. package/es/components/table/src/use-table.mjs.map +1 -1
  60. package/es/components.mjs +3 -1
  61. package/es/components.mjs.map +1 -1
  62. package/es/hooks/dialog/use-dialog.d.ts +2 -0
  63. package/es/hooks/dialog/use-dialog.mjs +4 -3
  64. package/es/hooks/dialog/use-dialog.mjs.map +1 -1
  65. package/es/index.mjs +2 -0
  66. package/es/index.mjs.map +1 -1
  67. package/es/package.json.mjs +1 -1
  68. package/es/utils/file.d.ts +18 -0
  69. package/es/utils/file.mjs +133 -0
  70. package/es/utils/file.mjs.map +1 -0
  71. package/es/utils/http/core/types.d.ts +1 -0
  72. package/global.d.ts +6 -4
  73. package/lib/components/date-picker-range/index.d.ts +3 -3
  74. package/lib/components/date-picker-range/src/date-picker-range.vue.d.ts +1 -1
  75. package/lib/components/form/src/form-item-vue.d.ts +2 -2
  76. package/lib/components/form/src/form-item.d.ts +1 -1
  77. package/lib/components/form/src/form-item.js.map +1 -1
  78. package/lib/components/form/src/hooks/use-form-item.js +3 -1
  79. package/lib/components/form/src/hooks/use-form-item.js.map +1 -1
  80. package/lib/components/index.d.ts +1 -0
  81. package/lib/components/index.js +4 -0
  82. package/lib/components/index.js.map +1 -1
  83. package/lib/components/input/style/css.d.ts +1 -1
  84. package/lib/components/input/style/css.js +1 -1
  85. package/lib/components/input/style/index.d.ts +1 -1
  86. package/lib/components/input/style/index.js +1 -1
  87. package/lib/components/link/index.d.ts +118 -0
  88. package/lib/components/link/index.js +14 -0
  89. package/lib/components/link/index.js.map +1 -0
  90. package/lib/components/link/src/link.d.ts +30 -0
  91. package/lib/components/link/src/link.js +21 -0
  92. package/lib/components/link/src/link.js.map +1 -0
  93. package/lib/components/link/src/link.vue.d.ts +73 -0
  94. package/lib/components/link/src/link.vue.js +10 -0
  95. package/lib/components/link/src/link.vue.js.map +1 -0
  96. package/lib/components/link/src/link.vue2.js +56 -0
  97. package/lib/components/link/src/link.vue2.js.map +1 -0
  98. package/lib/components/link/style/css.d.ts +2 -0
  99. package/lib/components/link/style/css.js +7 -0
  100. package/lib/components/link/style/css.js.map +1 -0
  101. package/lib/components/link/style/index.d.ts +2 -0
  102. package/lib/components/link/style/index.js +7 -0
  103. package/lib/components/link/style/index.js.map +1 -0
  104. package/lib/components/search-list-page/index.d.ts +51 -30
  105. package/lib/components/search-list-page/src/search-list-page.d.ts +1 -1
  106. package/lib/components/search-list-page/src/search-list-page.js +3 -3
  107. package/lib/components/search-list-page/src/search-list-page.js.map +1 -1
  108. package/lib/components/search-list-page/src/search-list-page.vue.d.ts +16 -11
  109. package/lib/components/search-list-page/src/search-list-page.vue2.js +3 -2
  110. package/lib/components/search-list-page/src/search-list-page.vue2.js.map +1 -1
  111. package/lib/components/search-list-page/src/use-search-list-page.d.ts +15 -9
  112. package/lib/components/search-list-page/src/use-search-list-page.js +4 -4
  113. package/lib/components/search-list-page/src/use-search-list-page.js.map +1 -1
  114. package/lib/components/table/index.d.ts +11 -6
  115. package/lib/components/table/src/table.d.ts +2 -1
  116. package/lib/components/table/src/table.js +2 -2
  117. package/lib/components/table/src/table.js.map +1 -1
  118. package/lib/components/table/src/table.vue.d.ts +4 -3
  119. package/lib/components/table/src/table.vue2.js +4 -3
  120. package/lib/components/table/src/table.vue2.js.map +1 -1
  121. package/lib/components/table/src/use-table.d.ts +71 -12
  122. package/lib/components/table/src/use-table.js +83 -26
  123. package/lib/components/table/src/use-table.js.map +1 -1
  124. package/lib/components.js +3 -1
  125. package/lib/components.js.map +1 -1
  126. package/lib/hooks/dialog/use-dialog.d.ts +2 -0
  127. package/lib/hooks/dialog/use-dialog.js +4 -3
  128. package/lib/hooks/dialog/use-dialog.js.map +1 -1
  129. package/lib/index.js +10 -6
  130. package/lib/index.js.map +1 -1
  131. package/lib/package.json.js +1 -1
  132. package/lib/utils/file.d.ts +18 -0
  133. package/lib/utils/file.js +136 -0
  134. package/lib/utils/file.js.map +1 -0
  135. package/lib/utils/http/core/types.d.ts +1 -0
  136. package/package.json +1 -1
  137. package/theme-chalk/custom-column.css +1 -1
  138. package/theme-chalk/index.css +1 -1
  139. package/theme-chalk/link.css +1 -0
  140. package/theme-chalk/src/custom-column.scss +6 -4
  141. package/theme-chalk/src/index.scss +2 -1
  142. package/theme-chalk/src/link.scss +6 -0
  143. package/theme-chalk/src/table.scss +20 -1
  144. package/theme-chalk/table.css +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # el-plus
2
2
 
3
+ ## 0.0.19
4
+
5
+ ### Patch Changes
6
+
7
+ - 1
8
+
3
9
  ## 0.0.18
4
10
 
5
11
  ### Patch Changes
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- .fade-enter-active,.fade-leave-active{transition:opacity .3s ease}.fade-enter-from,.fade-leave-to{opacity:0}.ep-form{position:relative}.ep-form__fold{bottom:23px;color:#367ef5;cursor:pointer;font-size:14px;position:absolute;right:0;text-align:center;width:70px}.ep-form__fold:hover{text-decoration:underline}.ep-form.is-fold{padding-right:70px}.ep-form .el-form-item--small{margin-bottom:18px}.ep-form .el-form-item--small .el-form-item__label{display:block;height:32px;line-height:32px;overflow:hidden;padding-left:18px;padding-right:6px;text-overflow:ellipsis;white-space:nowrap}.ep-form .el-form-item--small .el-form-item__content{font-size:13px;line-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-input{font-size:13px;height:32px}.ep-form .el-form-item--small .el-form-item__content .el-select__wrapper{font-size:13px;line-height:32px;min-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-date-editor .el-range-input{font-size:13px}.ep-table__action-buttons{white-space:nowrap}.ep-table .table-column-link .el-form-item{display:inline-block}.ep-table .table-column-link .el-form-item .el-form-item__label{display:none}.ep-table .el-table .cell{line-height:30px}.ep-table .el-table thead tr th{height:42px}.ep-table .el-table td,.ep-table .el-table th{padding:3px 0}.ep-table .el-form-item__error{position:unset;text-align:left}.ep-table .el-form-item{margin-bottom:0}.ep-table .el-form-item .el-form-item__label{padding:0}.ep-table .el-pagination{margin-top:12px;--el-pagination-font-size:13px}.ep-table .el-pagination .el-select{--el-select-font-size:13px}.ep-table .el-pagination .el-select .el-select__wrapper{font-size:13px}.ep-button{height:auto;padding:9px 15px}.ep-button.el-button--text{padding:0}.ep-button.el-button+.el-button{margin-left:10px}.ep-search-list-page #middle{overflow:hidden}.ep-search-list-page__middle-left{float:left}.ep-search-list-page__middle-left>.el-button{margin:16px 0}.ep-search-list-page__middle-right{float:right}.ep-search-list-page__middle-right .el-button{margin:16px 0}.ep-title__header{line-height:50px;overflow:hidden}.ep-title__title{float:left;font-size:15px;font-weight:500}.ep-title__toggle{color:#409eff;cursor:pointer;display:inline-block;font-size:14px;font-weight:400;margin-left:10px;white-space:nowrap}.ep-title__toggle .el-icon{transition:transform .3s;vertical-align:-2px}.ep-title.is-expanded .el-icon{transform:rotate(-180deg)}.ep-title__buttons{float:right}.ep-title__content{overflow:hidden;transition:max-height .3s ease-in-out}.ep-header{display:flex}.ep-header .el-page-header .el-page-header__left{margin-right:-10px;margin-top:4px}.ep-template-promise{position:relative;z-index:8888888888}.ep-dialog{padding:20px 25px 40px}.ep-dialog .el-dialog__headerbtn{height:56px}.ep-dialog .el-dialog__headerbtn .el-dialog__close{transform:scale(1.3)}.ep-dialog .el-dialog__header{text-align:center}.ep-dialog .el-dialog__header .el-dialog__title{color:#505050;font-size:16px;font-weight:600;line-height:24px;margin:4px}.ep-dialog .el-dialog__body{padding:25px 0 0}.ep-dialog__footer{padding:14px 0 0}.ep-dialog__footer button{font-size:12px}.ep-choose-dialog__selected-count{color:#409eff;float:left;font-size:16px;line-height:32px}.ep-custom-column__dialog .el-dialog__body{text-align:center}.ep-custom-column__dialog .el-transfer{display:inline-block}.ep-custom-column__dialog .el-transfer-panel__footer{border-bottom:0;height:0}.ep-custom-column__dialog .el-transfer-panel{overflow:visible}.ep-custom-column__operate{position:absolute;right:-100%;top:50%;transform:translate(25%,32px)}
1
+ .fade-enter-active,.fade-leave-active{transition:opacity .3s ease}.fade-enter-from,.fade-leave-to{opacity:0}.ep-form{position:relative}.ep-form__fold{bottom:23px;color:#367ef5;cursor:pointer;font-size:14px;position:absolute;right:0;text-align:center;width:70px}.ep-form__fold:hover{text-decoration:underline}.ep-form.is-fold{padding-right:70px}.ep-form .el-form-item--small{margin-bottom:18px}.ep-form .el-form-item--small .el-form-item__label{display:block;height:32px;line-height:32px;overflow:hidden;padding-left:18px;padding-right:6px;text-overflow:ellipsis;white-space:nowrap}.ep-form .el-form-item--small .el-form-item__content{font-size:13px;line-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-input{font-size:13px;height:32px}.ep-form .el-form-item--small .el-form-item__content .el-select__wrapper{font-size:13px;line-height:32px;min-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-date-editor .el-range-input{font-size:13px}.ep-table__action-buttons{white-space:nowrap}.ep-table .table-column-link .el-form-item{display:inline-block}.ep-table .table-column-link .el-form-item .el-form-item__label{display:none}.ep-table .el-table{font-size:13px}.ep-table .el-table .el-table__cell .is-edit{cursor:pointer}.ep-table .el-table .el-table__cell .is-edit:hover{color:#409eff}.ep-table .el-table .el-table__cell .is-edit .el-icon{vertical-align:-2px}.ep-table .el-table .cell{line-height:30px}.ep-table .el-table thead tr th{height:42px}.ep-table .el-table td,.ep-table .el-table th{padding:3px 0}.ep-table .el-form-item__error{position:unset;text-align:left}.ep-table .el-form-item{margin-bottom:0}.ep-table .el-form-item .el-form-item__label{padding:0}.ep-table .el-pagination{margin-top:12px;--el-pagination-font-size:13px}.ep-table .el-pagination .el-select{--el-select-font-size:13px}.ep-table .el-pagination .el-select .el-select__wrapper{font-size:13px}.ep-button{height:auto;padding:9px 15px}.ep-button.el-button--text{padding:0}.ep-button.el-button+.el-button{margin-left:10px}.ep-search-list-page #middle{overflow:hidden}.ep-search-list-page__middle-left{float:left}.ep-search-list-page__middle-left>.el-button{margin:16px 0}.ep-search-list-page__middle-right{float:right}.ep-search-list-page__middle-right .el-button{margin:16px 0}.ep-title__header{line-height:50px;overflow:hidden}.ep-title__title{float:left;font-size:15px;font-weight:500}.ep-title__toggle{color:#409eff;cursor:pointer;display:inline-block;font-size:14px;font-weight:400;margin-left:10px;white-space:nowrap}.ep-title__toggle .el-icon{transition:transform .3s;vertical-align:-2px}.ep-title.is-expanded .el-icon{transform:rotate(-180deg)}.ep-title__buttons{float:right}.ep-title__content{overflow:hidden;transition:max-height .3s ease-in-out}.ep-header{display:flex}.ep-header .el-page-header .el-page-header__left{margin-right:-10px;margin-top:4px}.ep-template-promise{position:relative;z-index:8888888888}.ep-dialog{padding:20px 25px 40px}.ep-dialog .el-dialog__headerbtn{height:56px}.ep-dialog .el-dialog__headerbtn .el-dialog__close{transform:scale(1.3)}.ep-dialog .el-dialog__header{text-align:center}.ep-dialog .el-dialog__header .el-dialog__title{color:#505050;font-size:16px;font-weight:600;line-height:24px;margin:4px}.ep-dialog .el-dialog__body{padding:25px 0 0}.ep-dialog__footer{padding:14px 0 0}.ep-dialog__footer button{font-size:12px}.ep-choose-dialog__selected-count{color:#409eff;float:left;font-size:16px;line-height:32px}.ep-custom-column__dialog .el-dialog__body{text-align:center}.ep-custom-column__dialog .el-transfer{display:inline-block}.ep-custom-column__dialog .el-transfer-panel__footer{border-bottom:0;height:0}.ep-custom-column__dialog .el-transfer-panel{overflow:visible}.ep-custom-column__operate{position:absolute;right:-100%;top:50%;transform:translate(calc(25% - 52px),32px)}.ep-link{font-size:13px}
@@ -1,10 +1,10 @@
1
- /*! ElPlus v0.0.18 */
1
+ /*! ElPlus v0.0.19 */
2
2
 
3
3
  (function (global, factory) {
4
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('element-plus'), require('@vue/shared'), require('axios'), require('js-cookie'), require('defu'), require('qs'), require('element-plus/es/components/table/src/table/defaults'), require('@element-plus/icons-vue'), require('mitt'), require('@vueuse/core'), require('vue-router')) :
5
- typeof define === 'function' && define.amd ? define(['exports', 'vue', 'element-plus', '@vue/shared', 'axios', 'js-cookie', 'defu', 'qs', 'element-plus/es/components/table/src/table/defaults', '@element-plus/icons-vue', 'mitt', '@vueuse/core', 'vue-router'], factory) :
6
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ElPlus = {}, global.Vue, global.ElementPlus, global.shared, global.axios, global.Cookies, global.defu, global.qs, global.elTableProps, global.iconsVue, global.mitt, global.core, global.vueRouter));
7
- })(this, (function (exports, vue, elementPlus, shared, axios, Cookies, defu, qs, elTableProps, iconsVue, mitt, core, vueRouter) { 'use strict';
4
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('element-plus'), require('@vue/shared'), require('axios'), require('js-cookie'), require('defu'), require('qs'), require('element-plus/es/components/table/src/table/defaults'), require('@element-plus/icons-vue'), require('mitt'), require('lodash-unified'), require('@vueuse/core'), require('vue-router')) :
5
+ typeof define === 'function' && define.amd ? define(['exports', 'vue', 'element-plus', '@vue/shared', 'axios', 'js-cookie', 'defu', 'qs', 'element-plus/es/components/table/src/table/defaults', '@element-plus/icons-vue', 'mitt', 'lodash-unified', '@vueuse/core', 'vue-router'], factory) :
6
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ElPlus = {}, global.Vue, global.ElementPlus, global.shared, global.axios, global.Cookies, global.defu, global.qs, global.elTableProps, global.iconsVue, global.mitt, global.lodashUnified, global.core, global.vueRouter));
7
+ })(this, (function (exports, vue, elementPlus, shared, axios, Cookies, defu, qs, elTableProps, iconsVue, mitt, lodashUnified, core, vueRouter) { 'use strict';
8
8
 
9
9
  function _interopNamespaceDefault(e) {
10
10
  var n = Object.create(null);
@@ -949,7 +949,9 @@
949
949
  });
950
950
  }
951
951
  if (render) {
952
- scopedSlots.default = render;
952
+ scopedSlots.default = () => {
953
+ return render(attrs["table-scope"]);
954
+ };
953
955
  }
954
956
  return {
955
957
  scopedSlots
@@ -1054,7 +1056,7 @@
1054
1056
  }
1055
1057
  });
1056
1058
 
1057
- var _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
1059
+ var _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
1058
1060
  ...{
1059
1061
  name: "EpForm",
1060
1062
  inheritAttrs: false
@@ -1152,7 +1154,7 @@
1152
1154
  }
1153
1155
  });
1154
1156
 
1155
- const EpForm = withInstall(_sfc_main$8);
1157
+ const EpForm = withInstall(_sfc_main$9);
1156
1158
 
1157
1159
  const { t: t$2 } = useLocale();
1158
1160
  const inputProps = {
@@ -1181,7 +1183,7 @@
1181
1183
  };
1182
1184
  const inputEmitsKeys = Object.keys(inputEmits);
1183
1185
 
1184
- var _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
1186
+ var _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
1185
1187
  ...{
1186
1188
  name: "EpInput",
1187
1189
  inheritAttrs: false
@@ -1315,7 +1317,7 @@
1315
1317
  }
1316
1318
  });
1317
1319
 
1318
- const EpInput = withInstall(_sfc_main$7);
1320
+ const EpInput = withInstall(_sfc_main$8);
1319
1321
 
1320
1322
  function _isSlot$1(s) {
1321
1323
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
@@ -1408,6 +1410,7 @@
1408
1410
  } = useLocale();
1409
1411
  const {
1410
1412
  scopedSlots = {},
1413
+ instance,
1411
1414
  render,
1412
1415
  destroyOnClose,
1413
1416
  onConfirm,
@@ -1483,10 +1486,10 @@
1483
1486
  });
1484
1487
  if (render) {
1485
1488
  const container = document.createElement("div");
1486
- const instance = vue.getCurrentInstance();
1489
+ const newInstance = instance || vue.getCurrentInstance();
1487
1490
  const vnode = vue.h(Dialog);
1488
- if (instance && instance.appContext) {
1489
- vnode.appContext = instance.appContext;
1491
+ if (newInstance && newInstance.appContext) {
1492
+ vnode.appContext = newInstance.appContext;
1490
1493
  }
1491
1494
  vue.render(vnode, container);
1492
1495
  document.body.appendChild(container);
@@ -1636,7 +1639,7 @@
1636
1639
  }
1637
1640
  };
1638
1641
 
1639
- var _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
1642
+ var _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
1640
1643
  ...{
1641
1644
  name: "EpCustomColumn",
1642
1645
  inheritAttrs: false
@@ -1841,7 +1844,7 @@
1841
1844
  }
1842
1845
  });
1843
1846
 
1844
- const EpCustomColumn = withInstall(_sfc_main$6);
1847
+ const EpCustomColumn = withInstall(_sfc_main$7);
1845
1848
 
1846
1849
  const inheritTableProps = {
1847
1850
  ...elTableProps,
@@ -1915,8 +1918,8 @@
1915
1918
  type: Array,
1916
1919
  default: () => []
1917
1920
  },
1918
- // 链接列
1919
- linkProps: {
1921
+ // 格式化列
1922
+ formatColumns: {
1920
1923
  type: Array,
1921
1924
  default: () => []
1922
1925
  },
@@ -1938,6 +1941,38 @@
1938
1941
  const tableEmits = [...elementPlus.ElTable.emits, "single-selection-change"];
1939
1942
  const tableEmitsKeys = tableEmits;
1940
1943
 
1944
+ const bem$1 = createNameSpace("form-dialog");
1945
+ const useFormDialog = (options = {}) => {
1946
+ const {
1947
+ dialogProps,
1948
+ title,
1949
+ ...formProps
1950
+ } = options;
1951
+ const formRef = vue.ref();
1952
+ let formData = formProps.formData || vue.reactive({});
1953
+ return useDialog({
1954
+ class: bem$1.b(),
1955
+ width: "80%",
1956
+ title,
1957
+ render: (props) => {
1958
+ return vue.createVNode(EpForm, vue.mergeProps({
1959
+ "ref": formRef,
1960
+ "modelValue": formData,
1961
+ "onUpdate:modelValue": ($event) => formData = $event
1962
+ }, {
1963
+ col: 1,
1964
+ "label-width": "auto",
1965
+ ...formProps
1966
+ }), null);
1967
+ },
1968
+ onConfirm: async (resolve) => {
1969
+ await formRef.value.validate();
1970
+ resolve(formData);
1971
+ },
1972
+ ...dialogProps
1973
+ });
1974
+ };
1975
+
1941
1976
  const useTable$1 = (props) => {
1942
1977
  const elFormRef = vue.useTemplateRef("elFormRef");
1943
1978
  const elTableRef = vue.useTemplateRef("elTableRef");
@@ -1973,7 +2008,12 @@
1973
2008
  }
1974
2009
  });
1975
2010
  const customColumns = vue.ref([]);
2011
+ const attrs = vue.useAttrs();
1976
2012
  const search = async (init = false, isPagination = false) => {
2013
+ const beforeSearch = attrs["before-search"];
2014
+ if (typeof beforeSearch === "function") {
2015
+ await beforeSearch?.();
2016
+ }
1977
2017
  if (init) {
1978
2018
  pagination.pageNo = 1;
1979
2019
  }
@@ -2007,6 +2047,7 @@
2007
2047
  if (props.customColumnModule) {
2008
2048
  loading.value = true;
2009
2049
  const columns = await bus.once("loadedCustomColumn");
2050
+ loading.value = false;
2010
2051
  customColumns.value = columns;
2011
2052
  bus.on("loadedCustomColumn", (columns2) => {
2012
2053
  customColumns.value = columns2;
@@ -2078,6 +2119,7 @@
2078
2119
  };
2079
2120
  };
2080
2121
  const useTableColumn = (props, tableData, customColumns) => {
2122
+ const instance = vue.getCurrentInstance();
2081
2123
  const columnProps = (column) => {
2082
2124
  const attrs = {
2083
2125
  "show-overflow-tooltip": true,
@@ -2090,16 +2132,50 @@
2090
2132
  if (typeof column.required === "function") {
2091
2133
  required = column.required();
2092
2134
  }
2093
- if (required) {
2094
- attrs["renderHeader"] = (data) => {
2095
- const {
2096
- column: column2
2097
- } = data;
2098
- return vue.createVNode("span", null, [vue.createVNode("span", {
2099
- "style": "color:var(--el-color-danger)"
2100
- }, [vue.createTextVNode(" * ")]), column2.label]);
2101
- };
2102
- }
2135
+ const editable = column.editable;
2136
+ attrs["renderHeader"] = () => {
2137
+ return vue.createVNode("span", null, [required ? vue.createVNode("span", {
2138
+ "style": "color:var(--el-color-danger)"
2139
+ }, [vue.createTextVNode(" * ")]) : "", vue.createVNode("span", {
2140
+ "class": {
2141
+ "is-edit": editable
2142
+ },
2143
+ "onClick": editable ? async () => {
2144
+ const cloneColumn = {
2145
+ ...column
2146
+ };
2147
+ delete cloneColumn.editable;
2148
+ const rawRender = cloneColumn.render;
2149
+ const formData = vue.reactive({});
2150
+ if (rawRender) {
2151
+ cloneColumn.render = () => {
2152
+ return rawRender({
2153
+ row: formData
2154
+ });
2155
+ };
2156
+ }
2157
+ const formDialog = useFormDialog({
2158
+ title: cloneColumn.label,
2159
+ dialogProps: {
2160
+ destroyOnClose: true,
2161
+ instance
2162
+ },
2163
+ formItemList: [cloneColumn],
2164
+ formData
2165
+ // formData: reactive({}),
2166
+ });
2167
+ const data = await formDialog.open();
2168
+ (tableData.value || []).forEach((item) => {
2169
+ item[column.prop] = data[column.prop];
2170
+ });
2171
+ if (typeof editable === "function") {
2172
+ editable(vue.toRaw(data));
2173
+ }
2174
+ } : void 0
2175
+ }, [column.label, editable ? vue.createVNode(elementPlus.ElIcon, null, {
2176
+ default: () => [vue.createVNode(iconsVue.EditPen, null, null)]
2177
+ }) : ""])]);
2178
+ };
2103
2179
  }
2104
2180
  if (column.filter) {
2105
2181
  const arr = tableData.value.map((item) => item[column.prop]);
@@ -2113,29 +2189,31 @@
2113
2189
  return row[column.prop] === value;
2114
2190
  };
2115
2191
  }
2192
+ if (column.type === "EpLink") {
2193
+ attrs.className = "table-column-link";
2194
+ }
2116
2195
  return {
2117
2196
  ...attrs,
2118
2197
  ...prepareProps(column)
2119
2198
  };
2120
2199
  };
2121
2200
  const columnList = vue.computed(() => {
2122
- let columns = props.columns;
2123
- if (props.customColumnModule) {
2124
- columns = customColumns.value;
2125
- }
2126
- return columns.filter((column) => {
2127
- if (props.linkProps.length) {
2128
- const linkColumn = props.linkProps.find((item) => item.prop === column.prop);
2129
- if (linkColumn) {
2130
- column.type = "EpButtons";
2131
- column.className = "table-column-link";
2132
- column.props = {
2133
- list: [linkColumn],
2134
- type: "text",
2135
- ...column.props
2201
+ const columns = props.customColumnModule ? customColumns.value : props.columns;
2202
+ return columns.map((column) => {
2203
+ let newColumn = {
2204
+ ...column
2205
+ };
2206
+ if (props.formatColumns.length) {
2207
+ const formatColumn = props.formatColumns.find((item) => item.prop === column.prop);
2208
+ if (formatColumn) {
2209
+ newColumn = {
2210
+ ...newColumn,
2211
+ ...formatColumn
2136
2212
  };
2137
2213
  }
2138
2214
  }
2215
+ return newColumn;
2216
+ }).filter((column) => {
2139
2217
  if ("show" in column) {
2140
2218
  return typeof column.show === "function" ? column.show(column) : column.show;
2141
2219
  } else if ("hide" in column) {
@@ -2150,7 +2228,8 @@
2150
2228
  };
2151
2229
  };
2152
2230
  const useTableFormItem = (props) => {
2153
- const formItemProps = (scope, item) => {
2231
+ const formItemProps = (scope, rawItem) => {
2232
+ const item = lodashUnified.cloneDeep(rawItem);
2154
2233
  let required = item.required;
2155
2234
  if (typeof required === "function") {
2156
2235
  required = required();
@@ -2185,10 +2264,19 @@
2185
2264
  }
2186
2265
  });
2187
2266
  }
2267
+ if (item.type === "EpLink") {
2268
+ (item.props ? item.props : item.props = {}).content = item.props.content || scope.row[item.prop];
2269
+ }
2188
2270
  for (const key in item) {
2189
2271
  if (key.startsWith("on") && typeof item[key] === "function") {
2190
2272
  const fn = item[key];
2191
- item[key] = (...args) => fn(...args, scope);
2273
+ item[key] = (...args) => {
2274
+ let event;
2275
+ if (args[0] instanceof Event) {
2276
+ event = args.shift();
2277
+ }
2278
+ return fn(...args, scope, event);
2279
+ };
2192
2280
  }
2193
2281
  }
2194
2282
  return {
@@ -2210,7 +2298,7 @@
2210
2298
  };
2211
2299
  };
2212
2300
 
2213
- var _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
2301
+ var _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
2214
2302
  ...{
2215
2303
  name: "EpTable",
2216
2304
  inheritAttrs: false
@@ -2358,12 +2446,13 @@
2358
2446
  }, {
2359
2447
  ref_for: true
2360
2448
  }, vue.unref(columnProps)(item)), {
2361
- default: vue.withCtx((scope) => [item.type ? (vue.openBlock(), vue.createBlock(vue.unref(EpFormItem), vue.mergeProps({
2449
+ default: vue.withCtx((scope) => [item.type || item.render ? (vue.openBlock(), vue.createBlock(vue.unref(EpFormItem), vue.mergeProps({
2362
2450
  key: 0,
2363
- "form-data": scope.row
2451
+ "form-data": scope.row,
2452
+ "table-scope": scope
2364
2453
  }, {
2365
2454
  ref_for: true
2366
- }, vue.unref(formItemProps)(scope, item)), null, 16, ["form-data"])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2455
+ }, vue.unref(formItemProps)(scope, item)), null, 16, ["form-data", "table-scope"])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2367
2456
  key: 1
2368
2457
  }, [vue.createTextVNode(vue.toDisplayString(scope.row[item.prop]), 1)], 64))]),
2369
2458
  _: 2
@@ -2395,7 +2484,7 @@
2395
2484
  }
2396
2485
  });
2397
2486
 
2398
- const EpTable = withInstall(_sfc_main$5);
2487
+ const EpTable = withInstall(_sfc_main$6);
2399
2488
 
2400
2489
  const searchListPageProps = {
2401
2490
  ...apiProps,
@@ -2429,9 +2518,9 @@
2429
2518
  actionButtons: {
2430
2519
  ...tableProps.actionButtons
2431
2520
  },
2432
- // 链接列
2433
- linkProps: {
2434
- ...tableProps.linkProps
2521
+ // 格式化列
2522
+ formatColumns: {
2523
+ ...tableProps.formatColumns
2435
2524
  },
2436
2525
  showSelectionCol: Boolean,
2437
2526
  showSingleSelectionCol: Boolean,
@@ -2486,7 +2575,8 @@
2486
2575
  search,
2487
2576
  reset,
2488
2577
  tableRef,
2489
- formRef
2578
+ formRef,
2579
+ beforeSearch: validate
2490
2580
  };
2491
2581
  };
2492
2582
  const useTable = (props, config) => {
@@ -2503,7 +2593,7 @@
2503
2593
  showSelectionCol: props.showSelectionCol,
2504
2594
  showSingleSelectionCol: props.showSingleSelectionCol,
2505
2595
  actionButtons: props.actionButtons,
2506
- linkProps: props.linkProps,
2596
+ formatColumns: props.formatColumns,
2507
2597
  api: props.api,
2508
2598
  reqData: props.formData,
2509
2599
  customColumnModule: props.customColumnModule,
@@ -2623,12 +2713,11 @@
2623
2713
  };
2624
2714
  });
2625
2715
  const search = async (isInitSearch = false) => {
2626
- await validate();
2627
2716
  tableRef.value.search(isInitSearch);
2628
2717
  };
2629
2718
  const reset = async () => {
2630
2719
  resetFields();
2631
- search();
2720
+ search(true);
2632
2721
  };
2633
2722
  const searchButtons = [
2634
2723
  {
@@ -2649,7 +2738,7 @@
2649
2738
  };
2650
2739
  };
2651
2740
 
2652
- var _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
2741
+ var _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
2653
2742
  ...{ name: "EpSearchListPage" },
2654
2743
  __name: "search-list-page",
2655
2744
  props: searchListPageProps,
@@ -2664,7 +2753,8 @@
2664
2753
  reset,
2665
2754
  tableRef,
2666
2755
  formRef,
2667
- tableProps
2756
+ tableProps,
2757
+ beforeSearch
2668
2758
  } = useSearchListPage(props);
2669
2759
  __expose({
2670
2760
  search,
@@ -2695,13 +2785,13 @@
2695
2785
  ], 2)
2696
2786
  ]),
2697
2787
  vue.renderSlot(_ctx.$slots, "tableBefore"),
2698
- vue.createVNode(vue.unref(EpTable), vue.normalizeProps(vue.guardReactiveProps(vue.unref(tableProps))), null, 16)
2788
+ vue.createVNode(vue.unref(EpTable), vue.mergeProps(vue.unref(tableProps), { "before-search": vue.unref(beforeSearch) }), null, 16, ["before-search"])
2699
2789
  ], 6);
2700
2790
  };
2701
2791
  }
2702
2792
  });
2703
2793
 
2704
- const EpSearchListPage = withInstall(_sfc_main$4);
2794
+ const EpSearchListPage = withInstall(_sfc_main$5);
2705
2795
 
2706
2796
  const inheritSelectProps = {
2707
2797
  ...elementPlus.selectProps,
@@ -2827,7 +2917,7 @@
2827
2917
  };
2828
2918
  }
2829
2919
 
2830
- var _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
2920
+ var _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
2831
2921
  ...{
2832
2922
  name: "EpSelect",
2833
2923
  inheritAttrs: false
@@ -2906,7 +2996,7 @@
2906
2996
  }
2907
2997
  });
2908
2998
 
2909
- const EpSelect = withInstall(_sfc_main$3);
2999
+ const EpSelect = withInstall(_sfc_main$4);
2910
3000
 
2911
3001
  const titleProps = {
2912
3002
  // 右侧按钮
@@ -2962,7 +3052,7 @@
2962
3052
  };
2963
3053
  };
2964
3054
 
2965
- var _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
3055
+ var _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
2966
3056
  ...{
2967
3057
  name: "EpTitle",
2968
3058
  inheritAttrs: false
@@ -3025,7 +3115,7 @@
3025
3115
  }
3026
3116
  });
3027
3117
 
3028
- const EpTitle = withInstall(_sfc_main$2);
3118
+ const EpTitle = withInstall(_sfc_main$3);
3029
3119
 
3030
3120
  const headerProps = {
3031
3121
  // 页面模式
@@ -3136,7 +3226,7 @@
3136
3226
  };
3137
3227
  };
3138
3228
 
3139
- var _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3229
+ var _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
3140
3230
  ...{
3141
3231
  name: "EpHeader",
3142
3232
  inheritAttrs: false
@@ -3169,7 +3259,7 @@
3169
3259
  }
3170
3260
  });
3171
3261
 
3172
- const EpHeader = withInstall(_sfc_main$1);
3262
+ const EpHeader = withInstall(_sfc_main$2);
3173
3263
 
3174
3264
  const { t } = useLocale();
3175
3265
  const datePickerRangeProps = {
@@ -3239,7 +3329,7 @@
3239
3329
  };
3240
3330
  const datePickerRangeEmits = {};
3241
3331
 
3242
- var _sfc_main = /* @__PURE__ */ vue.defineComponent({
3332
+ var _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3243
3333
  ...{
3244
3334
  name: "EpDatePickerRange",
3245
3335
  inheritAttrs: false
@@ -3295,7 +3385,69 @@
3295
3385
  }
3296
3386
  });
3297
3387
 
3298
- const EpDatePickerRange = withInstall(_sfc_main);
3388
+ const EpDatePickerRange = withInstall(_sfc_main$1);
3389
+
3390
+ const linkProps = {
3391
+ ...elementPlus.linkProps,
3392
+ content: {
3393
+ type: String
3394
+ },
3395
+ type: {
3396
+ ...elementPlus.linkProps.type,
3397
+ default: "primary"
3398
+ },
3399
+ underline: {
3400
+ ...elementPlus.linkProps.underline,
3401
+ default: "never"
3402
+ }
3403
+ };
3404
+
3405
+ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
3406
+ ...{
3407
+ name: "EpLink",
3408
+ inheritAttrs: false
3409
+ },
3410
+ __name: "link",
3411
+ props: linkProps,
3412
+ setup(__props) {
3413
+ const bem = createNameSpace("link");
3414
+ const props = __props;
3415
+ const attrs = vue.useAttrs();
3416
+ const slots = vue.computed(() => {
3417
+ return Object.keys(vue.useSlots());
3418
+ });
3419
+ return (_ctx, _cache) => {
3420
+ const _component_el_link = vue.resolveComponent("el-link");
3421
+ return vue.openBlock(), vue.createBlock(_component_el_link, vue.mergeProps({
3422
+ class: `${vue.unref(bem).b()} ${vue.unref(prepareClassNames)()}`,
3423
+ style: {
3424
+ ...vue.unref(prepareStyles)()
3425
+ }
3426
+ }, {
3427
+ ...props,
3428
+ ...vue.unref(attrs)
3429
+ }), vue.createSlots({
3430
+ default: vue.withCtx(() => [
3431
+ _ctx.content ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
3432
+ vue.createTextVNode(vue.toDisplayString(_ctx.content), 1)
3433
+ ], 64)) : vue.createCommentVNode("", true)
3434
+ ]),
3435
+ _: 2
3436
+ }, [
3437
+ vue.renderList(slots.value, (name) => {
3438
+ return {
3439
+ name,
3440
+ fn: vue.withCtx((scope) => [
3441
+ vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(scope)))
3442
+ ])
3443
+ };
3444
+ })
3445
+ ]), 1040, ["class", "style"]);
3446
+ };
3447
+ }
3448
+ });
3449
+
3450
+ const EpLink = withInstall(_sfc_main);
3299
3451
 
3300
3452
  var components = [
3301
3453
  EpButtons,
@@ -3307,10 +3459,11 @@
3307
3459
  EpTitle,
3308
3460
  EpHeader,
3309
3461
  EpDatePickerRange,
3310
- EpCustomColumn
3462
+ EpCustomColumn,
3463
+ EpLink
3311
3464
  ];
3312
3465
 
3313
- var version = "0.0.18";
3466
+ var version = "0.0.19";
3314
3467
 
3315
3468
  var globalProperties = {
3316
3469
  install(app) {
@@ -3323,7 +3476,7 @@
3323
3476
  globalProperties: globalProperties
3324
3477
  });
3325
3478
 
3326
- const bem$1 = createNameSpace("choose-dialog");
3479
+ const bem = createNameSpace("choose-dialog");
3327
3480
  const useChooseDialog = (options = {}) => {
3328
3481
  const {
3329
3482
  t
@@ -3340,12 +3493,12 @@
3340
3493
  if (!showSingleSelectionCol) {
3341
3494
  scopedSlots.footerPrepend = () => {
3342
3495
  return vue.createVNode("span", {
3343
- "class": bem$1.e("selected-count")
3496
+ "class": bem.e("selected-count")
3344
3497
  }, [t("ep.chooseDialog.selected"), selections.length, t("ep.chooseDialog.unit")]);
3345
3498
  };
3346
3499
  }
3347
3500
  return useDialog({
3348
- class: bem$1.b(),
3501
+ class: bem.b(),
3349
3502
  width: "80%",
3350
3503
  showFooter: !showSingleSelectionCol,
3351
3504
  scopedSlots,
@@ -3382,38 +3535,6 @@
3382
3535
  });
3383
3536
  };
3384
3537
 
3385
- const bem = createNameSpace("form-dialog");
3386
- const useFormDialog = (options = {}) => {
3387
- const {
3388
- dialogProps,
3389
- title,
3390
- ...formProps
3391
- } = options;
3392
- const formRef = vue.ref();
3393
- let formData = formProps.formData || vue.reactive({});
3394
- return useDialog({
3395
- class: bem.b(),
3396
- width: "80%",
3397
- title,
3398
- render: (props) => {
3399
- return vue.createVNode(EpForm, vue.mergeProps({
3400
- "ref": formRef,
3401
- "modelValue": formData,
3402
- "onUpdate:modelValue": ($event) => formData = $event
3403
- }, {
3404
- col: 1,
3405
- "label-width": "auto",
3406
- ...formProps
3407
- }), null);
3408
- },
3409
- onConfirm: async (resolve) => {
3410
- await formRef.value.validate();
3411
- resolve(formData);
3412
- },
3413
- ...dialogProps
3414
- });
3415
- };
3416
-
3417
3538
  const useNavigation = () => {
3418
3539
  const router = vueRouter.useRouter();
3419
3540
  const $goto = (r) => {
@@ -3497,6 +3618,7 @@
3497
3618
  exports.EpFormItem = EpFormItem;
3498
3619
  exports.EpHeader = EpHeader;
3499
3620
  exports.EpInput = EpInput;
3621
+ exports.EpLink = EpLink;
3500
3622
  exports.EpSearchListPage = EpSearchListPage;
3501
3623
  exports.EpSelect = EpSelect;
3502
3624
  exports.EpTable = EpTable;
@@ -3522,6 +3644,7 @@
3522
3644
  exports.inputEmitsKeys = inputEmitsKeys;
3523
3645
  exports.inputProps = inputProps;
3524
3646
  exports.install = install;
3647
+ exports.linkProps = linkProps;
3525
3648
  exports.searchListPageProps = searchListPageProps;
3526
3649
  exports.selectEmits = selectEmits;
3527
3650
  exports.selectEmitsKeys = selectEmitsKeys;