xianniu-ui 0.1.3 → 0.1.5

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 (89) hide show
  1. package/lib/style/basic.css +1 -0
  2. package/lib/style/city.css +1 -0
  3. package/lib/style/date.css +1 -0
  4. package/lib/style/flex.css +1 -0
  5. package/lib/style/import.css +1 -0
  6. package/lib/style/index.css +1 -1
  7. package/lib/style/search.css +1 -0
  8. package/lib/style/table.css +1 -1
  9. package/{src → lib/style}/theme/element-variables.scss +2 -4
  10. package/{src → lib/style}/theme/index.scss +0 -0
  11. package/{src → lib/style}/theme/mixin.scss +0 -0
  12. package/{src → lib/style}/theme/sidebar.scss +0 -0
  13. package/lib/style/theme/theme.scss +4 -0
  14. package/{src → lib/style}/theme/transition.scss +0 -0
  15. package/{src → lib/style}/theme/variables.scss +0 -0
  16. package/lib/style/tip.css +1 -0
  17. package/lib/style/tree.css +1 -0
  18. package/lib/style/upload.css +1 -0
  19. package/lib/xianniu-ui.common.js +25504 -18072
  20. package/lib/xianniu-ui.css +1 -0
  21. package/lib/xianniu-ui.umd.js +25508 -18076
  22. package/lib/xianniu-ui.umd.min.js +1 -9
  23. package/package.json +63 -62
  24. package/packages/city/index.js +7 -0
  25. package/packages/city/main.vue +258 -0
  26. package/packages/date/index.js +7 -0
  27. package/packages/date/main.vue +348 -0
  28. package/packages/dialog/!main.vue +90 -0
  29. package/packages/dialog/main.vue +37 -57
  30. package/packages/drawer/index.js +7 -0
  31. package/packages/drawer/main.vue +65 -0
  32. package/packages/empty/index.js +7 -0
  33. package/packages/empty/main.vue +33 -0
  34. package/packages/export/index.js +7 -0
  35. package/packages/export/main.vue +99 -0
  36. package/packages/import/index.js +7 -0
  37. package/packages/import/main.vue +135 -0
  38. package/packages/inputRange/index.js +7 -0
  39. package/packages/inputRange/main.vue +15 -0
  40. package/packages/page/main.vue +5 -5
  41. package/packages/search/index.js +7 -0
  42. package/packages/search/main.vue +230 -0
  43. package/packages/style/lib/basic.css +1 -0
  44. package/packages/style/lib/city.css +1 -0
  45. package/packages/style/lib/date.css +1 -0
  46. package/packages/style/lib/flex.css +1 -0
  47. package/packages/style/lib/import.css +1 -0
  48. package/packages/style/lib/index.css +1 -1
  49. package/packages/style/lib/search.css +1 -0
  50. package/packages/style/lib/table.css +1 -1
  51. package/packages/style/lib/tip.css +1 -0
  52. package/packages/style/lib/tree.css +1 -0
  53. package/packages/style/lib/upload.css +1 -0
  54. package/packages/style/src/basic.scss +64 -0
  55. package/packages/style/src/city.scss +3 -0
  56. package/packages/style/src/date.scss +5 -0
  57. package/packages/style/src/flex.scss +74 -0
  58. package/packages/style/src/import.scss +37 -0
  59. package/packages/style/src/index.scss +9 -1
  60. package/packages/style/src/mixin/mixin.scss +270 -0
  61. package/packages/style/src/search.scss +17 -0
  62. package/packages/style/src/table.scss +36 -4
  63. package/packages/style/src/theme/element-variables.scss +26 -0
  64. package/packages/style/src/theme/index.scss +1 -0
  65. package/packages/style/src/theme/mixin.scss +270 -0
  66. package/packages/style/src/theme/sidebar.scss +271 -0
  67. package/packages/style/src/theme/theme.scss +4 -0
  68. package/packages/style/src/theme/transition.scss +52 -0
  69. package/packages/style/src/theme/variables.scss +36 -0
  70. package/packages/style/src/tip.scss +26 -0
  71. package/packages/style/src/tree.scss +87 -0
  72. package/packages/style/src/upload.scss +46 -0
  73. package/packages/table/column.vue +42 -23
  74. package/packages/table/main.vue +126 -35
  75. package/packages/tip/index.js +7 -0
  76. package/packages/tip/main.vue +22 -0
  77. package/packages/tree/index.js +7 -0
  78. package/packages/tree/main.vue +192 -0
  79. package/packages/upload/index.js +7 -0
  80. package/packages/upload/main.vue +346 -0
  81. package/packages/upload/upload-pop.vue +49 -0
  82. package/packages/upload/upload-slot.vue +0 -0
  83. package/src/index.js +23 -3
  84. package/src/plugins/index.js +1 -1
  85. package/src/utils/format.js +119 -106
  86. package/src/utils/index.js +0 -2
  87. package/src/utils/reg.js +7 -1
  88. package/src/utils/utils.js +76 -10
  89. package/src/utils/lodash.js +0 -2
@@ -0,0 +1,64 @@
1
+ @import './theme/theme.scss';
2
+ .text-primary{color: $--color-primary!important;}
3
+ .text-success{color: $--color-success!important;}
4
+ .text-danger{color: $--color-danger!important;}
5
+ .text-warning{color: $--color-warning!important;}
6
+ @for $i from 0 through 30 {
7
+ .m-#{$i} {
8
+ margin: ($i) + px;
9
+ }
10
+ .mt-#{$i} {
11
+ margin-top: ($i) + px;
12
+ }
13
+ .mb-#{$i} {
14
+ margin-bottom: ($i) + px;
15
+ }
16
+ .ml-#{$i} {
17
+ margin-left: ($i) + px;
18
+ }
19
+ .mr-#{$i} {
20
+ margin-right: ($i) + px;
21
+ }
22
+
23
+ .p-#{$i} {
24
+ padding: ($i) + px;
25
+ }
26
+ .pt-#{$i} {
27
+ padding-top: ($i) + px;
28
+ }
29
+ .pb-#{$i} {
30
+ padding-bottom: ($i) + px;
31
+ }
32
+ .pl-#{$i} {
33
+ padding-left: ($i) + px;
34
+ }
35
+ .pr-#{$i} {
36
+ padding-right: ($i) + px;
37
+ }
38
+ .fz-#{$i} {
39
+ font-size: $i + px;
40
+ }
41
+ }
42
+ .text-ell-1 {
43
+ overflow: hidden;
44
+ white-space: nowrap;
45
+ text-overflow: ellipsis;
46
+ }
47
+ .text-ell-2 {
48
+ text-overflow: -o-ellipsis-lastline;
49
+ overflow: hidden;
50
+ text-overflow: ellipsis;
51
+ display: -webkit-box;
52
+ -webkit-line-clamp: 2;
53
+ line-clamp: 2;
54
+ -webkit-box-orient: vertical;
55
+ }
56
+ .text-right {
57
+ text-align: right;
58
+ }
59
+ .text-center {
60
+ text-align: center;
61
+ }
62
+ .text-left {
63
+ text-align: left;
64
+ }
@@ -0,0 +1,3 @@
1
+ .xn-city{
2
+ width: 100%;
3
+ }
@@ -0,0 +1,5 @@
1
+ .xn-date{
2
+ .el-range-editor.el-input__inner{
3
+ padding: 4px 10px;
4
+ }
5
+ }
@@ -0,0 +1,74 @@
1
+ @import './mixin/mixin.scss';
2
+
3
+ .flex {
4
+ @include flex();
5
+ }
6
+
7
+ .inline-flex {
8
+ @include flex(inline);
9
+ }
10
+
11
+ .flex-direction-row {
12
+ @include flex-direction(row);
13
+ }
14
+
15
+ .flex-direction-default {
16
+ @include flex-direction();
17
+ }
18
+
19
+ .flex-direction-col {
20
+ @include flex-direction(column);
21
+ }
22
+
23
+ .flex-direction-row-reverse {
24
+ @include flex-direction(row-reverse);
25
+ }
26
+
27
+ .flex-direction-col-reverse {
28
+ @include flex-direction(column-reverse);
29
+ }
30
+
31
+ .flex-wrap-no {
32
+ @include flex-wrap();
33
+ }
34
+
35
+ .flex-wrap-yes {
36
+ @include flex-wrap(wrap);
37
+ }
38
+
39
+ .flex-basis-1 {
40
+ @include flex-basis(1);
41
+ }
42
+
43
+ .flex-grow-1 {
44
+ @include flex-grow(1);
45
+ }
46
+
47
+ .flex-shrink-1 {
48
+ @include flex-shrink(1);
49
+ }
50
+
51
+ .flex-order-1 {
52
+ @include order(1);
53
+ }
54
+
55
+ .justify-content-center {
56
+ @include justify-content(center);
57
+ }
58
+ .justify-content-between {
59
+ @include justify-content(space-between);
60
+ }
61
+ .justify-content-end {
62
+ @include justify-content(flex-end);
63
+ }
64
+ .align-items-center {
65
+ @include align-items(center);
66
+ }
67
+
68
+ .align-self-center {
69
+ @include align-self(center);
70
+ }
71
+
72
+ .align-content-center {
73
+ @include align-content(center);
74
+ }
@@ -0,0 +1,37 @@
1
+ .xn-import .xn-import-upload{
2
+ .el-upload {
3
+ width: 100%;
4
+ .el-upload-dragger {
5
+ width: 100%;
6
+ .xn-import-trigger {
7
+ &.is-disabled {
8
+ background-color: #e9e9eb;
9
+ color: #bcbec2;
10
+ cursor: not-allowed;
11
+ }
12
+ width: 100%;
13
+ height: 100%;
14
+ border-radius: 5px;
15
+ flex-direction: column;
16
+ justify-content: center;
17
+ display: flex;
18
+ &__icon {
19
+ margin-top: 0;
20
+ font-size: 60px;
21
+ color: #c0c4cc;
22
+ }
23
+ &__text {
24
+ color: #606266;
25
+ font-size: 14px;
26
+ em {
27
+ color: #ff745c;
28
+ font-style: normal;
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
34
+ &-desc {
35
+ color: #909399;
36
+ }
37
+ }
@@ -1,2 +1,10 @@
1
+ @import './basic.scss';
2
+ @import './flex.scss';
1
3
  @import './table.scss';
2
- @import './page.scss';
4
+ @import './page.scss';
5
+ @import './upload.scss';
6
+ @import './date.scss';
7
+ @import './city.scss';
8
+ @import './tip.scss';
9
+ @import './tree.scss';
10
+ @import './import.scss';
@@ -0,0 +1,270 @@
1
+ @mixin clearfix {
2
+ &:after {
3
+ content: "";
4
+ display: table;
5
+ clear: both;
6
+ }
7
+ }
8
+
9
+ @mixin scrollBar {
10
+ &::-webkit-scrollbar-track-piece {
11
+ background: #d3dce6;
12
+ }
13
+
14
+ &::-webkit-scrollbar {
15
+ width: 6px;
16
+ }
17
+
18
+ &::-webkit-scrollbar-thumb {
19
+ background: #99a9bf;
20
+ border-radius: 20px;
21
+ }
22
+ }
23
+
24
+ @mixin relative {
25
+ position: relative;
26
+ width: 100%;
27
+ height: 100%;
28
+ }
29
+
30
+ @mixin pct($pct) {
31
+ width: #{$pct};
32
+ position: relative;
33
+ margin: 0 auto;
34
+ }
35
+
36
+ @mixin triangle($width, $height, $color, $direction) {
37
+ $width: $width/2;
38
+ $color-border-style: $height solid $color;
39
+ $transparent-border-style: $width solid transparent;
40
+ height: 0;
41
+ width: 0;
42
+
43
+ @if $direction==up {
44
+ border-bottom: $color-border-style;
45
+ border-left: $transparent-border-style;
46
+ border-right: $transparent-border-style;
47
+ }
48
+
49
+ @else if $direction==right {
50
+ border-left: $color-border-style;
51
+ border-top: $transparent-border-style;
52
+ border-bottom: $transparent-border-style;
53
+ }
54
+
55
+ @else if $direction==down {
56
+ border-top: $color-border-style;
57
+ border-left: $transparent-border-style;
58
+ border-right: $transparent-border-style;
59
+ }
60
+
61
+ @else if $direction==left {
62
+ border-right: $color-border-style;
63
+ border-top: $transparent-border-style;
64
+ border-bottom: $transparent-border-style;
65
+ }
66
+ }
67
+
68
+
69
+
70
+ // flex
71
+ // @ref http://w3.org/tr/css3-flexbox/#flex-containers
72
+ @mixin flex($display: block) {
73
+ @if ($display == block) {
74
+ display: -webkit-box;
75
+ display: -moz-box;
76
+ display: -webkit-flexbox;
77
+ display: -ms-flexbox;
78
+ display: -webkit-flex;
79
+ display: flex;
80
+ } @else {
81
+ display: -webkit-inline-flex;
82
+ display: inline-flex;
83
+ }
84
+ }
85
+
86
+ //----------------------------------------------------------------------
87
+
88
+ // flex 方向
89
+ // 取值: row | row-reverse | column | column-reverse
90
+ // 默认:row
91
+ @mixin flex-direction($flex-direction: row) {
92
+ $box-orient: horizontal;
93
+ $box-direction: inherit;
94
+
95
+ @if ($flex-direction == column) {
96
+ $box-orient: vertical;
97
+ $box-direction: inherit;
98
+ } @else if ($flex-direction == column-reverse) {
99
+ $box-orient: vertical;
100
+ $box-direction: reverse;
101
+ } @else if ($flex-direction == row-reverse) {
102
+ $box-orient: horizontal;
103
+ $box-direction: reverse;
104
+ } @else {
105
+ $direction: row;
106
+ }
107
+
108
+ -webkit-box-orient: $box-orient;
109
+ -moz-box-orient: $box-orient;
110
+ -webkit-box-direction: $box-direction;
111
+ -moz-box-direction: $box-direction;
112
+ -webkit-flex-direction: $flex-direction;
113
+ -moz-flex-direction: $flex-direction;
114
+ -ms-flex-direction: $flex-direction;
115
+ flex-direction: $flex-direction;
116
+ }
117
+
118
+ //----------------------------------------------------------------------
119
+
120
+ // flex 换行
121
+ // 取值: nowrap | wrap | wrap-reverse
122
+ // 默认: nowrap
123
+ @mixin flex-wrap($value: nowrap) {
124
+ -webkit-flex-wrap: $value;
125
+ -moz-flex-wrap: $value;
126
+
127
+ @if ($value == nowrap) {
128
+ -ms-flex-wrap: none;
129
+ } @else {
130
+ -ms-flex-wrap: $value;
131
+ }
132
+
133
+ flex-wrap: $value;
134
+ }
135
+
136
+ //----------------------------------------------------------------------
137
+
138
+ // 扩展收缩基准值
139
+ // 默认: auto,数值
140
+ @mixin flex-basis($value: auto) {
141
+ -webkit-flex-basis: $value;
142
+ -moz-flex-basis: $value;
143
+ -ms-flex-preferred-size: $value;
144
+ flex-basis: $value;
145
+ }
146
+
147
+ //----------------------------------------------------------------------
148
+
149
+ // flex 扩展值
150
+ // 默认: 0
151
+ @mixin flex-grow($int: 0) {
152
+ -webkit-box-flex: $int;
153
+ -webkit-flex-grow: $int;
154
+ -moz-flex-grow: $int;
155
+ -ms-flex-positive: $int;
156
+ flex-grow: $int;
157
+ }
158
+
159
+ //----------------------------------------------------------------------
160
+
161
+ // flex 收缩值
162
+ // 默认: 1
163
+ @mixin flex-shrink($int: 1) {
164
+ -webkit-flex-shrink: $int;
165
+ -moz-flex-shrink: $int;
166
+ -ms-flex-negative: $int;
167
+ flex-shrink: $int;
168
+ }
169
+
170
+ //----------------------------------------------------------------------
171
+
172
+ // flex 排序
173
+ // 默认: 0
174
+ @mixin order($int: 0) {
175
+ -webkit-box-ordinal-group: $int + 1;
176
+ -webkit-order: $int;
177
+ -moz-order: $int;
178
+ -ms-flex-order: $int;
179
+ order: $int;
180
+ }
181
+
182
+ //----------------------------------------------------------------------
183
+
184
+ // flex 主轴对齐
185
+ // 取值: flex-start | flex-end | center | space-between | space-around
186
+ // 默认: flex-start
187
+ @mixin justify-content($value: flex-start) {
188
+ @if ($value == flex-start) {
189
+ -webkit-box-pack: start;
190
+ -ms-flex-pack: start;
191
+ } @else if ($value == flex-end) {
192
+ -webkit-box-pack: end;
193
+ -ms-flex-pack: end;
194
+ } @else if ($value == space-between) {
195
+ -webkit-box-pack: justify;
196
+ -ms-flex-pack: justify;
197
+ } @else if ($value == space-around) {
198
+ -ms-flex-pack: distribute;
199
+ } @else {
200
+ -webkit-box-pack: $value;
201
+ -ms-flex-pack: $value;
202
+ }
203
+
204
+ -webkit-justify-content: $value;
205
+ -moz-justify-content: $value;
206
+ justify-content: $value;
207
+ }
208
+
209
+ //----------------------------------------------------------------------
210
+
211
+ // flex 交叉轴对齐方式
212
+ // 取值:flex-start | flex-end | center | baseline | stretch
213
+ // 默认:stretch
214
+ @mixin align-items($value: stretch) {
215
+ @if ($value == flex-start) {
216
+ -webkit-box-align: start;
217
+ -ms-flex-align: start;
218
+ } @else if ($value == flex-end) {
219
+ -webkit-box-align: end;
220
+ -ms-flex-align: end;
221
+ } @else {
222
+ -webkit-box-align: $value;
223
+ -ms-flex-align: $value;
224
+ }
225
+
226
+ -webkit-align-items: $value;
227
+ -moz-align-items: $value;
228
+ align-items: $value;
229
+ }
230
+
231
+ //----------------------------------------------------------------------
232
+
233
+ // flex 自身在交叉轴对齐方式
234
+ //
235
+ // 取值:auto | flex-start | flex-end | center | baseline | stretch
236
+ // 默认:auto
237
+ @mixin align-self($value: auto) {
238
+ -webkit-align-self: $value;
239
+ -moz-align-self: $value;
240
+
241
+ @if ($value == flex-start) {
242
+ -ms-flex-item-align: start;
243
+ } @else if ($value == flex-end) {
244
+ -ms-flex-item-align: end;
245
+ } @else {
246
+ -ms-flex-item-align: $value;
247
+ }
248
+
249
+ align-self: $value;
250
+ }
251
+
252
+ //----------------------------------------------------------------------
253
+
254
+ // flex 内容在交叉轴上的对齐方式
255
+ // 取值:flex-start | flex-end | center | space-between | space-around | stretch
256
+ // 默认:stretch
257
+ @mixin align-content($value: stretch) {
258
+ -webkit-align-content: $value;
259
+ -moz-align-content: $value;
260
+
261
+ @if ($value == flex-start) {
262
+ -ms-flex-line-pack: start;
263
+ } @else if $value == (flex-end) {
264
+ -ms-flex-line-pack: end;
265
+ } @else {
266
+ -ms-flex-line-pack: $value;
267
+ }
268
+
269
+ align-content: $value;
270
+ }
@@ -0,0 +1,17 @@
1
+ .xn-search {
2
+ &--row {
3
+ &_col {
4
+ display: flex;
5
+
6
+ ::v-deep .el-form-item__content {
7
+ width: 100%;
8
+ height: 32px;
9
+
10
+ }
11
+
12
+ ::v-deep .el-form-item__label {
13
+ flex: none;
14
+ }
15
+ }
16
+ }
17
+ }
@@ -1,9 +1,41 @@
1
- .xn-table-box{
2
- &-tools{
1
+ .xn-table-box {
2
+ &-tools {
3
3
  text-align: right;
4
4
  padding-bottom: 10px;
5
- &.is-border{
5
+ &.is-border {
6
6
  border-bottom: 1px solid #f0f0f0;
7
7
  }
8
+ &__pop{
9
+ min-width: 120px !important;
10
+ padding: 0 0 0 10px !important;
11
+ }
12
+ &__coll{
13
+ height: 200px;
14
+ overflow-y: auto;
15
+ }
16
+ }
17
+ .el-table {
18
+ .el-table__body-wrapper::-webkit-scrollbar {
19
+ width: 6px;
20
+ height: 8px;
21
+ background-color: #ebeef5;
22
+ }
23
+ /*定义滚动条轨道 内阴影+圆角*/
24
+ .el-table__body-wrapper::-webkit-scrollbar-track {
25
+ box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
26
+ border-radius: 3px;
27
+ background: rgba(255, 255, 255, 1);
28
+ }
29
+ /*定义滑块 内阴影+圆角*/
30
+ .el-table__body-wrapper::-webkit-scrollbar-thumb {
31
+ box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
32
+ -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
33
+ background-color: #ccc;
34
+ }
35
+ .el-table__fixed,
36
+ .el-table__fixed-right {
37
+ height: calc(100% - 7px) !important;
38
+ box-shadow: -7px 0px 7px -7px rgb(0 0 0 / 12%);
39
+ }
8
40
  }
9
- }
41
+ }
@@ -0,0 +1,26 @@
1
+
2
+ /* theme color */
3
+ @import './theme.scss';
4
+
5
+ $--button-font-weight: 400;
6
+
7
+ $--border-color-light: #dfe4ed;
8
+ $--border-color-lighter: #e6ebf5;
9
+
10
+ $--table-border: 1px solid #dfe6ec;
11
+
12
+ $--box-shadow-light: none;
13
+ $--fade-linear-transition:none;
14
+ $--fade-transition:none;
15
+ // $--table-border-color:#f00;
16
+ $--table-border:1px solid #f0f0f0;
17
+ // $--table-header-background-color: #fafafa;
18
+
19
+ $--font-path: "~element-ui/lib/theme-chalk/fonts";
20
+
21
+ @import "element-ui/packages/theme-chalk/src/index";
22
+
23
+
24
+ :export {
25
+ theme: $--color-primary;
26
+ }
@@ -0,0 +1 @@
1
+ @import './element-variables.scss';