
vue
hainandetong
编程,菜是原罪
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
this.$forceUpdate()都无法更新
用v-if空值这个组件 data(){ return { show:true } } 想更新 show=false; this.$nextTick(()=>{ this.show=true; }) 就能更新了原创 2020-01-14 18:04:27 · 11283 阅读 · 7 评论 -
vue cli3发布组件到npm上
组件内的内容 <template> <div :class="classes"> <button :class="buttonClasses" @click="goClick" :style="buttonStyle"><slot></slot></button> </div> &l...原创 2019-12-06 09:57:23 · 184 阅读 · 0 评论 -
vue i18n使用
安装命令 npm install vue-i18n main.js文件 import VueI18n from 'vue-i18n'; import messages from "@/lang/index"; const i18n = new VueI18n({ locale: 'zh', // 设置地区 messages, // 设置地区信息 }) new Vue({ i18n ...原创 2019-11-09 15:23:13 · 145 阅读 · 0 评论 -
vue项目打包后刷新404问题
const router= new Router({ //mode: 'history', base: process.env.BASE_URL, routes }); mode取掉history 推荐用nginx映射路径原创 2019-11-04 16:10:35 · 336 阅读 · 0 评论 -
vue同级组件的互相调用
子组件t2 <template> <div> <p>t2</p> </div> </template> <script> export default { name:'OnceT2', methods:{ sayHello2(){ ...原创 2019-09-22 22:46:29 · 2812 阅读 · 0 评论