File tree Expand file tree Collapse file tree 5 files changed +344
-295
lines changed Expand file tree Collapse file tree 5 files changed +344
-295
lines changed Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ const customTheme = {
336336
337337| 配置名 | 配置类型 | 默认值 | 说明/备注 |
338338| :------------: | :-------------------: | :-----------------: | :--------------------------------------------------------------------------------------------------: |
339- | size | ‘ mid’ \| 'small'\| 'big' | mid | 用于调整整体大小 |
339+ | size | ' mid' \| 'small'\| 'big' | mid | 用于调整整体大小 |
340340| theme | 'dark'\| 'default' | default | 主题切换 支持亮色和暗黑主题 |
341341| manualClose | boolean | false | 设置为 true 可以手动控制弹出框的关闭 |
342342| optionsName | - | {} | 翻译原有板块名字 |
@@ -352,6 +352,7 @@ const customTheme = {
352352| unicodeVersion | number | 11 | 在某些设备上可能不能兼容高版本的 emojiunicode |
353353| _ skin_ | - | none | 暂时无法很好的支持 |
354354| tippyOptions | 自定义 tippy 的配置 | | https://atomiks.github.io/tippyjs/v6/customization/ |
355+ | immediateClose | boolean | false | 设置为 true 时点击表情后立即关闭 |
355356
356357``` ts
357358type FixType = ' upleft' | ' upright' | ' upcenter' | ' downleft' | ' downright' | ' downcenter' // 控制表情弹出框的位置
Original file line number Diff line number Diff line change 33 "private" : false ,
44 "author" : " ADKCodeXD" ,
55 "description" : " 一个简单的Emoji表情选择组件" ,
6- "version" : " 3.0.4 " ,
6+ "version" : " 3.0.5 " ,
77 "license" : " MIT" ,
88 "main" : " ./dist/Vue3Emoji.umd.js" ,
99 "module" : " ./dist/Vue3Emoji.es.js" ,
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ const optionsName = {
1919}
2020const disableGroup = [' 食物&饮料' ]
2121const abc = ref (' 这里是双向绑定的值' )
22+ const manualClose = ref ()
2223const clickEvent = ref (' ' )
2324const customIcon: Emoji .JsonData = {
2425 ' Smileys & Emotion' : ' 😚' ,
@@ -64,6 +65,10 @@ const disableGroup2 = [
6465 ' Flags' ,
6566 ' Activities' ,
6667]
68+
69+ const closeCustom = () => {
70+ manualClose .value ?.closePop ()
71+ }
6772 </script >
6873
6974<template >
@@ -96,6 +101,25 @@ const disableGroup2 = [
96101 <V3Emoji size =" mid" :custom-tab =" customTab" :disable-group =" disableGroup2" />
97102 <p >customTab</p >
98103 </div >
104+ <div class =" test" >
105+ <V3Emoji size =" mid" :keep =" true" />
106+ <p >keep</p >
107+ </div >
108+ <div class =" test" >
109+ <V3Emoji
110+ size =" mid"
111+ :immediate-close =" true"
112+ :manual-close =" true"
113+ ref =" manualClose"
114+ @close ="
115+ () => {
116+ console.log('close')
117+ }
118+ "
119+ />
120+ <p >manual-close</p >
121+ </div >
122+ <button @click =" closeCustom" >close</button >
99123 </div >
100124 <div id =" app" >
101125 <div >
You can’t perform that action at this time.
0 commit comments