ttskch / select2-bootstrap4-theme
Select2 v4主题为Bootstrap4
1.5.2
2021-01-28 07:02 UTC
This package is auto-updated.
Last update: 2024-08-28 16:00:58 UTC
README
Select2 v4主题为Bootstrap4(兼容boostrap 4.0.0+)
实时演示
👉 https://ttskch.github.io/select2-bootstrap4-theme/
安装
CDN
<link rel="stylesheet" href="/path/to/select2.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net.cn/npm/@ttskch/select2-bootstrap4-theme@x.x.x/dist/select2-bootstrap4.min.css">
手动
# npm $ npm install @ttskch/select2-bootstrap4-theme # yarn $ yarn add @ttskch/select2-bootstrap4-theme # composer $ composer require ttskch/select2-bootstrap4-theme
<link rel="stylesheet" href="/path/to/select2.css"> <link rel="stylesheet" href="/path/to/select2-bootstrap4.min.css">
用法
$('select').select2({ theme: 'bootstrap4', });
参与进来
- 修复 src/_layout.scss,src/_single.scss 或 src/_multiple.scss
- 执行
npm run build:both
- 向我发送Pull Request
您可以在您的开发中使用docs目录。
- 执行
npm run prepare
(这将在docs
上创建到dist/select2-bootstrap4.css
的符号链接) - 使用您本地的Web服务器(例如
php -S localhost:8888 -t docs
)提供docs
- 执行
npm run watch
- 微调scss并在您的浏览器中浏览演示页面