el-plus 0.0.38 → 0.0.40

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 (95) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +206 -30
  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 +203 -28
  9. package/es/components/index.d.ts +1 -0
  10. package/es/components/index.mjs +2 -0
  11. package/es/components/index.mjs.map +1 -1
  12. package/es/components/search-list-page/index.d.ts +12 -12
  13. package/es/components/search-list-page/src/search-list-page.d.ts +1 -1
  14. package/es/components/search-list-page/src/search-list-page.vue.d.ts +5 -5
  15. package/es/components/search-list-page/src/use-search-list-page.d.ts +3 -3
  16. package/es/components/search-list-page/src/use-search-list-page.mjs +4 -1
  17. package/es/components/search-list-page/src/use-search-list-page.mjs.map +1 -1
  18. package/es/components/select/index.d.ts +3 -3
  19. package/es/components/select/src/select.d.ts +1 -1
  20. package/es/components/select/src/select.vue.d.ts +2 -2
  21. package/es/components/table/index.d.ts +3 -3
  22. package/es/components/table/src/table.d.ts +1 -1
  23. package/es/components/table/src/table.vue.d.ts +2 -2
  24. package/es/components/uni-vue/index.d.ts +24 -0
  25. package/es/components/uni-vue/index.mjs +8 -0
  26. package/es/components/uni-vue/index.mjs.map +1 -0
  27. package/es/components/uni-vue/src/uni-vue.d.ts +7 -0
  28. package/es/components/uni-vue/src/uni-vue.mjs +10 -0
  29. package/es/components/uni-vue/src/uni-vue.mjs.map +1 -0
  30. package/es/components/uni-vue/src/uni-vue.vue.d.ts +9 -0
  31. package/es/components/uni-vue/src/uni-vue.vue.mjs +6 -0
  32. package/es/components/uni-vue/src/uni-vue.vue.mjs.map +1 -0
  33. package/es/components/uni-vue/src/uni-vue.vue2.mjs +40 -0
  34. package/es/components/uni-vue/src/uni-vue.vue2.mjs.map +1 -0
  35. package/es/components/uni-vue/src/use-uni-vue.d.ts +3 -0
  36. package/es/components/uni-vue/src/use-uni-vue.mjs +138 -0
  37. package/es/components/uni-vue/src/use-uni-vue.mjs.map +1 -0
  38. package/es/components/uni-vue/style/css.d.ts +2 -0
  39. package/es/components/uni-vue/style/css.mjs +5 -0
  40. package/es/components/uni-vue/style/css.mjs.map +1 -0
  41. package/es/components/uni-vue/style/index.d.ts +2 -0
  42. package/es/components/uni-vue/style/index.mjs +5 -0
  43. package/es/components/uni-vue/style/index.mjs.map +1 -0
  44. package/es/components.mjs +3 -1
  45. package/es/components.mjs.map +1 -1
  46. package/es/index.mjs +2 -0
  47. package/es/index.mjs.map +1 -1
  48. package/es/package.json.mjs +1 -1
  49. package/es/types/global.d.ts +5 -0
  50. package/lib/components/index.d.ts +1 -0
  51. package/lib/components/index.js +5 -0
  52. package/lib/components/index.js.map +1 -1
  53. package/lib/components/search-list-page/index.d.ts +12 -12
  54. package/lib/components/search-list-page/src/search-list-page.d.ts +1 -1
  55. package/lib/components/search-list-page/src/search-list-page.vue.d.ts +5 -5
  56. package/lib/components/search-list-page/src/use-search-list-page.d.ts +3 -3
  57. package/lib/components/search-list-page/src/use-search-list-page.js +4 -1
  58. package/lib/components/search-list-page/src/use-search-list-page.js.map +1 -1
  59. package/lib/components/select/index.d.ts +3 -3
  60. package/lib/components/select/src/select.d.ts +1 -1
  61. package/lib/components/select/src/select.vue.d.ts +2 -2
  62. package/lib/components/table/index.d.ts +3 -3
  63. package/lib/components/table/src/table.d.ts +1 -1
  64. package/lib/components/table/src/table.vue.d.ts +2 -2
  65. package/lib/components/uni-vue/index.d.ts +24 -0
  66. package/lib/components/uni-vue/index.js +15 -0
  67. package/lib/components/uni-vue/index.js.map +1 -0
  68. package/lib/components/uni-vue/src/uni-vue.d.ts +7 -0
  69. package/lib/components/uni-vue/src/uni-vue.js +13 -0
  70. package/lib/components/uni-vue/src/uni-vue.js.map +1 -0
  71. package/lib/components/uni-vue/src/uni-vue.vue.d.ts +9 -0
  72. package/lib/components/uni-vue/src/uni-vue.vue.js +10 -0
  73. package/lib/components/uni-vue/src/uni-vue.vue.js.map +1 -0
  74. package/lib/components/uni-vue/src/uni-vue.vue2.js +44 -0
  75. package/lib/components/uni-vue/src/uni-vue.vue2.js.map +1 -0
  76. package/lib/components/uni-vue/src/use-uni-vue.d.ts +3 -0
  77. package/lib/components/uni-vue/src/use-uni-vue.js +140 -0
  78. package/lib/components/uni-vue/src/use-uni-vue.js.map +1 -0
  79. package/lib/components/uni-vue/style/css.d.ts +2 -0
  80. package/lib/components/uni-vue/style/css.js +7 -0
  81. package/lib/components/uni-vue/style/css.js.map +1 -0
  82. package/lib/components/uni-vue/style/index.d.ts +2 -0
  83. package/lib/components/uni-vue/style/index.js +7 -0
  84. package/lib/components/uni-vue/style/index.js.map +1 -0
  85. package/lib/components.js +3 -1
  86. package/lib/components.js.map +1 -1
  87. package/lib/index.js +11 -6
  88. package/lib/index.js.map +1 -1
  89. package/lib/package.json.js +1 -1
  90. package/lib/types/global.d.ts +5 -0
  91. package/package.json +1 -1
  92. package/theme-chalk/index.css +1 -1
  93. package/theme-chalk/src/index.scss +2 -1
  94. package/theme-chalk/src/uni-vue.scss +11 -0
  95. package/theme-chalk/uni-vue.css +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # el-plus
2
2
 
3
+ ## 0.0.40
4
+
5
+ ### Patch Changes
6
+
7
+ - univue
8
+
9
+ ## 0.0.39
10
+
11
+ ### Patch Changes
12
+
13
+ - 2
14
+
3
15
  ## 0.0.38
4
16
 
5
17
  ### 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}body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}.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-textarea__inner{font-size:13px!important}.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 .ep-title__toggle .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;margin-bottom:10px}.ep-header .el-page-header .el-page-header__left{margin-right:-10px;margin-top:4px}.ep-template-promise{position:relative;z-index:8888888888888888}.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
+ .fade-enter-active,.fade-leave-active{transition:opacity .3s ease}.fade-enter-from,.fade-leave-to{opacity:0}body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}.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-textarea__inner{font-size:13px!important}.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 .ep-title__toggle .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;margin-bottom:10px}.ep-header .el-page-header .el-page-header__left{margin-right:-10px;margin-top:4px}.ep-template-promise{position:relative;z-index:8888888888888888}.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}.ep-uni-vue{background:#fff}.ep-uni-vue__skeleton .el-skeleton__item{margin-top:10px}
@@ -1,10 +1,10 @@
1
- /*! ElPlus v0.0.38 */
1
+ /*! ElPlus v0.0.40 */
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('lodash-unified'), require('@vueuse/core'), require('vue-router'), require('js-base64')) :
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', 'js-base64'], 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, global.jsBase64));
7
- })(this, (function (exports, vue, elementPlus, shared, axios, Cookies, defu, qs, elTableProps, iconsVue, mitt, lodashUnified, core, vueRouter, jsBase64) { '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'), require('js-base64'), require('vue2/dist/vue.min.js'), require('vue-router3')) :
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', 'js-base64', 'vue2/dist/vue.min.js', 'vue-router3'], 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, global.jsBase64, global.Vue2, global.VueRouter3));
7
+ })(this, (function (exports, vue, elementPlus, shared, axios, Cookies, defu, qs, elTableProps, iconsVue, mitt, lodashUnified, core, vueRouter, jsBase64, Vue2, VueRouter3) { 'use strict';
8
8
 
9
9
  function _interopNamespaceDefault(e) {
10
10
  var n = Object.create(null);
@@ -1053,7 +1053,7 @@
1053
1053
  }
1054
1054
  });
1055
1055
 
1056
- var _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
1056
+ var _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
1057
1057
  ...{
1058
1058
  name: "EpForm",
1059
1059
  inheritAttrs: false
@@ -1151,7 +1151,7 @@
1151
1151
  }
1152
1152
  });
1153
1153
 
1154
- const EpForm = withInstall(_sfc_main$a);
1154
+ const EpForm = withInstall(_sfc_main$b);
1155
1155
 
1156
1156
  const { t: t$2 } = useLocale();
1157
1157
  const inputProps = {
@@ -1180,7 +1180,7 @@
1180
1180
  };
1181
1181
  const inputEmitsKeys = Object.keys(inputEmits);
1182
1182
 
1183
- var _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
1183
+ var _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
1184
1184
  ...{
1185
1185
  name: "EpInput",
1186
1186
  inheritAttrs: false
@@ -1314,7 +1314,7 @@
1314
1314
  }
1315
1315
  });
1316
1316
 
1317
- const EpInput = withInstall(_sfc_main$9);
1317
+ const EpInput = withInstall(_sfc_main$a);
1318
1318
 
1319
1319
  function _isSlot$1(s) {
1320
1320
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
@@ -1654,7 +1654,7 @@
1654
1654
  }
1655
1655
  };
1656
1656
 
1657
- var _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
1657
+ var _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
1658
1658
  ...{
1659
1659
  name: "EpCustomColumn",
1660
1660
  inheritAttrs: false
@@ -1860,7 +1860,7 @@
1860
1860
  }
1861
1861
  });
1862
1862
 
1863
- const EpCustomColumn = withInstall(_sfc_main$8);
1863
+ const EpCustomColumn = withInstall(_sfc_main$9);
1864
1864
 
1865
1865
  const inheritTableProps = {
1866
1866
  ...elTableProps,
@@ -2320,7 +2320,7 @@
2320
2320
  };
2321
2321
  };
2322
2322
 
2323
- var _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
2323
+ var _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
2324
2324
  ...{
2325
2325
  name: "EpTable",
2326
2326
  inheritAttrs: false
@@ -2505,7 +2505,7 @@
2505
2505
  }
2506
2506
  });
2507
2507
 
2508
- const EpTable = withInstall(_sfc_main$7);
2508
+ const EpTable = withInstall(_sfc_main$8);
2509
2509
 
2510
2510
  const searchListPageProps = {
2511
2511
  ...apiProps,
@@ -2628,7 +2628,10 @@
2628
2628
  if (tableProps.value.showPagination) {
2629
2629
  paginationHeight = document.querySelector(".el-pagination").offsetHeight + 12;
2630
2630
  }
2631
- const frameDistance = getEnv() ? 82 + 40 : 40;
2631
+ const frameDistance = getEnv() ? (
2632
+ // 82
2633
+ 48 + 40
2634
+ ) : 40;
2632
2635
  tableHeight.value = window.innerHeight - topHeight - middleHeight - paginationHeight - frameDistance - props.offsetTop;
2633
2636
  }, 0);
2634
2637
  };
@@ -2756,7 +2759,7 @@
2756
2759
  };
2757
2760
  };
2758
2761
 
2759
- var _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
2762
+ var _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
2760
2763
  ...{ name: "EpSearchListPage" },
2761
2764
  __name: "search-list-page",
2762
2765
  props: searchListPageProps,
@@ -2809,7 +2812,7 @@
2809
2812
  }
2810
2813
  });
2811
2814
 
2812
- const EpSearchListPage = withInstall(_sfc_main$6);
2815
+ const EpSearchListPage = withInstall(_sfc_main$7);
2813
2816
 
2814
2817
  const inheritSelectProps = {
2815
2818
  ...elementPlus.selectProps,
@@ -2935,7 +2938,7 @@
2935
2938
  };
2936
2939
  }
2937
2940
 
2938
- var _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
2941
+ var _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
2939
2942
  ...{
2940
2943
  name: "EpSelect",
2941
2944
  inheritAttrs: false
@@ -3023,7 +3026,7 @@
3023
3026
  }
3024
3027
  });
3025
3028
 
3026
- const EpSelect = withInstall(_sfc_main$5);
3029
+ const EpSelect = withInstall(_sfc_main$6);
3027
3030
 
3028
3031
  const titleProps = {
3029
3032
  // 右侧按钮
@@ -3082,7 +3085,7 @@
3082
3085
  };
3083
3086
  };
3084
3087
 
3085
- var _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
3088
+ var _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
3086
3089
  ...{
3087
3090
  name: "EpTitle",
3088
3091
  inheritAttrs: false
@@ -3146,7 +3149,7 @@
3146
3149
  }
3147
3150
  });
3148
3151
 
3149
- const EpTitle = withInstall(_sfc_main$4);
3152
+ const EpTitle = withInstall(_sfc_main$5);
3150
3153
 
3151
3154
  const headerProps = {
3152
3155
  // 页面模式
@@ -3327,7 +3330,7 @@
3327
3330
  };
3328
3331
  };
3329
3332
 
3330
- var _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
3333
+ var _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
3331
3334
  ...{
3332
3335
  name: "EpHeader",
3333
3336
  inheritAttrs: false
@@ -3360,7 +3363,7 @@
3360
3363
  }
3361
3364
  });
3362
3365
 
3363
- const EpHeader = withInstall(_sfc_main$3);
3366
+ const EpHeader = withInstall(_sfc_main$4);
3364
3367
 
3365
3368
  const { t } = useLocale();
3366
3369
  const datePickerRangeProps = {
@@ -3430,7 +3433,7 @@
3430
3433
  };
3431
3434
  const datePickerRangeEmits = {};
3432
3435
 
3433
- var _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
3436
+ var _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
3434
3437
  ...{
3435
3438
  name: "EpDatePickerRange",
3436
3439
  inheritAttrs: false
@@ -3486,7 +3489,7 @@
3486
3489
  }
3487
3490
  });
3488
3491
 
3489
- const EpDatePickerRange = withInstall(_sfc_main$2);
3492
+ const EpDatePickerRange = withInstall(_sfc_main$3);
3490
3493
 
3491
3494
  const linkProps = {
3492
3495
  ...elementPlus.linkProps,
@@ -3503,7 +3506,7 @@
3503
3506
  }
3504
3507
  };
3505
3508
 
3506
- var _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3509
+ var _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
3507
3510
  ...{
3508
3511
  name: "EpLink",
3509
3512
  inheritAttrs: false
@@ -3548,7 +3551,7 @@
3548
3551
  }
3549
3552
  });
3550
3553
 
3551
- const EpLink = withInstall(_sfc_main$1);
3554
+ const EpLink = withInstall(_sfc_main$2);
3552
3555
 
3553
3556
  const attachmentProps = {
3554
3557
  // 格式化列
@@ -3722,7 +3725,7 @@
3722
3725
  };
3723
3726
  };
3724
3727
 
3725
- var _sfc_main = /* @__PURE__ */ vue.defineComponent({
3728
+ var _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3726
3729
  ...{
3727
3730
  name: "EpAttachment",
3728
3731
  inheritAttrs: false
@@ -3777,7 +3780,176 @@
3777
3780
  }
3778
3781
  });
3779
3782
 
3780
- const EpAttachment = withInstall(_sfc_main);
3783
+ const EpAttachment = withInstall(_sfc_main$1);
3784
+
3785
+ const componentType = ["bpm", "address"];
3786
+ const uniVueProps = {
3787
+ name: String,
3788
+ // 组件名字
3789
+ type: String
3790
+ // 组件类型 bpm、 address
3791
+ };
3792
+
3793
+ const useUniVue = (props) => {
3794
+ const uniVue = vue.useTemplateRef("uniVue");
3795
+ const { type } = props;
3796
+ const loading = vue.ref(true);
3797
+ const isAddress = type === "address";
3798
+ const isBpm = type === "bpm";
3799
+ const isLoadStatic = componentType.indexOf(type) > -1;
3800
+ const attrs = vue.useAttrs();
3801
+ const setupWindow = () => {
3802
+ Vue2.use(VueRouter3);
3803
+ if (!window.Vue) {
3804
+ window.Vue = Vue2;
3805
+ }
3806
+ if (isAddress) {
3807
+ if (!window.axios) {
3808
+ window.axios = axios;
3809
+ }
3810
+ if (!window.ElementUI) {
3811
+ window.ElementUI = {
3812
+ Message: elementPlus.ElMessage,
3813
+ Loading: elementPlus.ElLoading
3814
+ };
3815
+ }
3816
+ }
3817
+ };
3818
+ setupWindow();
3819
+ const prepareVueAttributes = () => {
3820
+ const events = {};
3821
+ const _props = {};
3822
+ Object.keys(attrs).forEach((key) => {
3823
+ if (key.startsWith("on")) {
3824
+ let eventName = key.slice(2);
3825
+ eventName = eventName.replace(/([A-Z])/g, "-$1").toLowerCase();
3826
+ eventName = eventName.slice(1);
3827
+ events[eventName] = attrs[key];
3828
+ } else {
3829
+ _props[key] = attrs[key];
3830
+ }
3831
+ });
3832
+ return {
3833
+ on: events,
3834
+ props: _props
3835
+ };
3836
+ };
3837
+ const cdn = "//j01.hongxinshop.com/";
3838
+ const getStaticJsUrl = () => {
3839
+ switch (type) {
3840
+ case "bpm":
3841
+ return `${cdn}bpm-common/common/index.umd.min.js`;
3842
+ case "address":
3843
+ return `${cdn}address/static/hx-address-full.js`;
3844
+ default:
3845
+ return "";
3846
+ }
3847
+ };
3848
+ const getStaticCssUrl = () => {
3849
+ switch (type) {
3850
+ case "bpm":
3851
+ return `/bpm-common/common/index.css`;
3852
+ case "address":
3853
+ return `/address/static/hx-address.css`;
3854
+ default:
3855
+ return "";
3856
+ }
3857
+ };
3858
+ const hasLoadStaticJsResource = () => {
3859
+ let globalName;
3860
+ if (isAddress) {
3861
+ globalName = "hxAddress";
3862
+ }
3863
+ if (isBpm) {
3864
+ globalName = "index";
3865
+ }
3866
+ if (window[globalName]) return true;
3867
+ return false;
3868
+ };
3869
+ const loadStaticJsResource = async () => {
3870
+ return new Promise((resolve, reject) => {
3871
+ if (hasLoadStaticJsResource()) return resolve("");
3872
+ const script = document.createElement("script");
3873
+ script.src = getStaticJsUrl();
3874
+ script.onload = resolve;
3875
+ script.onerror = reject;
3876
+ document.body.appendChild(script);
3877
+ });
3878
+ };
3879
+ const loadStaticCssResource = async () => {
3880
+ const { data: css } = await http.request(getStaticCssUrl(), {
3881
+ responseReturn: "raw"
3882
+ });
3883
+ return css;
3884
+ };
3885
+ const setupInstance = async () => {
3886
+ if (undefined) return;
3887
+ const el = uniVue.value;
3888
+ const shadowRoot = el.attachShadow({ mode: "open" });
3889
+ const container = document.createElement("div");
3890
+ if (isLoadStatic) {
3891
+ try {
3892
+ loading.value = true;
3893
+ const [_res1, css] = await Promise.all([
3894
+ loadStaticJsResource(),
3895
+ loadStaticCssResource()
3896
+ ]);
3897
+ const style = document.createElement("style");
3898
+ style.textContent = css;
3899
+ shadowRoot.appendChild(style);
3900
+ } catch (error) {
3901
+ console.log(error);
3902
+ } finally {
3903
+ loading.value = false;
3904
+ }
3905
+ }
3906
+ shadowRoot.appendChild(container);
3907
+ new Vue2({
3908
+ el: container,
3909
+ router: new VueRouter3(),
3910
+ render: (h) => h(props.name, prepareVueAttributes())
3911
+ });
3912
+ };
3913
+ vue.onMounted(() => {
3914
+ setupInstance();
3915
+ });
3916
+ return {
3917
+ loading
3918
+ };
3919
+ };
3920
+
3921
+ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
3922
+ ...{
3923
+ name: "EpUniVue",
3924
+ inheritAttrs: false
3925
+ },
3926
+ __name: "uni-vue",
3927
+ props: uniVueProps,
3928
+ setup(__props) {
3929
+ const bem = createNameSpace("uni-vue");
3930
+ const props = __props;
3931
+ const { loading } = useUniVue(props);
3932
+ return (_ctx, _cache) => {
3933
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3934
+ vue.createVNode(vue.unref(elementPlus.ElSkeleton), {
3935
+ class: vue.normalizeClass(vue.unref(bem).e("skeleton")),
3936
+ loading: vue.unref(loading),
3937
+ style: { "background": "#fff", "padding": "5px 15px" },
3938
+ rows: 1
3939
+ }, null, 8, ["class", "loading"]),
3940
+ vue.createElementVNode("div", {
3941
+ ref: "uniVue",
3942
+ class: vue.normalizeClass(`${vue.unref(bem).b()} ${vue.unref(prepareClassNames)()}`),
3943
+ style: vue.normalizeStyle({
3944
+ ...vue.unref(prepareStyles)()
3945
+ })
3946
+ }, null, 6)
3947
+ ], 64);
3948
+ };
3949
+ }
3950
+ });
3951
+
3952
+ const EpUniVue = withInstall(_sfc_main);
3781
3953
 
3782
3954
  var components = [
3783
3955
  EpButtons,
@@ -3791,10 +3963,11 @@
3791
3963
  EpDatePickerRange,
3792
3964
  EpCustomColumn,
3793
3965
  EpLink,
3794
- EpAttachment
3966
+ EpAttachment,
3967
+ EpUniVue
3795
3968
  ];
3796
3969
 
3797
- var version = "0.0.38";
3970
+ var version = "0.0.40";
3798
3971
 
3799
3972
  var globalProperties = {
3800
3973
  install(app) {
@@ -3891,8 +4064,10 @@
3891
4064
  exports.EpSelect = EpSelect;
3892
4065
  exports.EpTable = EpTable;
3893
4066
  exports.EpTitle = EpTitle;
4067
+ exports.EpUniVue = EpUniVue;
3894
4068
  exports.attachmentProps = attachmentProps;
3895
4069
  exports.buttonsProps = buttonsProps;
4070
+ exports.componentType = componentType;
3896
4071
  exports.customColumnEmits = customColumnEmits;
3897
4072
  exports.customColumnProps = customColumnProps;
3898
4073
  exports.datePickerRangeEmits = datePickerRangeEmits;
@@ -3923,6 +4098,7 @@
3923
4098
  exports.tableProps = tableProps;
3924
4099
  exports.titleEmits = titleEmits;
3925
4100
  exports.titleProps = titleProps;
4101
+ exports.uniVueProps = uniVueProps;
3926
4102
  exports.useChooseDialog = useChooseDialog;
3927
4103
  exports.useDialog = useDialog;
3928
4104
  exports.useFormDialog = useFormDialog;