@shenjipo/mention-vue2 0.1.0 → 1.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/dist/index.d.ts +70 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +68 -12307
- package/package.json +37 -35
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,70 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
|
|
3
|
+
/** mention-editor 中透出的 item */
|
|
4
|
+
export interface MentionItem {
|
|
5
|
+
id: string | number
|
|
6
|
+
label: string
|
|
7
|
+
disabled?: boolean
|
|
8
|
+
[key: string]: any
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** MentionInputVue2 组件类型 */
|
|
12
|
+
declare const MentionInputVue2: Vue & {
|
|
13
|
+
new(): {
|
|
14
|
+
/* ---------------- props ---------------- */
|
|
15
|
+
|
|
16
|
+
/** v-model 绑定值 */
|
|
17
|
+
value: string
|
|
18
|
+
|
|
19
|
+
/** 占位文本 */
|
|
20
|
+
placeholder: string
|
|
21
|
+
|
|
22
|
+
/** suggestion 渲染容器(可选) */
|
|
23
|
+
suggestionDom: HTMLElement | null
|
|
24
|
+
|
|
25
|
+
/** suggestion Vue 组件构造器 */
|
|
26
|
+
suggestionComponent: Vue
|
|
27
|
+
|
|
28
|
+
/* ---------------- data ---------------- */
|
|
29
|
+
|
|
30
|
+
/** 内部 editor 实例(不建议外部直接使用) */
|
|
31
|
+
editor: any
|
|
32
|
+
|
|
33
|
+
/** mention bridge */
|
|
34
|
+
mentionBridge: any
|
|
35
|
+
|
|
36
|
+
/* ---------------- methods ---------------- */
|
|
37
|
+
|
|
38
|
+
/** 手动刷新(当前为空实现,预留) */
|
|
39
|
+
refresh(): void
|
|
40
|
+
|
|
41
|
+
/* ---------------- events ---------------- */
|
|
42
|
+
|
|
43
|
+
/** v-model */
|
|
44
|
+
$emit(event: 'input', value: string): this
|
|
45
|
+
|
|
46
|
+
/** 内容变化 */
|
|
47
|
+
$emit(event: 'change', value: string): this
|
|
48
|
+
|
|
49
|
+
/** mention 命令触发 */
|
|
50
|
+
$emit(event: 'command', item: MentionItem): this
|
|
51
|
+
|
|
52
|
+
/** 图片输入(拖拽 / 粘贴) */
|
|
53
|
+
$emit(
|
|
54
|
+
event: 'onFileChange',
|
|
55
|
+
file: File,
|
|
56
|
+
base64: string,
|
|
57
|
+
width: number,
|
|
58
|
+
height: number
|
|
59
|
+
): this
|
|
60
|
+
|
|
61
|
+
/** 非法文件 */
|
|
62
|
+
$emit(event: 'onFileReject', file: File): this
|
|
63
|
+
|
|
64
|
+
/** Enter 键 */
|
|
65
|
+
$emit(event: 'enter'): this
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export default MentionInputVue2
|
|
70
|
+
export { MentionInputVue2 }
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,oBAAoB,CAAC;AAE5B,eAAe,gBAAgB,CAAA"}
|