ct-component-plus 2.0.2 → 2.1.3

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": "2.0.2",
4
+ "version": "2.1.3",
5
5
  "type": "module",
6
6
  "main": "packages/components/index.js",
7
7
  "files": [
@@ -16,8 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "cingta-icon": "^2.1.6",
19
- "element-plus": "~2.12.0",
20
- "publish": "^0.6.0",
19
+ "element-plus": "2.10.0",
21
20
  "vue": "^3.2.47"
22
21
  },
23
22
  "devDependencies": {
@@ -34,4 +33,4 @@
34
33
  "vuepress": "^2.0.0-beta.63",
35
34
  "vuepress-plugin-demo-container": "^0.2.0"
36
35
  }
37
- }
36
+ }
@@ -62,7 +62,7 @@ defineExpose({
62
62
  ref: inputRef,
63
63
  });
64
64
  </script>
65
- <style lang='less'>
65
+ <style lang="less">
66
66
  .ct-input {
67
67
  @R: .ct-input;
68
68
  --ct-input-focus-color: var(--ct-color-primary);
@@ -104,4 +104,4 @@ defineExpose({
104
104
  }
105
105
  }
106
106
  }
107
- </style>
107
+ </style>
@@ -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
- selectRef.value.$refs.reference.input.value = result;
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,21 @@ defineExpose({
358
358
  </script>
359
359
  <style lang="less">
360
360
  .ct-select {
361
- width: 214px;
361
+ &.el-select {
362
+ position: relative;
363
+ width: 214px;
364
+ &__selected-item {
365
+ &:nth-child(1) {
366
+ display: none;
367
+ }
368
+ &:nth-child(2) {
369
+ display: none;
370
+ }
371
+ &:nth-child(3) {
372
+ display: flex;
373
+ }
374
+ }
375
+ }
362
376
  &__top {
363
377
  padding: 0 16px;
364
378
  font-size: var(--ct-font-size);
@@ -407,7 +421,7 @@ defineExpose({
407
421
  z-index: 3;
408
422
  right: var(--ct-component-inner-padding);
409
423
  top: 50%;
410
- height: calc(var(--ct-component-size) - 2px);
424
+ height: calc(var(--ct-component-size) - 8px);
411
425
  transform: translateY(-50%);
412
426
  background-color: #fff;
413
427
  }
@@ -419,18 +433,25 @@ defineExpose({
419
433
  color: var(--ct-color-grey-sub);
420
434
  }
421
435
  &.is-multiple {
422
- // &::after {
423
- // content: attr(select-text);
424
- // position: absolute;
425
- // left: var(--ct-component-inner-padding);
426
- // right: calc(var(--ct-component-inner-padding) * 2);
427
- // top: 50%;
428
- // transform: translateY(-50%);
429
- // text-overflow: ellipsis;
430
- // overflow: hidden;
431
- // white-space: nowrap;
432
- // cursor: pointer;
433
- // }
436
+ &::after {
437
+ content: attr(select-text);
438
+ position: absolute;
439
+ left: var(--ct-component-inner-padding);
440
+ right: calc(var(--ct-component-inner-padding) * 2);
441
+ top: 50%;
442
+ transform: translateY(-50%);
443
+ text-overflow: ellipsis;
444
+ overflow: hidden;
445
+ white-space: nowrap;
446
+ cursor: pointer;
447
+ pointer-events: none;
448
+ }
449
+ .el-select__placeholder.is-transparent {
450
+ display: block;
451
+ }
452
+ .el-select__selected-item {
453
+ display: none;
454
+ }
434
455
  }
435
456
  }
436
457
  </style>
@@ -135,9 +135,12 @@ const getYearList = () => {
135
135
  }
136
136
  yearList.value = yearArr;
137
137
  };
138
- watch(() => props.range, () => {
139
- getYearList();
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='less'>
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>
@@ -93,7 +93,6 @@
93
93
  padding: 1px var(--ct-component-inner-padding);
94
94
 
95
95
  &:focus-within {
96
-
97
96
  .ct-icon,
98
97
  .el-icon {
99
98
  color: var(--ct-color-primary);
@@ -178,7 +177,6 @@
178
177
  .el-input {
179
178
  &.is-focus {
180
179
  .el-input__suffix {
181
-
182
180
  .el-icon,
183
181
  .ct-icon {
184
182
  color: var(--ct-select-focus-icon-color);
@@ -192,7 +190,6 @@
192
190
  .el-input {
193
191
  &.is-focus {
194
192
  .el-input__wrapper {
195
-
196
193
  .el-icon,
197
194
  .ct-icon {
198
195
  color: var(--ct-color-primary);
@@ -201,7 +198,8 @@
201
198
  }
202
199
  }
203
200
 
204
- &__dropdown {}
201
+ &__dropdown {
202
+ }
205
203
 
206
204
  &-menu {
207
205
  &__list {
@@ -210,7 +208,7 @@
210
208
  }
211
209
 
212
210
  &-panel {
213
- --el-cascader-menu-border: 1px solid #F0F3F9;
211
+ --el-cascader-menu-border: 1px solid #f0f3f9;
214
212
  }
215
213
 
216
214
  &-node {
@@ -245,8 +243,8 @@
245
243
  }
246
244
  }
247
245
 
248
- >.el-radio,
249
- >.el-checkbox {
246
+ > .el-radio,
247
+ > .el-checkbox {
250
248
  margin-left: 10px;
251
249
  margin-right: -2px;
252
250
  }
@@ -276,7 +274,6 @@
276
274
  &-date-editor {
277
275
  &.el-range-editor {
278
276
  &:not(.is-active):focus-within {
279
-
280
277
  .ct-icon,
281
278
  .el-icon {
282
279
  color: var(--el-input-icon-color);
@@ -285,7 +282,6 @@
285
282
  }
286
283
 
287
284
  &.is-active {
288
-
289
285
  .ct-icon,
290
286
  .el-icon {
291
287
  color: var(--ct-color-primary);
@@ -325,7 +321,7 @@
325
321
 
326
322
  &-date-picker {
327
323
  --el-datepicker-header-text-color: var(--ct-color-grey-transition);
328
- --ct-datepicker-border-color: #F0F3F9;
324
+ --ct-datepicker-border-color: #f0f3f9;
329
325
  width: 304px;
330
326
  @R: .el-picker-panel;
331
327
 
@@ -367,7 +363,7 @@
367
363
  td {
368
364
  padding: 9px;
369
365
 
370
- >div {
366
+ > div {
371
367
  height: 26px;
372
368
  padding: 0;
373
369
  }
@@ -397,8 +393,8 @@
397
393
  }
398
394
 
399
395
  &-date-range-picker {
400
- --ct-datepicker-border-color: #F0F3F9;
401
- --el-datepicker-inrange-bg-color: #F5F7FC;
396
+ --ct-datepicker-border-color: #f0f3f9;
397
+ --el-datepicker-inrange-bg-color: #f5f7fc;
402
398
  --el-datepicker-inner-border-color: var(--ct-datepicker-border-color);
403
399
  --el-datepicker-header-text-color: var(--ct-color-grey-transition);
404
400
  width: 608px;
@@ -444,7 +440,6 @@
444
440
  &:first-of-type {
445
441
  .el-date-table-cell {
446
442
  border-radius: 4px 0 0 4px;
447
-
448
443
  }
449
444
  }
450
445
 
@@ -568,7 +563,6 @@
568
563
  box-shadow: none;
569
564
  }
570
565
  }
571
-
572
566
  }
573
567
 
574
568
  &__jump {
@@ -588,11 +582,12 @@
588
582
  @R: .el-table;
589
583
  font-size: 15px;
590
584
  --el-table-header-text-color: var(--ct-font-color);
591
- --el-table-header-bg-color: #F0F3F9;
585
+ --el-table-header-bg-color: #f0f3f9;
592
586
  // --el-table-row-hover-bg-color: #F7F9FD;
593
- --el-table-row-hover-bg-color: #FAFAFC;
587
+ --el-table-row-hover-bg-color: #fafafc;
594
588
 
595
- .cell {}
589
+ .cell {
590
+ }
596
591
 
597
592
  & @{R}__cell {
598
593
  padding: 16px 0;
@@ -702,6 +697,12 @@
702
697
  right: 16px;
703
698
  color: var(--ct-border-color);
704
699
  }
700
+ // 消息关闭按钮位置展示
701
+ .el-icon.el-message__closeBtn {
702
+ position: absolute;
703
+ top: 50%;
704
+ transform: translateY(-50%);
705
+ }
705
706
  }
706
707
 
707
708
  &-message.ct-message--success {
@@ -723,4 +724,4 @@
723
724
  background-color: var(--ct-color-danger-bg);
724
725
  border: var(--ct-color-danger-border) 1px solid;
725
726
  }
726
- }
727
+ }