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

stl:dynamic类标签能否添加JavaScript回调函数 #1031

Open
fenguo11 opened this issue Jul 12, 2018 · 6 comments
Labels

Comments

@fenguo11
Copy link

@fenguo11 fenguo11 commented Jul 12, 2018

stl:dynamic类标签能否添加JavaScript回调函数,这样就可以对动态返回的结果进行一些处理。

@17671877

This comment has been minimized.

Copy link
Collaborator

@17671877 17671877 commented Jul 13, 2018

有道理,我们加到完善计划里面

@starlying starlying mentioned this issue Jul 13, 2018
43 of 43 tasks complete
@paynehsu

This comment has been minimized.

Copy link

@paynehsu paynehsu commented Jul 31, 2018

这个提过n次了,请重视一下,动态内容因为加载有延迟,很多情况下都需要js处理的。

@starlying starlying mentioned this issue Aug 1, 2018
30 of 30 tasks complete
@starlying

This comment has been minimized.

Copy link
Contributor

@starlying starlying commented Aug 2, 2018

收到,我们会尽快实现

@fenguo11

This comment has been minimized.

Copy link
Author

@fenguo11 fenguo11 commented Aug 2, 2018

我已经对源码修改了一下,非专业人士,仅仅源码修改支持stl:dynamic动态调用,临时用用,代码难看,勿喷,不会使用git,看到有别人同求,就贴在这里吧!

用该文件
StlDynamic.zip解压,用解压出的StlDynamic.cs文件,替换源码目录中\SiteServer.CMS\StlParser\StlElement\目录下中的StlDynamic.cs源文件,按照文档重新编译生成网站就OK了。
在这里为stl:dynamic系列或者Isdynamic标签提供了三个属性,分别是ContainerID,BeforeSendJS,与CompleteJS,前者用于传入后者两个JS 函数告诉JS是哪个对象发生了回调,后两个一个为发送前执行的函数,一个为结束后执行的回调函数。
"BeforeSendJS", "发送前执行的JS代码,如可以显示一个等待框,等等,格式为function (ContainerID)"
"CompleteJS", "发送结束后执行的JS代码,格式为 function (ContainerID,err, data, status)"

@starlying

This comment has been minimized.

Copy link
Contributor

@starlying starlying commented Aug 3, 2018

厉害,我们会参考一下代码,加到产品里面

@starlying

This comment has been minimized.

Copy link
Contributor

@starlying starlying commented Aug 30, 2018

已加入到产品中,感谢 @fenguo11

@starlying starlying mentioned this issue Aug 30, 2018
43 of 85 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.