专业编程教程与实战项目分享平台

网站首页 > 技术文章 正文

编程资源介绍之BootstrapVue bootstrap编辑器哪个好

ins518 2024-10-08 08:32:09 技术文章 15 ℃ 0 评论

介绍

Bootstrap是Twitter推出的一个用于前端开发的开源工具包。它由Twitter的设计师Mark Otto和Jacob Thornton合作开发,是一个CSS/HTML框架。

Vue 是一套用于构建用户界面的渐进式框架

而两者的合体就是BootstrapVue,一个基于Vue.js 和Bootstrap v4开发的框架。

官网

https://bootstrap-vue.org/

安装使用

# With npm
npm install bootstrap-vue

# With yarn
yarn add bootstrap-vue

例子

vue

<div>

<b-button size="sm" @click="toggle">

{{ show ? 'Hide' : 'Show' }} Alert

</b-button>

<b-alert

v-model="show"

class="mt-3"

dismissible

@dismissed="dismissed"

>

Hello {{ name }}!

</b-alert>

</div>

javascript

{

data() {

return {

name: 'BootstrapVue',

show: true

}

},

watch: {

show(newVal) {

console.log('Alert is now ' + (newVal ? 'visible' : 'hidden'))

}

},

methods: {

toggle() {

console.log('Toggle button clicked')

this.show = !this.show

},

dismissed() {

console.log('Alert dismissed')

}

}

}

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表