随笔分类 - vue
自动引用elementplus组件
摘要:1、Vue项目中安装 Element Plus # NPM $ npm install element-plus --save # Yarn $ yarn add element-plus # pnpm $ pnpm install element-plus 2、组件按需引入配置 Vant按需引入-
阅读全文
单选和多选自定义样式
摘要:使用vue语言 这是多选 <div class="div-checked"> <label v-for="it in AreaData" :key="it.id"> <input type="checkbox" @change="choseYW" name="pageIdList" value="被
阅读全文
vue中disabled的使用,点击提交禁止再次点击
摘要:###disabled <button @click="withdrawMoney()" :disabled="submitDisabled">提交</button> <script> export default{ ready(){ this.submitDisabled = false; //初
阅读全文
Vue 实现移动端左右滑动切换
摘要:实现这个功能需要用到touch指令,这个是面向vue2.0的touch指令,是基于touchjs(移动端手势库)。 安装以及引入vue-touch npm install vue-touch@next --save //在vue项目中的main.js文件中引入:import VueTouch fro
阅读全文
vue如何禁止弹窗后面的滚动条滚动?
摘要:methods : { //禁止滚动 stop(){ var mo=function(e){e.preventDefault();}; document.body.style.overflow='hidden'; document.addEventListener("touchmove",mo,fa
阅读全文
vue返回上一页面如果没有上一页面返回首页
摘要:methods: { back(){ if (window.history.length <= 1) { this.$router.push({path:'/'}) return false } else { this.$router.go(-1) } } },
阅读全文
浙公网安备 33010602011771号