上一页 1 2 3 4 5 6 7 8 ··· 36 下一页
摘要: moduleA.ts const moduleA = { // strict:true, // strict:process.env.NODE_NEV !== 'production', // 全局共享的状态(数据)存放 state: { counter : 0 }, getters: { }, / 阅读全文
posted @ 2021-09-15 21:39 残星 阅读(288) 评论(0) 推荐(0) 编辑
摘要: state.ts export default { todos:[ {id:1,name:'张三'}, {id:2,name:'李四'}, {id:3,name:'王五'} ] } getters.ts export default { todosCount(state: { todos: stri 阅读全文
posted @ 2021-09-11 20:18 残星 阅读(63) 评论(0) 推荐(0) 编辑
摘要: index.ts import { createStore } from 'vuex' const store = createStore({ // strict:true, // strict:process.env.NODE_NEV !== 'production', // 全局共享的状态(数据 阅读全文
posted @ 2021-09-10 23:11 残星 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-09-08 21:21 残星 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 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= 阅读全文
posted @ 2021-09-06 15:52 残星 阅读(73) 评论(0) 推荐(0) 编辑
摘要: App.vue <template> <div id="nav"> <!-- 导航 --> <router-link to="/" active-class="current" replace>Home</router-link> | <router-link to="/about" active- 阅读全文
posted @ 2021-09-05 16:12 残星 阅读(107) 评论(0) 推荐(0) 编辑
摘要: App.vue <template> <div id="nav"> <!-- 导航 --> <router-link to="/" active-class="current" replace>Home</router-link> | <router-link to="/about" active- 阅读全文
posted @ 2021-09-04 19:09 残星 阅读(95) 评论(0) 推荐(0) 编辑
摘要: App.vue <template> <div id="nav"> <!-- 导航 --> <router-link to="/" active-class="current" replace>Home</router-link> | <router-link to="/about" active- 阅读全文
posted @ 2021-09-03 13:47 残星 阅读(59) 评论(0) 推荐(0) 编辑
摘要: index.js //引入 import { createRouter, createWebHashHistory } from 'vue-router' // import Home from '../views/Home.vue' // import Test3 from '../views/T 阅读全文
posted @ 2021-09-01 14:01 残星 阅读(75) 评论(0) 推荐(0) 编辑
摘要: App.vue <template> <div id="nav"> <!-- 导航 --> <router-link to="/" active-class="current" replace>Home</router-link> | <router-link to="/about" active- 阅读全文
posted @ 2021-09-01 13:39 残星 阅读(414) 评论(0) 推荐(0) 编辑
摘要: <template> <div id="test2_nav"> <button @click="test2_home()">Test2Home</button> </div> </template> <script> // @ is an alias to /src // import HelloW 阅读全文
posted @ 2021-08-31 14:38 残星 阅读(255) 评论(0) 推荐(0) 编辑
摘要: <router-link to="/" active-class="current" replace>Home</router-link> | <router-link to="/about" active-class="current" replace>About</router-link> | 阅读全文
posted @ 2021-08-31 14:22 残星 阅读(480) 评论(0) 推荐(0) 编辑
摘要: App.vue <template> <div id="nav"> <!-- 导航 --> <router-link to="/" active-class="current">Home</router-link> | <router-link to="/about" active-class="c 阅读全文
posted @ 2021-08-31 14:13 残星 阅读(226) 评论(0) 推荐(0) 编辑
摘要: https://next.router.vuejs.org/zh/installation.html 创建项目是选上vue-router,没有选择vue-router的话要手动安装 npm install vue-router@4 package.json App.vue <template> <d 阅读全文
posted @ 2021-08-31 13:34 残星 阅读(4732) 评论(0) 推荐(0) 编辑
摘要: Test1.vue <template> <div class="test1"> <h1>This is a test1 page</h1> <Test1Top></Test1Top> <Test1Center></Test1Center> <Test1Bottom></Test1Bottom> < 阅读全文
posted @ 2021-08-29 19:53 残星 阅读(556) 评论(0) 推荐(0) 编辑
摘要: Test1.vue <template> <div class="test1"> <h1>This is a test1 page</h1> <Test1Top :add-person="addPerson"/> <Test1Center :persons="persons" :del-person 阅读全文
posted @ 2021-08-29 17:31 残星 阅读(718) 评论(0) 推荐(0) 编辑
摘要: App.vue <template> <div id="nav"> <router-link to="/">Home</router-link> | <router-link to="/about">About</router-link> | <router-link to="/test1">Tes 阅读全文
posted @ 2021-08-28 19:19 残星 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 一、启动命令 npm run serve 二、打包命令 npm run build 三、程序入口 main.js main.js import { createApp } from 'vue' import App from './App.vue' import router from './rou 阅读全文
posted @ 2021-08-28 12:06 残星 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 一、 管理员cmd进入目录, vue init webpack vue_project1 (项目名不能有大写字母) 安装 vue-cli 脚手架 npm install -g @vue/cli@next 创建工程 npm init vite-app test_project cd test_proj 阅读全文
posted @ 2021-08-27 19:52 残星 阅读(195) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> .box{ width:200px; height:200px; background-color:red; dis 阅读全文
posted @ 2021-08-26 18:50 残星 阅读(19) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 36 下一页