vue from rookie to master - 2

1. Adding a CSS Framework

Adding Bootstrap to the Project

cd {project folder}
npm install [email protected]

**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)