n20-project-component 1.0.6 → 1.0.8
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/dist/fonts/n20-iconfont.09d221ee.woff +0 -0
- package/dist/fonts/n20-iconfont.1c4bfacc.ttf +0 -0
- package/dist/fonts/n20-iconfont.a6f34dc7.woff2 +0 -0
- package/dist/fonts/v3-iconfont.38d4b428.woff +0 -0
- package/dist/fonts/v3-iconfont.b56977e8.woff2 +0 -0
- package/dist/fonts/v3-iconfont.f0839d3b.ttf +0 -0
- package/dist/n20-project-component.common.js +6831 -7501
- package/dist/n20-project-component.css +1 -1
- package/dist/n20-project-component.umd.js +6831 -7501
- package/dist/n20-project-component.umd.min.js +5 -5
- package/package.json +7 -7
- package/src/components/ProFilterView/index.vue +6 -1
- package/src/components/ProFilterView/style/iconfont.css +61 -0
- package/src/components/ProFilterView/style/n20-iconfont.ttf +0 -0
- package/src/components/ProFilterView/style/n20-iconfont.woff +0 -0
- package/src/components/ProFilterView/style/n20-iconfont.woff2 +0 -0
- package/src/components/ProFilterView/style/style.scss +352 -0
- package/src/components/ProFilterView/style/v3-iconfont.ttf +0 -0
- package/src/components/ProFilterView/style/v3-iconfont.woff +0 -0
- package/src/components/ProFilterView/style/v3-iconfont.woff2 +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n20-project-component",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "PC 端 Vue 2 + Element UI 组件库",
|
|
5
5
|
"main": "dist/n20-project-component.umd.min.js",
|
|
6
6
|
"module": "dist/n20-project-component.common.js",
|
|
@@ -17,11 +17,8 @@
|
|
|
17
17
|
"prepublishOnly": "npm run build"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"n20-common-lib": "^2.22.39"
|
|
20
|
+
"element-ui": "^2.15.0",
|
|
21
|
+
"vue": "^2.6.0"
|
|
25
22
|
},
|
|
26
23
|
"devDependencies": {
|
|
27
24
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
|
@@ -65,5 +62,8 @@
|
|
|
65
62
|
"n20"
|
|
66
63
|
],
|
|
67
64
|
"author": "",
|
|
68
|
-
"license": "MIT"
|
|
65
|
+
"license": "MIT",
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"n20-common-lib": "^3.1.21"
|
|
68
|
+
}
|
|
69
69
|
}
|
|
@@ -446,6 +446,8 @@ export default {
|
|
|
446
446
|
},
|
|
447
447
|
// 新增
|
|
448
448
|
add() {
|
|
449
|
+
let keyIds = this.filterList.filter(v => v.required).map(v => v.id);
|
|
450
|
+
|
|
449
451
|
this.isRefresh = false;
|
|
450
452
|
this.viewPopoverVisible = false;
|
|
451
453
|
this.visible = true;
|
|
@@ -453,7 +455,7 @@ export default {
|
|
|
453
455
|
this.form = {
|
|
454
456
|
userNo: sessionStorage.getItem('userNo'),
|
|
455
457
|
pageNo: this.filterId,
|
|
456
|
-
keyIds: [],
|
|
458
|
+
keyIds: keyIds || [],
|
|
457
459
|
};
|
|
458
460
|
this.viewId = undefined;
|
|
459
461
|
this.searchForm = {
|
|
@@ -627,6 +629,9 @@ export default {
|
|
|
627
629
|
</script>
|
|
628
630
|
|
|
629
631
|
<style scoped>
|
|
632
|
+
@import './style/iconfont.css';
|
|
633
|
+
@import './style/style.scss';
|
|
634
|
+
|
|
630
635
|
.filter.is-hidden {
|
|
631
636
|
padding: 4px;
|
|
632
637
|
border-bottom: none !important;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* ProFilterView 组件使用的图标样式 */
|
|
2
|
+
|
|
3
|
+
/* v3 系列图标字体 (来自 iconFont3) */
|
|
4
|
+
@font-face {
|
|
5
|
+
font-family: "v3-iconfont";
|
|
6
|
+
src: url('./v3-iconfont.woff2') format('woff2'),
|
|
7
|
+
url('./v3-iconfont.woff') format('woff'),
|
|
8
|
+
url('./v3-iconfont.ttf') format('truetype');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* n20 系列图标字体 (来自 iconFont) */
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: "n20-iconfont";
|
|
14
|
+
src: url('./n20-iconfont.woff2') format('woff2'),
|
|
15
|
+
url('./n20-iconfont.woff') format('woff'),
|
|
16
|
+
url('./n20-iconfont.ttf') format('truetype');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* 应用字体到对应的图标类 */
|
|
20
|
+
[class^="v3-icon-"], [class*=" v3-icon-"] {
|
|
21
|
+
font-family: "v3-iconfont" !important;
|
|
22
|
+
font-size: 16px;
|
|
23
|
+
font-style: normal;
|
|
24
|
+
-webkit-font-smoothing: antialiased;
|
|
25
|
+
-moz-osx-font-smoothing: grayscale;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[class^="n20-icon-"], [class*=" n20-icon-"] {
|
|
29
|
+
font-family: "n20-iconfont" !important;
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
font-style: normal;
|
|
32
|
+
-webkit-font-smoothing: antialiased;
|
|
33
|
+
-moz-osx-font-smoothing: grayscale;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* ProFilterView 使用的 v3 系列图标 */
|
|
37
|
+
.v3-icon-find:before {
|
|
38
|
+
content: "\e6ef";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.v3-icon-inbox:before {
|
|
42
|
+
content: "\e6f2";
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.v3-icon-more:before {
|
|
46
|
+
content: "\e670";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.v3-icon-filter:before {
|
|
50
|
+
content: "\e6f4";
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* ProFilterView 使用的 n20 系列图标 */
|
|
54
|
+
.n20-icon-xiala-moren:before {
|
|
55
|
+
content: "\e66c";
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Element UI 图标 (el-icon-check) */
|
|
59
|
+
.el-icon-check:before {
|
|
60
|
+
content: "\e611";
|
|
61
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
// ProFilterView 组件样式
|
|
2
|
+
|
|
3
|
+
// 视图弹窗样式
|
|
4
|
+
.el-popover.pro-filter-view-popover {
|
|
5
|
+
padding: 8px;
|
|
6
|
+
margin-top: 4px;
|
|
7
|
+
max-width: 256px;
|
|
8
|
+
|
|
9
|
+
.filter-view-wrapper {
|
|
10
|
+
max-height: 300px;
|
|
11
|
+
overflow-y: auto;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* more 图标默认隐藏,hover 列表项时显示 */
|
|
15
|
+
.proFilterView-list-item .proFilterView-list-item__more {
|
|
16
|
+
visibility: hidden;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.proFilterView-list-item:hover .proFilterView-list-item__more {
|
|
20
|
+
visibility: visible;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* 视图名称单行溢出省略 */
|
|
24
|
+
.proFilterView-list-item__name {
|
|
25
|
+
flex: 1;
|
|
26
|
+
width: 180px;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// ProFilterView 主容器
|
|
35
|
+
.ProFilterView {
|
|
36
|
+
width: 100%;
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
|
|
39
|
+
.top {
|
|
40
|
+
padding: 6px 0px;
|
|
41
|
+
border-bottom: 1px solid #e5e6eb !important;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.filter {
|
|
45
|
+
padding: 12px 0px 4px;
|
|
46
|
+
border-bottom: 1px solid #e5e6eb !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.flex-item {
|
|
50
|
+
padding: 0 8px;
|
|
51
|
+
margin-top: 8px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.botton {
|
|
55
|
+
padding: 8px;
|
|
56
|
+
border-radius: 4px;
|
|
57
|
+
background: var(--fill-2, #f2f3f5);
|
|
58
|
+
border: none;
|
|
59
|
+
|
|
60
|
+
.popover-title {
|
|
61
|
+
display: inline-block;
|
|
62
|
+
max-width: 120px;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
text-overflow: ellipsis;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.activiti {
|
|
71
|
+
background: var(--color-primary-light-9);
|
|
72
|
+
border: var(--color-primary-light-9);
|
|
73
|
+
color: var(--color-primary);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
::v-deep .el-form-item__content {
|
|
77
|
+
margin-left: 0;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// 分割线
|
|
82
|
+
.ProFilterView_divider {
|
|
83
|
+
width: 100%;
|
|
84
|
+
height: 1px;
|
|
85
|
+
background-color: #e5e5e5;
|
|
86
|
+
margin-top: 8px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// 新建视图按钮
|
|
90
|
+
.ProFilterView-add {
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
margin-top: 8px;
|
|
93
|
+
|
|
94
|
+
img {
|
|
95
|
+
margin-right: 12px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
padding: 8px;
|
|
99
|
+
height: 20px;
|
|
100
|
+
line-height: 20px;
|
|
101
|
+
position: relative;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ProFilterView-add:hover {
|
|
105
|
+
border-radius: 2px;
|
|
106
|
+
background: var(--fill-1, #f7f8fa);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// 列表项样式
|
|
110
|
+
.proFilterView-list-item {
|
|
111
|
+
width: 100%;
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: start;
|
|
115
|
+
padding: 0px;
|
|
116
|
+
cursor: pointer;
|
|
117
|
+
border-radius: 2px;
|
|
118
|
+
|
|
119
|
+
&:hover {
|
|
120
|
+
color: var(--color-primary);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&.is-selected {
|
|
124
|
+
color: var(--color-primary);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.selected-icon {
|
|
128
|
+
color: var(--color-primary);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// 筛选器隐藏状态样式
|
|
133
|
+
.filter.is-hidden {
|
|
134
|
+
padding: 4px;
|
|
135
|
+
border-bottom: none !important;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// 高级查询样式
|
|
139
|
+
.data-scope {
|
|
140
|
+
background: var(--fill-1, #f5f7fa);
|
|
141
|
+
padding: 16px;
|
|
142
|
+
border-radius: 4px;
|
|
143
|
+
max-height: 450px;
|
|
144
|
+
overflow-y: auto;
|
|
145
|
+
|
|
146
|
+
.children {
|
|
147
|
+
margin-left: 80px;
|
|
148
|
+
border: 1px dashed #e5e6eb;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.view-name {
|
|
152
|
+
margin-bottom: 16px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.view-name-input {
|
|
156
|
+
width: 100%;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.condition-group {
|
|
160
|
+
margin-bottom: 16px;
|
|
161
|
+
padding-left: 32px;
|
|
162
|
+
position: relative;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.delete-group-btn-top {
|
|
166
|
+
position: absolute;
|
|
167
|
+
top: -16px;
|
|
168
|
+
right: -6px;
|
|
169
|
+
color: #4e5969;
|
|
170
|
+
z-index: 1;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.delete-group-btn-top :hover {
|
|
174
|
+
background: var(--color-danger-light-9, #fef0f0);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.conditions {
|
|
178
|
+
padding: 12px;
|
|
179
|
+
position: relative;
|
|
180
|
+
display: flex;
|
|
181
|
+
height: calc(44px * var(--condition-count, 1) - 12px);
|
|
182
|
+
|
|
183
|
+
.line {
|
|
184
|
+
width: 1px;
|
|
185
|
+
height: calc(44px * var(--line-condition-count, 1) - 36px);
|
|
186
|
+
background-color: #606266;
|
|
187
|
+
margin-right: 48px;
|
|
188
|
+
opacity: calc(1 - var(--is-single, 0));
|
|
189
|
+
margin-top: 12px;
|
|
190
|
+
position: relative;
|
|
191
|
+
|
|
192
|
+
.logic-select {
|
|
193
|
+
width: 60px;
|
|
194
|
+
position: absolute;
|
|
195
|
+
top: 50%;
|
|
196
|
+
left: 50%;
|
|
197
|
+
transform: translate(-50%, -50%);
|
|
198
|
+
display: flex;
|
|
199
|
+
border-radius: 4px;
|
|
200
|
+
overflow: hidden;
|
|
201
|
+
border: 1px solid #dcdfe6;
|
|
202
|
+
|
|
203
|
+
.logic-option {
|
|
204
|
+
flex: 1;
|
|
205
|
+
text-align: center;
|
|
206
|
+
padding: 4px 0;
|
|
207
|
+
font-size: 12px;
|
|
208
|
+
cursor: pointer;
|
|
209
|
+
background-color: #fff;
|
|
210
|
+
|
|
211
|
+
&.active {
|
|
212
|
+
background-color: var(--color-primary);
|
|
213
|
+
color: #fff;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&::before {
|
|
219
|
+
content: '';
|
|
220
|
+
position: absolute;
|
|
221
|
+
top: 0;
|
|
222
|
+
left: 0;
|
|
223
|
+
width: 8px;
|
|
224
|
+
height: 1px;
|
|
225
|
+
background-color: #606266;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&::after {
|
|
229
|
+
content: '';
|
|
230
|
+
position: absolute;
|
|
231
|
+
bottom: 0;
|
|
232
|
+
left: 0;
|
|
233
|
+
width: 8px;
|
|
234
|
+
height: 1px;
|
|
235
|
+
background-color: #606266;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.condition-item {
|
|
240
|
+
margin-bottom: 12px;
|
|
241
|
+
&:last-child {
|
|
242
|
+
margin-bottom: 0;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.condition-row {
|
|
247
|
+
display: flex;
|
|
248
|
+
align-items: center;
|
|
249
|
+
gap: 12px;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.group-header {
|
|
254
|
+
display: flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
justify-content: space-between;
|
|
257
|
+
margin-bottom: 12px;
|
|
258
|
+
padding: 8px;
|
|
259
|
+
background: var(--fill-2, #f2f3f5);
|
|
260
|
+
border-radius: 4px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.header-left {
|
|
264
|
+
display: flex;
|
|
265
|
+
align-items: center;
|
|
266
|
+
gap: 12px;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.group-logic-label,
|
|
270
|
+
.condition-logic-label {
|
|
271
|
+
display: flex;
|
|
272
|
+
align-items: center;
|
|
273
|
+
gap: 4px;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.logic-text {
|
|
277
|
+
font-size: 14px;
|
|
278
|
+
color: var(--color-text-regular, #606266);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.delete-group-btn {
|
|
282
|
+
color: var(--color-danger, #f56c6c);
|
|
283
|
+
padding: 4px 8px;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.delete-group-btn:hover {
|
|
287
|
+
background: var(--color-danger-light-9, #fef0f0);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.field-select,
|
|
291
|
+
.operator-select {
|
|
292
|
+
width: 150px;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.value-inputs {
|
|
296
|
+
flex: 1;
|
|
297
|
+
display: flex;
|
|
298
|
+
align-items: center;
|
|
299
|
+
gap: 8px;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.value-select,
|
|
303
|
+
.text-input {
|
|
304
|
+
width: 200px;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.date-picker {
|
|
308
|
+
width: 300px;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.number-input {
|
|
312
|
+
width: 200px;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.number-range {
|
|
316
|
+
display: flex;
|
|
317
|
+
align-items: center;
|
|
318
|
+
gap: 8px;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.delete-btn {
|
|
322
|
+
padding: 8px 2px;
|
|
323
|
+
margin-left: 0;
|
|
324
|
+
color: #4e5969;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.delete-btn:hover {
|
|
328
|
+
background: var(--color-danger-light-9, #fef0f0);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.add-btn {
|
|
332
|
+
padding: 8px 2px;
|
|
333
|
+
margin-right: -8px;
|
|
334
|
+
color: #4e5969;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.add-btn:hover {
|
|
338
|
+
background: var(--color-primary-light-9, #ecf5ff);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.group-actions {
|
|
342
|
+
display: flex;
|
|
343
|
+
gap: 12px;
|
|
344
|
+
margin-top: 8px;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.add-condition-btn,
|
|
348
|
+
.add-group-btn {
|
|
349
|
+
color: var(--color-primary, #409eff);
|
|
350
|
+
font-size: 14px;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|