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

基于现在的服务端渲染作为预览,有办法支持热区模块吗 #10

Open
bayun2 opened this issue Apr 20, 2020 · 2 comments

Comments

@bayun2
Copy link

bayun2 commented Apr 20, 2020

需要增加一个热区模块,对传进来的图,进行热区选择,配上链接。
但是预览框里的页面,其实是服务端渲染完的,我现在能想到的是, build preview 的时候,让组件本身支持划热区, build release 的时候,隐藏这个能力。然后再 preview 阶段划热区时通过 postMessage 告诉 json 编辑器,进行热区坐标设值。
不知道有没有别的思路来解决这个需求

@CntChen
Copy link
Contributor

CntChen commented Apr 21, 2020

好问题! 热区是我之前没有考虑的, 也是很重要的运营能力. 你的思路看起来可行, 在 build preview 时候, 让 iframe 里面的页面支持热区区域的框选, 并传回到主页面. 主页面再给这些热区渲染出表单让用户填写.

可视化编辑器其实是落地页面的 json 配置, 我感觉难点是这个能力怎么设计:涉及JSON数据结构拓展/预览iframe框选逻辑/通信逻辑/热区编辑表单等, 感觉改动的地方会比较多, 可能会有一些耦合, 后面拓展有难度.

不过, 值得一试.

@bayun2
Copy link
Author

bayun2 commented Apr 21, 2020

嗯,那我来试试吧

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

2 participants