From 84be0f28a660ddf8d7c98bd55ec134a380111a04 Mon Sep 17 00:00:00 2001 From: 13315423919 <13315423919@qq.com> Date: Wed, 19 Nov 2025 19:43:18 +0800 Subject: [PATCH] Add File --- doc/AlpineJs.md | 113 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 doc/AlpineJs.md diff --git a/doc/AlpineJs.md b/doc/AlpineJs.md new file mode 100644 index 0000000..96cf58a --- /dev/null +++ b/doc/AlpineJs.md @@ -0,0 +1,113 @@ +本项目使用了AlpineJs作为前端主要库,目的是简单快捷,语法类似于VUE2. + +中文官网:https://www.alpinejs.cn/ +国际官网:https://alpinejs.dev/ + +和UI相关的资源,本项目使用了如下的资源 +https://www.penguinui.com/ +https://devdojo.com/pines +https://pinemix.com/ + + +更多信息可以在bing中搜索alpine js ui library + + +作者编写了alp_unit.js实现单一模块的封装和加载,如下所示: + +
+ + + +其中动态加载,需要手工指定触发时机,如下方式: + + + + + + +1. init函数中监控触发 + init(){ + + //动态加载,AI对话框 + this.$watch('ppt_modalIsOpen',value => { + if (value){ + this.$nextTick(() => { + var dom = document.getElementById("ppt_ai_dialog") + scan_alp_units(dom); + }); + } + }); + + },//初始化函数 + +2. 事件触发函数: +enter_chat_agent(index){ + //先设置值 + this.ppt_modalIsOpen = true; + + //更新后动态加载 + this.$nextTick(() => { + var dom = document.getElementById("ppt_ai_dialog") + scan_alp_units(dom); + }); + +} + +==============================事件分发价值,在多个组件之间进行消息数据的传递======================= +