@lambo-design/shared 1.0.0-beta.205 → 1.0.0-beta.207

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.
@@ -43,8 +43,8 @@
43
43
  // 全局样式,查询条件-2022年11月11日
44
44
  .search {
45
45
  // date-picker
46
- .ivu-date-picker {
47
- width: 100% !important;
46
+ .ind-date-picker {
47
+ width: var(--date-picker-width, 100%);
48
48
  }
49
49
 
50
50
  // form
@@ -13,3 +13,11 @@
13
13
  @import './table.less';
14
14
  @import './tree.less';
15
15
  @import './upload.less';
16
+ @import './n-button.less';
17
+ @import './n-model/index.less';
18
+ @import './n-model/report-index.less';
19
+ @import './n-image-preview.less';
20
+ @import './n-picker.less';
21
+ @import './n-sign.less';
22
+ @import './n-tooltip.less';
23
+ @import './n-panel.less';
@@ -0,0 +1,131 @@
1
+ .upload-file {
2
+ position: relative;
3
+ min-height: 45px;
4
+
5
+ .data-panel {
6
+ padding: 5px 10px 0px 10px;
7
+ border: 1px #dee1e8 solid;
8
+ border-radius: 5px;
9
+ }
10
+
11
+ .content-item {
12
+ display: flex;
13
+ line-height: var(--file-line-height);
14
+ box-sizing: border-box;
15
+ border-bottom: 1px solid var(--ind-border-color);
16
+ // padding-left: 20px;
17
+ &:last-child {
18
+ border-bottom: none;
19
+ }
20
+
21
+ .title {
22
+ width: calc(100% - 240px);
23
+ font-size: 14px;
24
+ line-height: var(--file-line-height);
25
+ white-space: nowrap;
26
+ overflow: hidden;
27
+ text-overflow: ellipsis;
28
+ }
29
+ .preview {
30
+ width: 80px;
31
+ text-align: center;
32
+ color: var(--ind-primary-color);
33
+ cursor: pointer;
34
+ }
35
+ .download,
36
+ .delete {
37
+ display: block;
38
+ width: 80px;
39
+ line-height: var(--file-line-height);
40
+ cursor: pointer;
41
+ i {
42
+ font-size: 18px;
43
+ vertical-align: middle !important;
44
+ }
45
+ text-align: center;
46
+ color: var(--ind-primary-color);
47
+ }
48
+ }
49
+ }
50
+
51
+ .ivu-divider-horizontal {
52
+ margin: 5px 0;
53
+ }
54
+
55
+ .upload-img {
56
+ padding: 2px;
57
+ min-height: 60px;
58
+ line-height: 0px;
59
+ border: 2px var(--ind-bg-color-dark) solid;
60
+
61
+ .demo-upload-list {
62
+ display: inline-block;
63
+ width: 60px;
64
+ height: 60px;
65
+ text-align: center;
66
+ line-height: 60px;
67
+ border: 1px solid transparent;
68
+ border-radius: 4px;
69
+ overflow: hidden;
70
+ background: #fff;
71
+ position: relative;
72
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
73
+ margin-right: 4px;
74
+ }
75
+ .demo-upload-list img {
76
+ width: 100%;
77
+ height: 100%;
78
+ }
79
+ .demo-upload-list-cover {
80
+ display: none;
81
+ position: absolute;
82
+ top: 0;
83
+ bottom: 0;
84
+ left: 0;
85
+ right: 0;
86
+ background: rgba(0, 0, 0, 0.6);
87
+ cursor: pointer;
88
+ }
89
+ .demo-upload-list:hover .demo-upload-list-cover {
90
+ display: block;
91
+ }
92
+ .demo-upload-list-cover i {
93
+ margin: 0 2px;
94
+ color: var(--ind-white) !important;
95
+ font-size: 20px;
96
+ cursor: pointer;
97
+
98
+ &.delete-icon {
99
+ position: absolute;
100
+ top: 0;
101
+ right: 0;
102
+ margin: 0;
103
+ font-size: 16px;
104
+ background: rgba(255, 255, 255, 0.3);
105
+ border-radius: 0 0 0 50%;
106
+ }
107
+ }
108
+ }
109
+ .upload-img-no-border {
110
+ padding: 2px;
111
+ line-height: 0px;
112
+ }
113
+ .ivu-modal-fullscreen .ivu-modal-content {
114
+ background-color: rgba(0, 0, 0, 0) !important;
115
+ }
116
+ .ivu-modal-close .ivu-icon-ios-close {
117
+ color: white;
118
+ }
119
+ .ivu-carousel-item {
120
+ text-align: center;
121
+ }
122
+ .carouse-img {
123
+ max-width: 90vw !important;
124
+ max-height: 95vh !important;
125
+ min-block-size: -webkit-fill-available;
126
+ }
127
+ .carouse-content {
128
+ width: 100%;
129
+ height: 95vh;
130
+ text-align: center;
131
+ }
@@ -0,0 +1,131 @@
1
+ .upload-file {
2
+ position: relative;
3
+ min-height: 45px;
4
+
5
+ .data-panel {
6
+ padding: 5px 10px 0px 10px;
7
+ border: 1px #dee1e8 solid;
8
+ border-radius: 5px;
9
+ }
10
+
11
+ .content-item {
12
+ display: flex;
13
+ line-height: var(--file-line-height);
14
+ box-sizing: border-box;
15
+ border-bottom: 1px solid var(--ind-border-color);
16
+ // padding-left: 20px;
17
+ &:last-child {
18
+ border-bottom: none;
19
+ }
20
+
21
+ .title {
22
+ width: calc(100% - 240px);
23
+ font-size: 14px;
24
+ line-height: var(--file-line-height);
25
+ white-space: nowrap;
26
+ overflow: hidden;
27
+ text-overflow: ellipsis;
28
+ }
29
+ .preview {
30
+ width: 80px;
31
+ text-align: center;
32
+ color: var(--ind-primary-color);
33
+ cursor: pointer;
34
+ }
35
+ .download,
36
+ .delete {
37
+ display: block;
38
+ width: 80px;
39
+ line-height: var(--file-line-height);
40
+ cursor: pointer;
41
+ i {
42
+ font-size: 18px;
43
+ vertical-align: middle !important;
44
+ }
45
+ text-align: center;
46
+ color: var(--ind-primary-color);
47
+ }
48
+ }
49
+ }
50
+
51
+ .ivu-divider-horizontal {
52
+ margin: 5px 0;
53
+ }
54
+
55
+ .upload-img {
56
+ padding: 2px;
57
+ min-height: 60px;
58
+ line-height: 0px;
59
+ border: 2px var(--ind-bg-color-dark) solid;
60
+
61
+ .demo-upload-list {
62
+ display: inline-block;
63
+ width: 60px;
64
+ height: 60px;
65
+ text-align: center;
66
+ line-height: 60px;
67
+ border: 1px solid transparent;
68
+ border-radius: 4px;
69
+ overflow: hidden;
70
+ background: #fff;
71
+ position: relative;
72
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
73
+ margin-right: 4px;
74
+ }
75
+ .demo-upload-list img {
76
+ width: 100%;
77
+ height: 100%;
78
+ }
79
+ .demo-upload-list-cover {
80
+ display: none;
81
+ position: absolute;
82
+ top: 0;
83
+ bottom: 0;
84
+ left: 0;
85
+ right: 0;
86
+ background: rgba(0, 0, 0, 0.6);
87
+ cursor: pointer;
88
+ }
89
+ .demo-upload-list:hover .demo-upload-list-cover {
90
+ display: block;
91
+ }
92
+ .demo-upload-list-cover i {
93
+ margin: 0 2px;
94
+ color: var(--ind-white) !important;
95
+ font-size: 20px;
96
+ cursor: pointer;
97
+
98
+ &.delete-icon {
99
+ position: absolute;
100
+ top: 0;
101
+ right: 0;
102
+ margin: 0;
103
+ font-size: 16px;
104
+ background: rgba(255, 255, 255, 0.3);
105
+ border-radius: 0 0 0 50%;
106
+ }
107
+ }
108
+ }
109
+ .upload-img-no-border {
110
+ padding: 2px;
111
+ line-height: 0px;
112
+ }
113
+ .ivu-modal-fullscreen .ivu-modal-content {
114
+ background-color: rgba(0, 0, 0, 0) !important;
115
+ }
116
+ .ivu-modal-close .ivu-icon-ios-close {
117
+ color: white;
118
+ }
119
+ .ivu-carousel-item {
120
+ text-align: center;
121
+ }
122
+ .carouse-img {
123
+ max-width: 90vw !important;
124
+ max-height: 95vh !important;
125
+ min-block-size: -webkit-fill-available;
126
+ }
127
+ .carouse-content {
128
+ width: 100%;
129
+ height: 95vh;
130
+ text-align: center;
131
+ }
@@ -0,0 +1,19 @@
1
+ .ind-modal .ivu-modal {
2
+ top:var(--modal-top-height)
3
+ }
4
+ .ind-modal .ivu-modal-fullscreen{
5
+ top:0
6
+ }
7
+ .ind-modal .ivu-modal:not(.ivu-modal-fullscreen) .ivu-modal-body{
8
+ max-height:calc(100vh - var(--modal-other-height));
9
+ overflow:auto
10
+ }
11
+ .ind-modal .ivu-modal:not(.ivu-modal-fullscreen) .ivu-modal-footer button+button{
12
+ margin-left:0
13
+ }
14
+ .ind-modal .ivu-modal.ivu-modal-fullscreen .ivu-modal-close .ivu-icon-ios-close{
15
+ color:#fff
16
+ }
17
+ .ind-modal:has(.ivu-modal-confirm){
18
+ z-index:999999998!important
19
+ }
@@ -0,0 +1,43 @@
1
+ .report-index-model-panel .left-panel{
2
+ padding:var(--report-index-model-panel-padding);
3
+ border:1px solid var(--ind-border-color)
4
+ }
5
+ .report-index-model-panel .left-panel .report-index-dimension1-panel{
6
+ width:100px;
7
+ height:-webkit-fit-content;
8
+ height:-moz-fit-content;
9
+ height:fit-content;
10
+ border:1px solid var(--ind-border-color);
11
+ border-radius:4px
12
+ }
13
+ .report-index-model-panel .left-panel .report-index-dimension1-panel .report-index-dimension1{
14
+ text-align:center;
15
+ line-height:30px;
16
+ border-bottom:1px solid var(--ind-border-color);
17
+ cursor:pointer
18
+ }
19
+ .report-index-model-panel .left-panel .report-index-dimension1-panel .report-index-dimension1:last-child{
20
+ border-bottom:none
21
+ }
22
+ .report-index-model-panel .left-panel .report-index-dimension1-panel .report-index-dimension1.selected{
23
+ background-color:var(--ind-blue);
24
+ color:var(--ind-white)
25
+ }
26
+ .report-index-model-panel .left-panel .report-index-index-panel{
27
+ border-left:1px solid var(--ind-border-color)
28
+ }
29
+ .report-index-model-panel .left-panel .report-index-options{
30
+ padding:0 var(--report-index-model-panel-padding);
31
+ padding-right:var(--report-index-options-padding-right)
32
+ }
33
+ .report-index-model-panel .opt-panel{
34
+ padding:0 20px;
35
+ height:600px;
36
+ -webkit-box-pack:center;
37
+ -ms-flex-pack:center;
38
+ justify-content:center
39
+ }
40
+ .report-index-model-panel .right-panel{
41
+ padding:var(--report-index-model-panel-padding);
42
+ border:1px solid var(--ind-border-color)
43
+ }
@@ -0,0 +1,41 @@
1
+ .ind-loading-panel{
2
+ position:relative;
3
+ height:auto
4
+ }
5
+ .ind-loading-panel .ind-loading-spin--dark{
6
+ background-color:#e1e1e1;
7
+ opacity:.9
8
+ }
9
+ .ind-loading-panel .ind-loading-spin-icon{
10
+ -webkit-animation:ani-loading-spin 1s linear infinite;
11
+ animation:ani-loading-spin 1s linear infinite
12
+ }
13
+ @-webkit-keyframes ani-loading-spin{
14
+ from{
15
+ -webkit-transform:rotate(0);transform:rotate(0)
16
+ }
17
+ 50%{
18
+ -webkit-transform:rotate(180deg);transform:rotate(180deg)
19
+ }
20
+ to{
21
+ -webkit-transform:rotate(360deg);transform:rotate(360deg)
22
+ }
23
+ }@keyframes ani-loading-spin{
24
+ from{
25
+ -webkit-transform:rotate(0);transform:rotate(0)
26
+ }
27
+ 50%{
28
+ -webkit-transform:rotate(180deg);
29
+ transform:rotate(180deg)
30
+ }
31
+ to{
32
+ -webkit-transform:rotate(360deg);
33
+ transform:rotate(360deg)
34
+ }
35
+ }
36
+
37
+ .ind-back-top-panel{
38
+ position:relative;
39
+ height:100%;
40
+ overflow-y:auto
41
+ }
@@ -0,0 +1,37 @@
1
+ .ind-date-picker {
2
+ .ivu-date-picker {
3
+ width: -webkit-fill-available;
4
+ }
5
+
6
+ .ind-range-date-picker {
7
+ display: flex;
8
+ align-items: center;
9
+
10
+ .range-sep {
11
+ margin: 0 var(--ind-padding-base);
12
+ }
13
+ }
14
+ }
15
+
16
+ .ind-picker-drop {
17
+ .ivu-date-picker-cells-month.quarter,
18
+ .ivu-date-picker-cells-month.half-year {
19
+ span {
20
+ margin-left: 0;
21
+ margin-right: 0;
22
+ width: 50%;
23
+ text-align: center;
24
+
25
+ em {
26
+ width: auto;
27
+ padding: 0 10px;
28
+ }
29
+ }
30
+ }
31
+ .ivu-date-picker-cells-month.half-year {
32
+ display: flex;
33
+ span {
34
+ flex: 50% 1 1;
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,17 @@
1
+ .ind-sign{
2
+ padding:var(--ind-sign-padding)
3
+ }
4
+ .ind-sign__content{
5
+ display:flex;
6
+ justify-content:center;
7
+ align-items:center;
8
+ height:var(--ind-sign-content-height);
9
+ background-color:var(--ind-sign-content-background);
10
+ border:var(--ind-sign-content-border);
11
+ border-radius:var(--ind-border-radius-md);
12
+ overflow:hidden
13
+ }
14
+ .ind-sign__content canvas{
15
+ width:100%;
16
+ height:100%
17
+ }
@@ -0,0 +1,10 @@
1
+ .ivu-tooltip-arrow{
2
+ border-bottom-color:#e8e9ea !important
3
+ }
4
+ .ivu-tooltip-inner{
5
+ background-color:#e8e9ea !important;
6
+ color:#333 !important
7
+ }
8
+ body>.ivu-tooltip-popper .ivu-tooltip-inner {
9
+ white-space:pre-wrap
10
+ }
@@ -27,15 +27,15 @@
27
27
 
28
28
  .ag-cell {
29
29
  user-select: text;
30
- overflow: unset;
30
+ // overflow: unset;
31
31
  }
32
32
 
33
33
  // .ag-cell-value:has('.ivu-select') {
34
34
  // overflow: unset;
35
35
  // }
36
- .ag-cell.ag-wrap-cell {
37
- overflow: visible;
38
- }
36
+ // .ag-cell.ag-wrap-cell {
37
+ // overflow: visible;
38
+ // }
39
39
 
40
40
  .ag-theme-balham .ag-ltr .ag-has-focus .ag-cell-focus:not(.ag-cell-range-selected),
41
41
  .ag-theme-balham .ag-ltr .ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),
@@ -156,4 +156,4 @@
156
156
 
157
157
  .ivu-tree ul li {
158
158
  margin: var(--ivu-tree-margin);
159
- }
159
+ }
@@ -7,7 +7,7 @@
7
7
  * @Last Modified time: 2024-03-18 10:36:38
8
8
  */
9
9
 
10
- .ind-theme {
10
+ .ind-theme,.ind-modal.v-transfer-dom {
11
11
  .ag-theme-balham {
12
12
  --ag-grid-size: var(--ind-ag-grid-size);
13
13
  --ag-font-size: var(--ind-ag-font-size);
@@ -51,6 +51,7 @@
51
51
  line-height: var(--ind-ag-cell-line-height);
52
52
  align-items: center;
53
53
  display: flex;
54
+ // overflow: unset;
54
55
  .ag-cell-wrapper {
55
56
  display: flex;
56
57
  align-items: center;
@@ -168,6 +169,6 @@
168
169
  }
169
170
  }
170
171
  .ag-body.ag-layout-auto-height {
171
- min-height: 28px;
172
+ min-height: calc( var(--ind-ag-grid-size) * 6 ); // 28px; // 一行数据的高度
172
173
  }
173
174
  }
@@ -354,3 +354,10 @@ body > .ivu-tooltip-popper {
354
354
  font-size: 12px;
355
355
  // font-size: 14px;
356
356
  }
357
+
358
+ .ivu-spin-large.ivu-spin-fix.ivu-spin-fullscreen{
359
+ background-color:rgba(255,255,255,0.1)
360
+ }
361
+ .extend-height{
362
+ min-height: calc(100vh - 85px);
363
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/shared",
3
- "version": "1.0.0-beta.205",
3
+ "version": "1.0.0-beta.207",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -28,6 +28,9 @@
28
28
  "xlsx": "http://cicd.lambo.top/package/cdn/xlsx-0.19.1.tgz",
29
29
  "xlsx-style": "^0.8.13"
30
30
  },
31
+ "devDependencies": {
32
+ "vue": "^2.6.12"
33
+ },
31
34
  "scripts": {
32
35
  "release-shared": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
33
36
  "release-major": "standard-version --release-as major",
package/utils/bus.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import Vue from 'vue'
2
- const Bus = new Vue();
2
+ const Bus = null //new Vue();
3
3
  export default Bus;
@@ -217,20 +217,22 @@ const generator = (menuData,constantRouterComponents) => {
217
217
  if (item.component && typeof item.component == "string") {
218
218
  const target = constantRouterComponents[item.component];
219
219
  if (target) {
220
- if (typeof target.component == "string") {
221
- // 解决路由name与组件name不一致导致的keeplive不生效的问题
222
- try {
223
- //let componentPath = '@/view/' + target.component;
224
- item.component = resolve =>
225
- require(['@/view/'+ target.component], data => {
226
- data.default.name = item.name;
227
- resolve(data);
228
- });
229
- }catch (e) {
230
- delete item.component
220
+ if (target.component) {
221
+ if (typeof target.component == "string") {
222
+ // 解决路由name与组件name不一致导致的keeplive不生效的问题
223
+ try {
224
+ //let componentPath = '@/view/' + target.component;
225
+ item.component = resolve =>
226
+ require(['@/view/'+ target.component], data => {
227
+ data.default.name = item.name;
228
+ resolve(data);
229
+ });
230
+ }catch (e) {
231
+ delete item.component
232
+ }
233
+ } else {
234
+ item.component = target.component;
231
235
  }
232
- } else {
233
- item.component = target.component;
234
236
  }
235
237
  if (target.url) {
236
238
  let path = target.url;
@@ -251,7 +253,8 @@ const generator = (menuData,constantRouterComponents) => {
251
253
  if (target.hideInMenu) {
252
254
  item.meta.hideInMenu = target.hideInMenu;
253
255
  }
254
- } else if (item.uri) {
256
+ }
257
+ if (item.uri) {
255
258
  if (item.uri.startsWith("/")) {
256
259
  item.uri = item.uri.substr(1);
257
260
  }
@@ -309,35 +312,42 @@ const generator = (menuData,constantRouterComponents) => {
309
312
  let query = {};
310
313
  if (path.indexOf("?") > -1) {
311
314
  query = getUrlParams(path.substr(path.indexOf("?")));
312
- item.query = query;
313
315
  path = path.substr(0,path.indexOf("?"));
314
316
  }
315
- //let componentPath = '@/view/' + path;
316
- let component = require('@/view/' + path);
317
- if (component) {
318
- item.component = resolve => {
319
- require(['@/view/' + path], data => {
320
- data.default.name = item.name;
321
- resolve(data);
322
- });
323
- };
324
- item.path = "/" + path;
317
+ if (target && target.component) {
318
+
319
+ } else {
320
+ let component = require('@/view/' + path);
321
+ if (component) {
322
+ item.component = resolve => {
323
+ require(['@/view/' + path], data => {
324
+ data.default.name = item.name;
325
+ resolve(data);
326
+ });
327
+ };
328
+ } else {
329
+ //console.warn(`${item.name}(${item.uri})页面不存在`)
330
+ delete item.component;
331
+ }
332
+ }
333
+ if (target && target.url) {
334
+
325
335
  } else {
326
- //console.warn(`${item.name}(${item.uri})页面不存在`)
327
- delete item.component;
336
+ item.path = "/" + path;
337
+ item.query = query;
328
338
  }
329
339
  }catch (e){
330
340
  //console.warn(`${item.name}(${item.uri})页面不存在`)
331
341
  delete item.component;
332
342
  }
333
343
  }
334
- } else {
335
- //console.warn(`${item.name}的资源路径未配置`);
336
- delete item.component;
337
344
  }
338
345
  if (item.path == null) {
339
346
  item.path = "";
340
347
  }
348
+ if (item.component && typeof item.component == "string") {
349
+ delete item.component;
350
+ }
341
351
  if (item.children && item.children.length > 0) {
342
352
  generator(item.children,constantRouterComponents);
343
353
  }
package/utils/oss.js CHANGED
@@ -2,8 +2,6 @@ import { CONTENT_TYPE } from './ajax/content-type.js';
2
2
  import { config } from '../config/config.js';
3
3
  import ajax from "./ajax";
4
4
 
5
- const CONTEXT = config.ossServerContext
6
-
7
5
  /**
8
6
  * 文档中心下载文件的url,主要用于图片等直接写在 href 里
9
7
  *
@@ -11,7 +9,7 @@ const CONTEXT = config.ossServerContext
11
9
  * @returns url
12
10
  */
13
11
  export function getOssFileUrl(fileId = '') {
14
- return `${CONTEXT}/oss/file/get/${fileId}`
12
+ return `${config.ossServerContext}/oss/file/get/${fileId}`
15
13
  }
16
14
 
17
15
  /**
@@ -20,7 +18,7 @@ export function getOssFileUrl(fileId = '') {
20
18
  * @returns url
21
19
  */
22
20
  export function putOssFileUrl() {
23
- return `${CONTEXT}/oss/file/put`
21
+ return `${config.ossServerContext}/oss/file/put`
24
22
  }
25
23
 
26
24
  /**