小组件
YYY1920
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
git下载项目
1、初始化 git init 2、与origin master建立连接 git remote add origin git@github.com:XXXX/nothing2.git 3、把远程分支拉到本地 git fetch origin dev(dev为远程仓库的分支名) 4、在本地创建分支dev并切换到该分支 git checkout -b dev(本地分支名称) origin/dev(远程分支名称) 5、把某个分支上的内容都拉取到本地 git pull origin dev(远程分支名称) ...原创 2022-02-25 11:57:15 · 386 阅读 · 0 评论 -
分页组件
分页子组件 <template> <div class="pagination_content"> <div class="total" > 共 {{total}} 项 </div> <div class="pagination flex"> <div class="relative"> 每页显示 <Dropdown trigger="click"&原创 2021-05-11 10:42:37 · 766 阅读 · 0 评论 -
i8n的使用
1、安装 vue-i18n依赖包;使用NPM进行安装或者CNPM进行安装。 npm install vue-i18n --save-dev 2、此处以vue项目举例,将i18n引入vue实例,首在在main.js中引入 vue-i18n。 对i18n进行封装 i18n.js /* 多语言切换 */ import Vue from 'vue' import { i18n } from 'view-design' import VueI18n from 'vue-i18n' import messages,原创 2021-04-29 14:14:20 · 1877 阅读 · 0 评论 -
vuex状态 显示和隐藏封装
状态管理显示和隐藏 const commonFn={ // 显示和隐藏 // dispatch:含有异步操作,例如向后台提交数据,写法: this.$store.dispatch('action方法名',值) // commit:同步操作,写法:this.$store.commit('mutations方法名',值) closeClobalLoading(){ setTimeout(()=>{ store.dispatch('原创 2021-01-15 17:30:15 · 445 阅读 · 0 评论 -
封装 message消息弹框
信息弹窗封装 import Vue from 'vue' import {Message} from 'element-ui' import bus from '../js/bus' Vue.prototype.$message=Message const commonFn={ // message弹出信息提醒 toastMsg(type,msg){ switch(type){ case 'normal': bus..原创 2021-01-15 15:54:38 · 617 阅读 · 0 评论 -
返回上一页封装
返回上一页组件 // 点击返回上一页 import router from '../../router/index' const formMixin={ methods:{ goback(){ router.go(-1) } } } export default formMixin 引入原创 2021-01-15 10:38:01 · 186 阅读 · 0 评论 -
video-player组件使用
1安装 npm install vue-video-player --save main.js引入 import VideoPlayer from 'vue-video-player' require('video.js/dist/video-js.css') require('vue-video-player/src/custom-theme.css') Vue.use(VideoPlayer) 组件使用 <template> <div class="video">原创 2020-12-21 21:11:42 · 5103 阅读 · 0 评论 -
数据的截取 和等比分成
数据的截取 和等比分成 this.Dept_top = res.data; var num = Math.ceil(this.Dept_top.length / 3); this.p_ming = this.Dept_top.slice(0, num); this.p_ming_all = this.p_ming.length; ...原创 2020-04-21 13:56:13 · 278 阅读 · 0 评论 -
vue 星级评分 ——简单版
vue 星级评分 ——简单版 此星级评分超级简单 好用高效 适用于多种场景 三目运算 代码如下 html 部分 // An highlighted block <template> <div> <div style="display: inline-block" v-for="(num,index) in 6" :key="index" @cl...原创 2019-06-06 16:31:44 · 1915 阅读 · 1 评论
分享