摘要:
moduleA.ts const moduleA = { // strict:true, // strict:process.env.NODE_NEV !== 'production', // 全局共享的状态(数据)存放 state: { counter : 0 }, getters: { }, / 阅读全文
摘要:
state.ts export default { todos:[ {id:1,name:'张三'}, {id:2,name:'李四'}, {id:3,name:'王五'} ] } getters.ts export default { todosCount(state: { todos: stri 阅读全文
摘要:
index.ts import { createStore } from 'vuex' const store = createStore({ // strict:true, // strict:process.env.NODE_NEV !== 'production', // 全局共享的状态(数据 阅读全文
摘要:
Test9.vue <template> <div id="test9_body"> <div id="header"><h1>上标题</h1></div> <div id="body"> <div id="navl"> 左导航 <div> Test9 <div> <button @click="g 阅读全文
摘要:
Test7.vue <template> <div id="test7_body"> <div id="header"><h1>上标题</h1></div> <div id="body"> <div id="navl"> 左导航 <div> Test7 <div> <router-link :to= 阅读全文
摘要:
App.vue <template> <div id="nav"> <!-- 导航 --> <router-link to="/" active-class="current" replace>Home</router-link> | <router-link to="/about" active- 阅读全文
摘要:
App.vue <template> <div id="nav"> <!-- 导航 --> <router-link to="/" active-class="current" replace>Home</router-link> | <router-link to="/about" active- 阅读全文
摘要:
App.vue <template> <div id="nav"> <!-- 导航 --> <router-link to="/" active-class="current" replace>Home</router-link> | <router-link to="/about" active- 阅读全文
摘要:
index.js //引入 import { createRouter, createWebHashHistory } from 'vue-router' // import Home from '../views/Home.vue' // import Test3 from '../views/T 阅读全文
摘要:
App.vue <template> <div id="nav"> <!-- 导航 --> <router-link to="/" active-class="current" replace>Home</router-link> | <router-link to="/about" active- 阅读全文
摘要:
<template> <div id="test2_nav"> <button @click="test2_home()">Test2Home</button> </div> </template> <script> // @ is an alias to /src // import HelloW 阅读全文
摘要:
<router-link to="/" active-class="current" replace>Home</router-link> | <router-link to="/about" active-class="current" replace>About</router-link> | 阅读全文
摘要:
App.vue <template> <div id="nav"> <!-- 导航 --> <router-link to="/" active-class="current">Home</router-link> | <router-link to="/about" active-class="c 阅读全文
摘要:
https://next.router.vuejs.org/zh/installation.html 创建项目是选上vue-router,没有选择vue-router的话要手动安装 npm install vue-router@4 package.json App.vue <template> <d 阅读全文
摘要:
Test1.vue <template> <div class="test1"> <h1>This is a test1 page</h1> <Test1Top></Test1Top> <Test1Center></Test1Center> <Test1Bottom></Test1Bottom> < 阅读全文
摘要:
Test1.vue <template> <div class="test1"> <h1>This is a test1 page</h1> <Test1Top :add-person="addPerson"/> <Test1Center :persons="persons" :del-person 阅读全文
摘要:
App.vue <template> <div id="nav"> <router-link to="/">Home</router-link> | <router-link to="/about">About</router-link> | <router-link to="/test1">Tes 阅读全文
摘要:
一、启动命令 npm run serve 二、打包命令 npm run build 三、程序入口 main.js main.js import { createApp } from 'vue' import App from './App.vue' import router from './rou 阅读全文
摘要:
一、 管理员cmd进入目录, vue init webpack vue_project1 (项目名不能有大写字母) 安装 vue-cli 脚手架 npm install -g @vue/cli@next 创建工程 npm init vite-app test_project cd test_proj 阅读全文
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> .box{ width:200px; height:200px; background-color:red; dis 阅读全文