File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
docs/.vitepress/theme/components Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1919</template >
2020
2121<script setup>
22+ el .addEventListener (' click' , ()=> {
23+ const overlay = document .createElement (' div' );
24+ overlay .className = ' modal-overlay' ;
25+
26+ const modal = document .createElement (' div' );
27+ modal .className = ' modal-card' ;
28+ modal .innerHTML = `
29+ <img src =" ${el.querySelector('img').src}" alt =" 二维码" >
30+ <div class =" modal-title" >SecRandom团队再次感谢您的支持</div >
31+ <div class =" modal-subtitle" >点击周围空白关闭</div >
32+ ` ;
33+
34+ overlay .appendChild (modal);
35+ document .body .appendChild (overlay);
36+
37+ // 点击空白关闭
38+ overlay .addEventListener (' click' , (e )=> {
39+ if (e .target === overlay){
40+ document .body .removeChild (overlay);
41+ }
42+ });
43+ });
44+ });
2245 </script >
2346
2447<style scoped>
You can’t perform that action at this time.
0 commit comments