@lambo-design/shared 1.0.0-beta.45 → 1.0.0-beta.47

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.
@@ -0,0 +1,253 @@
1
+ export default {
2
+ key: "atrovirens",
3
+ title: "墨绿色",
4
+ primaryColor: "#3EAF7C",
5
+ vars: `
6
+ --primary-color: #3EAF7C;
7
+ --primary-color-tint-20: #65bf96;
8
+ --primary-color-tint-90: #ecf7f2;
9
+ --primary-color-tint-80: #d8efe5;
10
+ --primary-color-tint-5: #48b383;
11
+ --primary-color-tint-95-fade-50: rgba(245, 251, 248, 0.5);
12
+ --primary-color-fade-20: rgba(62, 175, 124, 0.2);
13
+ --primary-color-shade-5: #3ba676;
14
+ --info-color: #2db7f5;
15
+ --info-color-tint-20: #57c5f7;
16
+ --info-color-tint-90: #eaf8fe;
17
+ --info-color-tint-80: #d5f1fd;
18
+ --info-color-tint-5: #38bbf6;
19
+ --info-color-tint-95-fade-50: rgba(245, 251, 254, 0.5);
20
+ --info-color-fade-20: rgba(45, 183, 245, 0.2);
21
+ --info-color-shade-5: #2baee9;
22
+ --success-color: #19be6b;
23
+ --success-color-tint-20: #47cb89;
24
+ --success-color-tint-90: #e8f9f0;
25
+ --success-color-tint-80: #d1f2e1;
26
+ --success-color-tint-5: #25c172;
27
+ --success-color-tint-95-fade-50: rgba(244, 252, 248, 0.5);
28
+ --success-color-fade-20: rgba(25, 190, 107, 0.2);
29
+ --success-color-shade-5: #18b566;
30
+ --processing-color: #3EAF7C;
31
+ --warning-color: #ff9900;
32
+ --warning-color-tint-20: #ffad33;
33
+ --warning-color-tint-90: #fff5e6;
34
+ --warning-color-tint-5: #ff9e0d;
35
+ --warning-color-tint-80: #ffebcc;
36
+ --warning-color-tint-95-fade-50: rgba(255, 250, 242, 0.5);
37
+ --warning-color-fade-20: rgba(255, 153, 0, 0.2);
38
+ --warning-color-shade-5: #f29100;
39
+ --error-color: #ed4014;
40
+ --error-color-tint-20: #f16643;
41
+ --error-color-tint-90: #fdece8;
42
+ --error-color-tint-5: #ee4a20;
43
+ --error-color-tint-80: #fbd9d0;
44
+ --error-color-tint-95-fade-50: rgba(254, 245, 243, 0.5);
45
+ --error-color-fade-20: rgba(237, 64, 20, 0.2);
46
+ --error-color-shade-5: #e13d13;
47
+ --normal-color: #e6ebf1;
48
+ --link-color: #2d8cf0;
49
+ --link-hover-color: #57a3f3;
50
+ --link-active-color: #2b85e4;
51
+ --selected-color: rgba(62, 175, 124, 0.9);
52
+ --selected-color-shade-10: rgba(55, 154, 109, 0.91);
53
+ --tooltip-color: #fff;
54
+ --subsidiary-color: #808695;
55
+ --rate-star-color: #f5a623;
56
+ --rate-star-color-tint-20: #f7b84f;
57
+ --white: #fff;
58
+ --black: #000;
59
+ --body-background: #fff;
60
+ --component-background: #fff;
61
+ --font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
62
+ --code-family: Consolas, Menlo, Courier, monospace;
63
+ --title-color: #17233d;
64
+ --text-color: #515a6e;
65
+ --text-color-secondary: rgba(0, 0, 0, 0.45);
66
+ --heading-color: rgba(0, 0, 0, 0.85);
67
+ --heading-color-dark: #ffffff;
68
+ --font-size-base: 14px;
69
+ --font-size-small: 12px;
70
+ --font-size-large: 16px;
71
+ --line-height-base: 1.5;
72
+ --line-height-computed: 21px;
73
+ --border-radius-base: 6px;
74
+ --border-radius-small: 4px;
75
+ --cursor-disabled: not-allowed;
76
+ --padding-lg: 24px;
77
+ --padding-md: 16px;
78
+ --padding-sm: 12px;
79
+ --padding-xs: 8px;
80
+ --border-color-base: #dcdee2;
81
+ --border-color-split: #e8eaec;
82
+ --border-width-base: 1px;
83
+ --border-style-base: solid;
84
+ --background-color-base: #f7f7f7;
85
+ --background-color-select-hover: #f3f3f3;
86
+ --tooltip-bg: rgba(70, 76, 91, 0.9);
87
+ --head-bg: #f9fafc;
88
+ --table-thead-bg: #f8f8f9;
89
+ --table-td-stripe-bg: #f8f8f9;
90
+ --table-td-hover-bg: #ebf7ff;
91
+ --table-td-highlight-bg: #ebf7ff;
92
+ --menu-dark-title: #515a6e;
93
+ --menu-dark-active-bg: #363e4f;
94
+ --menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
95
+ --menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
96
+ --date-picker-cell-hover-bg: #e1f0fe;
97
+ --shadow-color: rgba(0, 0, 0, 0.2);
98
+ --shadow-base: 0 1px 6px rgba(0, 0, 0, 0.2);
99
+ --shadow-card: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
100
+ --shadow-up: 0 -1px 6px rgba(0, 0, 0, 0.2);
101
+ --shadow-down: 0 1px 6px rgba(0, 0, 0, 0.2);
102
+ --shadow-left: -1px 0 6px rgba(0, 0, 0, 0.2);
103
+ --shadow-right: 1px 0 6px rgba(0, 0, 0, 0.2);
104
+ --btn-height-base: 32px;
105
+ --btn-height-large: 40px;
106
+ --btn-height-small: 24px;
107
+ --btn-padding-base: 0 15px;
108
+ --btn-padding-large: 0 15px;
109
+ --btn-padding-small: 0 7px;
110
+ --btn-font-weight: normal;
111
+ --btn-padding-base-icon: 5px 15px 6px;
112
+ --btn-padding-large-icon: 6px 15px 6px 15px;
113
+ --btn-padding-small-icon: 1px 7px 2px;
114
+ --btn-font-size: 14px;
115
+ --btn-font-size-large: 16px;
116
+ --btn-font-size-small: 14px;
117
+ --btn-border-radius: 4px;
118
+ --btn-border-radius-small: 3px;
119
+ --btn-group-border: #3ba676;
120
+ --btn-disable-color: #c5c8ce;
121
+ --btn-disable-bg: #f7f7f7;
122
+ --btn-disable-border: #dcdee2;
123
+ --btn-default-color: #515a6e;
124
+ --btn-default-color-tint-20: #747b8b;
125
+ --btn-default-color-shade-5: #4d5669;
126
+ --btn-default-bg: #fff;
127
+ --btn-default-bg-tint-20: #ffffff;
128
+ --btn-default-bg-shade-5: #f2f2f2;
129
+ --btn-default-border: #dcdee2;
130
+ --btn-default-border-tint-20: #e3e5e8;
131
+ --btn-default-border-shade-5: #d1d3d7;
132
+ --btn-primary-color: #fff;
133
+ --btn-primary-color-tint-20: #ffffff;
134
+ --btn-primary-color-tint-5: #ffffff;
135
+ --btn-primary-color-shade-5: #f2f2f2;
136
+ --btn-primary-bg: #3EAF7C;
137
+ --btn-primary-bg-tint-20: #65bf96;
138
+ --btn-primary-bg-tint-5: #48b383;
139
+ --btn-primary-bg-shade-5: #3ba676;
140
+ --btn-ghost-color: #515a6e;
141
+ --btn-ghost-color-tint-20: #747b8b;
142
+ --btn-ghost-color-shade-5: #4d5669;
143
+ --btn-ghost-bg: #fff;
144
+ --btn-ghost-bg-tint-20: #ffffff;
145
+ --btn-ghost-bg-shade-5: #f2f2f2;
146
+ --btn-ghost-border: #dcdee2;
147
+ --btn-ghost-border-tint-20: #e3e5e8;
148
+ --btn-ghost-border-shade-5: #d1d3d7;
149
+ --btn-circle-size: 32px;
150
+ --btn-circle-size-large: 40px;
151
+ --btn-circle-size-small: 24px;
152
+ --btn-square-size: 32px;
153
+ --btn-square-size-large: 40px;
154
+ --btn-square-size-small: 24px;
155
+ --grid-columns: 24;
156
+ --grid-gutter-width: 0;
157
+ --layout-body-background: #f5f7f9;
158
+ --layout-header-background: #515a6e;
159
+ --layout-header-height: 64px;
160
+ --layout-header-padding: 0 50px;
161
+ --layout-footer-padding: 24px 50px;
162
+ --layout-footer-background: #f5f7f9;
163
+ --layout-sider-background: #515a6e;
164
+ --layout-sider-background-tint-10: #626b7d;
165
+ --layout-trigger-height: 48px;
166
+ --layout-trigger-color: #fff;
167
+ --layout-zero-trigger-width: 36px;
168
+ --layout-zero-trigger-height: 42px;
169
+ --legend-color: #999;
170
+ --input-height-base: 32px;
171
+ --input-height-large: 40px;
172
+ --input-height-small: 24px;
173
+ --input-padding-horizontal: 7px;
174
+ --input-padding-vertical-base: 4px;
175
+ --input-padding-vertical-small: 1px;
176
+ --input-padding-vertical-large: 6px;
177
+ --input-placeholder-color: #c5c8ce;
178
+ --input-color: #515a6e;
179
+ --input-border-color: #dcdee2;
180
+ --input-border-color-tint-20: #e3e5e8;
181
+ --input-bg: #fff;
182
+ --input-group-bg: #f8f8f9;
183
+ --input-hover-border-color: #3EAF7C;
184
+ --input-hover-border-color-tint-20: #65bf96;
185
+ --input-hover-border-color-fade-20: rgba(62, 175, 124, 0.2);
186
+ --input-focus-border-color: #3EAF7C;
187
+ --input-disabled-bg: #f3f3f3;
188
+ --tag-font-size: 12px;
189
+ --screen-xs: 480px;
190
+ --screen-xs-min: 480px;
191
+ --screen-xs-max: 479px;
192
+ --screen-sm: 576px;
193
+ --screen-sm-min: 576px;
194
+ --screen-sm-max: 575px;
195
+ --screen-md: 768px;
196
+ --screen-md-min: 768px;
197
+ --screen-md-max: 767px;
198
+ --screen-lg: 992px;
199
+ --screen-lg-min: 992px;
200
+ --screen-lg-max: 991px;
201
+ --screen-xl: 1200px;
202
+ --screen-xl-min: 1200px;
203
+ --screen-xl-max: 1199px;
204
+ --screen-xxl: 1600px;
205
+ --screen-xxl-min: 1600px;
206
+ --screen-xxl-max: 1599px;
207
+ --zindex-spin: 8;
208
+ --zindex-affix: 10;
209
+ --zindex-back-top: 10;
210
+ --zindex-select: 900;
211
+ --zindex-modal: 1000;
212
+ --zindex-drawer: 1000;
213
+ --zindex-message: 1010;
214
+ --zindex-notification: 1010;
215
+ --zindex-tooltip: 1060;
216
+ --zindex-transfer: 1060;
217
+ --zindex-loading-bar: 2000;
218
+ --zindex-spin-fullscreen: 2010;
219
+ --animation-time: 0.3s;
220
+ --animation-time-quick: 0.15s;
221
+ --transition-time: 0.2s;
222
+ --ease-in-out: ease-in-out;
223
+ --slider-color: #65bf96;
224
+ --slider-height: 4px;
225
+ --slider-margin: 16px 0;
226
+ --slider-button-wrap-size: 18px;
227
+ --slider-button-wrap-offset: -5px;
228
+ --slider-disabled-color: #ccc;
229
+ --avatar-size-base: 32px;
230
+ --avatar-size-lg: 40px;
231
+ --avatar-size-sm: 24px;
232
+ --avatar-font-size-base: 18px;
233
+ --avatar-font-size-lg: 24px;
234
+ --avatar-font-size-sm: 14px;
235
+ --avatar-bg: #ccc;
236
+ --avatar-color: #fff;
237
+ --avatar-border-radius: 4px;
238
+ --anchor-border-width: 2px;
239
+ --list-header-background: transparent;
240
+ --list-footer-background: transparent;
241
+ --list-empty-text-padding: 16px;
242
+ --list-item-padding: 12px 0;
243
+ --list-item-meta-margin-bottom: 16px;
244
+ --list-item-meta-avatar-margin-right: 16px;
245
+ --list-item-meta-title-margin-bottom: 12px;
246
+ `,
247
+ style:`
248
+ html {
249
+ padding:0;
250
+ margin:0;
251
+ }
252
+ `
253
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/shared",
3
- "version": "1.0.0-beta.45",
3
+ "version": "1.0.0-beta.47",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
package/utils/assist.js CHANGED
@@ -1,84 +1,84 @@
1
- // deepCopy
2
-
3
-
4
- export function deepCopy(data) {
5
- let i;
6
- const t = typeOf(data);
7
- let o;
8
-
9
- if (t === 'array') {
10
- o = [];
11
- } else if (t === 'object') {
12
- o = {};
13
- } else {
14
- return data;
15
- }
16
-
17
- if (t === 'array') {
18
- for (i = 0; i < data.length; i++) {
19
- o.push(deepCopy(data[i]));
20
- }
21
- } else if (t === 'object') {
22
- for (i in data) {
23
- o[i] = deepCopy(data[i]);
24
- }
25
- }
26
- return o;
27
- }
28
-
29
- export function typeOf(obj) {
30
- const toString = Object.prototype.toString;
31
- const map = {
32
- '[object Boolean]': 'boolean',
33
- '[object Number]': 'number',
34
- '[object String]': 'string',
35
- '[object Function]': 'function',
36
- '[object Array]': 'array',
37
- '[object Date]': 'date',
38
- '[object RegExp]': 'regExp',
39
- '[object Undefined]': 'undefined',
40
- '[object Null]': 'null',
41
- '[object Object]': 'object'
42
- };
43
- return map[toString.call(obj)];
44
- }
45
-
46
- export function operateBtn(vm, h, currentRow, operationName, operation, type, permission) {
47
- return h('Button', {
48
- props: {
49
- type: type,
50
- size: "small",
51
- ghost: true,
52
- },
53
- directives: [(permission === '' || permission === null) ? '' : {
54
- name: "permission",
55
- value: permission
56
- }],
57
- style: {
58
- margin: '0 2px'
59
- },
60
- on: {
61
- 'click': () => {
62
- operation(vm, currentRow);
63
- }
64
- }
65
- }, operationName);
66
-
67
- }
68
-
69
- export function operateHref(vm, h, currentRow, operationName, operation) {
70
- return h('a', {
71
- style: {
72
- margin: '0 4px'
73
- },
74
- on: {
75
- 'click': () => {
76
- operation(vm, currentRow);
77
- }
78
- }
79
- }, operationName);
80
- }
81
-
82
- export function isJson(arg) {
83
- return typeof (arg) == "object" && Object.prototype.toString.call(arg).toLowerCase() == "[object object]" && !arg.length
84
- };
1
+ // deepCopy
2
+
3
+
4
+ export function deepCopy(data) {
5
+ let i;
6
+ const t = typeOf(data);
7
+ let o;
8
+
9
+ if (t === 'array') {
10
+ o = [];
11
+ } else if (t === 'object') {
12
+ o = {};
13
+ } else {
14
+ return data;
15
+ }
16
+
17
+ if (t === 'array') {
18
+ for (i = 0; i < data.length; i++) {
19
+ o.push(deepCopy(data[i]));
20
+ }
21
+ } else if (t === 'object') {
22
+ for (i in data) {
23
+ o[i] = deepCopy(data[i]);
24
+ }
25
+ }
26
+ return o;
27
+ }
28
+
29
+ export function typeOf(obj) {
30
+ const toString = Object.prototype.toString;
31
+ const map = {
32
+ '[object Boolean]': 'boolean',
33
+ '[object Number]': 'number',
34
+ '[object String]': 'string',
35
+ '[object Function]': 'function',
36
+ '[object Array]': 'array',
37
+ '[object Date]': 'date',
38
+ '[object RegExp]': 'regExp',
39
+ '[object Undefined]': 'undefined',
40
+ '[object Null]': 'null',
41
+ '[object Object]': 'object'
42
+ };
43
+ return map[toString.call(obj)];
44
+ }
45
+
46
+ export function operateBtn(vm, h, currentRow, operationName, operation, type, permission) {
47
+ return h('Button', {
48
+ props: {
49
+ type: type,
50
+ size: "small",
51
+ ghost: true,
52
+ },
53
+ directives: [(permission === '' || permission === null) ? '' : {
54
+ name: "permission",
55
+ value: permission
56
+ }],
57
+ style: {
58
+ margin: '0 2px'
59
+ },
60
+ on: {
61
+ 'click': () => {
62
+ operation(vm, currentRow);
63
+ }
64
+ }
65
+ }, operationName);
66
+
67
+ }
68
+
69
+ export function operateHref(vm, h, currentRow, operationName, operation) {
70
+ return h('a', {
71
+ style: {
72
+ margin: '0 4px'
73
+ },
74
+ on: {
75
+ 'click': () => {
76
+ operation(vm, currentRow);
77
+ }
78
+ }
79
+ }, operationName);
80
+ }
81
+
82
+ export function isJson(arg) {
83
+ return typeof (arg) == "object" && Object.prototype.toString.call(arg).toLowerCase() == "[object object]" && !arg.length
84
+ };
@@ -16,9 +16,18 @@ export const hasRoute = ($router, name) => {
16
16
  * @returns {*|boolean}
17
17
  */
18
18
  export const hasRoutePath = ($router, path) => {
19
- let routes = $router.getRoutes();
20
- let res = routes.filter(item => item.path === path)
21
- return res && res.length > 0
19
+ if ($router && path) {
20
+ let routes = $router.getRoutes();
21
+ if (path.trim().startsWith("dida/")) {
22
+ path = path.trim().replace("dida/","");
23
+ if (!path.startsWith("/")) {
24
+ path = "/" + path;
25
+ }
26
+ }
27
+ let res = routes.filter(item => item.path === path)
28
+ return res && res.length > 0
29
+ }
30
+ return false
22
31
  }
23
32
  /**
24
33
  * 动态生成菜单