desfpc/vuebootstrap
最新稳定版本:1.05
Composer 安装命令:
composer require desfpc/vuebootstrap
包简介
Vue bootstrap components
README 文档
README
Vue js bootstrap 5 components
Validation
Component and plugin for vue 3 and bootstrap 5 validation
Usage
- Copy *.js files to your project (in example to /js/vuebootstrap/ folder)
- Main Vue app file:
const { createApp } = Vue
import App from '/js/app.js'
import Validation from '/js/vuebootstrap/validation.js'
import Validate from '/js/vuebootstrap/validate.js'
const app = createApp(App)
app.use(Validation, {});
app.component("Validate", Validate);
app.mount("#app");
- In your App add validation to any form element:
<Validate v-slot="{ errorClass }" :rule="$validationRules.string" :value="user.name" :func="$globalValidation"> <input type="text" class="form-control" :class="errorClass" id="name" v-model="user.name"> </Validate>
Where you can change:
- $validationRules.string - rule for validation (See all rules in validation.js)
- <input... - any form element
- <input :class="errorClass" - validated class for input
- Check your form for valid in your App:
if (this.$checkValidation()) {
// Form is valid
} else {
// Form is invalid
}
Tabs
Component for vue 3 and bootstrap 5 tabs
Usage
- Copy *.js files to your project (in example to /js/vuebootstrap/ folder)
- Main Vue app file:
const { createApp } = Vue
import App from '/js/vendor/authorize/profile.js'
import Tabs from '/js/vuebootstrap/tabs.js'
const app = createApp(App)
app.component("Tabs", Tabs);
app.mount("#app");
- In your App add tabs element:
<Tabs tabsjson='[{"name": "Test_Tab1", "id": "test_tab_1"}, {"name": "Test_Tab2", "id": "test_tab_2"}]' startactivetab="test_tab_1"> <template v-slot:test_tab_1> test tab 1 body </template> <template v-slot:test_tab_2> test tab 2 body </template> </Tabs>
Where:
- tabsjson - json array with tabs names and ids
- startactivetab - id of tab which will be active after page load
<template v-slot:test_tab_1>- body of tab with id "test_tab_1"
Active Table
Component for vue 3 and bootstrap 5 table with ordering, pagination and filters
Link
Button
AInput
ASelect
Alert
Helper
统计信息
- 总下载量: 47
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2023-06-24