会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
纸上得来终觉浅,绝知此事要躬行
博客园
首页
新随笔
联系
管理
上一页
1
2
3
4
5
6
7
8
···
36
下一页
2021年9月15日
vuex store modules
摘要: moduleA.ts const moduleA = { // strict:true, // strict:process.env.NODE_NEV !== 'production', // 全局共享的状态(数据)存放 state: { counter : 0 }, getters: { }, /
阅读全文
posted @ 2021-09-15 21:39 残星
阅读(324)
评论(0)
推荐(0)
2021年9月11日
vuex store 改造
摘要: 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 残星
阅读(73)
评论(0)
推荐(0)
2021年9月10日
vuex store
摘要: index.ts import { createStore } from 'vuex' const store = createStore({ // strict:true, // strict:process.env.NODE_NEV !== 'production', // 全局共享的状态(数据
阅读全文
posted @ 2021-09-10 23:11 残星
阅读(109)
评论(0)
推荐(0)
2021年9月8日
Vue axios
摘要: 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 残星
阅读(47)
评论(0)
推荐(0)
2021年9月6日
Vue keep-alive
摘要: 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 残星
阅读(103)
评论(0)
推荐(0)
2021年9月5日
vue 路由守卫
摘要: 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 残星
阅读(119)
评论(0)
推荐(0)
2021年9月4日
vue-router 参数传递
摘要: 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 残星
阅读(114)
评论(0)
推荐(0)
2021年9月3日
vue-router 路由嵌套
摘要: 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 残星
阅读(69)
评论(0)
推荐(0)
2021年9月1日
vue-router 路由懒加载
摘要: 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 残星
阅读(89)
评论(0)
推荐(0)
vue-router 动态路由
摘要: 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 残星
阅读(431)
评论(0)
推荐(0)
2021年8月31日
vue-router js实现路由跳转
摘要: <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 残星
阅读(267)
评论(0)
推荐(0)
vue-router replace 浏览器前进后退记忆栈不记住当前菜单页面
摘要: <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 残星
阅读(508)
评论(0)
推荐(0)
vue-router active-class 进入当前菜单的样式
摘要: 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 残星
阅读(248)
评论(0)
推荐(0)
vue-router createWebHashHistory
摘要: 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 残星
阅读(4889)
评论(0)
推荐(0)
2021年8月29日
Vue3工程示例
摘要: 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 残星
阅读(625)
评论(0)
推荐(0)
Vue3工程用Vue2示例
摘要: 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 残星
阅读(754)
评论(0)
推荐(0)
2021年8月28日
Vue工程添加组件调用
摘要: 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 残星
阅读(73)
评论(0)
推荐(0)
Vue 项目结构
摘要: 一、启动命令 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 残星
阅读(91)
评论(0)
推荐(0)
2021年8月27日
命令行创建Vue项目
摘要: 一、 管理员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 残星
阅读(209)
评论(0)
推荐(0)
2021年8月26日
Vue 自定义指令
摘要: <!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 残星
阅读(28)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
36
下一页
公告