eoss-ui 0.7.22 → 0.7.23

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 (214) hide show
  1. package/lib/button-group.js +5 -4
  2. package/lib/button.js +5 -4
  3. package/lib/calogin.js +238 -237
  4. package/lib/checkbox-group.js +5 -4
  5. package/lib/data-table-form.js +5 -4
  6. package/lib/data-table.js +5 -4
  7. package/lib/date-picker.js +5 -4
  8. package/lib/dialog.js +5 -4
  9. package/lib/eoss-ui.common.js +285 -270
  10. package/lib/flow-group.js +5 -4
  11. package/lib/flow-list.js +5 -4
  12. package/lib/flow.js +17 -11
  13. package/lib/form.js +5 -4
  14. package/lib/handle-user.js +5 -4
  15. package/lib/handler.js +5 -4
  16. package/lib/icon.js +5 -4
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +5 -4
  19. package/lib/input.js +5 -4
  20. package/lib/login.js +17 -7
  21. package/lib/main.js +9 -8
  22. package/lib/nav.js +5 -4
  23. package/lib/page.js +5 -4
  24. package/lib/pagination.js +5 -4
  25. package/lib/player.js +5 -4
  26. package/lib/qr-code.js +18 -17
  27. package/lib/radio-group.js +5 -4
  28. package/lib/retrial-auth.js +5 -4
  29. package/lib/select-ganged.js +5 -4
  30. package/lib/select.js +5 -4
  31. package/lib/selector-panel.js +5 -4
  32. package/lib/selector.js +5 -4
  33. package/lib/sizer.js +5 -4
  34. package/lib/steps.js +5 -4
  35. package/lib/switch.js +5 -4
  36. package/lib/table-form.js +5 -4
  37. package/lib/tabs.js +5 -4
  38. package/lib/tips.js +5 -4
  39. package/lib/tree-group.js +5 -4
  40. package/lib/tree.js +5 -4
  41. package/lib/upload.js +5 -4
  42. package/lib/utils/util.js +5 -4
  43. package/lib/wujie.js +5 -4
  44. package/lib/wxlogin.js +5 -4
  45. package/package.json +1 -1
  46. package/packages/button/index.js +5 -5
  47. package/packages/button/src/main.vue +418 -418
  48. package/packages/button-group/index.js +5 -5
  49. package/packages/calendar/index.js +5 -5
  50. package/packages/calogin/index.js +5 -5
  51. package/packages/calogin/src/plugin.js +915 -915
  52. package/packages/card/index.js +5 -5
  53. package/packages/card/src/main.vue +156 -156
  54. package/packages/cascader/index.js +5 -5
  55. package/packages/cascader/src/main.vue +168 -168
  56. package/packages/checkbox-group/index.js +5 -5
  57. package/packages/checkbox-group/src/main.vue +333 -333
  58. package/packages/clients/index.js +5 -5
  59. package/packages/clients/src/main.vue +151 -151
  60. package/packages/data-table/index.js +5 -5
  61. package/packages/data-table/src/children.vue +39 -39
  62. package/packages/data-table/src/sizer.vue +195 -195
  63. package/packages/data-table-form/index.js +5 -5
  64. package/packages/data-table-form/src/checkbox.vue +101 -101
  65. package/packages/data-table-form/src/colgroup.vue +17 -17
  66. package/packages/data-table-form/src/main.vue +181 -181
  67. package/packages/data-table-form/src/radio.vue +65 -65
  68. package/packages/data-table-form/src/table.vue +233 -233
  69. package/packages/data-table-form/src/tbody.vue +336 -336
  70. package/packages/data-table-form/src/thead.vue +68 -68
  71. package/packages/date-picker/index.js +5 -5
  72. package/packages/date-picker/src/main.vue +236 -236
  73. package/packages/dialog/index.js +5 -5
  74. package/packages/enable-drag/index.js +5 -5
  75. package/packages/enterprise/index.js +5 -5
  76. package/packages/enterprise/src/main.vue +66 -66
  77. package/packages/error-page/index.js +5 -5
  78. package/packages/error-page/src/main.vue +44 -44
  79. package/packages/flow/index.js +5 -5
  80. package/packages/flow/src/component/CustomPreset.vue +322 -322
  81. package/packages/flow/src/component/Preset.vue +255 -255
  82. package/packages/flow/src/component/TimeLimit.vue +190 -190
  83. package/packages/flow/src/form.vue +121 -121
  84. package/packages/flow/src/processForm.vue +4 -0
  85. package/packages/flow/src/table.vue +58 -58
  86. package/packages/flow-group/index.js +5 -5
  87. package/packages/flow-list/index.js +5 -5
  88. package/packages/form/index.js +5 -5
  89. package/packages/handle-user/index.js +5 -5
  90. package/packages/handler/index.js +5 -5
  91. package/packages/icon/index.js +5 -5
  92. package/packages/icons/index.js +5 -5
  93. package/packages/icons/src/main.vue +81 -81
  94. package/packages/input/index.js +5 -5
  95. package/packages/input/src/main.vue +356 -356
  96. package/packages/input-number/index.js +5 -5
  97. package/packages/input-number/src/main.vue +106 -106
  98. package/packages/label/index.js +5 -5
  99. package/packages/label/src/main.vue +457 -457
  100. package/packages/layout/index.js +5 -5
  101. package/packages/layout/src/item.vue +152 -152
  102. package/packages/layout/src/main.vue +31 -31
  103. package/packages/login/index.js +5 -5
  104. package/packages/login/src/main.vue +18 -1
  105. package/packages/main/index.js +5 -5
  106. package/packages/main/src/default/message.vue +249 -249
  107. package/packages/main/src/default/notice.vue +157 -157
  108. package/packages/main/src/public/online.vue +89 -89
  109. package/packages/main/src/public/settings.vue +221 -221
  110. package/packages/main/src/simplicity/apps.vue +388 -388
  111. package/packages/main/src/simplicity/lists.vue +84 -84
  112. package/packages/main/src/simplicity/menu-list.vue +135 -135
  113. package/packages/main/src/simplicity/message.vue +259 -259
  114. package/packages/main/src/simplicity/notice.vue +190 -190
  115. package/packages/main/src/simplicity/router-page.vue +45 -45
  116. package/packages/main/src/simplicity/sub-menu.vue +264 -264
  117. package/packages/menu/index.js +5 -5
  118. package/packages/menu/src/main.vue +584 -584
  119. package/packages/nav/index.js +5 -5
  120. package/packages/nav/src/main.vue +351 -351
  121. package/packages/notify/index.js +5 -5
  122. package/packages/notify/src/main.vue +538 -538
  123. package/packages/page/index.js +5 -5
  124. package/packages/page/src/main.vue +167 -167
  125. package/packages/pagination/index.js +5 -5
  126. package/packages/pagination/src/main.vue +96 -96
  127. package/packages/player/index.js +5 -5
  128. package/packages/player/src/main.vue +194 -194
  129. package/packages/qr-code/index.js +5 -5
  130. package/packages/qr-code/src/main.vue +170 -170
  131. package/packages/radio-group/index.js +6 -6
  132. package/packages/radio-group/src/main.vue +319 -319
  133. package/packages/retrial-auth/index.js +5 -5
  134. package/packages/retrial-auth/src/main.vue +280 -280
  135. package/packages/select/index.js +5 -5
  136. package/packages/select-ganged/index.js +5 -5
  137. package/packages/select-ganged/src/main.vue +724 -724
  138. package/packages/selector/index.js +5 -5
  139. package/packages/selector-panel/index.js +5 -5
  140. package/packages/selector-panel/src/tree.vue +129 -129
  141. package/packages/sizer/index.js +5 -5
  142. package/packages/sizer/src/main.vue +254 -254
  143. package/packages/steps/index.js +5 -5
  144. package/packages/steps/src/main.vue +181 -181
  145. package/packages/switch/index.js +5 -5
  146. package/packages/table-form/index.js +5 -5
  147. package/packages/tabs/index.js +5 -5
  148. package/packages/tabs/src/main.vue +788 -788
  149. package/packages/tabs-panel/index.js +5 -5
  150. package/packages/tabs-panel/src/main.vue +29 -29
  151. package/packages/theme-chalk/src/base.scss +261 -261
  152. package/packages/theme-chalk/src/button-group.scss +176 -176
  153. package/packages/theme-chalk/src/button.scss +24 -24
  154. package/packages/theme-chalk/src/calendar.scss +113 -113
  155. package/packages/theme-chalk/src/card.scss +99 -99
  156. package/packages/theme-chalk/src/checkbox-group.scss +8 -8
  157. package/packages/theme-chalk/src/clients.scss +87 -87
  158. package/packages/theme-chalk/src/data-table-form.scss +67 -67
  159. package/packages/theme-chalk/src/data-table.scss +293 -293
  160. package/packages/theme-chalk/src/date-picker.scss +7 -7
  161. package/packages/theme-chalk/src/dialog.scss +77 -77
  162. package/packages/theme-chalk/src/enable-drag.scss +181 -181
  163. package/packages/theme-chalk/src/enterprise.scss +5 -5
  164. package/packages/theme-chalk/src/error-page.scss +18 -18
  165. package/packages/theme-chalk/src/flow-group.scss +110 -110
  166. package/packages/theme-chalk/src/flow-list.scss +39 -39
  167. package/packages/theme-chalk/src/handle-user.scss +40 -40
  168. package/packages/theme-chalk/src/icons.scss +99 -99
  169. package/packages/theme-chalk/src/input.scss +9 -9
  170. package/packages/theme-chalk/src/label.scss +24 -24
  171. package/packages/theme-chalk/src/layout.scss +46 -46
  172. package/packages/theme-chalk/src/main.scss +663 -663
  173. package/packages/theme-chalk/src/menu.scss +222 -222
  174. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  175. package/packages/theme-chalk/src/nav.scss +111 -111
  176. package/packages/theme-chalk/src/page.scss +3 -3
  177. package/packages/theme-chalk/src/pagination.scss +29 -29
  178. package/packages/theme-chalk/src/player.scss +9 -9
  179. package/packages/theme-chalk/src/qr-code.scss +17 -17
  180. package/packages/theme-chalk/src/radio-group.scss +9 -9
  181. package/packages/theme-chalk/src/retrial-auth.scss +38 -38
  182. package/packages/theme-chalk/src/select-ganged.scss +8 -8
  183. package/packages/theme-chalk/src/select.scss +8 -8
  184. package/packages/theme-chalk/src/selector-panel.scss +204 -204
  185. package/packages/theme-chalk/src/sizer.scss +36 -36
  186. package/packages/theme-chalk/src/steps.scss +88 -88
  187. package/packages/theme-chalk/src/switch.scss +3 -3
  188. package/packages/theme-chalk/src/table-form.scss +1 -1
  189. package/packages/theme-chalk/src/tabs.scss +87 -87
  190. package/packages/theme-chalk/src/tips.scss +7 -7
  191. package/packages/theme-chalk/src/toolbar.scss +179 -179
  192. package/packages/theme-chalk/src/tree-group.scss +72 -72
  193. package/packages/theme-chalk/src/tree.scss +165 -165
  194. package/packages/theme-chalk/src/wxlogin.scss +3 -3
  195. package/packages/tips/index.js +5 -5
  196. package/packages/tips/src/main.vue +141 -141
  197. package/packages/toolbar/index.js +5 -5
  198. package/packages/toolbar/src/main.vue +430 -430
  199. package/packages/tree/index.js +5 -5
  200. package/packages/tree-group/index.js +5 -5
  201. package/packages/upload/index.js +5 -5
  202. package/packages/upload/src/picture.js +15 -15
  203. package/packages/wujie/index.js +5 -5
  204. package/packages/wujie/src/main.vue +145 -145
  205. package/packages/wxlogin/index.js +5 -5
  206. package/packages/wxlogin/src/main.vue +128 -128
  207. package/src/config/image.js +2 -2
  208. package/src/index.js +1 -1
  209. package/src/utils/bus.js +3 -3
  210. package/src/utils/date-util.js +312 -312
  211. package/src/utils/http.js +50 -50
  212. package/src/utils/store.js +21 -21
  213. package/src/utils/util.js +6 -5
  214. package/src/utils/webSocket.js +107 -107
@@ -1,222 +1,222 @@
1
- @import './common/var.scss';
2
- @import './base.scss';
3
- .es-menu-vertical-scrollbar {
4
- height: 100%;
5
- }
6
- .el-menu,
7
- .el-menu--horizontal > .el-submenu {
8
- border-right: 0;
9
- background-color: transparent;
10
- .el-menu-item,
11
- .el-submenu__title {
12
- display: flex;
13
- align-items: center;
14
- padding-right: 16px;
15
- height: 48px;
16
- line-height: 48px;
17
- &:not(.is-disabled):focus,
18
- &:not(.is-disabled):hover {
19
- background-color: transparent;
20
- }
21
- }
22
- [class^='es-icon-'],
23
- [class^='es-icons-'],
24
- .es-menu-item-tooltip,
25
- .es-icon {
26
- vertical-align: middle;
27
- margin-right: 5px;
28
- width: 24px;
29
- text-align: center;
30
- font-size: 18px;
31
- }
32
- .el-submenu__icon-arrow {
33
- right: 8px;
34
- }
35
- .es-menu-title-vertical {
36
- flex: 1;
37
- display: block;
38
- white-space: normal;
39
- line-height: 16px;
40
- margin-right: 8px;
41
- position: relative;
42
- .es-badge {
43
- @extend .es-text-ellipsis-row2;
44
- line-height: 18px;
45
- .el-badge__content {
46
- right: 0;
47
- top: 50%;
48
- margin-top: -10px;
49
- transform: scale(0.9);
50
- line-height: 18px;
51
- }
52
- }
53
- }
54
- &.es-menu-collapse {
55
- & > .el-menu-item {
56
- flex-direction: column;
57
- box-orient: vertical;
58
- padding: 8px 0 !important;
59
- text-align: center;
60
- height: auto !important;
61
- min-height: 60px;
62
- }
63
- & > li {
64
- & > .el-submenu__title {
65
- width: 100%;
66
- display: block;
67
- padding: 8px 0 !important;
68
- height: auto;
69
- min-height: 60px;
70
- text-align: center;
71
- line-height: 18px;
72
- }
73
- }
74
- .es-icon-sidebar {
75
- font-size: 26px;
76
- }
77
- .es-menu-title-text {
78
- flex: none;
79
- margin: 4px 0 0;
80
- font-size: 13px;
81
- line-height: 16px;
82
- .es-badge {
83
- padding-right: 0;
84
- .el-badge__content {
85
- top: -100%;
86
- right: 0;
87
- &:not(.is-dot) {
88
- top: -150%;
89
- right: -6px;
90
- }
91
- }
92
- }
93
- }
94
- }
95
- .es-item-vertical {
96
- width: $--nav-initial-width;
97
- height: auto;
98
- min-height: 70px;
99
- padding: 8px 0 !important;
100
- flex-direction: column;
101
- box-orient: vertical;
102
- .es-menu-item-icon {
103
- font-size: 26px;
104
- line-height: 30px;
105
- }
106
- .es-menu-title-text {
107
- text-align: center;
108
- font-size: 14px;
109
- }
110
- }
111
- &.es-menu-nav {
112
- & > .el-menu-item {
113
- flex-direction: column;
114
- box-orient: vertical;
115
- padding: 8px 0 !important;
116
- text-align: center;
117
- & > .es-icon-sidebar {
118
- font-size: 26px;
119
- }
120
- }
121
- }
122
- }
123
- .es-menu-vertical,
124
- .es-menu-popper-vertical > .el-menu {
125
- background-color: $--color-primary;
126
- .el-menu-item:not(.is-disabled),
127
- .el-submenu__title {
128
- height: 40px;
129
- line-height: 40px;
130
- border: 0;
131
- color: #fff;
132
- i {
133
- color: #fff;
134
- }
135
-
136
- &.is-active {
137
- background-color: $--color-primary-light-8;
138
- i {
139
- color: #fff;
140
- }
141
- }
142
- &:hover,
143
- &:focus {
144
- background-color: $--color-primary-light-8;
145
- }
146
- }
147
- }
148
- .el-menu--horizontal {
149
- & > .el-submenu {
150
- .el-submenu__icon-arrow {
151
- margin-top: 0;
152
- }
153
- }
154
- .es-submenu-horizontal.is-active {
155
- background-color: $--color-primary-light-7;
156
- }
157
- & > .el-menu-item {
158
- height: 44px;
159
- line-height: 44px;
160
- &:not(.is-disabled) {
161
- &:hover {
162
- color: $--color-primary;
163
- }
164
- }
165
- &.is-active {
166
- border-bottom-width: 3px;
167
- color: $--color-primary !important;
168
- }
169
- }
170
- & > .el-submenu {
171
- .el-submenu__title {
172
- height: 44px;
173
- line-height: 44px;
174
- }
175
- }
176
- .el-menu {
177
- background-color: #fff;
178
- .el-submenu__title,
179
- .el-menu-item {
180
- color: rgba(0, 0, 0, 0.45);
181
- &:not(.is-disabled):focus,
182
- &:not(.is-disabled):hover {
183
- background-color: transparent;
184
- color: rgba(0, 0, 0, 0.75);
185
- }
186
- &.is-active {
187
- color: $--color-primary;
188
- font-size: 15px;
189
- }
190
- }
191
- }
192
- }
193
- .es-menu-tooltip {
194
- background: $--color-primary !important;
195
- .popper__arrow {
196
- border-right-color: $--color-primary !important;
197
- &::after {
198
- border-right-color: $--color-primary !important;
199
- }
200
- }
201
- }
202
-
203
- .es-menu-item-horizontal {
204
- flex-direction: unset !important;
205
- & > .es-badge > .el-badge__content.is-fixed {
206
- transform: translate(50%, 0);
207
- }
208
- }
209
- .es-menu-title-horizontal {
210
- & > .es-badge > .el-badge__content.is-fixed {
211
- transform: translate(50%, 0);
212
- }
213
- }
214
- .es-disabled {
215
- cursor: not-allowed;
216
- color: rgba(255, 255, 255, 0.3);
217
- background-color: transparent;
218
- &:hover {
219
- color: rgba(255, 255, 255, 0.3);
220
- background-color: transparent;
221
- }
222
- }
1
+ @import './common/var.scss';
2
+ @import './base.scss';
3
+ .es-menu-vertical-scrollbar {
4
+ height: 100%;
5
+ }
6
+ .el-menu,
7
+ .el-menu--horizontal > .el-submenu {
8
+ border-right: 0;
9
+ background-color: transparent;
10
+ .el-menu-item,
11
+ .el-submenu__title {
12
+ display: flex;
13
+ align-items: center;
14
+ padding-right: 16px;
15
+ height: 48px;
16
+ line-height: 48px;
17
+ &:not(.is-disabled):focus,
18
+ &:not(.is-disabled):hover {
19
+ background-color: transparent;
20
+ }
21
+ }
22
+ [class^='es-icon-'],
23
+ [class^='es-icons-'],
24
+ .es-menu-item-tooltip,
25
+ .es-icon {
26
+ vertical-align: middle;
27
+ margin-right: 5px;
28
+ width: 24px;
29
+ text-align: center;
30
+ font-size: 18px;
31
+ }
32
+ .el-submenu__icon-arrow {
33
+ right: 8px;
34
+ }
35
+ .es-menu-title-vertical {
36
+ flex: 1;
37
+ display: block;
38
+ white-space: normal;
39
+ line-height: 16px;
40
+ margin-right: 8px;
41
+ position: relative;
42
+ .es-badge {
43
+ @extend .es-text-ellipsis-row2;
44
+ line-height: 18px;
45
+ .el-badge__content {
46
+ right: 0;
47
+ top: 50%;
48
+ margin-top: -10px;
49
+ transform: scale(0.9);
50
+ line-height: 18px;
51
+ }
52
+ }
53
+ }
54
+ &.es-menu-collapse {
55
+ & > .el-menu-item {
56
+ flex-direction: column;
57
+ box-orient: vertical;
58
+ padding: 8px 0 !important;
59
+ text-align: center;
60
+ height: auto !important;
61
+ min-height: 60px;
62
+ }
63
+ & > li {
64
+ & > .el-submenu__title {
65
+ width: 100%;
66
+ display: block;
67
+ padding: 8px 0 !important;
68
+ height: auto;
69
+ min-height: 60px;
70
+ text-align: center;
71
+ line-height: 18px;
72
+ }
73
+ }
74
+ .es-icon-sidebar {
75
+ font-size: 26px;
76
+ }
77
+ .es-menu-title-text {
78
+ flex: none;
79
+ margin: 4px 0 0;
80
+ font-size: 13px;
81
+ line-height: 16px;
82
+ .es-badge {
83
+ padding-right: 0;
84
+ .el-badge__content {
85
+ top: -100%;
86
+ right: 0;
87
+ &:not(.is-dot) {
88
+ top: -150%;
89
+ right: -6px;
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ .es-item-vertical {
96
+ width: $--nav-initial-width;
97
+ height: auto;
98
+ min-height: 70px;
99
+ padding: 8px 0 !important;
100
+ flex-direction: column;
101
+ box-orient: vertical;
102
+ .es-menu-item-icon {
103
+ font-size: 26px;
104
+ line-height: 30px;
105
+ }
106
+ .es-menu-title-text {
107
+ text-align: center;
108
+ font-size: 14px;
109
+ }
110
+ }
111
+ &.es-menu-nav {
112
+ & > .el-menu-item {
113
+ flex-direction: column;
114
+ box-orient: vertical;
115
+ padding: 8px 0 !important;
116
+ text-align: center;
117
+ & > .es-icon-sidebar {
118
+ font-size: 26px;
119
+ }
120
+ }
121
+ }
122
+ }
123
+ .es-menu-vertical,
124
+ .es-menu-popper-vertical > .el-menu {
125
+ background-color: $--color-primary;
126
+ .el-menu-item:not(.is-disabled),
127
+ .el-submenu__title {
128
+ height: 40px;
129
+ line-height: 40px;
130
+ border: 0;
131
+ color: #fff;
132
+ i {
133
+ color: #fff;
134
+ }
135
+
136
+ &.is-active {
137
+ background-color: $--color-primary-light-8;
138
+ i {
139
+ color: #fff;
140
+ }
141
+ }
142
+ &:hover,
143
+ &:focus {
144
+ background-color: $--color-primary-light-8;
145
+ }
146
+ }
147
+ }
148
+ .el-menu--horizontal {
149
+ & > .el-submenu {
150
+ .el-submenu__icon-arrow {
151
+ margin-top: 0;
152
+ }
153
+ }
154
+ .es-submenu-horizontal.is-active {
155
+ background-color: $--color-primary-light-7;
156
+ }
157
+ & > .el-menu-item {
158
+ height: 44px;
159
+ line-height: 44px;
160
+ &:not(.is-disabled) {
161
+ &:hover {
162
+ color: $--color-primary;
163
+ }
164
+ }
165
+ &.is-active {
166
+ border-bottom-width: 3px;
167
+ color: $--color-primary !important;
168
+ }
169
+ }
170
+ & > .el-submenu {
171
+ .el-submenu__title {
172
+ height: 44px;
173
+ line-height: 44px;
174
+ }
175
+ }
176
+ .el-menu {
177
+ background-color: #fff;
178
+ .el-submenu__title,
179
+ .el-menu-item {
180
+ color: rgba(0, 0, 0, 0.45);
181
+ &:not(.is-disabled):focus,
182
+ &:not(.is-disabled):hover {
183
+ background-color: transparent;
184
+ color: rgba(0, 0, 0, 0.75);
185
+ }
186
+ &.is-active {
187
+ color: $--color-primary;
188
+ font-size: 15px;
189
+ }
190
+ }
191
+ }
192
+ }
193
+ .es-menu-tooltip {
194
+ background: $--color-primary !important;
195
+ .popper__arrow {
196
+ border-right-color: $--color-primary !important;
197
+ &::after {
198
+ border-right-color: $--color-primary !important;
199
+ }
200
+ }
201
+ }
202
+
203
+ .es-menu-item-horizontal {
204
+ flex-direction: unset !important;
205
+ & > .es-badge > .el-badge__content.is-fixed {
206
+ transform: translate(50%, 0);
207
+ }
208
+ }
209
+ .es-menu-title-horizontal {
210
+ & > .es-badge > .el-badge__content.is-fixed {
211
+ transform: translate(50%, 0);
212
+ }
213
+ }
214
+ .es-disabled {
215
+ cursor: not-allowed;
216
+ color: rgba(255, 255, 255, 0.3);
217
+ background-color: transparent;
218
+ &:hover {
219
+ color: rgba(255, 255, 255, 0.3);
220
+ background-color: transparent;
221
+ }
222
+ }
@@ -1,117 +1,117 @@
1
- // 根据颜色获取对应的hsv,在tinycolor中首先进行了归一化处理,这里没有
2
- // 返回的结果h是0~360,代表的是色相的角度, sv的范围0-1
3
- @function rbgToHsv($color) {
4
- $red: red($color);
5
- $green: green($color);
6
- $blue: blue($color);
7
- $max: max($red, $green, $blue);
8
- $min: min($red, $green, $blue);
9
- $diff: $max - $min;
10
- $h: 0;
11
- @if $max == $min {
12
- $h: 0;
13
- } @else if $max == $red {
14
- $h: 60 * ($green - $blue) / $diff + if($green >= $blue, 0, 360);
15
- } @else if $max == $green {
16
- $h: 60 * ($blue - $red) / $diff + 120;
17
- } @else if $max == $blue {
18
- $h: 60 * ($red - $green) / $diff + 240;
19
- }
20
- $s: if($max == 0, 0, $diff / $max);
21
- $v: $max / 255;
22
- @return $h, $s, $v;
23
- }
24
- // hsv转化成rgb,借鉴了tinycolor的做法,避免通过$th的值判断来获取对应的rgb的取值
25
- // $t1~4的计算目前不清楚为什么这样做
26
- @function hsvTorgb($h, $s, $v) {
27
- $th: floor($h / 60);
28
- $t1: $h / 60 - $th;
29
- $t2: $v * (1 - $s);
30
- $t3: $v * (1 - $t1 * $s);
31
- $t4: $v * (1 - (1 - $t1) * $s);
32
- $i: $th % 6 + 1;
33
- $r: nth(($v, $t3, $t2, $t2, $t4, $v), $i);
34
- $g: nth(($t4, $v, $v, $t3, $t2, $t2), $i);
35
- $b: nth(($t2, $t2, $t4, $v, $v, $t3), $i);
36
- @return rgb(round($r * 255), round($g * 255), round($b * 255));
37
- }
38
- // 求一个数的n次幂
39
- @function pow($number, $n) {
40
- $ret: 1;
41
- @if $n >= 0 {
42
- @for $i from 1 through $n {
43
- $ret: $ret * $number;
44
- }
45
- } @else {
46
- @for $i from $n to 0 {
47
- $ret: $ret / $number;
48
- }
49
- }
50
- @return $ret;
51
- }
52
- // 浮点数保留小数位
53
- @function toFixed($float, $digits: 2) {
54
- $pow: pow(10, $digits);
55
- @return round($float * $pow) / $pow;
56
- }
57
- //转换色相
58
- @function getHue($h, $i, $isLight) {
59
- $hue: null;
60
- @if $h >= 60 and $h <= 240 {
61
- $hue: if($isLight, $h - $hueStep * $i, $h + $hueStep * $i);
62
- } @else {
63
- $hue: if($isLight, $h + $hueStep * $i, $h - $hueStep * $i);
64
- }
65
- $hue: ($hue + 360) % 360;
66
- @return round($hue);
67
- }
68
- // 转换饱和度
69
- @function getSaturation($s, $i, $isLight) {
70
- $saturation: null;
71
- @if $isLight {
72
- $saturation: $s - $saturationStep1 * $i;
73
- } @else if $i == $darkColorCount {
74
- $saturation: $s + $saturationStep1;
75
- } @else {
76
- $saturation: $s + $saturationStep2 * $i;
77
- }
78
- $saturation: min($saturation, 1);
79
-
80
- @if $isLight and $i == $lightColorCount and $saturation > 0.1 {
81
- $saturation: 0.1;
82
- }
83
- $saturation: max($saturation, 0.06);
84
- @return toFixed($saturation, 2);
85
- }
86
- // 转换明度
87
- @function getValue($v, $i, $isLight) {
88
- $value: min(
89
- if($isLight, $v + $brightnessStep1 * $i, $v - $brightnessStep2 * $i),
90
- 1
91
- );
92
- @return toFixed($value, 2);
93
- }
94
- $hueStep: 2;
95
- $saturationStep1: 0.16;
96
- $saturationStep2: 0.05;
97
- $brightnessStep1: 0.05;
98
- $brightnessStep2: 0.15;
99
- $lightColorCount: 5;
100
- $darkColorCount: 4;
101
-
102
- // 根据颜色和对应的色板位置,计算出对应的色板颜色
103
- @function getColor($color, $index) {
104
- $isLight: if($index <= 6, true, false);
105
- $hsv: rbgToHsv($color);
106
- //这里将i转换成以主色为中心,两侧的i值逐渐增大
107
- $i: if(
108
- $isLight,
109
- $lightColorCount + 1 - $index,
110
- $index - $lightColorCount - 1
111
- );
112
- @return hsvTorgb(
113
- getHue(nth($hsv, 1), $i, $isLight),
114
- getSaturation(nth($hsv, 2), $i, $isLight),
115
- getValue(nth($hsv, 3), $i, $isLight)
116
- );
117
- }
1
+ // 根据颜色获取对应的hsv,在tinycolor中首先进行了归一化处理,这里没有
2
+ // 返回的结果h是0~360,代表的是色相的角度, sv的范围0-1
3
+ @function rbgToHsv($color) {
4
+ $red: red($color);
5
+ $green: green($color);
6
+ $blue: blue($color);
7
+ $max: max($red, $green, $blue);
8
+ $min: min($red, $green, $blue);
9
+ $diff: $max - $min;
10
+ $h: 0;
11
+ @if $max == $min {
12
+ $h: 0;
13
+ } @else if $max == $red {
14
+ $h: 60 * ($green - $blue) / $diff + if($green >= $blue, 0, 360);
15
+ } @else if $max == $green {
16
+ $h: 60 * ($blue - $red) / $diff + 120;
17
+ } @else if $max == $blue {
18
+ $h: 60 * ($red - $green) / $diff + 240;
19
+ }
20
+ $s: if($max == 0, 0, $diff / $max);
21
+ $v: $max / 255;
22
+ @return $h, $s, $v;
23
+ }
24
+ // hsv转化成rgb,借鉴了tinycolor的做法,避免通过$th的值判断来获取对应的rgb的取值
25
+ // $t1~4的计算目前不清楚为什么这样做
26
+ @function hsvTorgb($h, $s, $v) {
27
+ $th: floor($h / 60);
28
+ $t1: $h / 60 - $th;
29
+ $t2: $v * (1 - $s);
30
+ $t3: $v * (1 - $t1 * $s);
31
+ $t4: $v * (1 - (1 - $t1) * $s);
32
+ $i: $th % 6 + 1;
33
+ $r: nth(($v, $t3, $t2, $t2, $t4, $v), $i);
34
+ $g: nth(($t4, $v, $v, $t3, $t2, $t2), $i);
35
+ $b: nth(($t2, $t2, $t4, $v, $v, $t3), $i);
36
+ @return rgb(round($r * 255), round($g * 255), round($b * 255));
37
+ }
38
+ // 求一个数的n次幂
39
+ @function pow($number, $n) {
40
+ $ret: 1;
41
+ @if $n >= 0 {
42
+ @for $i from 1 through $n {
43
+ $ret: $ret * $number;
44
+ }
45
+ } @else {
46
+ @for $i from $n to 0 {
47
+ $ret: $ret / $number;
48
+ }
49
+ }
50
+ @return $ret;
51
+ }
52
+ // 浮点数保留小数位
53
+ @function toFixed($float, $digits: 2) {
54
+ $pow: pow(10, $digits);
55
+ @return round($float * $pow) / $pow;
56
+ }
57
+ //转换色相
58
+ @function getHue($h, $i, $isLight) {
59
+ $hue: null;
60
+ @if $h >= 60 and $h <= 240 {
61
+ $hue: if($isLight, $h - $hueStep * $i, $h + $hueStep * $i);
62
+ } @else {
63
+ $hue: if($isLight, $h + $hueStep * $i, $h - $hueStep * $i);
64
+ }
65
+ $hue: ($hue + 360) % 360;
66
+ @return round($hue);
67
+ }
68
+ // 转换饱和度
69
+ @function getSaturation($s, $i, $isLight) {
70
+ $saturation: null;
71
+ @if $isLight {
72
+ $saturation: $s - $saturationStep1 * $i;
73
+ } @else if $i == $darkColorCount {
74
+ $saturation: $s + $saturationStep1;
75
+ } @else {
76
+ $saturation: $s + $saturationStep2 * $i;
77
+ }
78
+ $saturation: min($saturation, 1);
79
+
80
+ @if $isLight and $i == $lightColorCount and $saturation > 0.1 {
81
+ $saturation: 0.1;
82
+ }
83
+ $saturation: max($saturation, 0.06);
84
+ @return toFixed($saturation, 2);
85
+ }
86
+ // 转换明度
87
+ @function getValue($v, $i, $isLight) {
88
+ $value: min(
89
+ if($isLight, $v + $brightnessStep1 * $i, $v - $brightnessStep2 * $i),
90
+ 1
91
+ );
92
+ @return toFixed($value, 2);
93
+ }
94
+ $hueStep: 2;
95
+ $saturationStep1: 0.16;
96
+ $saturationStep2: 0.05;
97
+ $brightnessStep1: 0.05;
98
+ $brightnessStep2: 0.15;
99
+ $lightColorCount: 5;
100
+ $darkColorCount: 4;
101
+
102
+ // 根据颜色和对应的色板位置,计算出对应的色板颜色
103
+ @function getColor($color, $index) {
104
+ $isLight: if($index <= 6, true, false);
105
+ $hsv: rbgToHsv($color);
106
+ //这里将i转换成以主色为中心,两侧的i值逐渐增大
107
+ $i: if(
108
+ $isLight,
109
+ $lightColorCount + 1 - $index,
110
+ $index - $lightColorCount - 1
111
+ );
112
+ @return hsvTorgb(
113
+ getHue(nth($hsv, 1), $i, $isLight),
114
+ getSaturation(nth($hsv, 2), $i, $isLight),
115
+ getValue(nth($hsv, 3), $i, $isLight)
116
+ );
117
+ }