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

json导入 #12

Open
WangYi0220 opened this issue Aug 28, 2019 · 5 comments
Open

json导入 #12

WangYi0220 opened this issue Aug 28, 2019 · 5 comments

Comments

@WangYi0220
Copy link

您好,能否指点一下如何将已有JSON 导入进行回显?谢谢。

@charlieysx
Copy link
Owner

@WangYi0220
src/store/modules/pageDesign.js里面有这个方法导出json数据
image
你看下就应该知道怎么把json设置回去了

@WangYi0220
Copy link
Author

感谢,已经成功回显

@ancin
Copy link

ancin commented Apr 26, 2020

@CB-ysx 您好, 这个模板也是json形式的吗? 哪个位置能加载这个模板?

@charlieysx
Copy link
Owner

@ancin 可以写一个setWidgetJsonData方法,传模板的json数据,进行赋值。

setWidgetJsonData(store, {page, widgets}) {
    store.state.dPage = page;
    store.state.dWidgets = widgets;
}

大概这样子,可能还有其他数据的初始化。

@ancin
Copy link

ancin commented Apr 27, 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

3 participants