@infly/ui 1.0.18 → 1.0.19
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.
- package/README.md +43 -43
- package/package.json +53 -29
- package/scripts/install-comp.js +13 -0
- package/src/Base/InflyCheckBox/InflyCheckBox.test.js +154 -0
- package/src/Base/InflyCheckBox/InflyCheckBox.vue +227 -0
- package/src/Base/InflyCheckBox/index.js +6 -0
- package/src/Base/InflyDialog/InflyDialog.test.js +122 -0
- package/src/Base/InflyDialog/InflyDialog.vue +111 -0
- package/src/Base/InflyDialog/index.js +6 -0
- package/src/Base/InflyForm/InflyForm.test.js +239 -0
- package/src/Base/InflyForm/InflyForm.vue +974 -0
- package/src/Base/InflyForm/index.js +6 -0
- package/src/Base/InflyInput/InflyInput.test.js +105 -0
- package/src/Base/InflyInput/InflyInput.vue +167 -0
- package/src/Base/InflyInput/index.js +6 -0
- package/src/Base/InflyList/InflyList.test.js +229 -0
- package/src/Base/InflyList/InflyList.vue +925 -0
- package/src/Base/InflyList/index.js +6 -0
- package/src/Base/InflySelect/InflySelect.js +0 -0
- package/src/Business/BusinessSwitch/BusinessSwitch.test.js +96 -0
- package/src/Business/BusinessSwitch/BusinessSwitch.vue +115 -0
- package/src/Business/BusinessSwitch/index.js +6 -0
- package/src/Business/BusinessTag/BusinessTag.test.js +83 -0
- package/src/Business/BusinessTag/BusinessTag.vue +58 -0
- package/src/Business/BusinessTag/index.js +6 -0
- package/src/Business/InstitutionSelect/InstitutionSelect.test.js +158 -0
- package/src/Business/InstitutionSelect/InstitutionSelect.vue +770 -0
- package/src/Business/InstitutionSelect/index.js +6 -0
- package/src/index.js +30 -0
- package/styles/base.scss +755 -0
- package/styles/index.scss +202 -0
- package/styles/mixin.scss +19 -0
- package/styles/variables.scss +24 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
@import "./variables.scss";
|
|
2
|
+
@import "./base.scss";
|
|
3
|
+
@import "./mixin.scss";
|
|
4
|
+
|
|
5
|
+
$--list-btn-left-default: $--list-btn-offset-left + $--list-input-width;
|
|
6
|
+
|
|
7
|
+
// 通用组件样式
|
|
8
|
+
.comp-InflyList,
|
|
9
|
+
.comp-InflyForm {
|
|
10
|
+
z-index: $--list-z-index;
|
|
11
|
+
|
|
12
|
+
.btn-list__wrap--bottom {
|
|
13
|
+
left: var(--btn-left, #{$--list-btn-left-default});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.comp-InflyList {
|
|
18
|
+
.infly-input__wrap,
|
|
19
|
+
.el-date-editor--daterange.el-range-editor--mini {
|
|
20
|
+
width: $--list-input-width;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.infly-form__wrap {
|
|
24
|
+
position: relative;
|
|
25
|
+
padding-right: $--list-form-btn-right;
|
|
26
|
+
|
|
27
|
+
.el-form-item.el-form-item--mini {
|
|
28
|
+
margin-bottom: $--list-form-item-mb;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.list__tabs--top {
|
|
33
|
+
min-height: calc(100vh - #{$--list-min-height-offset});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.btn-list__wrap--bottom {
|
|
37
|
+
position: absolute;
|
|
38
|
+
bottom: $--list-btn-bottom;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.comp-InflyDialog .comp-InflyList {
|
|
43
|
+
.list__tabs--top {
|
|
44
|
+
min-height: unset;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// 标准化页面及表单样式
|
|
49
|
+
.standard-form {
|
|
50
|
+
&-page-detail {
|
|
51
|
+
.el-tabs {
|
|
52
|
+
min-height: calc(100vh - #{$--list-min-height-offset});
|
|
53
|
+
|
|
54
|
+
.el-tab-pane {
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.el-date-editor--datetime.el-date-editor.el-input,
|
|
61
|
+
.el-select.el-select--mini,
|
|
62
|
+
.el-input--mini.infly-input__wrap {
|
|
63
|
+
width: $--sf-input-width;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.el-input-group__prepend .el-select.el-select--mini {
|
|
67
|
+
width: $--sf-prepend-select-width;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.el-upload:has(.standard-upload_icon) {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
align-items: center;
|
|
75
|
+
width: $--sf-upload-size;
|
|
76
|
+
height: $--sf-upload-size;
|
|
77
|
+
border: 1px dashed $--sf-upload-border-color;
|
|
78
|
+
border-radius: $--sf-upload-radius;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.btn-list__wrap--bottom {
|
|
82
|
+
position: relative;
|
|
83
|
+
left: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&__item--module {
|
|
87
|
+
&.el-form-item--mini .el-form-item__label {
|
|
88
|
+
margin-bottom: $--sf-module-label-mb;
|
|
89
|
+
font-weight: normal;
|
|
90
|
+
line-height: $--sf-module-label-lh !important;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.el-form-item__label {
|
|
94
|
+
position: relative;
|
|
95
|
+
padding-right: 0;
|
|
96
|
+
color: $--color-primary;
|
|
97
|
+
|
|
98
|
+
&::before {
|
|
99
|
+
content: "";
|
|
100
|
+
position: absolute;
|
|
101
|
+
bottom: 0;
|
|
102
|
+
left: 0;
|
|
103
|
+
width: 100%;
|
|
104
|
+
height: $--sf-divider-height;
|
|
105
|
+
background-color: $--color-primary;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&::after {
|
|
109
|
+
content: "";
|
|
110
|
+
position: absolute;
|
|
111
|
+
bottom: 0;
|
|
112
|
+
left: 100%;
|
|
113
|
+
width: calc(100vw - 100%);
|
|
114
|
+
height: $--sf-divider-height;
|
|
115
|
+
background-color: $--color-tabs-border;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Inline form base layout. Supports class on wrapper or el-form.
|
|
121
|
+
&--inline,
|
|
122
|
+
&--inline-seamless {
|
|
123
|
+
.el-form,
|
|
124
|
+
&.infly-form__wrap {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-wrap: wrap;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.el-form-item {
|
|
130
|
+
width: $--sf-inline-item-width;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.el-form-item--newline {
|
|
134
|
+
@include flex-break-before;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.btn-list__wrap--bottom,
|
|
138
|
+
.el-form-item--fullline,
|
|
139
|
+
.standard-form__item--nowrap,
|
|
140
|
+
.standard-form__item--module,
|
|
141
|
+
.standard-form__item--tabgroup {
|
|
142
|
+
flex-basis: 100%;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.btn-list__wrap--bottom {
|
|
146
|
+
position: relative;
|
|
147
|
+
left: 0;
|
|
148
|
+
margin-top: $--sf-inline-btn-mt;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Seamless inline form: inherit inline layout and remove reserved right space.
|
|
153
|
+
&--inline-seamless {
|
|
154
|
+
.infly-form__wrap,
|
|
155
|
+
&.infly-form__wrap {
|
|
156
|
+
padding-right: 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.btn-list__wrap--bottom {
|
|
160
|
+
position: absolute;
|
|
161
|
+
left: var(--btn-left, #{$--list-btn-left-default});
|
|
162
|
+
bottom: $--sf-inline-btn-mt;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&--compact {
|
|
167
|
+
&.el-form-item.el-form .el-form-item.el-form-item--mini {
|
|
168
|
+
margin-bottom: 0;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&--positioned {
|
|
173
|
+
.el-form,
|
|
174
|
+
&.infly-form__wrap {
|
|
175
|
+
display: grid;
|
|
176
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
177
|
+
column-gap: $--sf-positioned-column-gap;
|
|
178
|
+
align-items: start;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.standard-form__item {
|
|
182
|
+
min-width: 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.standard-form__item--position-left {
|
|
186
|
+
grid-column: 1;
|
|
187
|
+
width: 100%;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.standard-form__item--position-right {
|
|
191
|
+
grid-column: 2;
|
|
192
|
+
width: 100%;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.standard-form__item--position-full,
|
|
196
|
+
.standard-form__item--tabgroup,
|
|
197
|
+
.btn-list__wrap--bottom {
|
|
198
|
+
grid-column: 1 / -1;
|
|
199
|
+
width: 100%;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@mixin multi-ellipsis($line: 2) {
|
|
2
|
+
display: -webkit-box;
|
|
3
|
+
-webkit-line-clamp: 2;
|
|
4
|
+
line-clamp: 2;
|
|
5
|
+
-webkit-box-orient: vertical;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
text-overflow: ellipsis;
|
|
8
|
+
word-break: break-all;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@mixin flex-break-before {
|
|
13
|
+
&::before {
|
|
14
|
+
content: "";
|
|
15
|
+
flex-basis: 100%;
|
|
16
|
+
width: 0;
|
|
17
|
+
height: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
$--color-primary: #426af0 !default;
|
|
2
|
+
$--color-tabs-border: #e4e7ed;
|
|
3
|
+
|
|
4
|
+
// InflyList 尺寸
|
|
5
|
+
$--list-input-width: 420px; // 筛选输入框宽度
|
|
6
|
+
$--list-btn-offset-left: 80px; // 按钮区域 label 宽度偏移
|
|
7
|
+
$--list-form-btn-right: 140px; // 表单右侧按钮区占位
|
|
8
|
+
$--list-form-item-mb: 10px; // 表单项底部间距
|
|
9
|
+
$--list-min-height-offset: 100px; // 页面最小高度减去的偏移
|
|
10
|
+
$--list-btn-bottom: 1.5px; // 按钮区底部微调
|
|
11
|
+
$--list-z-index: 99; // 组件层级
|
|
12
|
+
|
|
13
|
+
// standard-form 尺寸
|
|
14
|
+
$--sf-input-width: 280px; // 标准表单输入框宽度
|
|
15
|
+
$--sf-prepend-select-width: 100px; // 前置 select 宽度
|
|
16
|
+
$--sf-upload-size: 120px; // 上传图标区尺寸
|
|
17
|
+
$--sf-upload-radius: 8px; // 上传区圆角
|
|
18
|
+
$--sf-upload-border-color: #d9d9d9; // 上传区边框色
|
|
19
|
+
$--sf-inline-item-width: 600px; // 行内表单项宽度
|
|
20
|
+
$--sf-positioned-column-gap: 24px; // 左右分栏表单列间距
|
|
21
|
+
$--sf-inline-btn-mt: 12px; // 行内按钮顶部间距
|
|
22
|
+
$--sf-module-label-mb: 15px; // 模块标签底部间距
|
|
23
|
+
$--sf-module-label-lh: 40px; // 模块标签行高
|
|
24
|
+
$--sf-divider-height: 2px; // 分隔线高度
|