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

更新 Bootstrap CSS 至 4.x 版本 #10

Open
409915016 opened this issue Sep 29, 2020 · 1 comment
Open

更新 Bootstrap CSS 至 4.x 版本 #10

409915016 opened this issue Sep 29, 2020 · 1 comment
Assignees
Labels
Milestone

Comments

@409915016
Copy link
Owner

409915016 commented Sep 29, 2020

bootstrap.native 3.0 版本依赖 Bootstrap 4

The faster, lighter and more secure set of JavaScript components for Bootstrap 4,

Froms 表单

管理后台在保存相册、分类时偶尔会跳转至新的页面,研究了半天才意识到在 HTML 结构中使用了 <form> 表单,由于没有使用基于 Vue 的 UI 组件,Froms 表单会触发原生的表单提交请求。

其中一个解决方法是在表单内 button 元素中加入 type="button" 属性,这也是 Bootstrap 示例代码中推荐的!

<button class="btn btn-primary" type="button" @click="submit">

</button>

参考资料

@409915016
Copy link
Owner Author

409915016 commented Oct 6, 2020

Bootstrap 4 移除了 glyphicons 图标,可以用 Font Awesome 代替,参考 Bootstrap 4 - Glyphicons migration?

Migrating from Glyphicons to Font Awesome is quite easy.

Include a reference to Font Awesome (either locally, or use the CDN).

<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

Then run a search and replace where you search for glyphicon glyphicon- and replace it with fa fa-. Most of the CSS class names are the same. Some have changed though, so you have to manually fix those.

引用修改 12c1ec6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant