前端
_MICHAEL_LIU_
这个作者很懒,什么都没留下…
展开
-
vue js代码混淆加密、压缩
亲测有效。1.首先安装 npm i webpack-obfuscator -D 与 npm i compression-webpack-plugin -D2.打开vue.config.js 文件,如没有在项目根目录新建,粘贴以下内容,已经加上注释let CompressionPlugin = require("compression-webpack-plugin");const JavaS...原创 2019-11-14 15:18:34 · 15383 阅读 · 9 评论 -
解决问题:[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not.....
问题描述//解决问题:[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included b...原创 2019-08-30 16:29:31 · 480 阅读 · 0 评论 -
vue 解决 滚动穿透(联级滚动)的问题
问题:当打开dialog或者其他弹窗组件至于顶页时,滑动dialog会影响底页,使其一同滚动。解决方法:以dialog为例(v-model=“dialog”),当dialog = true 时,弹窗打开。js://检测该值变化 watch: { dialog(val) { if (this.dialog == true) { //开启d...原创 2019-08-07 14:12:19 · 1126 阅读 · 2 评论 -
vue Js 阻止浏览器回退
方法一:推荐主要适用于有弹窗或者遮罩的情况下,例如使用dialog,(v-model=“dialog”)当dialog = true 时,弹窗打开。 watch: { //监测变化 dialog(val) { if (this.dialog == true) { //添加一个历史记录 history.pushSta...原创 2019-08-07 12:52:55 · 3106 阅读 · 0 评论 -
vue v-for 嵌套 二维数组 示例
<template> <v-container fluid grid-list-md class="thirdMain_main_div_container"> <v-layout row wrap> <v-flex d-flex xs12 sm12 md12 class="thirdMain_flex_3_1"> ...原创 2019-07-22 09:45:51 · 1805 阅读 · 0 评论 -
vue javascript 实时检测滚轮(scroll)距页面顶部的距离
mounted() { window.addEventListener('scroll', this.handleScroll); }, methods: { handleScroll() { console.log(document.documentElement.scrollTop); }, }, de...原创 2019-07-19 02:37:52 · 4602 阅读 · 1 评论 -
javascript 检测图片是否加载完全 vue onload
let img = new Image(); img.src = "图片地址"; img.onload = function () { console.log("image is loaded"); //do something }原创 2019-07-18 21:52:33 · 4914 阅读 · 0 评论