![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
YouZi_X
balabala
展开
-
element UI tab拖曳
sortableJs实现element UI Tab标签页的拖曳原创 2021-09-16 14:23:46 · 875 阅读 · 0 评论 -
elementUI message 简化使用封装
内容// message.jsimport { Message } from 'element-ui'let messageInstance = nullexport const message = options => { if (messageInstance) { messageInstance.close() } messageInstance = Message(options)};['error', 'success', 'info',原创 2021-07-19 17:19:27 · 472 阅读 · 0 评论 -
手摸手,优雅实现vue中使用 svg-icon
注册全局svg组件,并使用require.context API 引入所有指定目录下的图标,根据增删自动生成`svgsymbol`原创 2021-07-19 17:01:43 · 518 阅读 · 0 评论 -
Vue加载(动态)组件的方式
//正常加载import index from '../pages/index.vue'import view from '../pages/view.vue'//懒加载const index = resolve => require(['../pages/index.vue'], resolve)const view = resolve => require(['../pages/view.vue'], resolve)//懒加载 - 按组const index = r =&g.原创 2020-08-12 23:28:35 · 501 阅读 · 0 评论 -
vue如何实现页面刷新
vue多种方法实现页面或组件数据刷新原创 2020-08-14 16:21:32 · 1356 阅读 · 0 评论 -
点击切换,激活选中样式
需求:点击目标元素后,切换元素样式解决:1.data中增加需要激活样式的目标元素在兄弟元素中的索引,一般默认为0data() { return { activeIndex : -1, // 0为默认选择第一个,-1为不选择 }; }2.目标元素添加点击事件,并设置动态类名(进行三元运算判断)<li :class="activeIndex == index ? 'active' : ''" v-for="(item,index原创 2020-07-31 17:15:44 · 800 阅读 · 0 评论 -
this.$refs获取不到子组件
this.$refs获取不到子组件dom,this.$refs获取到的值为undefined的原因及解决方法原创 2020-06-16 00:38:42 · 10928 阅读 · 0 评论 -
uni-app生命周期
生命周期分为:页面生命周期和应用生命周期生命周期可参考:uni-app官方API注意平台支持,仅某个平台支持会显示,5+App是超HTML5+的App方案.例如分享:只有小程序支持.这时我们就要采用跨终端解决方案:https://uniapp.dcloud.io/platform1.应用生命周期2.页面生命周期<template> <view class="content"> <image class=...原创 2020-06-15 14:26:28 · 234 阅读 · 0 评论 -
vue打包,放到服务器
打包vue项目打包步骤放到服务器网上搜索到的相关问题和解决方法。1、求助!Vue项目用Webpack打包后放到服务器上,但访问是空白页?弄了好久了也不知道什么原因2、vue项目中,npm run build生成的index.html文件只有放在根目录下打开才能生效,怎么解决?3、Vue应用部署到服务器的正确方式...原创 2020-04-13 10:23:59 · 160 阅读 · 0 评论