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

我想加个模板的功能 #16

Open
ancin opened this issue Apr 27, 2020 · 2 comments
Open

我想加个模板的功能 #16

ancin opened this issue Apr 27, 2020 · 2 comments

Comments

@ancin
Copy link

ancin commented Apr 27, 2020

  1. getWidgetJsonData 利用这个方法生出json对吧,然后保存。
  2. 加载模板的时候,可以利用this.addWidget(jsonObj); 加载模板;是不是这样?
    请大佬指点。我这样做的;中间widget没有显示出我们的模板,也没有报错。

请指点。
谢谢。

@charlieysx
Copy link
Owner

addWidget只是添加单个组件吧。
回显json数据,这个方法我没做,需要你自己写下。
即getWidgetJsonData会得到一份json,page代表页面设置,page下还有一个widgets代表组件列表,两份都设置到vuex里。

@ancin
Copy link
Author

ancin commented Apr 28, 2020

@CB-ysx 谢谢指点,我尝试下。感谢。

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