前端技术
Html Js Css,Vue其他个人开发中会用到的前端技术
Zakza
编程是一门艺术~
展开
-
JS模拟input输入并触发事件
原生js模拟输入input内容,并触发搜索事件实现:document.querySelector('input').dispatchEvent(new InputEvent("input")原创 2022-06-10 18:32:22 · 7777 阅读 · 0 评论 -
tampermonkey自动化学习(持续更新~)
官网插件下载安装// ==UserScript==// @name New Userscript// @namespace http://tampermonkey.net/// @version 0.1// @description try to take over the world!// @author You// @match https://www.baidu.com/*// @icon https:原创 2022-05-12 21:58:43 · 2834 阅读 · 1 评论 -
解决Vue中使用vuex时,数据为{__ob__:observer}问题
//属性const state = { serviceTags: [] }//读属性const getters = { getTags: state => { return JSON.parse(state.serviceTags) },}//同步写属性const mutations = { updateTags(state, newVal) { state.serviceTags = JSON.stringify(newVal) },}//异步写属性.原创 2022-05-07 18:23:19 · 1377 阅读 · 1 评论 -
WebStorm+Vue-cli 配置alias 点击跳转无效问题
尝试方法 查看vue-cli版本,不同版本配置文件不同 使用vue inspect检查,搜索alias查看路径映射 使用console.log打印日志,确保vue.config.js正确加载运行 可以直接添加测试,是否可以跳转 Vue-cli4.x成功解决,vue.config.js如下/** * vue-cli 打包配置文件 * vue.config.js */const resolve = dir => require('path')..原创 2021-12-08 16:39:37 · 1690 阅读 · 0 评论 -
Nginx部署Vue项目包刷新 404
server{ listen 80; server_name testwx.wangshibo.com; index index.php index.html index.htm default.php default.htm default.html; root /www/wwwroot/ssoShuang/dist; #vue-router配置 location / { try_files $uri $uri/ @router; .原创 2021-04-26 14:10:41 · 92 阅读 · 0 评论 -
nodejs forever启动前后端项目
安装forevernpm install forever -g,expressnpm install express -gexpress-generatornpm install express-generator -g安装cnpmnpm install -g cnpm --registry=https://registry.npm.taobao.org安...原创 2019-07-28 16:39:31 · 595 阅读 · 0 评论 -
视频倍速js,记录
videojs.getPlayers("video-player").html5player.tech_.setPlaybackRate(2)原创 2020-02-26 12:29:13 · 454 阅读 · 0 评论 -
js拦截点击事件 部分可用
需求:拦截页面所有点击事件,并返回点击dom元素或者当前网址$('*').onclick = function(e) { e = e || window.event; e.cancelBubble = true; e.stopPropagation(); e.preventDefault(); setTimeout(function() { ...原创 2019-06-15 14:34:33 · 6432 阅读 · 0 评论 -
前端传参url中包含 #,&等特殊字符处理方法
前端加密参考https://blog.csdn.net/chenlycly/article/details/51820727 好像是使用js的escape()方法java后端编码解码类public class Escape { private final static String[] hex = { "00", "01", "02", "03", "04...转载 2018-07-27 15:36:24 · 7183 阅读 · 0 评论 -
LayUI树形菜单(后台List<Tree>转layui tree的nodes的json结构)
$.ajax({ type: "post", url: 你的url, dataType: 'json', success: function (d) { layui.use(['tree', 'layer'], function () { layui.tree({ elem: '#fa...原创 2018-07-10 10:00:42 · 12100 阅读 · 1 评论 -
easyui tree菜单根据json转换
/** * Created by cjj on 2018/5/4. */function convert(rows){//默认三级 ,图标可变 function exists(rows, parentId){ for(var i=0; i<rows.length; i++){ if (rows[i].id == parentId) ret...原创 2018-05-04 12:54:30 · 382 阅读 · 0 评论 -
js加载Json数组实现ajax加载动态页面数据
<script type="text/javascript"> $.ajax({ url : "${pageContext.request.contextPath}/shop.action?method=getJson", async : true, ...原创 2018-03-14 20:35:06 · 1232 阅读 · 0 评论 -
EasyUI之datagrid从java服务器自动填充数据
关于easyUI datagrid插件从java后台获取数据前段代码<table id="dg" title="dg1" class="easyui-datagrid" style="width:700px;height:250px" url="${pageContext.request.contextPath }/getUsers.do" toolbar="#toolbar&qu原创 2018-03-09 16:57:14 · 1554 阅读 · 0 评论