Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

服务端的变量数据怎么传入到public的后台js上使用 #139

Open
potternice opened this issue Jan 14, 2023 · 5 comments
Open

Comments

@potternice
Copy link

No description provided.

@augushong
Copy link

封装控制器的assign,到页面上,比如一个bom上的json数据,再封装一个js方法获取。

最原始的方法是直接在对应的html上输出数据,然后再js上获取。再json一下

@potternice
Copy link
Author

我现在用这样子的处理,要么赋值到dom节点上,要么直接在html下设置js echo的变量,但是加载的时候存在在js的页面无法获取的问题,尤其是清除缓存的情况下,部分的变量直接没掉,导致js那边报错,感觉加载有点问题,尤其是用websocker的时候

@augushong
Copy link

你这个思路没问题。应该是你代码实现有问题。

@potternice
Copy link
Author

菜单的点击怎么设置点击能进行页面数据的重载呀

@cshaptx4869
Copy link
Contributor

自行实现向js模块文件传递变量 cshaptx4869/easyadmin@00f10f6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants