会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
alannero
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
6
7
8
9
10
11
12
13
下一页
2021年11月11日
遍历对象的方法(后面再补充)
摘要: var list = {'a':1,'b':2} console.log(Object.keys(list))//返回一个对象属性名组成的数组【'a','b'】 Object.keys(list).forEach(key=>{ const str = key + ':' + list[key] })
阅读全文
posted @ 2021-11-11 11:05 幻影之舞
阅读(53)
评论(0)
推荐(0)
2021年10月25日
vue3 监视 watch
摘要: setup() { //数据 let num = ref(0) let msg = ref('6666') let person = reactive({ name:'大王', age:18, job:{ j1:{ money:20 } } }) //情况1:监视ref定义的数据(watch有第三个
阅读全文
posted @ 2021-10-25 22:37 幻影之舞
阅读(1141)
评论(0)
推荐(0)
vue3计算属性
摘要: import { reactive, computed } from "vue"; export default { name: "HelloWorld", setup() { let person = reactive({ firstName: "李", lastName: "晓玲", }); /
阅读全文
posted @ 2021-10-25 21:55 幻影之舞
阅读(585)
评论(0)
推荐(0)
2021年10月18日
Vuex的使用
摘要: 安装; npm i vuex 创建store文件夹,包含count.js perosn.js 以及汇总的index.js count.js: export default{ namespaced:true, actions:{ waitJia(context,val){ context.commit
阅读全文
posted @ 2021-10-18 23:10 幻影之舞
阅读(50)
评论(0)
推荐(0)
2021年10月16日
Vue引入element组件
摘要: 全部引入 安装:npm i element-ui main.js: //引入element import ElementUI from 'element-ui'; //引入element全部样式 import 'element-ui/lib/theme-chalk/index.css'; Vue.u
阅读全文
posted @ 2021-10-16 22:55 幻影之舞
阅读(573)
评论(0)
推荐(0)
2021年9月22日
路由的props配置
摘要: route.js // 该文件专门用于创建整个应用的路由器 import VueRouter from 'vue-router' //引入组件 import About from '../pages/About' import Home from '../pages/Home' import New
阅读全文
posted @ 2021-09-22 19:52 幻影之舞
阅读(235)
评论(0)
推荐(0)
路由的传参-query和params
摘要: message组件: <div> <ul> <li v-for="m in messageList" :key="m.id"> <router-link :to="{ name:'xiangqing', params:{ id:m.id, title:m.title } }"> {{m.title}
阅读全文
posted @ 2021-09-22 19:27 幻影之舞
阅读(262)
评论(0)
推荐(0)
2021年9月21日
axios请求
摘要: 效果图 安装axios npm i axios search组件: <template> <div class="search"> <section class="jumbotron"> <h3 class="jumbotron-heading">Search Github Users</h3> <
阅读全文
posted @ 2021-09-21 18:05 幻影之舞
阅读(73)
评论(0)
推荐(0)
全局事件总线以及消息订阅
摘要: 安装全局事件总线: main.js: new Vue({ el:'#app', render: h => h(App), beforeCreate(){ Vue.prototype.$bus = this//安装全局事件总线 } }) 传值组件中 methods:{ sendName(){ this
阅读全文
posted @ 2021-09-21 17:54 幻影之舞
阅读(113)
评论(0)
推荐(0)
2021年8月30日
vue的插件
摘要: 插件引入(main.js里引用) import Plugin from './plugins.js'; Vue.use(Plugin); main.js import Vue from 'vue' import App from './App.vue' Vue.config.productionTi
阅读全文
posted @ 2021-08-30 23:21 幻影之舞
阅读(62)
评论(0)
推荐(0)
上一页
1
···
6
7
8
9
10
11
12
13
下一页
公告