@web-utils/component 1.2.4 → 1.2.6

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 (111) hide show
  1. package/README.md +27 -27
  2. package/dist/chunks/163eed3b.js +16 -1
  3. package/dist/chunks/2bd4e340.js +184 -0
  4. package/dist/chunks/6499de3a.js +30 -1
  5. package/dist/chunks/7af3ceb1.js +75 -0
  6. package/dist/chunks/86bcadec.js +24 -0
  7. package/dist/chunks/8bbde9bf.js +81 -1
  8. package/dist/chunks/90bd3d52.js +26 -1
  9. package/dist/chunks/92404ceb.js +126 -0
  10. package/dist/chunks/a73fe8ee.js +11 -0
  11. package/dist/chunks/df803484.js +60 -0
  12. package/dist/components/address-input/index.js +113 -1
  13. package/dist/components/aside-menu/index.js +58 -1
  14. package/dist/components/awesome-button/index.js +82 -1
  15. package/dist/components/capsule-tab/index.js +52 -1
  16. package/dist/components/chunk-file-uploader/index.js +119 -1
  17. package/dist/components/chunk-file-uploader-button/index.js +60 -1
  18. package/dist/components/chunk-file-uploader-drop/index.js +65 -1
  19. package/dist/components/chunk-file-uploader-file/index.js +311 -1
  20. package/dist/components/chunk-file-uploader-files/index.js +49 -1
  21. package/dist/components/chunk-file-uploader-list/index.js +50 -1
  22. package/dist/components/chunk-file-uploader-un-support/index.js +51 -1
  23. package/dist/components/code-mirror-editor/index.js +310 -6
  24. package/dist/components/color-picker/index.js +110 -1
  25. package/dist/components/confirm-button/index.js +57 -1
  26. package/dist/components/confirmable/index.js +28 -1
  27. package/dist/components/context-menu/index.js +236 -1
  28. package/dist/components/custom-scrollbar/index.js +150 -1
  29. package/dist/components/data-table-picker/index.js +137 -1
  30. package/dist/components/dynamic-table/index.js +195 -1
  31. package/dist/components/e-charts/index.js +229 -1
  32. package/dist/components/editable-progress/index.js +141 -1
  33. package/dist/components/editable-tree/index.js +789 -1
  34. package/dist/components/egd-collapse/index.js +79 -1
  35. package/dist/components/egd-collapse-item/index.js +132 -1
  36. package/dist/components/el-color-picker-dropdown/index.js +170 -1
  37. package/dist/components/element-dialog/index.js +242 -1
  38. package/dist/components/empty-view/index.js +69 -1
  39. package/dist/components/error-view/index.js +61 -1
  40. package/dist/components/flex-column/index.js +50 -1
  41. package/dist/components/flex-item/index.js +66 -1
  42. package/dist/components/flex-row/index.js +50 -1
  43. package/dist/components/flex-scroller/index.js +47 -1
  44. package/dist/components/form-button/index.js +80 -1
  45. package/dist/components/form-cascader/index.js +151 -1
  46. package/dist/components/form-checkbox-group/index.js +192 -1
  47. package/dist/components/form-date-picker/index.js +182 -1
  48. package/dist/components/form-holder/index.js +90 -1
  49. package/dist/components/form-input/index.js +106 -1
  50. package/dist/components/form-input-email/index.js +97 -1
  51. package/dist/components/form-input-id-card/index.js +104 -1
  52. package/dist/components/form-input-number/index.js +123 -1
  53. package/dist/components/form-input-phone-number/index.js +98 -1
  54. package/dist/components/form-input-time/index.js +124 -1
  55. package/dist/components/form-item/index.js +120 -1
  56. package/dist/components/form-item-config-provider/index.js +63 -1
  57. package/dist/components/form-item-group/index.js +169 -1
  58. package/dist/components/form-radio-group/index.js +170 -1
  59. package/dist/components/form-select/index.js +154 -1
  60. package/dist/components/form-switch/index.js +97 -1
  61. package/dist/components/form-textarea/index.js +102 -1
  62. package/dist/components/form-view/index.js +343 -1
  63. package/dist/components/guide-steps/index.js +94 -1
  64. package/dist/components/icon-card/index.js +62 -1
  65. package/dist/components/iframe-window/index.js +99 -1
  66. package/dist/components/input-number/index.js +274 -1
  67. package/dist/components/input-number-range/index.js +110 -1
  68. package/dist/components/j-s-x-component/index.js +16 -1
  69. package/dist/components/keep-view-alive/index.js +119 -1
  70. package/dist/components/loading-view/index.js +61 -1
  71. package/dist/components/nav-bar/index.js +52 -1
  72. package/dist/components/not-implement/index.js +35 -1
  73. package/dist/components/page/index.js +40 -1
  74. package/dist/components/page-header/index.js +56 -1
  75. package/dist/components/page-index/index.js +151 -1
  76. package/dist/components/page-index-top/index.js +119 -1
  77. package/dist/components/page-skeleton/index.js +56 -1
  78. package/dist/components/page-skeleton-new/index.js +98 -1
  79. package/dist/components/pageable-table/index.js +429 -1
  80. package/dist/components/pageable-view/index.js +328 -2
  81. package/dist/components/photo-swipe/index.js +187 -1
  82. package/dist/components/resize-observer/index.js +62 -1
  83. package/dist/components/search-popover/index.js +391 -2
  84. package/dist/components/sign-panel/index.js +242 -1
  85. package/dist/components/split-pane/index.js +209 -1
  86. package/dist/components/stateful/index.js +84 -1
  87. package/dist/components/static-pageable-table/index.js +92 -1
  88. package/dist/components/swiper/index.js +158 -1
  89. package/dist/components/tab/index.js +145 -1
  90. package/dist/components/tab-item/index.js +73 -1
  91. package/dist/components/table-column/index.js +89 -1
  92. package/dist/components/table-view/index.js +363 -1
  93. package/dist/components/tag-render/index.js +97 -1
  94. package/dist/components/tinymce-editor/index.js +173 -1
  95. package/dist/components/tinymce-wrapper/index.js +618 -1
  96. package/dist/components/toolbar/index.js +217 -1
  97. package/dist/components/toolbar-button/index.js +90 -1
  98. package/dist/components/trigger/index.js +71 -1
  99. package/dist/components/vue-tags-input/index.js +439 -1
  100. package/dist/components/watermark/index.js +63 -1
  101. package/dist/components/x-dialog/index.js +173 -1
  102. package/dist/index.css +2102 -1
  103. package/dist/index.es.js +2995 -2078
  104. package/package.json +29 -29
  105. package/web-types.json +22 -16
  106. package/dist/chunks/23bd3525.js +0 -1
  107. package/dist/chunks/65f4f4f2.js +0 -1
  108. package/dist/chunks/8473fc69.js +0 -1
  109. package/dist/chunks/addb6ed5.js +0 -1
  110. package/dist/chunks/b8305633.js +0 -1
  111. package/dist/chunks/e8547f66.js +0 -1
@@ -1 +1,61 @@
1
- import{n as o}from"../../chunks/6499de3a.js";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"loading-view",style:{fontSize:e.fontSize,height:e.height}},[e._t("default",function(){return[n("div",{staticClass:"flex-column horizon-center"},[n("i",{staticClass:"el-icon-loading",style:{fontSize:e.iconSize}}),n("p",[e._v(e._s(e.loadingTips))])])]})],2)},l=[];const r={name:"LoadingView",props:{loadingTips:{type:String,default:"\u52A0\u8F7D\u4E2D..."},fontSize:{type:String,default:"20px"},iconSize:{type:String,default:"20px"},height:{type:String,default:"100%"}}},i={};var s=o(r,a,l,!1,c,null,null,null);function c(e){for(let t in i)this[t]=i[t]}var _=function(){return s.exports}();export{_ as default};
1
+ import { n as o } from "../../chunks/6499de3a.js";
2
+ var s = function() {
3
+ var t = this, e = t.$createElement, n = t._self._c || e;
4
+ return n("div", {
5
+ staticClass: "loading-view",
6
+ style: {
7
+ fontSize: t.fontSize,
8
+ height: t.height
9
+ }
10
+ }, [t._t("default", function() {
11
+ return [n("div", {
12
+ staticClass: "flex-column horizon-center"
13
+ }, [n("i", {
14
+ staticClass: "el-icon-loading",
15
+ style: {
16
+ fontSize: t.iconSize
17
+ }
18
+ }), n("p", [t._v(t._s(t.loadingTips))])])];
19
+ })], 2);
20
+ }, a = [];
21
+ const l = {
22
+ name: "LoadingView",
23
+ props: {
24
+ loadingTips: {
25
+ type: String,
26
+ default: "\u52A0\u8F7D\u4E2D..."
27
+ },
28
+ fontSize: {
29
+ type: String,
30
+ default: "20px"
31
+ },
32
+ iconSize: {
33
+ type: String,
34
+ default: "20px"
35
+ },
36
+ height: {
37
+ type: String,
38
+ default: "100%"
39
+ }
40
+ }
41
+ }, i = {};
42
+ var r = /* @__PURE__ */ o(
43
+ l,
44
+ s,
45
+ a,
46
+ !1,
47
+ _,
48
+ null,
49
+ null,
50
+ null
51
+ );
52
+ function _(t) {
53
+ for (let e in i)
54
+ this[e] = i[e];
55
+ }
56
+ const u = /* @__PURE__ */ function() {
57
+ return r.exports;
58
+ }();
59
+ export {
60
+ u as default
61
+ };
@@ -1 +1,52 @@
1
- import{n as o}from"../../chunks/6499de3a.js";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"nav-bar"},[t.showBack?a("ElButton",{attrs:{type:"text",icon:"el-icon-arrow-left"},on:{click:t.goBack}},[t._v(" \u8FD4\u56DE ")]):t._e(),t.$slots.right?a("div",{staticClass:"flex-1 flex-box-column vertical-center"},[t._t("right")],2):t._e()],1)},s=[];const l={name:"NavBar",props:{onGoBack:Function,showBack:{type:Boolean,default:!0}},methods:{goBack(){this.onGoBack?this.onGoBack():this.$router.back()}}},n={};var i=o(l,r,s,!1,c,null,null,null);function c(t){for(let e in n)this[e]=n[e]}var _=function(){return i.exports}();export{_ as default};
1
+ import { n as a } from "../../chunks/6499de3a.js";
2
+ var r = function() {
3
+ var t = this, e = t.$createElement, n = t._self._c || e;
4
+ return n("div", {
5
+ staticClass: "nav-bar"
6
+ }, [t.showBack ? n("ElButton", {
7
+ attrs: {
8
+ type: "text",
9
+ icon: "el-icon-arrow-left"
10
+ },
11
+ on: {
12
+ click: t.goBack
13
+ }
14
+ }, [t._v(" \u8FD4\u56DE ")]) : t._e(), t.$slots.right ? n("div", {
15
+ staticClass: "flex-1 flex-box-column vertical-center"
16
+ }, [t._t("right")], 2) : t._e()], 1);
17
+ }, s = [];
18
+ const c = {
19
+ name: "NavBar",
20
+ props: {
21
+ onGoBack: Function,
22
+ showBack: {
23
+ type: Boolean,
24
+ default: !0
25
+ }
26
+ },
27
+ methods: {
28
+ goBack() {
29
+ this.onGoBack ? this.onGoBack() : this.$router.back();
30
+ }
31
+ }
32
+ }, o = {};
33
+ var l = /* @__PURE__ */ a(
34
+ c,
35
+ r,
36
+ s,
37
+ !1,
38
+ _,
39
+ null,
40
+ null,
41
+ null
42
+ );
43
+ function _(t) {
44
+ for (let e in o)
45
+ this[e] = o[e];
46
+ }
47
+ const u = /* @__PURE__ */ function() {
48
+ return l.exports;
49
+ }();
50
+ export {
51
+ u as default
52
+ };
@@ -1 +1,35 @@
1
- import{n as a}from"../../chunks/6499de3a.js";var l=function(){var e=this,t=e.$createElement;return e._self._c,e._m(0)},_=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"not-implement"},[n("div",[n("i",{staticClass:"fa fa-wrench"}),e._v(" \u5EFA\u8BBE\u4E2D... ")])])}];const s={name:"NotImplement"},r={};var i=a(s,l,_,!1,o,null,null,null);function o(e){for(let t in r)this[t]=r[t]}var c=function(){return i.exports}();export{c as default};
1
+ import { n as r } from "../../chunks/6499de3a.js";
2
+ var s = function() {
3
+ var e = this, t = e.$createElement;
4
+ return e._self._c, e._m(0);
5
+ }, o = [function() {
6
+ var e = this, t = e.$createElement, n = e._self._c || t;
7
+ return n("div", {
8
+ staticClass: "not-implement"
9
+ }, [n("div", [n("i", {
10
+ staticClass: "fa fa-wrench"
11
+ }), e._v(" \u5EFA\u8BBE\u4E2D... ")])]);
12
+ }];
13
+ const a = {
14
+ name: "NotImplement"
15
+ }, _ = {};
16
+ var l = /* @__PURE__ */ r(
17
+ a,
18
+ s,
19
+ o,
20
+ !1,
21
+ c,
22
+ null,
23
+ null,
24
+ null
25
+ );
26
+ function c(e) {
27
+ for (let t in _)
28
+ this[t] = _[t];
29
+ }
30
+ const m = /* @__PURE__ */ function() {
31
+ return l.exports;
32
+ }();
33
+ export {
34
+ m as default
35
+ };
@@ -1 +1,40 @@
1
- import{n as r}from"../../chunks/6499de3a.js";var l=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"page flex-box flex-1",class:{vertical:e.vertical&&!e.horizontal}},[e._t("default")],2)},o=[];const _={name:"Page",props:{vertical:{type:Boolean,default:!0},horizontal:Boolean}},a={};var c=r(_,l,o,!1,i,null,null,null);function i(e){for(let t in a)this[t]=a[t]}var s=function(){return c.exports}();export{s as default};
1
+ import { n as o } from "../../chunks/6499de3a.js";
2
+ var l = function() {
3
+ var e = this, t = e.$createElement, a = e._self._c || t;
4
+ return a("div", {
5
+ staticClass: "page flex-box flex-1",
6
+ class: {
7
+ vertical: e.vertical && !e.horizontal
8
+ }
9
+ }, [e._t("default")], 2);
10
+ }, r = [];
11
+ const s = {
12
+ name: "Page",
13
+ props: {
14
+ vertical: {
15
+ type: Boolean,
16
+ default: !0
17
+ },
18
+ horizontal: Boolean
19
+ }
20
+ }, n = {};
21
+ var _ = /* @__PURE__ */ o(
22
+ s,
23
+ l,
24
+ r,
25
+ !1,
26
+ c,
27
+ null,
28
+ null,
29
+ null
30
+ );
31
+ function c(e) {
32
+ for (let t in n)
33
+ this[t] = n[t];
34
+ }
35
+ const u = /* @__PURE__ */ function() {
36
+ return _.exports;
37
+ }();
38
+ export {
39
+ u as default
40
+ };
@@ -1 +1,56 @@
1
- import{n as l}from"../../chunks/6499de3a.js";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"egd-header flex-box egd-page-header"},[e._t("section-title",function(){return[n("span",{staticClass:"section-title"},[e._t("title",function(){return[e._v(e._s(e.title))]},{title:e.title})],2)]},{title:e.title}),n("div",{staticClass:"flex-box flex-1 vertical-center"},[n("div",{class:["flex-box","flex-1","vertical-center",{"align-end":e.alignEnd}]},[e._t("default")],2)])],2)},r=[];const s={name:"PageHeader",props:{title:{type:String,default:"\u6807\u9898"},alignEnd:{type:Boolean,default:!0}}},a={};var o=l(s,i,r,!1,_,null,null,null);function _(e){for(let t in a)this[t]=a[t]}var c=function(){return o.exports}();export{c as default};
1
+ import { n as a } from "../../chunks/6499de3a.js";
2
+ var i = function() {
3
+ var e = this, t = e.$createElement, n = e._self._c || t;
4
+ return n("div", {
5
+ staticClass: "egd-header flex-box egd-page-header"
6
+ }, [e._t("section-title", function() {
7
+ return [n("span", {
8
+ staticClass: "section-title"
9
+ }, [e._t("title", function() {
10
+ return [e._v(e._s(e.title))];
11
+ }, {
12
+ title: e.title
13
+ })], 2)];
14
+ }, {
15
+ title: e.title
16
+ }), n("div", {
17
+ staticClass: "flex-box flex-1 vertical-center"
18
+ }, [n("div", {
19
+ class: ["flex-box", "flex-1", "vertical-center", {
20
+ "align-end": e.alignEnd
21
+ }]
22
+ }, [e._t("default")], 2)])], 2);
23
+ }, r = [];
24
+ const s = {
25
+ name: "PageHeader",
26
+ props: {
27
+ title: {
28
+ type: String,
29
+ default: "\u6807\u9898"
30
+ },
31
+ alignEnd: {
32
+ type: Boolean,
33
+ default: !0
34
+ }
35
+ }
36
+ }, l = {};
37
+ var o = /* @__PURE__ */ a(
38
+ s,
39
+ i,
40
+ r,
41
+ !1,
42
+ _,
43
+ null,
44
+ null,
45
+ null
46
+ );
47
+ function _(e) {
48
+ for (let t in l)
49
+ this[t] = l[t];
50
+ }
51
+ const u = /* @__PURE__ */ function() {
52
+ return o.exports;
53
+ }();
54
+ export {
55
+ u as default
56
+ };
@@ -1 +1,151 @@
1
- import{treeToArray as d,findFirstMatchNode as n}from"@web-utils/core";import{n as o}from"../../chunks/6499de3a.js";var l=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"egd-container"},[t.aside?e("div",{staticClass:"egd-aside",style:{width:t.asideWidth}},[t._t("aside",function(){return[e("div",{staticClass:"egd-main"},[t._t("nav-top"),e("div",{staticClass:"egd-header"},[e("span",{staticClass:"section-title flex-not-shrink"},[t._v(t._s(t.sectionTitle))])]),t._t("menu",function(){return[e("ElTree",{ref:"menuTree",attrs:{data:t.menus,"default-expand-all":"",props:t.defaultProps,"highlight-current":"","empty-text":"\u8BF7\u914D\u7F6E\u83DC\u5355\uFF01","default-expanded-keys":t.currentTreeKey,"node-key":"key"},on:{"node-click":t.onNodeClick},scopedSlots:t._u([{key:"default",fn:function(s){var i=s.data,u=s.node;return[t._t("tree-node",function(){return[e("span",[e("i",{class:i.icon}),t._v(" "+t._s(i.label))])]},{data:i,node:u})]}}],null,!0)})]})],2)]})],2):t._e(),e("div",{staticClass:"page-index-content",style:{width:t.aside?`calc(100% - ${t.asideWidth})`:"100%"}},[t._t("default",function(){return[e("div",{staticClass:"page-index-content-empty"},[t._v(" "+t._s(t.tips)+" ")])]})],2)])},c=[];const h={name:"PageIndex",props:{menus:{type:Array,default:()=>[]},asideWidth:{type:String,default:"220px"},aside:{type:Boolean,default:!0},tips:{type:String,default:"\u8BF7\u6DFB\u52A0\u9875\u9762\u5185\u5BB9\uFF01"},sectionTitle:{type:String,default:"\u529F\u80FD\u5BFC\u822A"},schema:{type:String,default:""},currentTreeKey:{type:Array,default:()=>[]},defaultProps:{type:Object,default:()=>({})}},watch:{menus(){this.setCurrentKey(this.$route.path)}},mounted(){this.activeFirstMenu()},activated(){this.setCurrentKey(this.$route.path)},methods:{async activeFirstMenu(){if(d(this.menus).map(a=>a.path).filter(a=>a).includes(this.$route.path))await this.setCurrentKey(this.$route.path);else{const a=n(this.menus,e=>e.path);a&&(await this.$router.push({path:a.path,query:a.query}),await this.setCurrentKey(a.path))}},async onNodeClick(t){t.path&&t.path.indexOf("/")>-1&&await this.$router.push({path:t.path,query:t.query}),await this.setCurrentKey(t.key)},async setCurrentKey(t){await this.$nextTick(),this.$refs.menuTree&&this.$refs.menuTree.setCurrentKey(t)},async beforeRouteUpdate(t,a,e){if(t.path===this.schema){const s=n(this.menus,i=>i.path);s?(await e({path:s.path,query:s.query}),await this.setCurrentKey(s.path)):await e(!1)}else await e(),await this.setCurrentKey(this.$route.path)}}},r={};var p=o(h,l,c,!1,f,null,null,null);function f(t){for(let a in r)this[a]=r[a]}var y=function(){return p.exports}();export{y as default};
1
+ import { treeToArray as d, findFirstMatchNode as n } from "@web-utils/core";
2
+ import { n as o } from "../../chunks/6499de3a.js";
3
+ var l = function() {
4
+ var t = this, a = t.$createElement, e = t._self._c || a;
5
+ return e("div", {
6
+ staticClass: "egd-container"
7
+ }, [t.aside ? e("div", {
8
+ staticClass: "egd-aside",
9
+ style: {
10
+ width: t.asideWidth
11
+ }
12
+ }, [t._t("aside", function() {
13
+ return [e("div", {
14
+ staticClass: "egd-main"
15
+ }, [t._t("nav-top"), e("div", {
16
+ staticClass: "egd-header"
17
+ }, [e("span", {
18
+ staticClass: "section-title flex-not-shrink"
19
+ }, [t._v(t._s(t.sectionTitle))])]), t._t("menu", function() {
20
+ return [e("ElTree", {
21
+ ref: "menuTree",
22
+ attrs: {
23
+ data: t.menus,
24
+ "default-expand-all": "",
25
+ props: t.defaultProps,
26
+ "highlight-current": "",
27
+ "empty-text": "\u8BF7\u914D\u7F6E\u83DC\u5355\uFF01",
28
+ "default-expanded-keys": t.currentTreeKey,
29
+ "node-key": "key"
30
+ },
31
+ on: {
32
+ "node-click": t.onNodeClick
33
+ },
34
+ scopedSlots: t._u([{
35
+ key: "default",
36
+ fn: function(s) {
37
+ var i = s.data, u = s.node;
38
+ return [t._t("tree-node", function() {
39
+ return [e("span", [e("i", {
40
+ class: i.icon
41
+ }), t._v(" " + t._s(i.label))])];
42
+ }, {
43
+ data: i,
44
+ node: u
45
+ })];
46
+ }
47
+ }], null, !0)
48
+ })];
49
+ })], 2)];
50
+ })], 2) : t._e(), e("div", {
51
+ staticClass: "page-index-content",
52
+ style: {
53
+ width: t.aside ? `calc(100% - ${t.asideWidth})` : "100%"
54
+ }
55
+ }, [t._t("default", function() {
56
+ return [e("div", {
57
+ staticClass: "page-index-content-empty"
58
+ }, [t._v(" " + t._s(t.tips) + " ")])];
59
+ })], 2)]);
60
+ }, c = [];
61
+ const h = {
62
+ name: "PageIndex",
63
+ props: {
64
+ menus: {
65
+ type: Array,
66
+ default: () => []
67
+ },
68
+ asideWidth: {
69
+ type: String,
70
+ default: "220px"
71
+ },
72
+ aside: {
73
+ type: Boolean,
74
+ default: !0
75
+ },
76
+ tips: {
77
+ type: String,
78
+ default: "\u8BF7\u6DFB\u52A0\u9875\u9762\u5185\u5BB9\uFF01"
79
+ },
80
+ sectionTitle: {
81
+ type: String,
82
+ default: "\u529F\u80FD\u5BFC\u822A"
83
+ },
84
+ schema: {
85
+ type: String,
86
+ default: ""
87
+ },
88
+ currentTreeKey: {
89
+ type: Array,
90
+ default: () => []
91
+ },
92
+ defaultProps: {
93
+ type: Object,
94
+ default: () => ({})
95
+ }
96
+ },
97
+ watch: {
98
+ menus() {
99
+ this.setCurrentKey(this.$route.path);
100
+ }
101
+ },
102
+ mounted() {
103
+ this.activeFirstMenu();
104
+ },
105
+ activated() {
106
+ this.setCurrentKey(this.$route.path);
107
+ },
108
+ methods: {
109
+ async activeFirstMenu() {
110
+ if (d(this.menus).map((a) => a.path).filter((a) => a).includes(this.$route.path))
111
+ await this.setCurrentKey(this.$route.path);
112
+ else {
113
+ const a = n(this.menus, (e) => e.path);
114
+ a && (await this.$router.push({ path: a.path, query: a.query }), await this.setCurrentKey(a.path));
115
+ }
116
+ },
117
+ async onNodeClick(t) {
118
+ t.path && t.path.indexOf("/") > -1 && await this.$router.push({ path: t.path, query: t.query }), await this.setCurrentKey(t.key);
119
+ },
120
+ async setCurrentKey(t) {
121
+ await this.$nextTick(), this.$refs.menuTree && this.$refs.menuTree.setCurrentKey(t);
122
+ },
123
+ async beforeRouteUpdate(t, a, e) {
124
+ if (t.path === this.schema) {
125
+ const s = n(this.menus, (i) => i.path);
126
+ s ? (await e({ path: s.path, query: s.query }), await this.setCurrentKey(s.path)) : await e(!1);
127
+ } else
128
+ await e(), await this.setCurrentKey(this.$route.path);
129
+ }
130
+ }
131
+ }, r = {};
132
+ var p = /* @__PURE__ */ o(
133
+ h,
134
+ l,
135
+ c,
136
+ !1,
137
+ y,
138
+ null,
139
+ null,
140
+ null
141
+ );
142
+ function y(t) {
143
+ for (let a in r)
144
+ this[a] = r[a];
145
+ }
146
+ const m = /* @__PURE__ */ function() {
147
+ return p.exports;
148
+ }();
149
+ export {
150
+ m as default
151
+ };
@@ -1 +1,119 @@
1
- import{treeToArray as u,findFirstMatchNode as s}from"@web-utils/core";import{n as o}from"../../chunks/6499de3a.js";var c=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.menus&&t.menus.length?a("PageSkeleton",{scopedSlots:t._u([{key:"header",fn:function(){return[a("PageHeader",{scopedSlots:t._u([{key:"section-title",fn:function(){return[a("ElTabs",{on:{"tab-click":t.tabClick},model:{value:t.activeTab,callback:function(n){t.activeTab=n},expression:"activeTab"}},t._l(t.menus,function(n){return a("ElTabPane",{key:n.path,attrs:{label:n.label,name:`${n.path}`}})}),1)]},proxy:!0}],null,!1,412017982)})]},proxy:!0}],null,!1,2288233724)},[t._t("default",function(){return[a("EmptyView",{attrs:{"empty-tips":t.tips}})]})],2):a("EmptyView",{attrs:{"empty-tips":"\u6682\u65E0\u6743\u9650\uFF01"}})},l=[];const p={name:"PageIndexTop",props:{menus:{type:Array,default:()=>[]},tips:{type:String,default:"\u8BF7\u6DFB\u52A0\u9875\u9762\u5185\u5BB9\uFF01"},schema:{type:String,default:""}},data(){return{activeTab:""}},watch:{menus:"activeFirstMenu"},mounted(){this.activeFirstMenu()},methods:{async activeFirstMenu(){if(u(this.menus).map(e=>e.path).filter(e=>e).includes(this.$route.path))this.activeTab=this.$route.path;else{const e=s(this.menus,a=>a.path);e&&(this.activeTab=e.path,await this.$router.push({path:e.path,query:e.query}))}},async tabClick(t){await this.$router.push(t.name)},async beforeRouteUpdate(t,e,a){if(t.path===this.schema){const n=s(this.menus,i=>i.path);n?(await a({path:n.path,query:n.query}),this.activeTab=n.path):await a(!1)}else await a()}}},r={};var h=o(p,c,l,!1,m,null,null,null);function m(t){for(let e in r)this[e]=r[e]}var f=function(){return h.exports}();export{f as default};
1
+ import { treeToArray as u, findFirstMatchNode as s } from "@web-utils/core";
2
+ import { n as o } from "../../chunks/6499de3a.js";
3
+ var c = function() {
4
+ var t = this, e = t.$createElement, a = t._self._c || e;
5
+ return t.menus && t.menus.length ? a("PageSkeleton", {
6
+ scopedSlots: t._u([{
7
+ key: "header",
8
+ fn: function() {
9
+ return [a("PageHeader", {
10
+ scopedSlots: t._u([{
11
+ key: "section-title",
12
+ fn: function() {
13
+ return [a("ElTabs", {
14
+ on: {
15
+ "tab-click": t.tabClick
16
+ },
17
+ model: {
18
+ value: t.activeTab,
19
+ callback: function(n) {
20
+ t.activeTab = n;
21
+ },
22
+ expression: "activeTab"
23
+ }
24
+ }, t._l(t.menus, function(n) {
25
+ return a("ElTabPane", {
26
+ key: n.path,
27
+ attrs: {
28
+ label: n.label,
29
+ name: `${n.path}`
30
+ }
31
+ });
32
+ }), 1)];
33
+ },
34
+ proxy: !0
35
+ }], null, !1, 412017982)
36
+ })];
37
+ },
38
+ proxy: !0
39
+ }], null, !1, 2288233724)
40
+ }, [t._t("default", function() {
41
+ return [a("EmptyView", {
42
+ attrs: {
43
+ "empty-tips": t.tips
44
+ }
45
+ })];
46
+ })], 2) : a("EmptyView", {
47
+ attrs: {
48
+ "empty-tips": "\u6682\u65E0\u6743\u9650\uFF01"
49
+ }
50
+ });
51
+ }, l = [];
52
+ const p = {
53
+ name: "PageIndexTop",
54
+ props: {
55
+ menus: {
56
+ type: Array,
57
+ default: () => []
58
+ },
59
+ tips: {
60
+ type: String,
61
+ default: "\u8BF7\u6DFB\u52A0\u9875\u9762\u5185\u5BB9\uFF01"
62
+ },
63
+ schema: {
64
+ type: String,
65
+ default: ""
66
+ }
67
+ },
68
+ data() {
69
+ return {
70
+ activeTab: ""
71
+ };
72
+ },
73
+ watch: {
74
+ menus: "activeFirstMenu"
75
+ },
76
+ mounted() {
77
+ this.activeFirstMenu();
78
+ },
79
+ methods: {
80
+ async activeFirstMenu() {
81
+ if (u(this.menus).map((e) => e.path).filter((e) => e).includes(this.$route.path))
82
+ this.activeTab = this.$route.path;
83
+ else {
84
+ const e = s(this.menus, (a) => a.path);
85
+ e && (this.activeTab = e.path, await this.$router.push({ path: e.path, query: e.query }));
86
+ }
87
+ },
88
+ async tabClick(t) {
89
+ await this.$router.push(t.name);
90
+ },
91
+ async beforeRouteUpdate(t, e, a) {
92
+ if (t.path === this.schema) {
93
+ const n = s(this.menus, (i) => i.path);
94
+ n ? (await a({ path: n.path, query: n.query }), this.activeTab = n.path) : await a(!1);
95
+ } else
96
+ await a();
97
+ }
98
+ }
99
+ }, r = {};
100
+ var h = /* @__PURE__ */ o(
101
+ p,
102
+ c,
103
+ l,
104
+ !1,
105
+ m,
106
+ null,
107
+ null,
108
+ null
109
+ );
110
+ function m(t) {
111
+ for (let e in r)
112
+ this[e] = r[e];
113
+ }
114
+ const y = /* @__PURE__ */ function() {
115
+ return h.exports;
116
+ }();
117
+ export {
118
+ y as default
119
+ };
@@ -1 +1,56 @@
1
- import{n as o}from"../../chunks/6499de3a.js";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Page",{staticClass:"page-skeleton"},[e.header?e._t("header",function(){return[e.title?n("PageHeader",{attrs:{title:e.title}}):n("NavBar")]}):e._e(),n("div",{class:["page-content",{"flex-column":e.flexColumn,"flex-row":e.flexRow,"content-scroll":e.contentScroll},e.contentClass]},[e._t("default")],2)],2)},r=[];const s={name:"PageSkeleton",props:{title:String,flexColumn:Boolean,flexRow:Boolean,header:{type:Boolean,default:!0},contentClass:String,contentScroll:{type:Boolean,default:!0}}},l={};var c=o(s,a,r,!1,i,null,null,null);function i(e){for(let t in l)this[t]=l[t]}var u=function(){return c.exports}();export{u as default};
1
+ import { n as o } from "../../chunks/6499de3a.js";
2
+ var a = function() {
3
+ var e = this, t = e.$createElement, n = e._self._c || t;
4
+ return n("Page", {
5
+ staticClass: "page-skeleton"
6
+ }, [e.header ? e._t("header", function() {
7
+ return [e.title ? n("PageHeader", {
8
+ attrs: {
9
+ title: e.title
10
+ }
11
+ }) : n("NavBar")];
12
+ }) : e._e(), n("div", {
13
+ class: ["page-content", {
14
+ "flex-column": e.flexColumn,
15
+ "flex-row": e.flexRow,
16
+ "content-scroll": e.contentScroll
17
+ }, e.contentClass]
18
+ }, [e._t("default")], 2)], 2);
19
+ }, r = [];
20
+ const s = {
21
+ name: "PageSkeleton",
22
+ props: {
23
+ title: String,
24
+ flexColumn: Boolean,
25
+ flexRow: Boolean,
26
+ header: {
27
+ type: Boolean,
28
+ default: !0
29
+ },
30
+ contentClass: String,
31
+ contentScroll: {
32
+ type: Boolean,
33
+ default: !0
34
+ }
35
+ }
36
+ }, l = {};
37
+ var c = /* @__PURE__ */ o(
38
+ s,
39
+ a,
40
+ r,
41
+ !1,
42
+ _,
43
+ null,
44
+ null,
45
+ null
46
+ );
47
+ function _(e) {
48
+ for (let t in l)
49
+ this[t] = l[t];
50
+ }
51
+ const i = /* @__PURE__ */ function() {
52
+ return c.exports;
53
+ }();
54
+ export {
55
+ i as default
56
+ };
@@ -1 +1,98 @@
1
- import{n as a}from"../../chunks/6499de3a.js";var o=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("Page",{staticClass:"page-skeleton-new",attrs:{horizontal:""}},[t("div",{staticClass:"page-skeleton-new-left",style:{width:e.sidebarWidth}},[e.header?t("div",{staticClass:"page-skeleton-new-header",staticStyle:{"margin-right":"0"}},[t("span",{staticClass:"section-title"},[e._v(e._s(e.title))])]):e._e(),t("div",{staticClass:"flex-item",staticStyle:{"border-right":"1px solid #eee"}},[e._t("sidebar-content",function(){return[e._v(" \u4FA7\u680F\u5185\u5BB9 ")]})],2)]),t("div",{staticClass:"page-skeleton-new-right",style:{width:`calc(100% - ${e.sidebarWidth})`}},[e.header?t("div",{staticClass:"page-skeleton-new-header",staticStyle:{"margin-left":"0","padding-left":"10px"}},[t("div",{staticClass:"flex-item flex-row vertical-center"},[e._t("header-left")],2),t("div",{staticClass:"flex-item flex-row vertical-center"},[t("div",{class:["flex-row","flex-item","vertical-center","align-end"]},[e._t("header-right")],2)])]):e._e(),t("div",{class:["page-skeleton-new-page-content","flex-item",{"flex-column":e.flexColumn,"flex-row":e.flexRow,"content-scroll":e.contentScroll},e.contentClass]},[e._t("default",function(){return[e._v("\u5185\u5BB9")]})],2)])])},s=[];const i={name:"PageSkeletonNew",props:{title:{type:String,default:"\u9875\u9762\u6807\u9898"},flexColumn:Boolean,flexRow:Boolean,header:{type:Boolean,default:!0},contentClass:String,contentScroll:{type:Boolean,default:!0},sidebarWidth:{type:String,default:"240px"}}},l={};var r=a(i,o,s,!1,c,null,null,null);function c(e){for(let n in l)this[n]=l[n]}var d=function(){return r.exports}();export{d as default};
1
+ import { n as a } from "../../chunks/6499de3a.js";
2
+ var s = function() {
3
+ var e = this, l = e.$createElement, t = e._self._c || l;
4
+ return t("Page", {
5
+ staticClass: "page-skeleton-new",
6
+ attrs: {
7
+ horizontal: ""
8
+ }
9
+ }, [t("div", {
10
+ staticClass: "page-skeleton-new-left",
11
+ style: {
12
+ width: e.sidebarWidth
13
+ }
14
+ }, [e.header ? t("div", {
15
+ staticClass: "page-skeleton-new-header",
16
+ staticStyle: {
17
+ "margin-right": "0"
18
+ }
19
+ }, [t("span", {
20
+ staticClass: "section-title"
21
+ }, [e._v(e._s(e.title))])]) : e._e(), t("div", {
22
+ staticClass: "flex-item",
23
+ staticStyle: {
24
+ "border-right": "1px solid #eee"
25
+ }
26
+ }, [e._t("sidebar-content", function() {
27
+ return [e._v(" \u4FA7\u680F\u5185\u5BB9 ")];
28
+ })], 2)]), t("div", {
29
+ staticClass: "page-skeleton-new-right",
30
+ style: {
31
+ width: `calc(100% - ${e.sidebarWidth})`
32
+ }
33
+ }, [e.header ? t("div", {
34
+ staticClass: "page-skeleton-new-header",
35
+ staticStyle: {
36
+ "margin-left": "0",
37
+ "padding-left": "10px"
38
+ }
39
+ }, [t("div", {
40
+ staticClass: "flex-item flex-row vertical-center"
41
+ }, [e._t("header-left")], 2), t("div", {
42
+ staticClass: "flex-item flex-row vertical-center"
43
+ }, [t("div", {
44
+ class: ["flex-row", "flex-item", "vertical-center", "align-end"]
45
+ }, [e._t("header-right")], 2)])]) : e._e(), t("div", {
46
+ class: ["page-skeleton-new-page-content", "flex-item", {
47
+ "flex-column": e.flexColumn,
48
+ "flex-row": e.flexRow,
49
+ "content-scroll": e.contentScroll
50
+ }, e.contentClass]
51
+ }, [e._t("default", function() {
52
+ return [e._v("\u5185\u5BB9")];
53
+ })], 2)])]);
54
+ }, i = [];
55
+ const r = {
56
+ name: "PageSkeletonNew",
57
+ props: {
58
+ title: {
59
+ type: String,
60
+ default: "\u9875\u9762\u6807\u9898"
61
+ },
62
+ flexColumn: Boolean,
63
+ flexRow: Boolean,
64
+ header: {
65
+ type: Boolean,
66
+ default: !0
67
+ },
68
+ contentClass: String,
69
+ contentScroll: {
70
+ type: Boolean,
71
+ default: !0
72
+ },
73
+ sidebarWidth: {
74
+ type: String,
75
+ default: "240px"
76
+ }
77
+ }
78
+ }, n = {};
79
+ var o = /* @__PURE__ */ a(
80
+ r,
81
+ s,
82
+ i,
83
+ !1,
84
+ c,
85
+ null,
86
+ null,
87
+ null
88
+ );
89
+ function c(e) {
90
+ for (let l in n)
91
+ this[l] = n[l];
92
+ }
93
+ const _ = /* @__PURE__ */ function() {
94
+ return o.exports;
95
+ }();
96
+ export {
97
+ _ as default
98
+ };