美文网首页
vue from rookie to master - 2

vue from rookie to master - 2

作者: ElliotG | 来源:发表于2018-09-19 16:16 被阅读0次

1. Adding a CSS Framework

Adding Bootstrap to the Project

cd {project folder}
npm install bootstrap@4.0.0

**2. Adding Bootstrap in the main.js **

find in the src Folder

import "bootstrap/dist/css/bootstrap.min.css";

3. computed property

The computed property is used to define properties that operate on the application’s data, and this allows Vue.js to detect changes to the application data efficiently, which is important in complex applications.

export default {
    name: 'app',
    data() {
        ...
    },
    computed: {
        filteredTasks() {
            return this.hideCompleted ?
                this.tasks.filter(t => !t.done) : this.tasks
        }
    }
}

相关文章

网友评论

      本文标题:vue from rookie to master - 2

      本文链接:https://www.haomeiwen.com/subject/vsuinftx.html