随笔 - 193  文章 - 0  评论 - 8  阅读 - 32万 
01 2022 档案
vue项目--favicon设置以及动态修改favicon
摘要:主要代码 var link = document.querySelector("link[rel*='icon']") || document.createElement('link');link.type = 'image/x-icon';link.rel = 'shortcut icon';li 阅读全文
posted @ 2022-01-28 09:39 仔仔爱学习 阅读(421) 评论(0) 推荐(0) 编辑
原生html+css设置项目主题色
摘要:<script> document.body.style.setProperty('--main-color', '#0f0');</script> .box{ width: 100px; height: 100px; background: var(--main-color);}转自:https: 阅读全文
posted @ 2022-01-26 17:33 仔仔爱学习 阅读(25) 评论(0) 推荐(0) 编辑
node.js自动化读取同文件名vue,并引入组件
摘要:// 自动化引入模块组件 const path = require('path') const files = require.context('@/components/common/modules', false, /\.vue$/) const modules = {} files.keys( 阅读全文
posted @ 2022-01-20 14:25 仔仔爱学习 阅读(287) 评论(0) 推荐(0) 编辑
es6 排序sort
摘要:<script> let arr = [2,1,3,5,4]; arr= arr.sort((n1,n2)=>{ // return -1; //返回负值 交换顺序 // return 0 或者 1 //返回正值 保持顺序不变 console.log(n1,n2); return n2-n1; // 阅读全文
posted @ 2022-01-13 14:29 仔仔爱学习 阅读(1709) 评论(0) 推荐(0) 编辑
blob 下载并给文件重命名 es6的写法 jquery的写法
摘要:1、es6的写法/** * 获取 blob * @param {String} url 目标文件地址 * @return {Promise} */ function getBlob(url) { return new Promise(resolve => { const xhr = new XMLH 阅读全文
posted @ 2022-01-11 10:38 仔仔爱学习 阅读(719) 评论(0) 推荐(0) 编辑
vue 拖拽 组件
摘要:安装 npm install awe-dnd --save 应用 在main.js中,通过Vue.use导入插件 import VueDND from 'awe-dnd' Vue.use(VueDND) 使用方法 <template> <div class="color-list"> <div cl 阅读全文
posted @ 2022-01-05 15:16 仔仔爱学习 阅读(402) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示