@v-c/mentions 1.2.0 → 1.2.2
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/Mentions.js +2 -8
- package/package.json +5 -5
package/dist/Mentions.js
CHANGED
|
@@ -6,7 +6,7 @@ import { filterOption, getBeforeSelectionText, getLastMeasureIndex, replaceWithM
|
|
|
6
6
|
import { Fragment, computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef, watch } from "vue";
|
|
7
7
|
import { BaseInput } from "@v-c/input";
|
|
8
8
|
import TextArea from "@v-c/textarea";
|
|
9
|
-
import { KeyCode, clsx, omit, useId } from "@v-c/util";
|
|
9
|
+
import { KeyCode, clsx, isVueRenderable, omit, useId } from "@v-c/util";
|
|
10
10
|
import { toArray } from "@v-c/util/dist/Children/toArray";
|
|
11
11
|
import { filterEmpty, getAttrStyleAndClass } from "@v-c/util/dist/props-util";
|
|
12
12
|
//#region src/Mentions.tsx
|
|
@@ -123,7 +123,6 @@ var InternalMentions = /* @__PURE__ */ defineComponent((props, { slots, expose,
|
|
|
123
123
|
return list.filter((option) => {
|
|
124
124
|
/** Return all result if `filterOption` is false. */
|
|
125
125
|
if (filterOption$1 === false) return true;
|
|
126
|
-
if (typeof filterOption$1 !== "function") return true;
|
|
127
126
|
return filterOption$1(targetMeasureText, option);
|
|
128
127
|
});
|
|
129
128
|
};
|
|
@@ -516,7 +515,6 @@ var InternalMentions = /* @__PURE__ */ defineComponent((props, { slots, expose,
|
|
|
516
515
|
default: void 0
|
|
517
516
|
},
|
|
518
517
|
allowClear: {
|
|
519
|
-
type: [Boolean, Object],
|
|
520
518
|
required: false,
|
|
521
519
|
default: void 0
|
|
522
520
|
},
|
|
@@ -529,7 +527,6 @@ var InternalMentions = /* @__PURE__ */ defineComponent((props, { slots, expose,
|
|
|
529
527
|
default: void 0
|
|
530
528
|
},
|
|
531
529
|
onClear: {
|
|
532
|
-
type: Function,
|
|
533
530
|
required: false,
|
|
534
531
|
default: void 0
|
|
535
532
|
},
|
|
@@ -574,14 +571,13 @@ var InternalMentions = /* @__PURE__ */ defineComponent((props, { slots, expose,
|
|
|
574
571
|
split: " ",
|
|
575
572
|
notFoundContent: "Not Found",
|
|
576
573
|
validateSearch,
|
|
577
|
-
filterOption,
|
|
578
574
|
rows: 1
|
|
579
575
|
}),
|
|
580
576
|
name: "VMentions",
|
|
581
577
|
inheritAttrs: false
|
|
582
578
|
});
|
|
583
579
|
var Mentions = /* @__PURE__ */ defineComponent((props, { expose, attrs }) => {
|
|
584
|
-
const hasSuffix = computed(() =>
|
|
580
|
+
const hasSuffix = computed(() => isVueRenderable(props.suffix) || Boolean(props.allowClear));
|
|
585
581
|
const holderRef = shallowRef();
|
|
586
582
|
const mentionRef = shallowRef();
|
|
587
583
|
const mergedValue = shallowRef(props?.value ?? props?.defaultValue ?? "");
|
|
@@ -806,7 +802,6 @@ var Mentions = /* @__PURE__ */ defineComponent((props, { expose, attrs }) => {
|
|
|
806
802
|
default: void 0
|
|
807
803
|
},
|
|
808
804
|
allowClear: {
|
|
809
|
-
type: [Boolean, Object],
|
|
810
805
|
required: false,
|
|
811
806
|
default: void 0
|
|
812
807
|
},
|
|
@@ -819,7 +814,6 @@ var Mentions = /* @__PURE__ */ defineComponent((props, { expose, attrs }) => {
|
|
|
819
814
|
default: void 0
|
|
820
815
|
},
|
|
821
816
|
onClear: {
|
|
822
|
-
type: Function,
|
|
823
817
|
required: false,
|
|
824
818
|
default: void 0
|
|
825
819
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-c/mentions",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/antdv-next/vue-components/tree/next/packages/mentions",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"vue": "^3.0.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@v-c/input": "^1.1.
|
|
34
|
-
"@v-c/menu": "^1.
|
|
33
|
+
"@v-c/input": "^1.1.2",
|
|
34
|
+
"@v-c/menu": "^1.4.0",
|
|
35
35
|
"@v-c/textarea": "^1.1.0",
|
|
36
|
-
"@v-c/
|
|
37
|
-
"@v-c/
|
|
36
|
+
"@v-c/util": "^1.2.1",
|
|
37
|
+
"@v-c/trigger": "^1.1.1"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "vite build",
|