@ditari/bsui 1.0.0 → 1.0.2

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 (158) hide show
  1. package/dist/cjs/components/components.cjs.js +1 -1
  2. package/dist/cjs/components/components.d.ts +2 -1
  3. package/dist/cjs/components/form/grid-form/GridForm.cjs.js +1 -0
  4. package/dist/cjs/components/form/grid-form/GridForm.d.ts +2 -0
  5. package/dist/cjs/components/form/index.cjs.js +1 -1
  6. package/dist/cjs/components/form/index.d.ts +8 -1
  7. package/dist/cjs/components/grid/Grid.cjs.js +1 -0
  8. package/dist/cjs/components/grid/Grid.d.ts +23 -0
  9. package/dist/cjs/components/grid/GridItem.cjs.js +1 -0
  10. package/dist/cjs/components/grid/GridItem.d.ts +2 -0
  11. package/dist/cjs/components/grid/index.cjs.js +1 -0
  12. package/dist/cjs/components/grid/index.d.ts +23 -0
  13. package/dist/cjs/components/index.cjs.js +1 -1
  14. package/dist/cjs/components/layout/Breadcrumb.vue.cjs.js +1 -1
  15. package/dist/cjs/components/layout/List.vue.cjs.js +1 -1
  16. package/dist/cjs/components/layout/Main.vue.cjs.js +1 -1
  17. package/dist/cjs/components/layout/Menu.cjs.js +1 -1
  18. package/dist/cjs/components/layout/NavTabs.vue.cjs.js +1 -1
  19. package/dist/cjs/components/layout/Show.vue.cjs.js +1 -1
  20. package/dist/cjs/components/layout/Show.vue.d.ts +11 -0
  21. package/dist/cjs/components/layout/index.d.ts +11 -25
  22. package/dist/cjs/components/table/Table.vue.cjs.js +1 -1
  23. package/dist/cjs/components/table/Table.vue.d.ts +1 -1
  24. package/dist/cjs/components/table/index.d.ts +1 -1
  25. package/dist/cjs/components/theme/index.cjs.js +1 -0
  26. package/dist/cjs/components/theme/index.d.ts +1 -0
  27. package/dist/cjs/hooks/http/index.cjs.js +1 -0
  28. package/dist/cjs/hooks/http/index.d.ts +29 -0
  29. package/dist/cjs/hooks/index.cjs.js +1 -0
  30. package/dist/cjs/hooks/index.d.ts +2 -0
  31. package/dist/cjs/hooks/route/index.cjs.js +1 -0
  32. package/dist/cjs/hooks/route/index.d.ts +9 -0
  33. package/dist/cjs/store/index.cjs.js +1 -0
  34. package/dist/cjs/store/index.d.ts +7 -7
  35. package/dist/cjs/store/modules/Breadcrumb.cjs.js +1 -1
  36. package/dist/cjs/store/modules/Breadcrumb.d.ts +6 -16
  37. package/dist/cjs/store/modules/DataDictionary.cjs.js +1 -1
  38. package/dist/cjs/store/modules/DataDictionary.d.ts +28 -3
  39. package/dist/cjs/store/modules/KeepAlive.cjs.js +1 -1
  40. package/dist/cjs/store/modules/KeepAlive.d.ts +3 -4
  41. package/dist/cjs/store/modules/Menu.cjs.js +1 -1
  42. package/dist/cjs/store/modules/Menu.d.ts +1 -2
  43. package/dist/cjs/store/modules/NavTab.cjs.js +1 -1
  44. package/dist/cjs/store/modules/NavTab.d.ts +3 -4
  45. package/dist/cjs/store/modules/Settings.cjs.js +1 -1
  46. package/dist/cjs/store/modules/Settings.d.ts +23 -9
  47. package/dist/cjs/store/modules/User.cjs.js +1 -1
  48. package/dist/cjs/store/modules/User.d.ts +1 -2
  49. package/dist/cjs/store/types.cjs.js +1 -1
  50. package/dist/cjs/utils/get.cjs.js +1 -0
  51. package/dist/css/grid/style/index.css +1 -0
  52. package/dist/css/index.css +1 -0
  53. package/dist/css/menu/style/index.css +1 -0
  54. package/dist/esm/components/components.d.ts +2 -1
  55. package/dist/esm/components/components.esm.js +10 -7
  56. package/dist/esm/components/form/grid-form/GridForm.d.ts +2 -0
  57. package/dist/esm/components/form/grid-form/GridForm.esm.js +9 -0
  58. package/dist/esm/components/form/index.d.ts +8 -1
  59. package/dist/esm/components/form/index.esm.js +5 -3
  60. package/dist/esm/components/grid/Grid.d.ts +23 -0
  61. package/dist/esm/components/grid/Grid.esm.js +55 -0
  62. package/dist/esm/components/grid/GridItem.d.ts +2 -0
  63. package/dist/esm/components/grid/GridItem.esm.js +15 -0
  64. package/dist/esm/components/grid/index.d.ts +23 -0
  65. package/dist/esm/components/grid/index.esm.js +8 -0
  66. package/dist/esm/components/index.esm.js +16 -13
  67. package/dist/esm/components/layout/Breadcrumb.vue.esm.js +13 -19
  68. package/dist/esm/components/layout/List.vue.esm.js +29 -35
  69. package/dist/esm/components/layout/Main.vue.esm.js +53 -50
  70. package/dist/esm/components/layout/Menu.esm.js +45 -19
  71. package/dist/esm/components/layout/NavTabs.vue.esm.js +27 -27
  72. package/dist/esm/components/layout/Show.vue.d.ts +11 -0
  73. package/dist/esm/components/layout/Show.vue.esm.js +70 -48
  74. package/dist/esm/components/layout/index.d.ts +11 -25
  75. package/dist/esm/components/table/Table.vue.d.ts +1 -1
  76. package/dist/esm/components/table/Table.vue.esm.js +2 -2
  77. package/dist/esm/components/table/index.d.ts +1 -1
  78. package/dist/esm/components/theme/index.d.ts +1 -0
  79. package/dist/esm/components/theme/index.esm.js +4 -0
  80. package/dist/esm/hooks/http/index.d.ts +29 -0
  81. package/dist/esm/hooks/http/index.esm.js +52 -0
  82. package/dist/esm/hooks/index.d.ts +2 -0
  83. package/dist/esm/hooks/index.esm.js +6 -0
  84. package/dist/esm/hooks/route/index.d.ts +9 -0
  85. package/dist/esm/hooks/route/index.esm.js +42 -0
  86. package/dist/esm/store/index.d.ts +7 -7
  87. package/dist/esm/store/index.esm.js +16 -0
  88. package/dist/esm/store/modules/Breadcrumb.d.ts +6 -16
  89. package/dist/esm/store/modules/Breadcrumb.esm.js +4 -12
  90. package/dist/esm/store/modules/DataDictionary.d.ts +28 -3
  91. package/dist/esm/store/modules/DataDictionary.esm.js +30 -6
  92. package/dist/esm/store/modules/KeepAlive.d.ts +3 -4
  93. package/dist/esm/store/modules/KeepAlive.esm.js +4 -4
  94. package/dist/esm/store/modules/Menu.d.ts +1 -2
  95. package/dist/esm/store/modules/Menu.esm.js +1 -1
  96. package/dist/esm/store/modules/NavTab.d.ts +3 -4
  97. package/dist/esm/store/modules/NavTab.esm.js +2 -2
  98. package/dist/esm/store/modules/Settings.d.ts +23 -9
  99. package/dist/esm/store/modules/Settings.esm.js +81 -6
  100. package/dist/esm/store/modules/User.d.ts +1 -2
  101. package/dist/esm/store/modules/User.esm.js +4 -1
  102. package/dist/esm/store/types.esm.js +4 -4
  103. package/dist/esm/style.css +1 -274
  104. package/dist/esm/utils/get.esm.js +11 -0
  105. package/dist/style/grid/style/index.scss +61 -0
  106. package/dist/style/index.scss +15 -0
  107. package/dist/style/menu/style/index.scss +18 -0
  108. package/dist/style/theme/theme.scss +1 -0
  109. package/dist/style/theme/variable.scss +21 -0
  110. package/package.json +10 -7
  111. package/src/components/components.ts +4 -0
  112. package/src/components/config/Config.vue +8 -0
  113. package/src/components/form/Form.vue +10 -0
  114. package/src/components/form/grid-form/GridForm.jsx +10 -0
  115. package/src/components/form/index.ts +8 -0
  116. package/src/components/form/style/index.less +0 -0
  117. package/src/components/grid/Grid.tsx +73 -0
  118. package/src/components/grid/GridItem.tsx +15 -0
  119. package/src/components/grid/index.md +4 -0
  120. package/src/components/grid/index.ts +7 -0
  121. package/src/components/grid/style/index.scss +61 -0
  122. package/src/components/index.scss +15 -0
  123. package/src/components/index.ts +31 -0
  124. package/src/components/layout/Breadcrumb.vue +119 -0
  125. package/src/components/layout/Header.vue +0 -0
  126. package/src/components/layout/Layout.jsx +24 -0
  127. package/src/components/layout/List.vue +159 -0
  128. package/src/components/layout/Main.vue +187 -0
  129. package/src/components/layout/Menu.jsx +96 -0
  130. package/src/components/layout/NavTabs.vue +192 -0
  131. package/src/components/layout/Show.vue +157 -0
  132. package/src/components/layout/index.ts +19 -0
  133. package/src/components/menu/Menu.jsx +94 -0
  134. package/src/components/menu/style/index.scss +18 -0
  135. package/src/components/select/Select.vue +85 -0
  136. package/src/components/table/Field.vue +49 -0
  137. package/src/components/table/Table.vue +391 -0
  138. package/src/components/table/index.md +1 -0
  139. package/src/components/table/index.ts +5 -0
  140. package/src/components/theme/index.ts +1 -0
  141. package/src/components/theme/theme.scss +1 -0
  142. package/src/components/theme/variable.scss +21 -0
  143. package/src/hooks/http/index.ts +107 -0
  144. package/src/hooks/index.ts +2 -0
  145. package/src/hooks/route/index.ts +84 -0
  146. package/src/store/index.ts +7 -0
  147. package/src/store/modules/Breadcrumb.ts +25 -0
  148. package/src/store/modules/DataDictionary.ts +49 -0
  149. package/src/store/modules/KeepAlive.ts +47 -0
  150. package/src/store/modules/Menu.ts +24 -0
  151. package/src/store/modules/NavTab.ts +81 -0
  152. package/src/store/modules/Settings.ts +120 -0
  153. package/src/store/modules/User.ts +23 -0
  154. package/src/store/types.ts +15 -0
  155. package/src/tsconfig.json +16 -0
  156. package/src/utils/get.ts +15 -0
  157. package/src/utils/index.ts +2 -0
  158. package/src/utils/install.ts +12 -0
@@ -1,274 +1 @@
1
- .dfb-list-layout {
2
- padding: 20px;
3
- height: 100%;
4
- }
5
- .dfb-list-layout .wrapper {
6
- display: flex;
7
- flex-direction: column;
8
- }
9
- .dfb-list-layout .dfb-list-table {
10
- flex: 1;
11
- }
12
- .dfb-list-layout .dfb-list-table .ant-card-body {
13
- display: flex;
14
- flex-direction: column;
15
- height: 100%;
16
- }
17
- .dfb-list-layout .dfb-list-form .ant-card-body {
18
- padding-bottom: 0;
19
- }
20
- .dfb-list-layout .wrapper,
21
- .dfb-layout {
22
- height: 100%;
23
- }
24
- .dfb-layout .dfb-layout-sider {
25
- position: fixed;
26
- left: 0;
27
- top: 0;
28
- bottom: 0;
29
- z-index: 1;
30
- }
31
- .dfb-layout .dfb-top-layout {
32
- position: fixed;
33
- left: 200px;
34
- right: 0;
35
- z-index: 210;
36
- }
37
- .dfb-layout .dfb-layout-content {
38
- margin-left: 200px;
39
- margin-top: 84px;
40
- }
41
- .fade-enter-active,
42
- .fade-leave-active {
43
- transition: opacity 0.1s ease;
44
- }
45
- .fade-enter-from,
46
- .fade-leave-to {
47
- opacity: 0;
48
- }
49
- .main-enter-active {
50
- transition: 0.2s;
51
- }
52
- .main-leave-active {
53
- transition: 0.15s;
54
- }
55
- .main-enter-from {
56
- opacity: 0;
57
- margin-left: -20px;
58
- }
59
- .main-leave-to {
60
- opacity: 0;
61
- margin-left: 20px;
62
- }
63
- .dfb-layout-header {
64
- display: flex;
65
- justify-content: space-between;
66
- align-items: center;
67
- padding: 0 15px;
68
- height: 42px;
69
- border-bottom: 1px solid #f0f2f5;
70
- background-color: #fff;
71
- }
72
- .dfb-layout-header .dfb-layout-header-left {
73
- display: flex;
74
- justify-content: center;
75
- }
76
- .dfb-layout-header .dfb-layout-header-left .dfb-side-collapsed {
77
- margin-right: 20px;
78
- cursor: pointer;
79
- width: 42px;
80
- line-height: 30px;
81
- text-align: center;
82
- transition-duration: 0.2s;
83
- }
84
- .dfb-layout-header .dfb-layout-header-left .dfb-side-collapsed:hover {
85
- background-color: #f0f2f5;
86
- border-radius: 4px;
87
- }
88
- .dfb-layout-header .dfb-layout-header-left .dfb-side-collapsed .icon {
89
- transition-duration: 0.2s;
90
- }
91
- .dfb-user-menu {
92
- display: flex;
93
- align-items: center;
94
- height: 100%;
95
- }
96
- .dfb-user-menu .dfb-operation-items {
97
- margin-left: 10px;
98
- height: 100%;
99
- }
100
- .dfb-user-menu .dfb-operation-items .ant-dropdown-link {
101
- display: flex;
102
- align-items: center;
103
- justify-content: center;
104
- height: 100%;
105
- }
106
- .collapsed-animation {
107
- transform: rotate(-180deg);
108
- }
109
- .xi-pagination {
110
- margin-top: 24px;
111
- text-align: center;
112
- }
113
- .dfb-nav {
114
- background: #f0f2f5;
115
- }
116
- .dfb-nav .ant-tabs-nav {
117
- margin: 0;
118
- }
119
- .dfb-nav .ant-tabs-content-holder {
120
- display: none;
121
- }
122
- .dfb-nav .ant-tabs-tab {
123
- position: relative;
124
- margin-left: 0 !important;
125
- border: 0 !important;
126
- transition: none !important;
127
- border-radius: 10px 10px 0 0 !important;
128
- }
129
- .dfb-nav .ant-tabs-tab:not(.ant-tabs-tab-active) {
130
- background: transparent;
131
- }
132
- .dfb-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active) {
133
- background: #e9e9e9;
134
- }
135
- .dfb-nav .ant-tabs-tab .ant-tabs-tab-btn {
136
- display: flex;
137
- align-items: center;
138
- }
139
- .dfb-nav .ant-tabs-tab .anticon {
140
- margin-right: 0;
141
- margin-left: 20px;
142
- }
143
- .dfb-nav .ant-tabs-tab .anticon:hover {
144
- font-weight: 700;
145
- }
146
- .dfb-nav .ant-tabs-nav-wrap {
147
- padding: 4px 8px 0;
148
- }
149
- .dfb-nav .ant-tabs-tab:before,
150
- .dfb-nav .ant-tabs-tab:after {
151
- position: absolute;
152
- bottom: 0;
153
- content: "";
154
- width: 20px;
155
- height: 20px;
156
- border-radius: 100%;
157
- box-shadow: 0 0 0 40px transparent;
158
- }
159
- .dfb-nav .ant-tabs-tab:before {
160
- left: -20px;
161
- clip-path: inset(50% -10px 0 50%);
162
- }
163
- .dfb-nav .ant-tabs-tab:after {
164
- right: -20px;
165
- clip-path: inset(50% 50% 0 -10px);
166
- }
167
- .dfb-nav .ant-tabs-tab:hover:before,
168
- .dfb-nav .ant-tabs-tab:hover:after {
169
- box-shadow: 0 0 0 30px #e9e9e9;
170
- }
171
- .dfb-nav .ant-tabs-tab.ant-tabs-tab-active:before,
172
- .dfb-nav .ant-tabs-tab.ant-tabs-tab-active:after {
173
- z-index: 10;
174
- box-shadow: 0 0 0 30px #fff;
175
- }
176
- .dfb-nav .tab-item-dividers {
177
- position: absolute;
178
- z-index: 0;
179
- height: 14px;
180
- top: 50%;
181
- left: 0;
182
- right: 0;
183
- margin-top: -7px;
184
- }
185
- .dfb-nav .tab-item-dividers:before {
186
- content: "";
187
- display: block;
188
- position: absolute;
189
- top: 0;
190
- left: 1px;
191
- bottom: 0;
192
- width: 1px;
193
- opacity: 1;
194
- background-color: red;
195
- transition: opacity 0.2s ease, background-color 0.3s;
196
- z-index: 2;
197
- }
198
- .dfb-show-layout .dfb-page-header {
199
- position: sticky;
200
- top: 84px;
201
- padding: 4px 24px;
202
- }
203
- .xi-show-layout {
204
- display: flex;
205
- flex-direction: column;
206
- }
207
- .xi-show-layout .xi-page-header {
208
- background: #fff;
209
- position: sticky;
210
- top: 0;
211
- z-index: 1;
212
- padding: 0 0 0 10px;
213
- }
214
- .xi-show-layout .xi-page-header .ant-page-header-heading-title {
215
- font-size: 16px;
216
- }
217
- .xi-show-layout .xi-show-content {
218
- flex: 1;
219
- position: relative;
220
- padding: 20px;
221
- overflow-y: scroll;
222
- -ms-overflow-style: none;
223
- }
224
- .xi-show-layout .xi-show-content::-webkit-scrollbar {
225
- width: 0 !important;
226
- display: none;
227
- }
228
- .xi-show-layout .footer {
229
- padding: 20px;
230
- }
231
- .dfb-breadcrumb .ant-breadcrumb-separator {
232
- display: none;
233
- }
234
- .dfb-breadcrumb .breadcrumb {
235
- display: flex;
236
- }
237
- .dfb-breadcrumb .breadcrumb .breadcrumb-item:first-child .breadcrumb-link {
238
- border-radius: 6px 0 0 6px;
239
- clip-path: polygon(
240
- 0 0,
241
- calc(100% - 8px) 0,
242
- 100% 50%,
243
- calc(100% - 8px) 100%,
244
- 0 100%
245
- );
246
- }
247
- .dfb-breadcrumb
248
- .breadcrumb
249
- .breadcrumb-item:last-child:not(:last-child)
250
- .breadcrumb-link {
251
- border-radius: 0 6px 6px 0;
252
- clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 8px 50%);
253
- }
254
- .dfb-breadcrumb .breadcrumb-link {
255
- display: block;
256
- padding: 4px 12px;
257
- background: #f0f2f5;
258
- clip-path: polygon(
259
- 0 0,
260
- calc(100% - 8px) 0,
261
- 100% 50%,
262
- calc(100% - 8px) 100%,
263
- 0 100%,
264
- 8px 50%
265
- );
266
- }
267
- .breadcrumb-enter-active {
268
- transition: all 0.25s;
269
- }
270
- .breadcrumb-enter-from,
271
- .breadcrumb-leave-active {
272
- opacity: 0;
273
- transform: translate(30px) skew(-50deg);
274
- }
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)}
@@ -0,0 +1,11 @@
1
+ const n = (e, o, r = void 0) => {
2
+ const s = o.replace(/\[(\d+)\]/g, ".$1").split(".");
3
+ let t = e;
4
+ for (const c of s)
5
+ if (t = Object(t)[c], t === void 0)
6
+ return r;
7
+ return t;
8
+ };
9
+ export {
10
+ n as get
11
+ };
@@ -0,0 +1,61 @@
1
+ @import "../../theme/variable.scss";
2
+
3
+ .#{$prefix-name}-grid {
4
+ position: relative;
5
+ display: grid;
6
+
7
+ .#{$prefix-name}-grid--item {
8
+ border: $gird-border-width solid $grid-border-color;
9
+ margin-left: -$gird-border-width;
10
+ margin-top: -$gird-border-width;
11
+ }
12
+ }
13
+
14
+ // 网格表单样式
15
+ .#{$prefix-name}-grid-form {
16
+ .ant-form-item {
17
+ margin-bottom: 0;
18
+ height: 100%;
19
+ .ant-form-item-label {
20
+ border-right: $gird-border-width solid $grid-border-color;
21
+ }
22
+ .ant-input,
23
+ .ant-select-selector {
24
+ border: 0;
25
+ border-radius: 0;
26
+
27
+ &:focus {
28
+ box-shadow: 0 0 0 $grid-input-border-width
29
+ $grid-input-focus-border-color;
30
+ }
31
+ }
32
+ .ant-input[disabled] {
33
+ color: #525252;
34
+ }
35
+ }
36
+ .ant-form-item-has-error {
37
+ .ant-input {
38
+ &::placeholder {
39
+ //color: red;
40
+ }
41
+ }
42
+ .ant-form-item-explain {
43
+ display: none;
44
+ }
45
+ }
46
+ .ant-select-focused:not(.ant-select-disabled).ant-select:not(
47
+ .ant-select-customize-input
48
+ )
49
+ .ant-select-selector {
50
+ box-shadow: 0 0 0 $grid-input-border-width $grid-input-focus-border-color;
51
+ }
52
+ .ant-form-item-has-error
53
+ :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus {
54
+ box-shadow: 0 0 0px $grid-input-border-width red;
55
+ border-radius: 0;
56
+ }
57
+ .ant-form-item-has-error
58
+ :not(.ant-input-disabled):not(.ant-input-borderless).ant-input {
59
+ box-shadow: 0 0 0px $grid-input-border-width $grid-input-error-border-color;
60
+ }
61
+ }
@@ -0,0 +1,15 @@
1
+ @import "./theme/variable";
2
+ @import "./grid/style";
3
+ @import "./menu/style";
4
+
5
+ html,
6
+ body,
7
+ #app {
8
+ height: 100vh;
9
+ background: $bg-color;
10
+ &::-webkit-scrollbar {
11
+ width: 0 !important;
12
+ display: none;
13
+ }
14
+ }
15
+
@@ -0,0 +1,18 @@
1
+ @import "../../theme/variable.scss";
2
+
3
+ .ditari-menu {
4
+ // 菜单高度 $logo-height 为logo的高度
5
+ height: calc(100vh - $logo-height);
6
+ overflow: scroll;
7
+ &::-webkit-scrollbar {
8
+ width: 0 !important;
9
+ display: none;
10
+ }
11
+ }
12
+
13
+ .ditari-layout {
14
+ background-color: red;
15
+ .ditari-layout-sider {
16
+ background-color: red;
17
+ }
18
+ }
@@ -0,0 +1 @@
1
+ @import "./variable";
@@ -0,0 +1,21 @@
1
+ // class 前缀
2
+ $prefix-name: ditari-bsui;
3
+ // 页面背景颜色
4
+ $bg-color: #f0f2f5;
5
+ //左侧logo高度
6
+ $logo-height: 240px !default;
7
+ /******======网格变量======******/
8
+ //网格边框颜色
9
+ $grid-border-color: #4e4e4e;
10
+ // 网格里面输入框获取焦点时的边框颜色
11
+ $grid-input-focus-border-color: #1890ff;
12
+ //输入框校验不通过时候的颜色
13
+ $grid-input-error-border-color: #ff4d4f;
14
+ // 网格输入框边框宽度
15
+ $grid-input-border-width: 2px;
16
+ // 网格边框宽度
17
+ $gird-border-width: 1px;
18
+
19
+ // 左侧菜单
20
+ $top-header-height: 84px;
21
+ $logo-height: 40px !default;
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@ditari/bsui",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "files": [
5
- "dist/**"
5
+ "dist/**",
6
+ "src/**"
6
7
  ],
7
8
  "private": false,
8
9
  "publishConfig": {
9
10
  "access": "public"
10
11
  },
11
12
  "exports": {
12
- "./ui": {
13
+ ".": {
13
14
  "require": "./dist/cjs/components/index.cjs.js",
14
15
  "import": "./dist/esm/components/index.esm.js",
15
16
  "types": "./dist/esm/components/index.d.ts"
@@ -20,9 +21,11 @@
20
21
  "types": "./dist/esm/store/index.d.ts"
21
22
  },
22
23
  "./hooks": {
23
- "require": "./dist/cjs/store/index.cjs.js",
24
- "import": "./dist/esm/store/index.esm.js",
25
- "types": "./dist/esm/store/index.d.ts"
26
- }
24
+ "require": "./dist/cjs/hooks/index.cjs.js",
25
+ "import": "./dist/esm/hooks/index.esm.js",
26
+ "types": "./dist/esm/hooks/index.d.ts"
27
+ },
28
+ "./css/*": "./dist/css/*",
29
+ "./theme/*": "./dist/style/*"
27
30
  }
28
31
  }
@@ -0,0 +1,4 @@
1
+ export { default as DForm } from "./form";
2
+ export * from "./layout";
3
+ export { default as DTable } from "./table";
4
+ export { DGrid, DGridItem } from "./grid";
@@ -0,0 +1,8 @@
1
+ <script setup lang="ts"></script>
2
+ <script lang="ts">
3
+ export default {
4
+ name: "Config"
5
+ };
6
+ </script>
7
+ <template></template>
8
+ <style scoped></style>
@@ -0,0 +1,10 @@
1
+ <script setup lang="ts"></script>
2
+ <script lang="ts">
3
+ export default {
4
+ name: "DForm"
5
+ };
6
+ </script>
7
+ <template>
8
+ <div>form</div>
9
+ <a-button>ok</a-button>
10
+ </template>
@@ -0,0 +1,10 @@
1
+ import { defineComponent } from "vue";
2
+ /**
3
+ * 网格表单
4
+ * @author 余春林
5
+ */
6
+ export default defineComponent({
7
+ setup() {
8
+ return () => <>我是网格表单</>;
9
+ }
10
+ });
@@ -0,0 +1,8 @@
1
+ import { withInstall } from "../../utils/index";
2
+ import Form from "./Form.vue";
3
+ import GridForm from "./grid-form/GridForm";
4
+
5
+ export const DForm = withInstall(Form);
6
+ export const DGridForm = withInstall(GridForm);
7
+
8
+ export default { DForm, DGridForm };
File without changes
@@ -0,0 +1,73 @@
1
+ import { ref, defineComponent } from "vue";
2
+ import { useResizeObserver } from "@vueuse/core";
3
+ import { useSettingsStore } from "../../store";
4
+ import { storeToRefs } from "pinia";
5
+ import { prefixName } from "../theme";
6
+ import GridItem from "./GridItem";
7
+
8
+ //class名称
9
+ const baseClassName = `${prefixName}-grid`;
10
+
11
+ export default defineComponent({
12
+ name: "DGrid",
13
+ props: {
14
+ // css class
15
+ className: {
16
+ type: String,
17
+ default: ""
18
+ },
19
+ // 是否补全空白单元格
20
+ fill: {
21
+ type: Boolean,
22
+ default: true
23
+ }
24
+ },
25
+ setup(props, { slots }: any) {
26
+ if (!slots.default) {
27
+ return () => <>ok</>;
28
+ }
29
+ // 从store获取网格配置信息
30
+ const store = useSettingsStore();
31
+ // 转换成响应式对象 不使用storeToRefs的对象被解构后失去”响应式“
32
+ const { gridValue } = storeToRefs(store);
33
+
34
+ // 获取单元格个数
35
+ const length =
36
+ slots?.default()[0]?.children.length || slots?.default().length;
37
+
38
+ // 要填充空白的网格数
39
+ const fillGridItems = ref<number[]>([]);
40
+
41
+ // 网格列
42
+ const baseStyle = ref<any>({
43
+ "grid-template-columns": gridValue.value?.value ?? ""
44
+ });
45
+
46
+ //监听屏幕尺寸变化,一般只有人工拉大屏幕尺寸才会触发(默认执行一次)
47
+ useResizeObserver(document.body, () => {
48
+ //TODO 检测浏览器是否被缩放
49
+ //
50
+ store.gridMatching();
51
+ baseStyle.value["grid-template-columns"] = gridValue.value?.value ?? "";
52
+ // 获取当前设备匹配到显示的列数配置
53
+ const colCount = gridValue.value?.col;
54
+ // 根据总单元格和显示的列数 计算出总行数
55
+ const rowCount = Math.ceil(length / colCount);
56
+ // 总行数乘以显示的列数减去传入的子标签个数 等于要填充的空白单元格数
57
+ const number = props.fill ? rowCount * colCount - length : 0;
58
+ // 生成一个要填充空白单元格的数组 用于循环空白的单元格
59
+ fillGridItems.value = Array.from({ length: number }, (_, i) => i + 1);
60
+ });
61
+
62
+ return () => (
63
+ <>
64
+ <div class={[baseClassName, props.className]} style={baseStyle.value}>
65
+ {slots.default && slots.default(fillGridItems.value)}
66
+ {fillGridItems.value.map((number) => (
67
+ <GridItem key={number}></GridItem>
68
+ ))}
69
+ </div>
70
+ </>
71
+ );
72
+ }
73
+ });
@@ -0,0 +1,15 @@
1
+ import { defineComponent } from "vue";
2
+ import { prefixName } from "../theme";
3
+
4
+ //class名称
5
+ const className = `${prefixName}-grid--item`;
6
+ export default defineComponent({
7
+ name: "DGridItem",
8
+ setup(props, { slots }) {
9
+ return () => (
10
+ <>
11
+ <div class={className}>{slots.default && slots.default()}</div>
12
+ </>
13
+ );
14
+ }
15
+ });
@@ -0,0 +1,4 @@
1
+ # Gird
2
+
3
+
4
+ # GridItem
@@ -0,0 +1,7 @@
1
+ import { withInstall } from "../../utils/index";
2
+ import Grid from "./Grid";
3
+ import GridItem from "./GridItem";
4
+
5
+ export const DGrid = withInstall(Grid);
6
+ export const DGridItem = withInstall(GridItem);
7
+
@@ -0,0 +1,61 @@
1
+ @import "../../theme/variable.scss";
2
+
3
+ .#{$prefix-name}-grid {
4
+ position: relative;
5
+ display: grid;
6
+
7
+ .#{$prefix-name}-grid--item {
8
+ border: $gird-border-width solid $grid-border-color;
9
+ margin-left: -$gird-border-width;
10
+ margin-top: -$gird-border-width;
11
+ }
12
+ }
13
+
14
+ // 网格表单样式
15
+ .#{$prefix-name}-grid-form {
16
+ .ant-form-item {
17
+ margin-bottom: 0;
18
+ height: 100%;
19
+ .ant-form-item-label {
20
+ border-right: $gird-border-width solid $grid-border-color;
21
+ }
22
+ .ant-input,
23
+ .ant-select-selector {
24
+ border: 0;
25
+ border-radius: 0;
26
+
27
+ &:focus {
28
+ box-shadow: 0 0 0 $grid-input-border-width
29
+ $grid-input-focus-border-color;
30
+ }
31
+ }
32
+ .ant-input[disabled] {
33
+ color: #525252;
34
+ }
35
+ }
36
+ .ant-form-item-has-error {
37
+ .ant-input {
38
+ &::placeholder {
39
+ //color: red;
40
+ }
41
+ }
42
+ .ant-form-item-explain {
43
+ display: none;
44
+ }
45
+ }
46
+ .ant-select-focused:not(.ant-select-disabled).ant-select:not(
47
+ .ant-select-customize-input
48
+ )
49
+ .ant-select-selector {
50
+ box-shadow: 0 0 0 $grid-input-border-width $grid-input-focus-border-color;
51
+ }
52
+ .ant-form-item-has-error
53
+ :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus {
54
+ box-shadow: 0 0 0px $grid-input-border-width red;
55
+ border-radius: 0;
56
+ }
57
+ .ant-form-item-has-error
58
+ :not(.ant-input-disabled):not(.ant-input-borderless).ant-input {
59
+ box-shadow: 0 0 0px $grid-input-border-width $grid-input-error-border-color;
60
+ }
61
+ }
@@ -0,0 +1,15 @@
1
+ @import "./theme/variable";
2
+ @import "./grid/style";
3
+ @import "./menu/style";
4
+
5
+ html,
6
+ body,
7
+ #app {
8
+ height: 100vh;
9
+ background: $bg-color;
10
+ &::-webkit-scrollbar {
11
+ width: 0 !important;
12
+ display: none;
13
+ }
14
+ }
15
+