ct-component-plus 0.0.48 → 0.0.49

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": "0.0.48",
4
+ "version": "0.0.49",
5
5
  "type": "module",
6
6
  "main": "packages/components/index.js",
7
7
  "files": [
@@ -70,7 +70,7 @@
70
70
  </template>
71
71
 
72
72
  <script setup>
73
- import { onMounted, computed, ref, watch, inject, watchEffect } from "vue";
73
+ import { onMounted, computed, ref, watch, inject, watchEffect, nextTick } from "vue";
74
74
  import { selectEmits, selectProps } from "./index";
75
75
  import { useNamespace, useBuriedParams, useCheckedAll } from "../../../hooks";
76
76
  import { isFunction, isArray } from "../../../utils";
@@ -150,6 +150,11 @@ watch(
150
150
  () => selectText.value,
151
151
  (newVal) => {
152
152
  selectRef.value.selectedLabel = newVal;
153
+ if (props.multiple) {
154
+ nextTick(() => {
155
+ selectRef.value.$refs.reference.input.value = newVal;
156
+ })
157
+ }
153
158
  }
154
159
  );
155
160
  watchEffect(async () => {
@@ -363,18 +368,18 @@ defineExpose({
363
368
  color: var(--ct-color-grey-sub);
364
369
  }
365
370
  &.is-multiple {
366
- &::after {
367
- content: attr(select-text);
368
- position: absolute;
369
- left: var(--ct-component-inner-padding);
370
- right: calc(var(--ct-component-inner-padding) * 2);
371
- top: 50%;
372
- transform: translateY(-50%);
373
- text-overflow: ellipsis;
374
- overflow: hidden;
375
- white-space: nowrap;
376
- cursor: pointer;
377
- }
371
+ // &::after {
372
+ // content: attr(select-text);
373
+ // position: absolute;
374
+ // left: var(--ct-component-inner-padding);
375
+ // right: calc(var(--ct-component-inner-padding) * 2);
376
+ // top: 50%;
377
+ // transform: translateY(-50%);
378
+ // text-overflow: ellipsis;
379
+ // overflow: hidden;
380
+ // white-space: nowrap;
381
+ // cursor: pointer;
382
+ // }
378
383
  }
379
384
  }
380
385
  </style>