ct-component-plus 1.6.0 → 2.0.0
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ct-component-plus",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "packages/components/index.js",
|
|
7
7
|
"files": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"cingta-icon": "^2.1.6",
|
|
19
|
-
"element-plus": "
|
|
19
|
+
"element-plus": "^2.5.0",
|
|
20
20
|
"vue": "^3.2.47"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
@@ -155,9 +155,9 @@ const selectText = computed(() => {
|
|
|
155
155
|
result = selectObj.value.map((item) => item.label).join(cnt);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
nextTick(() => {
|
|
159
|
-
|
|
160
|
-
});
|
|
158
|
+
// nextTick(() => {
|
|
159
|
+
// selectRef.value.$refs.reference.input.value = result;
|
|
160
|
+
// });
|
|
161
161
|
return result;
|
|
162
162
|
});
|
|
163
163
|
const emptyText = computed(() => {
|
|
@@ -358,7 +358,9 @@ defineExpose({
|
|
|
358
358
|
</script>
|
|
359
359
|
<style lang="less">
|
|
360
360
|
.ct-select {
|
|
361
|
-
|
|
361
|
+
&.el-select {
|
|
362
|
+
width: 214px;
|
|
363
|
+
}
|
|
362
364
|
&__top {
|
|
363
365
|
padding: 0 16px;
|
|
364
366
|
font-size: var(--ct-font-size);
|
|
@@ -407,7 +409,7 @@ defineExpose({
|
|
|
407
409
|
z-index: 3;
|
|
408
410
|
right: var(--ct-component-inner-padding);
|
|
409
411
|
top: 50%;
|
|
410
|
-
height: calc(var(--ct-component-size) -
|
|
412
|
+
height: calc(var(--ct-component-size) - 8px);
|
|
411
413
|
transform: translateY(-50%);
|
|
412
414
|
background-color: #fff;
|
|
413
415
|
}
|
|
@@ -419,18 +421,24 @@ defineExpose({
|
|
|
419
421
|
color: var(--ct-color-grey-sub);
|
|
420
422
|
}
|
|
421
423
|
&.is-multiple {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
424
|
+
&::after {
|
|
425
|
+
content: attr(select-text);
|
|
426
|
+
position: absolute;
|
|
427
|
+
left: var(--ct-component-inner-padding);
|
|
428
|
+
right: calc(var(--ct-component-inner-padding) * 2);
|
|
429
|
+
top: 50%;
|
|
430
|
+
transform: translateY(-50%);
|
|
431
|
+
text-overflow: ellipsis;
|
|
432
|
+
overflow: hidden;
|
|
433
|
+
white-space: nowrap;
|
|
434
|
+
cursor: pointer;
|
|
435
|
+
}
|
|
436
|
+
.el-select__placeholder.is-transparent {
|
|
437
|
+
display: block;
|
|
438
|
+
}
|
|
439
|
+
.el-select__selected-item {
|
|
440
|
+
display: none;
|
|
441
|
+
}
|
|
434
442
|
}
|
|
435
443
|
}
|
|
436
444
|
</style>
|
|
@@ -135,9 +135,12 @@ const getYearList = () => {
|
|
|
135
135
|
}
|
|
136
136
|
yearList.value = yearArr;
|
|
137
137
|
};
|
|
138
|
-
watch(
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
watch(
|
|
139
|
+
() => props.range,
|
|
140
|
+
() => {
|
|
141
|
+
getYearList();
|
|
142
|
+
}
|
|
143
|
+
);
|
|
141
144
|
const filterHandleE = (str) => {
|
|
142
145
|
//处理结束年
|
|
143
146
|
if (judgeYear(str) && judgeRange(str)) {
|
|
@@ -207,7 +210,7 @@ onMounted(() => {
|
|
|
207
210
|
getYearList();
|
|
208
211
|
});
|
|
209
212
|
</script>
|
|
210
|
-
<style lang=
|
|
213
|
+
<style lang="less">
|
|
211
214
|
.ct-year-select {
|
|
212
215
|
--el-select-input-focus-border-color: transparent;
|
|
213
216
|
--ct-year-select-select-inner-box-shadow: none;
|
|
@@ -273,5 +276,15 @@ onMounted(() => {
|
|
|
273
276
|
}
|
|
274
277
|
}
|
|
275
278
|
}
|
|
279
|
+
.el-select__wrapper {
|
|
280
|
+
padding: 1px 12px;
|
|
281
|
+
min-height: 30px;
|
|
282
|
+
box-shadow: var(--ct-year-select-select-inner-box-shadow);
|
|
283
|
+
&.is-focused,
|
|
284
|
+
&.is-hovering:not(.is-focused),
|
|
285
|
+
&.is-disabled {
|
|
286
|
+
box-shadow: var(--ct-year-select-select-inner-box-shadow);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
276
289
|
}
|
|
277
|
-
</style>
|
|
290
|
+
</style>
|