摘要:
1.新建watermark.js let watermark = {} let setWatermark = (str) => { let id = '1.23452384164.123412416'; if (document.getElementById(id) !== null) { docu 阅读全文
摘要:
vue项目,在index.html添加 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> 然后在app.vue //禁止默认拖动缩放 w 阅读全文
摘要:
1.安装vue-touch(https://github.com/vuejs/vue-touch/tree/next) cnpm install vue-touch@next --save 2.在main.js使用 import VueTouch from 'vue-touch' Vue.use(V 阅读全文
摘要:
1.安装 1 yarn add v-viewer 2.全局安装 1 import Viewer from 'v-viewer' 2 import 'viewerjs/dist/viewer.css' 3 Vue.use(Viewer, { 4 defaultOptions: { 5 zIndex: 阅读全文
摘要:
1.安装 1 yarn add weixin-js-sdk 2.引入 1 import wx from 'weixin-js-sdk'; 3.使用 1 wx(){ 2 let url = encodeURIComponent(window.location.href.split('#')[0]) 3 阅读全文
摘要:
1.安装 1 yarn add Vconsole 2.引入 1 import Vconsole from 'vconsole' 2 const vConsole = new Vconsole() 3 Vue.use(vConsole) 或者 <script src="https://wechatfe 阅读全文
摘要:
1.backTop/index.vue 1 <template> 2 <div class="backtop" v-if="btnFlag" @click="backTop"> 3 <img class="go-top" src="../../assets/images/huidaodingbu.p 阅读全文
摘要:
1.loading/index.vue 1 <template> 2 <div v-if="show" class="lds-spinner"> 3 <div class="spinner"> 4 <div class="double-bounce1"></div> 5 <div class="do 阅读全文
摘要:
1.directives/index.js 1 import Vue from 'vue' 2 3 Vue.directive('watermark',(el,binding)=>{ 4 function addWaterMarker(str,parentNode,font,textColor){/ 阅读全文
摘要:
1.scroll/index.vue 1 <template> 2 <div class="scroll"></div> 3 </template> 4 5 <script> 6 export default { 7 name:'Scroll', 8 methods:{ 9 scrollEvent( 阅读全文