Meteor Accounts - 登录表单更改HTML删除下拉列表JS [英] Meteor Accounts - Login forms change HTML remove dropdown JS
问题描述
如何修改Meteor的帐户-ui来更改所呈现的类和html标签,而无需重写所有帐户-ui逻辑?
例如我想删除下拉行为,只是直接在我的页面中显示表单。
我读了这个答案,但它没有去详细信息 - 它只是删除默认的CSS。我想更深入一点..
How do I modify Meteor's Accounts-ui to change the classes and the html tags rendered without re-writing all the accounts-ui logic? For example I'd like to remove the "dropdown" behavior and just display the form directly in my page. I read this answer but it doesn't go into detail - it just removes the default CSS. I'd like to go a bit deeper..
推荐答案
造型
删除 accounts-ui
meteor remove accounts-ui
添加 accounts-ui-unstyled
& less
meteor add accounts-ui-unstyled
meteor add less
最后,将以下文件添加到项目目录&根据您的观看次数编辑它
Finally, add the following file to your project directory & edit it to your viewing pleasure
https://github.com/meteor/meteor/blob/master/packages/accounts-ui/login_buttons.less
更多自定义
您可以编辑accounts-ui包并编辑html& js没有从头开始:
You can edit the accounts-ui package and edit html & js without starting from scratch:
删除 accounts-ui-unstyled
包并在下面的dir中添加内容(package.js& accounts_ui_tests.js除外)到项目的客户端
dir,添加 accounts-urls
并编辑它微调它到您的规格。
Remove the accounts-ui-unstyled
package and add the stuff in the dir below (except package.js & accounts_ui_tests.js) to your project's client
dir, add accounts-urls
and edit it to fine tune it to your spec.
https://github.com/meteor/meteor/tree/master/packages/accounts-ui-unstyled
直到meteor为我们提供了指定加载顺序的方法
重命名以下文件,以便按正确的顺序加载
Rename the following files so they load in the correct order
1accounts_ui.js
2login_buttons.html
3login_buttons_single.html
4login_buttons_dropdown.html
5login_buttons_dialogs.html
6login_buttons_session.js
7login_buttons.js
8login_buttons_single.js
9login_buttons_dropdown.js
login_buttons_dialogs.js
这篇关于Meteor Accounts - 登录表单更改HTML删除下拉列表JS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!