ct-component-plus 1.5.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": "1.5.0",
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": "~2.4.4",
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
- 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,9 @@ defineExpose({
358
358
  </script>
359
359
  <style lang="less">
360
360
  .ct-select {
361
- width: 214px;
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) - 2px);
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
- // &::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
- // }
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(() => 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>
@@ -105,33 +105,44 @@
105
105
  --ct-color-bluegray-11: #434852;
106
106
  --ct-color-bluegray-12: #2c2e33;
107
107
  --ct-color-bluegray-13: #131314;
108
+
109
+ --ct-color-red: #F55549;
110
+ --ct-color-tigerlily: #FF643E;
111
+ --ct-color-orange: #FF9233;
112
+ --ct-color-apricot: #FFAD2C;
113
+ --ct-color-gold: #FFC300;
114
+ --ct-color-lemon: #FFE600;
115
+ --ct-color-lime: #BFE600;
116
+ --ct-color-green: #75CE5F;
117
+ --ct-color-cyan: #22C2B7;
118
+ --ct-color-skyblue: #42A6FF;
119
+ --ct-color-blue: #4D64FF;
120
+ --ct-color-violet: #644DFF;
121
+ --ct-color-purple: #AC4DFF;
122
+ --ct-color-magenta: #E65CE6;
123
+ --ct-color-white: #FFFFFF;
124
+
108
125
  // ------red-color-------
109
- --ct-color-red-1: #fef7f6;
110
- --ct-color-red-2: #ffe2e0;
111
- --ct-color-red-3: #ffc6c2;
112
- --ct-color-red-4: #ffa9a3;
113
- --ct-color-red-5: #ff8980;
114
- --ct-color-red-6: #f55549;
115
- --ct-color-red-7: #db382c;
116
- --ct-color-red-8: #c22013;
126
+ --ct-color-red-1: #FEF4F4;
127
+ --ct-color-red-2: #FFE2E0;
128
+ --ct-color-red-3: #FFC6C2;
129
+ --ct-color-red-4: #FFA9A3;
130
+ --ct-color-red-5: #FF7B70;
131
+ --ct-color-red: #F55549;
117
132
  // ------orange-color-------
118
- --ct-color-orange-1: #fff7f0;
119
- --ct-color-orange-2: #ffe9d6;
120
- --ct-color-orange-3: #ffd4ae;
121
- --ct-color-orange-4: #ffbb80;
122
- --ct-color-orange-5: #ffa85c;
123
- --ct-color-orange-6: #ff9233;
124
- --ct-color-orange-7: #e67717;
125
- --ct-color-orange-8: #cc5f00;
133
+ --ct-color-orange-1: #FFF7F0;
134
+ --ct-color-orange-2: #FFE9D6;
135
+ --ct-color-orange-3: #FFD9B8;
136
+ --ct-color-orange-4: #FFBB80;
137
+ --ct-color-orange-5: #FFA85C;
138
+ --ct-color-orange: #FF9233;
126
139
  // ------gold-color-------
127
- --ct-color-gold-1: #fffaeb;
128
- --ct-color-gold-2: #fff5d6;
129
- --ct-color-gold-3: #ffecad;
130
- --ct-color-gold-4: #ffe180;
131
- --ct-color-gold-5: #ffd95c;
132
- --ct-color-gold-6: #ffc300;
133
- --ct-color-gold-7: #e6af00;
134
- --ct-color-gold-8: #cc9c00;
140
+ --ct-color-gold-1: #FFFAEB;
141
+ --ct-color-gold-2: #FFF5D6;
142
+ --ct-color-gold-3: #FFEDB3;
143
+ --ct-color-gold-4: #FFE180;
144
+ --ct-color-gold-5: #FFD95C;
145
+ --ct-color-gold: #FFC300;
135
146
  // ------yellow-color-------
136
147
  --ct-color-yellow-1: #fffff0;
137
148
  --ct-color-yellow-2: #fcfcd4;
@@ -160,50 +171,40 @@
160
171
  --ct-color-green-7: #53cc45;
161
172
  --ct-color-green-8: #42b336;
162
173
  // ------cyan-color-------
163
- --ct-color-cyan-1: #f0fcfc;
164
- --ct-color-cyan-2: #dcfafa;
165
- --ct-color-cyan-3: #c9f5f5;
166
- --ct-color-cyan-4: #a4ebeb;
167
- --ct-color-cyan-5: #79e0e0;
168
- --ct-color-cyan-6: #3dcccc;
169
- --ct-color-cyan-7: #24b3b3;
170
- --ct-color-cyan-8: #0f9999;
174
+ --ct-color-cyan-1: #EDFCFB;
175
+ --ct-color-cyan-2: #DCFAF8;
176
+ --ct-color-cyan-3: #BDF2EF;
177
+ --ct-color-cyan-4: #97E6E0;
178
+ --ct-color-cyan-5: #6BD6CF;
179
+ --ct-color-cyan: #22C2B7;
171
180
  // ------skyblue-color-------
172
- --ct-color-skyblue-1: #f0f9ff;
173
- --ct-color-skyblue-2: #e0f3ff;
174
- --ct-color-skyblue-3: #c7e9ff;
175
- --ct-color-skyblue-4: #9ed8ff;
176
- --ct-color-skyblue-5: #66c1ff;
177
- --ct-color-skyblue-6: #33adff;
178
- --ct-color-skyblue-7: #0092f5;
179
- --ct-color-skyblue-8: #007dd1;
181
+ --ct-color-skyblue-1: #F0F8FF;
182
+ --ct-color-skyblue-2: #E0F1FF;
183
+ --ct-color-skyblue-3: #C2E2FF;
184
+ --ct-color-skyblue-4: #99CFFF;
185
+ --ct-color-skyblue-5: #66B8FF;
186
+ --ct-color-skyblue: #42A6FF;
180
187
  // ------blue-color-------
181
- --ct-color-blue-1: #f5f6ff;
182
- --ct-color-blue-2: #e6e9ff;
183
- --ct-color-blue-3: #ccd2ff;
184
- --ct-color-blue-4: #b8c1ff;
185
- --ct-color-blue-5: #7a8cff;
186
- --ct-color-blue-6: #4d64ff;
187
- --ct-color-blue-7: #2e46e6;
188
- --ct-color-blue-8: #152ed6;
188
+ --ct-color-blue-1: #F2F5FF;
189
+ --ct-color-blue-2: #E6ECFF;
190
+ --ct-color-blue-3: #CCD8FF;
191
+ --ct-color-blue-4: #A8BDFF;
192
+ --ct-color-blue-5: #738FFF;
193
+ --ct-color-blue: #4D64FF;
194
+ // ------violet-color-------
195
+ --ct-color-violet-1: #F4F2FF;
196
+ --ct-color-violet-2: #E9E6FF;
197
+ --ct-color-violet-3: #D3CCFF;
198
+ --ct-color-violet-4: #B8ADFF;
199
+ --ct-color-violet-5: #8C7AFF;
200
+ --ct-color-violet: #644DFF;
189
201
  // ------purple-color-------
190
- --ct-color-purple-1: #faf5ff;
191
- --ct-color-purple-2: #f1e0ff;
192
- --ct-color-purple-3: #e7ccff;
193
- --ct-color-purple-4: #d9adff;
194
- --ct-color-purple-5: #c17aff;
195
- --ct-color-purple-6: #ac4dff;
196
- --ct-color-purple-7: #902ee6;
197
- --ct-color-purple-8: #7614cc;
198
- // ------magenta-color-------
199
- --ct-color-magenta-1: #fff5ff;
200
- --ct-color-magenta-2: #fae1fa;
201
- --ct-color-magenta-3: #f5cef5;
202
- --ct-color-magenta-4: #f0b2f0;
203
- --ct-color-magenta-5: #eb8deb;
204
- --ct-color-magenta-6: #e65ce6;
205
- --ct-color-magenta-7: #cc3dcc;
206
- --ct-color-magenta-8: #b324b3;
202
+ --ct-color-purple-1: #F9F2FF;
203
+ --ct-color-purple-2: #F1E0FF;
204
+ --ct-color-purple-3: #E7CCFF;
205
+ --ct-color-purple-4: #D6A8FF;
206
+ --ct-color-purple-5: #BF75FF;
207
+ --ct-color-purple: #AC4DFF;
207
208
  }
208
209
 
209
210
  body {