笔记
栈狮
这个作者很懒,什么都没留下…
展开
-
关于Global CSS cannot be imported from files other than your Custom <App>. Due t
问题描述:提示:我们在运行Next项目时候出现全局样式不可导入或者导入失败例如:Global CSS cannot be imported from files other than your Custom <App>. Due to the Global nature of stylesheets, and to avoid conflicts, Please move all first-party global CSS imports to pages/_app.js. ...原创 2022-04-21 10:12:44 · 3026 阅读 · 0 评论 -
微信小程序radio巧用
页面代码 <radio-group bindchange="radioChange"> <radio class="radio_class" wx:for="{{useAlbum}}" value="{{item.id}}" checked="checked">{{item.name}}</radio> </radio-group>js代码date里useAlbum: [{ name: '关闭', id: 0,checked:原创 2021-10-20 20:16:01 · 636 阅读 · 0 评论 -
indexOf在数组里面的巧用
1,删除数组下标元素 let index =1 //要删除的 let ni = [1,2,3,6,4,8] //当前的那个数组 console.log(index) console.log(ni.indexOf(index) < 0) if(ni.indexOf(index) != -1){ //如果数组里面存在那个值就会返回下标 ni.splice(ni.indexOf(index),1) //splice(数组下标,删除后面几个)原创 2021-10-19 18:45:27 · 377 阅读 · 0 评论 -
在微信里判断链接是图片还是视频
在微信里判断链接是图片还是视频啥的一锅端出品(未经授权禁止转载)求 一箭三联废话不多说 先上代码关键api wx.getImageInfo先看我的代码banimg(arrs,ind){ let arr =arrs let index = ind let i = 0 let a = [] fac() function fac(){ if(i<arr.length){ wx.getImag.原创 2021-09-03 21:54:02 · 956 阅读 · 0 评论 -
定时器的单利模式
主要代码用的时候看使用说明 不懂滴留言(求求关注)var HashMap = require('../tools/HashMap')/** * 使用说明: * 1、引入 var timeTool=require("../utils/timeTool.js") * 2、onload 里面实例化并调用start方法: * mtimeTool = new timeTool( this); mtimeTool.start();添加监听函数:keykey随意写不要重复原创 2021-08-28 16:34:58 · 73 阅读 · 0 评论 -
js数据校验工具 js
var regexEnum = { intege : "^-?[1-9]\\d*$", // 整数 intege1 : "^[1-9]\\d*$", // 正整数 intege2 : "^-[1-9]\\d*$", // 负整数 num : "^([+-]?)\\d*\\.?\\d+$", // 数字 num1 : "^([+]?)\\d*$", // 正数(正整数 + 0) num2 : "^-[1-9]\\d*|0$", // 负数(负整数 + 0) .原创 2021-08-05 15:39:47 · 328 阅读 · 0 评论 -
Vue通过路由传参数
跳转这样写 this.$router.push({ path:'/user',//跳转的地址 query: { TName: res.data.user[0].teacherName,//TName参数 mailBox: res.data.user[0].mailbox, telephone: res.data.user[0].mailbox, .原创 2021-06-25 09:49:07 · 94 阅读 · 0 评论 -
关于parseInt的参数
parseInt是一种字符串转数字的例如parseInt("123abc")结果就位123 但第一位不是数字就NaN了parse原创 2021-06-15 21:35:22 · 1597 阅读 · 1 评论 -
使用mixin抽离公共数据方法
假若 a页和b页面有共同的数据 或者数据结构方法,我们就可以把公共部分抽离假若我这有个公共数据 写在mixin.js里面原创 2021-06-13 00:38:23 · 165 阅读 · 0 评论 -
Vue父组件调用子组件的方法
同样子组件加入ref属性 父组件直接$refs.属性名.方法例如 这里有个子组件child3原创 2021-06-13 00:10:24 · 82 阅读 · 0 评论 -
解决跨域问题 最简洁代码
在vue.config.js里面配置 devServer: {//是个对象 proxy: {//请求转发 '/api': { //以api开头的 traget:' xxxxx'//转发的地方 如api/123 将会转发到 xxxx/123 } } }原创 2021-06-12 23:37:43 · 91 阅读 · 0 评论 -
Vue获取Dom(渲染后的)
首先来个标签 知道原创 2021-06-12 22:33:57 · 432 阅读 · 0 评论 -
VUE路由懒加载
懒加载 要用就加载不用就不加载 提高性能 减少等待时间区别 懒加载 当部分网页需要某个文件的时候才会加载 而不是 浏览器全部加载非懒加载都是从这里取引用某个页面原创 2021-06-12 22:19:39 · 46 阅读 · 0 评论 -
Vue超简单的动态绑定样式
:class=" 这里面可以是数组形式和对象形式"如图原创 2021-06-12 22:09:33 · 114 阅读 · 0 评论 -
前端里面的“根”节点
1.网页里面的根节点首先来看一个dom 树原创 2021-06-06 16:51:25 · 813 阅读 · 0 评论 -
小白都会使用的jsDoc-vue
小白都会使用的jsDoc-vue第一步 安装依赖这里有三个依赖minamijsdocvue-template-complier安装依赖npm install --save-dev jsdocnpm install --save-dev minaminpm install --save-dev vue-template-complier 使用yarm的话把 npm install 换成 yarn add第二步配置在前端vue项目根目录创建.jsdoc.config.j原创 2021-05-18 09:55:35 · 1616 阅读 · 2 评论 -
vue导入外部样式
即可原创 2021-05-02 19:17:09 · 139 阅读 · 0 评论 -
c: \Users\ATFWUS\AppData\Local(Temp\tomcat-docbase.613353598438846626.8802\articleImage\2828/B8/28 C
springBoot输出类似于c: \Users\ATFWUS\AppData\Local(Temp\tomcat-docbase.613353598438846626.8802\articleImage\2828/B8/28C:\Users\ATFWUS\AppData\Local(Temp\tomcat-docbase.613353598438846626.8802\articleImage\2828/B8/28的路径解决办法第一步第二部改变工作目录为你的项目目录...原创 2021-04-30 17:43:23 · 1462 阅读 · 3 评论 -
vue-cli3x解决跨域
在根目录里的vue,config.js里配置//配置请求转发的代理//定义代理的对象//let proxyObj = {};//拦截http请求// proxyObj['/'] = {// ws: false, //关掉websocket// // target: 'http://47.107.158.11:8082', //目标转发的地址// target: 'http://localhost:8082', //目标转发的地址// changeOri原创 2021-04-15 00:00:12 · 145 阅读 · 0 评论 -
vue导入外部样式
目录结构成功导入!原创 2021-04-14 18:24:49 · 152 阅读 · 0 评论 -
javascript的学习
1.选择器:document.getElementById(’#ID’) 找到那个id 每个网页中的id都是唯一的document.getElementsByClassName(‘.class’) 找到那个类 可以嵌套 类中类document.querySelector( ’ #id或者.class’) 找到那个id或者类document.querySelector( ’ #id或者.class’) .querySelector( ’ .class’)找到那个父下的类2.绑定事件找到元素原创 2021-04-14 14:35:20 · 213 阅读 · 0 评论 -
网页文字和图片中部对其
效果图html代码 <div class="right-nav"> <p>欢迎光临1号店</p> <a href="#">请登录</a> <span><img src="image/runbun.png" >帮助中心<img src="image/turnb.png" ></span> </div>css代码 .right-nav span *{原创 2021-04-13 21:10:22 · 112 阅读 · 0 评论 -
Base64-encoded key bytes may only be specified for HMAC signatures Base 64编码的密钥字节只能为hmac签名指定。
MS512改Hs原创 2021-03-18 16:26:05 · 3520 阅读 · 1 评论 -
访问自己服务器的tomcat
tomcat安装好后修改Tomcat的server.xml(我的是在C:\apache\conf目录下)文件,原默认8080端口改为80Host节点中name原localhost改为目标域名,并且在Host节点中添加如下的Context节点。path="" docBase=" 这个填你的war的名字"( 比如我的是zy.war就是zy ) debug=“0” reloadable=“true”然后重启tomcat...原创 2021-03-10 03:18:25 · 426 阅读 · 0 评论 -
tomcat服务器上部署spring maven项目导出的jar 包
前提安装好了JDK上传jar文件到tomcat的wabapps文件夹下有宝塔控制台的 进入终端然后cd到你的tomcat的webpack进来之后然后 java -jar 加你的jar包全名然后回车原创 2021-02-14 18:22:59 · 180 阅读 · 0 评论 -
uni-app的ajax(uni.request)
uni.request({ url:接口地址, method: 'get', dataType: 'json', success: (res) => { console.log(res.data); } })控制台效果原创 2021-02-05 17:14:28 · 1666 阅读 · 0 评论 -
vue利用localStorage进行传一些值
vue利用localStorage进行传一些值这里可以在方法里储存 methods:{ play:function (){ let that = this; this.urls=that.url+that.url1; localStorage.setItem('playUrl',this.urls); } }然后在加载页面的时候去取值 mounted() { this.url= localStorage.getItem('pla原创 2021-02-03 19:13:38 · 398 阅读 · 0 评论 -
Vue路由嵌套 在组件里的切换
home为父组件在l路由的index里这样写然后在父组件里加个view就可以了原创 2021-02-03 18:00:55 · 735 阅读 · 0 评论 -
swagger接口显示null问题
如果你的接口里面的值显示null 请检查你数据库命名规范原创 2021-01-21 20:34:45 · 1732 阅读 · 0 评论 -
Vue使用音频播放器插件 vue-aplayer
安装 vue-aplayernpm install vue-aplayer --save引入、注册import aplayer from "vue-aplayer"; components: { aplayer },3.使用<!--music:当前播放的音乐。 list:播放列表 :showlrc:是否显示歌词--><aplayer :music="musics[0]" :list="musics" :showlrc="true"></aplaye..原创 2021-01-17 14:00:45 · 4600 阅读 · 8 评论 -
vue获取屏幕长宽
data(){ return{ windowWidth: document.documentElement.clientWidth, //实时屏幕宽度 windowHeight: document.documentElement.clientHeight, //实时屏幕高度 } }, // <!--在watch中监听实时宽高--> watch: { windowHeight (val) { let that =原创 2021-01-15 23:37:22 · 655 阅读 · 0 评论 -
vue cli脚手架前端调后端数据接口时候的本地代理跨域问题,如我在本地localhost访问接口http://mobilecdn.kugou.com/api/v3/search/song?
**vue cli脚手架前端调后端数据接口时候的本地代理跨域问题,如我在本地localhost访问接口http://10.1.5.11:8080/xxx/duty?time=2017-07-07 14:57:22’,是要跨域的才可以访问的,如果直接访问会报跨域访问错误解决方法:这里只需要在webpack配置一下proxyTable就OK了,在config中找到index.js如下 :config/index.jsproxyTable: { '/api': { target原创 2021-01-14 21:46:43 · 357 阅读 · 0 评论 -
spring boot的一个书记句酷配置
paalication,propertiesserver.port=8080#mysql数据库连接spring.datasource.driver-class-name=com.mysql.jdbc.Driverspring.datasource.url=jdbc:mysql://localhost:3306/share?useUnicode=true&characterEncoding=utf8spring.datasource.username=rootspring.datasou原创 2021-01-07 20:38:11 · 61 阅读 · 0 评论 -
swagger的配置文件
package com.Id.vueservice.config;import com.google.common.base.Predicates;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import springfox.documentation.builders.ApiInfoBuilder;import spri原创 2021-01-07 19:44:43 · 891 阅读 · 0 评论 -
Spring mybatits lombok swagger的集合依赖 自动生成代码 工程
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/mav原创 2021-01-07 19:43:32 · 69 阅读 · 0 评论 -
自动生成代码的genreator
package generator;//import java.util.ArrayList;//import java.util.HashMap;//import java.util.List;//import java.util.Map;////import com.baomidou.mybatisplus.annotation.IdType;//import com.baomidou.mybatisplus.generator.AutoGenerator;//import com.b原创 2021-01-07 19:41:40 · 294 阅读 · 1 评论 -
swagger
标题swagger接口架包导不进来添加依赖就行 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.7.0</version> </dependency> <!-- https:/原创 2021-01-05 16:40:53 · 259 阅读 · 0 评论 -
idea自动生成set/get的插件
插件名:lombokidea在pom里导入依赖 <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </dependency>安装插件seting->plugins安装后点restart或者重启IDEA配置lombok注解处理Settings原创 2021-01-05 16:29:36 · 2307 阅读 · 0 评论 -
Mybatis的常见错误
错误名:### Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 25; columnNumber: 17; 元素类型为 "xxxxx" 的内容必须匹配 "(xxxxxxx?,如果发现类似的请检查你的mybatis-coonfig标签的顺序这是报错的正确的是有的id.原创 2020-12-22 17:49:01 · 149 阅读 · 0 评论 -
Maven手动配置文件过滤
由于maven里的约定大于配置,有些写的配置文件,有些文件无法导出或生效的问题在pom里加入<build> <resources> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.properties</i原创 2020-12-22 09:52:15 · 937 阅读 · 0 评论