@ditari/bsui 1.0.2 → 1.0.4

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 (77) hide show
  1. package/dist/cjs/components/index.cjs.js +1 -1
  2. package/dist/cjs/components/index.d.ts +10 -2
  3. package/dist/cjs/components/layout/Breadcrumb.vue.cjs2.js +1 -1
  4. package/dist/cjs/components/layout/List.vue.cjs2.js +1 -1
  5. package/dist/cjs/components/layout/Main.vue.cjs.js +1 -1
  6. package/dist/cjs/components/layout/Main.vue.cjs2.js +1 -1
  7. package/dist/cjs/components/layout/NavTabs.vue.cjs.js +1 -1
  8. package/dist/cjs/components/layout/NavTabs.vue.cjs2.js +1 -1
  9. package/dist/cjs/components/layout/Show.vue.cjs2.js +1 -1
  10. package/dist/cjs/components/layout/index.cjs.js +1 -1
  11. package/dist/cjs/components/menu/Menu.cjs.js +1 -0
  12. package/dist/cjs/store/modules/User.cjs.js +1 -1
  13. package/dist/cjs/store/modules/User.d.ts +14 -8
  14. package/dist/css/index.css +1 -1
  15. package/dist/css/layout/style/breadcrumb.css +1 -0
  16. package/dist/css/layout/style/index.css +1 -0
  17. package/dist/css/layout/style/list.css +1 -0
  18. package/dist/css/layout/style/main.css +1 -0
  19. package/dist/css/layout/style/navtab.css +1 -0
  20. package/dist/css/layout/style/show.css +1 -0
  21. package/dist/css/menu/style/index.css +1 -1
  22. package/dist/esm/components/index.d.ts +10 -2
  23. package/dist/esm/components/index.esm.js +17 -17
  24. package/dist/esm/components/layout/Breadcrumb.vue.esm2.js +2 -2
  25. package/dist/esm/components/layout/List.vue.esm2.js +2 -2
  26. package/dist/esm/components/layout/Main.vue.esm.js +20 -22
  27. package/dist/esm/components/layout/Main.vue.esm2.js +2 -2
  28. package/dist/esm/components/layout/NavTabs.vue.esm.js +44 -39
  29. package/dist/esm/components/layout/NavTabs.vue.esm2.js +2 -2
  30. package/dist/esm/components/layout/Show.vue.esm2.js +2 -2
  31. package/dist/esm/components/layout/index.esm.js +5 -9
  32. package/dist/esm/components/menu/Menu.esm.js +71 -0
  33. package/dist/esm/store/modules/User.d.ts +14 -8
  34. package/dist/esm/store/modules/User.esm.js +13 -8
  35. package/dist/esm/style.css +1 -1
  36. package/dist/style/index.scss +2 -1
  37. package/dist/style/layout/style/breadcrumb.scss +57 -0
  38. package/dist/style/layout/style/index.scss +6 -0
  39. package/dist/style/layout/style/list.scss +26 -0
  40. package/dist/style/layout/style/main.scss +100 -0
  41. package/dist/style/layout/style/navtab.scss +118 -0
  42. package/dist/style/layout/style/show.scss +37 -0
  43. package/dist/style/menu/style/index.scss +12 -4
  44. package/dist/style/theme/variable.scss +23 -6
  45. package/package.json +7 -3
  46. package/src/components/index.scss +2 -1
  47. package/src/components/index.ts +10 -2
  48. package/src/components/layout/Breadcrumb.vue +0 -76
  49. package/src/components/layout/List.vue +1 -27
  50. package/src/components/layout/Main.vue +2 -102
  51. package/src/components/layout/NavTabs.vue +6 -95
  52. package/src/components/layout/Show.vue +1 -39
  53. package/src/components/layout/style/breadcrumb.scss +57 -0
  54. package/src/components/layout/style/index.scss +6 -0
  55. package/src/components/layout/style/list.scss +26 -0
  56. package/src/components/layout/style/main.scss +100 -0
  57. package/src/components/layout/style/navtab.scss +118 -0
  58. package/src/components/layout/style/show.scss +37 -0
  59. package/src/components/{layout/Menu.jsx → menu/Menu-bak.jsx} +36 -34
  60. package/src/components/menu/Menu.jsx +88 -47
  61. package/src/components/menu/style/index.scss +12 -4
  62. package/src/components/theme/variable.scss +23 -6
  63. package/src/store/modules/User.ts +16 -9
  64. package/dist/cjs/components/layout/Breadcrumb.vue.cjs3.js +0 -1
  65. package/dist/cjs/components/layout/List.vue.cjs3.js +0 -1
  66. package/dist/cjs/components/layout/Main.vue.cjs3.js +0 -1
  67. package/dist/cjs/components/layout/Menu.cjs.js +0 -1
  68. package/dist/cjs/components/layout/NavTabs.vue.cjs3.js +0 -1
  69. package/dist/cjs/components/layout/Show.vue.cjs3.js +0 -1
  70. package/dist/esm/components/layout/Breadcrumb.vue.esm3.js +0 -5
  71. package/dist/esm/components/layout/List.vue.esm3.js +0 -5
  72. package/dist/esm/components/layout/Main.vue.esm3.js +0 -5
  73. package/dist/esm/components/layout/Menu.esm.js +0 -52
  74. package/dist/esm/components/layout/NavTabs.vue.esm3.js +0 -5
  75. package/dist/esm/components/layout/Show.vue.esm3.js +0 -5
  76. /package/dist/cjs/components/{layout → menu}/Menu.d.ts +0 -0
  77. /package/dist/esm/components/{layout → menu}/Menu.d.ts +0 -0
@@ -0,0 +1,71 @@
1
+ import { defineComponent as y, inject as C, ref as d, createVNode as n, resolveComponent as l, isVNode as K, Fragment as s, withDirectives as M, vShow as j, h as k } from "vue";
2
+ import { storeToRefs as N } from "pinia";
3
+ import "@ant-design/icons-vue";
4
+ import { useMenuStore as w } from "../../store/modules/Menu.esm.js";
5
+ import { useSettingsStore as I } from "../../store/modules/Settings.esm.js";
6
+ function D(o) {
7
+ return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !K(o);
8
+ }
9
+ const _ = /* @__PURE__ */ y({
10
+ name: "DMenu",
11
+ setup() {
12
+ const {
13
+ componentName: o,
14
+ prop: H
15
+ } = C("menuIcon"), {
16
+ list: p
17
+ } = w(), f = I(), {
18
+ getCollapsed: m
19
+ } = N(f), c = d(["/labelList", "/label"]), i = d(["/label"]), v = ({
20
+ item: e,
21
+ key: t,
22
+ keyPath: r
23
+ }) => {
24
+ console.log(e, t, r), c.value = r, i.value = [t];
25
+ }, h = (e) => n(s, null, [n(l("a-menu-item"), {
26
+ key: e.url
27
+ }, {
28
+ icon: () => u(e),
29
+ default: () => e.title
30
+ })]), b = ["anticon", "anticon-menu", "ant-menu-item-icon"], u = (e) => n(s, null, [e.icon ? S(e.icon) : M(n("div", {
31
+ className: b
32
+ }, [e.title.substring(0, 1)]), [[j, m.value]])]), S = (e) => o === "nativeHtml" ? n("span", {
33
+ innerHTML: e
34
+ }, null) : k(l(o), {
35
+ prop: e
36
+ }), a = (e) => n(s, null, [n(l("a-sub-menu"), {
37
+ key: e.url
38
+ }, {
39
+ title: () => e.title,
40
+ icon: () => u(e),
41
+ default: () => e.children.map(
42
+ (t) => !t.children || t.children.length === 0 ? g(t) : a(t)
43
+ // 递归调用
44
+ )
45
+ })]), g = (e) => n(s, null, [n(l("a-menu-item"), {
46
+ key: e.url
47
+ }, {
48
+ default: () => e.title
49
+ })]);
50
+ return () => {
51
+ let e;
52
+ return n(l("a-menu"), {
53
+ mode: "inline",
54
+ theme: "dark",
55
+ openKeys: c.value,
56
+ "onUpdate:openKeys": (t) => c.value = t,
57
+ selectedKeys: i.value,
58
+ "onUpdate:selectedKeys": (t) => i.value = t,
59
+ onClick: v
60
+ }, D(e = p.map((t) => {
61
+ var r;
62
+ return !t.children || ((r = t.children) == null ? void 0 : r.length) === 0 ? h(t) : a(t);
63
+ })) ? e : {
64
+ default: () => [e]
65
+ });
66
+ };
67
+ }
68
+ });
69
+ export {
70
+ _ as default
71
+ };
@@ -1,15 +1,21 @@
1
- export declare const useUserStore: import("pinia").StoreDefinition<string, {
2
- token: undefined;
3
- }, {
1
+ export interface State {
2
+ token: string | undefined;
3
+ userInfo: any;
4
+ }
5
+ export declare const useUserStore: import("pinia").StoreDefinition<string, State, {
4
6
  getToken: (state: {
5
- token: undefined;
6
- } & import("pinia").PiniaCustomStateProperties<{
7
- token: undefined;
8
- }>) => undefined;
7
+ token: string | undefined;
8
+ userInfo: any;
9
+ } & import("pinia").PiniaCustomStateProperties<State>) => string | undefined;
10
+ getUserInfo: (state: {
11
+ token: string | undefined;
12
+ userInfo: any;
13
+ } & import("pinia").PiniaCustomStateProperties<State>) => any;
9
14
  }, {
10
15
  /**
11
16
  * 保存token
12
17
  * @param token
13
18
  */
14
- saveToken(token: any): void;
19
+ saveToken(token: string): void;
20
+ saveUserInfo(data: any): void;
15
21
  }>;
@@ -1,12 +1,13 @@
1
- import { defineStore as t } from "pinia";
2
- import { USER_ID as o } from "../types.esm.js";
3
- const s = t(o, {
1
+ import { defineStore as o } from "pinia";
2
+ import { USER_ID as t } from "../types.esm.js";
3
+ const n = o(t, {
4
4
  state: () => ({
5
- // token
6
- token: void 0
5
+ token: void 0,
6
+ userInfo: void 0
7
7
  }),
8
8
  getters: {
9
- getToken: (e) => e.token
9
+ getToken: (e) => e.token,
10
+ getUserInfo: (e) => e.userInfo
10
11
  },
11
12
  actions: {
12
13
  /**
@@ -15,9 +16,13 @@ const s = t(o, {
15
16
  */
16
17
  saveToken(e) {
17
18
  this.token = e;
19
+ },
20
+ saveUserInfo(e) {
21
+ this.userInfo = e;
18
22
  }
19
- }
23
+ },
24
+ persist: !0
20
25
  });
21
26
  export {
22
- s as useUserStore
27
+ n as useUserStore
23
28
  };
@@ -1 +1 @@
1
- .ditari-ant-back-top{right:4px;bottom:120px}.ditari-layout{height:100%}.ditari-layout .ditari-layout-sider{position:fixed;left:0;top:0;bottom:0;z-index:1}.ditari-layout .ditari-top-layout{position:fixed;left:200px;right:0;z-index:210}.ditari-layout .ditari-layout-content{margin-left:200px;margin-top:84px}.fade-enter-active,.fade-leave-active{transition:opacity .1s ease}.fade-enter-from,.fade-leave-to{opacity:0}.main-enter-active{transition:.2s}.main-leave-active{transition:.15s}.main-enter-from{opacity:0;margin-left:-20px}.main-leave-to{opacity:0;margin-left:20px}.ditari-layout-header{display:flex;justify-content:space-between;align-items:center;padding:0 15px;height:42px;border-bottom:1px solid #f0f2f5;background-color:#fff}.ditari-layout-header .ditari-layout-header-left{display:flex;justify-content:center}.ditari-layout-header .ditari-layout-header-left .ditari-side-collapsed{margin-right:20px;cursor:pointer;width:42px;line-height:30px;text-align:center;transition-duration:.2s}.ditari-layout-header .ditari-layout-header-left .ditari-side-collapsed:hover{background-color:#f0f2f5;border-radius:4px}.ditari-layout-header .ditari-layout-header-left .ditari-side-collapsed .icon{transition-duration:.2s}.ditari-user-menu{display:flex;align-items:center;height:100%}.ditari-user-menu .ditari-operation-items{margin-left:10px;height:100%}.ditari-user-menu .ditari-operation-items .ant-dropdown-link{display:flex;align-items:center;justify-content:center;height:100%}.collapsed-animation{transform:rotate(-180deg)}.ditari-list-layout{padding:20px;height:100%}.ditari-list-layout .wrapper{display:flex;flex-direction:column}.ditari-list-layout .ditari-list-table{flex:1}.ditari-list-layout .ditari-list-table .ant-card-body{display:flex;flex-direction:column;height:100%}.ditari-list-layout .ditari-list-form .ant-card-body{padding-bottom:0}.ditari-list-layout .wrapper{height:100%}.ditari-show-layout{position:relative}.ditari-show-layout .ant-card{margin-bottom:10px}.ditari-show-layout .ant-card .ant-card-head{padding:10px 24px}.ditari-show-layout .ant-card .ant-card-head .ant-card-head-title{padding:0}.ditari-show-layout .ant-card:last-child{margin-bottom:0}.ditari-show-layout .ditari-page-header{position:sticky;top:84px;z-index:1;padding:4px 24px;transition:all .3s}.ditari-show-layout .ditari-page-header.active{box-shadow:1px 5px 20px 2px #e0e0e0}.ditari-show-layout .ditari-show-footer{position:fixed;right:0;bottom:0;left:200px;padding:10px;background:#fff;box-shadow:0 0 5px 3px #e0e0e0}.ditari-nav{background:#f0f2f5}.ditari-nav .ant-tabs-nav{margin:0}.ditari-nav .ant-tabs-content-holder{display:none}.ditari-nav .ant-tabs-tab{position:relative;margin-left:0!important;border:0!important;transition:none!important;border-radius:10px 10px 0 0!important}.ditari-nav .ant-tabs-tab:not(.ant-tabs-tab-active){background:transparent}.ditari-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active){background:#e9e9e9}.ditari-nav .ant-tabs-tab .ant-tabs-tab-btn{display:flex;align-items:center}.ditari-nav .ant-tabs-tab .anticon{margin-right:0;margin-left:20px}.ditari-nav .ant-tabs-tab .anticon:hover{font-weight:700}.ditari-nav .ant-tabs-nav-wrap{padding:4px 8px 0}.ditari-nav .ant-tabs-tab:before,.ditari-nav .ant-tabs-tab:after{position:absolute;bottom:0;content:"";width:20px;height:20px;border-radius:100%;box-shadow:0 0 0 40px transparent}.ditari-nav .ant-tabs-tab:before{left:-20px;clip-path:inset(50% -10px 0 50%)}.ditari-nav .ant-tabs-tab:after{right:-20px;clip-path:inset(50% 50% 0 -10px)}.ditari-nav .ant-tabs-tab:hover:before,.ditari-nav .ant-tabs-tab:hover:after{box-shadow:0 0 0 30px #e9e9e9}.ditari-nav .ant-tabs-tab.ant-tabs-tab-active:before,.ditari-nav .ant-tabs-tab.ant-tabs-tab-active:after{z-index:10;box-shadow:0 0 0 30px #fff}.ditari-nav .tab-item-dividers{position:absolute;z-index:0;height:14px;top:50%;left:0;right:0;margin-top:-7px}.ditari-nav .tab-item-dividers:before{content:"";display:block;position:absolute;top:0;left:1px;bottom:0;width:1px;opacity:1;background-color:red;transition:opacity .2s ease,background-color .3s;z-index:2}.xi-pagination{margin-top:24px;text-align:center}.ditari-breadcrumb .ant-breadcrumb-separator{display:none}.ditari-breadcrumb .breadcrumb{display:flex}.ditari-breadcrumb .breadcrumb .breadcrumb-item:first-child .breadcrumb-link{border-radius:6px 0 0 6px;clip-path:polygon(0 0,calc(100% - 8px) 0,100% 50%,calc(100% - 8px) 100%,0 100%)}.ditari-breadcrumb .breadcrumb .breadcrumb-item:last-child:not(:last-child) .breadcrumb-link{border-radius:0 6px 6px 0;clip-path:polygon(0 0,100% 0,100% 100%,0 100%,8px 50%)}.ditari-breadcrumb .breadcrumb-link{display:block;padding:4px 12px;background:#f0f2f5;clip-path:polygon(0 0,calc(100% - 8px) 0,100% 50%,calc(100% - 8px) 100%,0 100%,8px 50%)}.breadcrumb-enter-active{transition:all .25s}.breadcrumb-enter-from,.breadcrumb-leave-active{opacity:0;transform:translate(30px) skew(-50deg)}
1
+ .xi-pagination{margin-top:24px;text-align:center}
@@ -1,7 +1,7 @@
1
1
  @import "./theme/variable";
2
2
  @import "./grid/style";
3
3
  @import "./menu/style";
4
-
4
+ @import "./layout/style";
5
5
  html,
6
6
  body,
7
7
  #app {
@@ -13,3 +13,4 @@ body,
13
13
  }
14
14
  }
15
15
 
16
+
@@ -0,0 +1,57 @@
1
+ @import "../../theme/variable.scss";
2
+ .ditari-breadcrumb {
3
+
4
+ .ant-breadcrumb-separator {
5
+ display: none;
6
+ }
7
+ .breadcrumb {
8
+ display: flex;
9
+
10
+ .breadcrumb-item {
11
+ &:first-child {
12
+ .breadcrumb-link {
13
+ border-radius: 6px 0 0 6px;
14
+ clip-path: polygon(
15
+ 0 0,
16
+ calc(100% - 8px) 0,
17
+ 100% 50%,
18
+ calc(100% - 8px) 100%,
19
+ 0 100%
20
+ );
21
+ }
22
+ }
23
+ &:last-child {
24
+ &:not(:last-child) {
25
+ .breadcrumb-link {
26
+ border-radius: 0 6px 6px 0;
27
+ clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 8px 50%);
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
33
+
34
+ .breadcrumb-link {
35
+ display: block;
36
+ padding: 4px 12px;
37
+ background: #f0f2f5;
38
+ clip-path: polygon(
39
+ 0 0,
40
+ calc(100% - 8px) 0,
41
+ 100% 50%,
42
+ calc(100% - 8px) 100%,
43
+ 0 100%,
44
+ 8px 50%
45
+ );
46
+ }
47
+ }
48
+
49
+ .breadcrumb-enter-active {
50
+ transition: all 0.25s;
51
+ }
52
+
53
+ .breadcrumb-enter-from,
54
+ .breadcrumb-leave-active {
55
+ opacity: 0;
56
+ transform: translateX(30px) skewX(-50deg);
57
+ }
@@ -0,0 +1,6 @@
1
+
2
+ @import "./breadcrumb";
3
+ @import "./list";
4
+ @import "./main";
5
+ @import "./navtab";
6
+ @import "./show";
@@ -0,0 +1,26 @@
1
+ @import "../../theme/variable.scss";
2
+ .ditari-list-layout {
3
+ padding: 20px;
4
+ height: 100%;
5
+ .wrapper {
6
+ display: flex;
7
+ flex-direction: column;
8
+ }
9
+ .ditari-list-table {
10
+ flex: 1;
11
+ .ant-card-body {
12
+ display: flex;
13
+ flex-direction: column;
14
+ height: 100%;
15
+ }
16
+ }
17
+ .ditari-list-form {
18
+ .ant-card-body {
19
+ padding-bottom: 0;
20
+ }
21
+ }
22
+
23
+ .wrapper {
24
+ height: 100%;
25
+ }
26
+ }
@@ -0,0 +1,100 @@
1
+ @import "../../theme/variable.scss";
2
+ .ditari-ant-back-top {
3
+ right: 4px;
4
+ bottom: 120px;
5
+ }
6
+ .ditari-layout {
7
+ height: 100%;
8
+ .ditari-layout-sider {
9
+ position: fixed;
10
+ left: 0;
11
+ top: 0;
12
+ bottom: 0;
13
+ z-index: 1;
14
+ }
15
+ .ditari-top-layout {
16
+ position: fixed;
17
+ left: 200px;
18
+ right: 0;
19
+ z-index: 210;
20
+ }
21
+ .ditari-layout-content {
22
+ margin-left: 200px;
23
+ margin-top: 84px;
24
+ }
25
+ }
26
+ .fade-enter-active,
27
+ .fade-leave-active {
28
+ transition: opacity 0.1s ease;
29
+ }
30
+
31
+ .fade-enter-from,
32
+ .fade-leave-to {
33
+ opacity: 0;
34
+ }
35
+
36
+ .main-enter-active {
37
+ transition: 0.2s;
38
+ }
39
+
40
+ .main-leave-active {
41
+ transition: 0.15s;
42
+ }
43
+
44
+ .main-enter-from {
45
+ opacity: 0;
46
+ margin-left: -20px;
47
+ }
48
+
49
+ .main-leave-to {
50
+ opacity: 0;
51
+ margin-left: 20px;
52
+ }
53
+
54
+ .ditari-layout-header {
55
+ display: flex;
56
+ justify-content: space-between;
57
+ align-items: center;
58
+ padding: 0 15px;
59
+ height: 42px;
60
+ border-bottom: 1px solid #f0f2f5;
61
+ background-color: #fff;
62
+ .ditari-layout-header-left {
63
+ display: flex;
64
+ justify-content: center;
65
+ .ditari-side-collapsed {
66
+ margin-right: 20px;
67
+ cursor: pointer;
68
+ width: 42px;
69
+ line-height: 30px;
70
+ text-align: center;
71
+ transition-duration: 0.2s;
72
+ &:hover {
73
+ background-color: #f0f2f5;
74
+ border-radius: 4px;
75
+ }
76
+ .icon {
77
+ transition-duration: 0.2s;
78
+ }
79
+ }
80
+ }
81
+ }
82
+ .ditari-user-menu {
83
+ display: flex;
84
+ align-items: center;
85
+ height: 100%;
86
+ .ditari-operation-items {
87
+ margin-left: 10px;
88
+ height: 100%;
89
+ .ant-dropdown-link {
90
+ display: flex;
91
+ align-items: center;
92
+ justify-content: center;
93
+ height: 100%;
94
+ }
95
+ }
96
+ }
97
+
98
+ .collapsed-animation {
99
+ transform: rotate(-180deg);
100
+ }
@@ -0,0 +1,118 @@
1
+ @import "../../theme/variable.scss";
2
+
3
+ /*分割线*/
4
+ @mixin tab-dividers {
5
+ .tab-dividers {
6
+ &::before {
7
+ opacity: 0;
8
+ }
9
+ }
10
+ }
11
+
12
+ .ditari-nav {
13
+ background: $nav-tab-bg-color;
14
+ .ant-tabs-nav {
15
+ margin: 0;
16
+ }
17
+ .ant-tabs-content-holder {
18
+ display: none;
19
+ }
20
+ .ant-tabs-tab {
21
+ position: relative;
22
+ margin-left: 0 !important;
23
+ border: 0 !important;
24
+ transition: none !important;
25
+ border-radius: 10px 10px 0 0 !important;
26
+ color: $nav-tab-text-color;
27
+ &:first-child,
28
+ &.ant-tabs-tab-active {
29
+ .tab-dividers {
30
+ &::before {
31
+ opacity: 0;
32
+ }
33
+ }
34
+ }
35
+ &:not(.ant-tabs-tab-active) {
36
+ background: transparent;
37
+ }
38
+ &:hover {
39
+ &:not(.ant-tabs-tab-active) {
40
+ background: $nav-tab-hover-bg-color;
41
+ @include tab-dividers;
42
+ & + .ant-tabs-tab {
43
+ @include tab-dividers;
44
+ }
45
+ }
46
+ }
47
+
48
+ .ant-tabs-tab-btn {
49
+ display: flex;
50
+ align-items: center;
51
+ }
52
+ .anticon {
53
+ margin-right: 0;
54
+ margin-left: 10px;
55
+ &:hover {
56
+ //color: red;
57
+ }
58
+ }
59
+ }
60
+ .ant-tabs-tab-active + .ant-tabs-tab {
61
+ @include tab-dividers;
62
+ }
63
+
64
+ .ant-tabs-nav-wrap {
65
+ padding: 4px 8px 0;
66
+ }
67
+
68
+ .ant-tabs-tab::before,
69
+ .ant-tabs-tab::after {
70
+ position: absolute;
71
+ bottom: 0;
72
+ content: "";
73
+ width: 20px;
74
+ height: 20px;
75
+ border-radius: 100%;
76
+ box-shadow: 0 0 0 40px transparent;
77
+ }
78
+ .ant-tabs-tab::before {
79
+ left: -20px;
80
+ clip-path: inset(50% -10px 0 50%);
81
+ }
82
+ .ant-tabs-tab::after {
83
+ right: -20px;
84
+ clip-path: inset(50% 50% 0 -10px);
85
+ }
86
+
87
+ .ant-tabs-tab:hover::before,
88
+ .ant-tabs-tab:hover::after {
89
+ box-shadow: 0 0 0 30px $nav-tab-hover-bg-color;
90
+ }
91
+
92
+ .ant-tabs-tab.ant-tabs-tab-active::before,
93
+ .ant-tabs-tab.ant-tabs-tab-active::after {
94
+ z-index: 10;
95
+ box-shadow: 0 0 0 30px #fff;
96
+ }
97
+
98
+ .tab-dividers {
99
+ position: absolute;
100
+ z-index: 0;
101
+ height: 14px;
102
+ top: 50%;
103
+ left: 0;
104
+ margin-top: -7px;
105
+ &::before {
106
+ content: "";
107
+ display: block;
108
+ position: absolute;
109
+ top: 0;
110
+ left: 1px;
111
+ bottom: 0;
112
+ width: 1px;
113
+ opacity: 1;
114
+ background-color: $nav-tab-dividers-color;
115
+ transition: opacity 0.2s ease, background-color 0.3s;
116
+ }
117
+ }
118
+ }
@@ -0,0 +1,37 @@
1
+ @import "../../theme/variable.scss";
2
+ .ditari-show-layout {
3
+ position: relative;
4
+ .ant-card {
5
+ margin-bottom: 10px;
6
+ .ant-card-head {
7
+ padding: 10px 24px;
8
+ .ant-card-head-title {
9
+ padding: 0;
10
+ }
11
+ }
12
+ &:last-child {
13
+ margin-bottom: 0;
14
+ }
15
+ }
16
+ .ditari-page-header {
17
+ position: sticky;
18
+ top: 84px;
19
+ z-index: 1;
20
+ padding: 4px 24px;
21
+ transition: all 0.3s;
22
+ &.active {
23
+ box-shadow: 1px 5px 20px 2px $box-shadow-color;
24
+ }
25
+ }
26
+ .ditari-show-content {
27
+ }
28
+ .ditari-show-footer {
29
+ position: fixed;
30
+ right: 0;
31
+ bottom: 0;
32
+ left: 200px;
33
+ padding: 10px;
34
+ background: #fff;
35
+ box-shadow: 0px 0px 5px 3px $box-shadow-color;
36
+ }
37
+ }
@@ -10,9 +10,17 @@
10
10
  }
11
11
  }
12
12
 
13
- .ditari-layout {
14
- background-color: red;
15
- .ditari-layout-sider {
16
- background-color: red;
13
+ .ditari-layout-sider {
14
+ background-color: $side-bg-color;
15
+ .ant-menu-dark {
16
+ background-color: $side-bg-color;
17
+ .ant-menu-inline.ant-menu-sub {
18
+ background-color: $side-menu-sub-bg-color;
19
+ }
20
+ .ant-menu{
21
+ &:before,&:after{
22
+ //display: none;
23
+ }
24
+ }
17
25
  }
18
26
  }
@@ -6,16 +6,33 @@ $bg-color: #f0f2f5;
6
6
  $logo-height: 240px !default;
7
7
  /******======网格变量======******/
8
8
  //网格边框颜色
9
- $grid-border-color: #4e4e4e;
9
+ $grid-border-color: #4e4e4e !default;
10
10
  // 网格里面输入框获取焦点时的边框颜色
11
- $grid-input-focus-border-color: #1890ff;
11
+ $grid-input-focus-border-color: #1890ff !default;
12
12
  //输入框校验不通过时候的颜色
13
- $grid-input-error-border-color: #ff4d4f;
13
+ $grid-input-error-border-color: #ff4d4f !default;
14
14
  // 网格输入框边框宽度
15
- $grid-input-border-width: 2px;
15
+ $grid-input-border-width: 2px !default;
16
16
  // 网格边框宽度
17
- $gird-border-width: 1px;
17
+ $gird-border-width: 1px !default;
18
18
 
19
+ // show头部阴影
20
+ $box-shadow-color: #e0e0e0 !default;
21
+
22
+ /******======左侧菜单======******/
19
23
  // 左侧菜单
20
- $top-header-height: 84px;
24
+
21
25
  $logo-height: 40px !default;
26
+ //左侧菜单北京颜色
27
+ $side-bg-color: #162157 !default;
28
+ //子菜单展开后的背景颜色
29
+ $side-menu-sub-bg-color: #101847 !default;
30
+
31
+ /******======多标签======******/
32
+ $nav-tab-bg-color: linear-gradient(270deg, #019cfe 0%, #0165fe 100%) !default;
33
+ //分割符颜色
34
+ $nav-tab-dividers-color: #fff !default;
35
+ // 字体颜色
36
+ $nav-tab-text-color: #fff !default;
37
+ // 悬浮的背景色
38
+ $nav-tab-hover-bg-color: #065de1 !default;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@ditari/bsui",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "files": [
5
- "dist/**",
6
- "src/**"
5
+ "dist",
6
+ "src"
7
7
  ],
8
8
  "private": false,
9
9
  "publishConfig": {
@@ -27,5 +27,9 @@
27
27
  },
28
28
  "./css/*": "./dist/css/*",
29
29
  "./theme/*": "./dist/style/*"
30
+ },
31
+ "devDependencies": {
32
+ "@ant-design/icons-vue": "^6.1.0",
33
+ "ant-design-vue": "^3.2.15"
30
34
  }
31
35
  }
@@ -1,7 +1,7 @@
1
1
  @import "./theme/variable";
2
2
  @import "./grid/style";
3
3
  @import "./menu/style";
4
-
4
+ @import "./layout/style";
5
5
  html,
6
6
  body,
7
7
  #app {
@@ -13,3 +13,4 @@ body,
13
13
  }
14
14
  }
15
15
 
16
+
@@ -5,15 +5,22 @@ import { createPersistedState } from "pinia-plugin-persistedstate";
5
5
  import * as components from "./components";
6
6
  export * from "./components";
7
7
 
8
+ export interface MenuIcon {
9
+ componentName: string | "nativeHtml";
10
+ type: string;
11
+ }
12
+ export interface Options {
13
+ menuIcon: MenuIcon;
14
+ prop: string;
15
+ }
8
16
  const c: any = components;
9
- export const install = function (app: App, opts: any) {
17
+ export const install = function (app: App, opts: Options) {
10
18
  Object.keys(c).forEach((key) => {
11
19
  const component = c[key];
12
20
  if (component.install) {
13
21
  app.use(component);
14
22
  }
15
23
  });
16
-
17
24
  //注册pinia
18
25
  const pinia = createPinia();
19
26
  //pinia启用持久化
@@ -23,6 +30,7 @@ export const install = function (app: App, opts: any) {
23
30
  })
24
31
  );
25
32
  app.use(pinia);
33
+ app.provide("menuIcon", opts.menuIcon);
26
34
  console.log("options", opts);
27
35
  };
28
36