Configuração rápida para o eslint funcionar no VSCode, no template webpack do vue-cli
Projeto:
npx vue-cli init webpack <nomedoprojeto>
cd <nomedoprojeto>
npm install
module.exports = { | |
title: 'Hello VuePress', | |
description: 'Just playing around' | |
} |
Configuração rápida para o eslint funcionar no VSCode, no template webpack do vue-cli
Projeto:
npx vue-cli init webpack <nomedoprojeto>
cd <nomedoprojeto>
npm install
<template> | |
<div class="hello"> | |
<div v-if="isLogged()"> | |
Usuário Logado: {{username}} | |
</div> | |
<div v-else> | |
Ninguém logado | |
</div> |
<template> | |
<div id="app"> | |
<button @click="setFakeLogin()">Fake Login</button> | |
<button @click="setFakeLogout()">Fake Logout</button> | |
<router-view/> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: 'App', |
// The Vue build version to load with the `import` command | |
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. | |
import Vue from 'vue' | |
import App from './App' | |
import router from './router' | |
import VueStash from './vue-stash' | |
import store from './store' | |
Vue.use(VueStash) |
import Vue from 'vue' | |
import App from './App' | |
import router from './router' | |
import VueStash from 'vue-stash' | |
Vue.use(VueStash) | |
Vue.config.productionTip = false | |
/* eslint-disable no-new */ |
<template> | |
<div class="hello"> | |
<div v-if="store.isLogged()"> | |
Usuário Logado: {{store.username}} | |
</div> | |
<div v-else> | |
Ninguém logado | |
</div> |
<template> | |
<div id="app"> | |
<button @click="setFakeLogin()">Fake Login</button> | |
<button @click="setFakeLogout()">Fake Logout</button> | |
<router-view/> | |
</div> | |
</template> | |
<script> | |
import store from './store' |
const store = { | |
_username: '', | |
_email: '', | |
_token: '', | |
isLogged () { | |
return this.token | |
}, | |
set username (str) { |
<template> | |
<div> | |
<form-box title="Hello Form Box" message="A help message" v-on:save="onSave" @clear="onClear"> | |
<b-field label="Name"> | |
<b-input v-model="name"></b-input> | |
</b-field> | |
<b-field label="Email"> | |
<b-input v-model="email"></b-input> | |
</b-field> | |
</form-box> |