![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
前端
你还满意吗
这个作者很懒,什么都没留下…
展开
-
vue封装axios
第一步:下载axiosnpm install axios第二步:设置请求头及其请求地址定义一个api文件夹,新建一个index.js文件,内容如下// 第一步:实例化axios对象,简单封装const axios = require('axios'); // 生成一个axios实例axios.defaults.baseURL = 'http://192.168.1.5:8006/api'; // 设置请求后端的URL地址axios.de原创 2021-04-26 22:26:00 · 225 阅读 · 0 评论 -
前端使用vue做多级地区联动(三级地区联动、四级地区联动)demo
方案一使用方案一最简洁,只需要引入一个js即可,可操作性强,能够根据自己的需求来进行设置使用步骤第一步:引入地区联动js地区js第二步:在vue中使用<template> <div> <!-- {{s}} --> <div> <select v-model="s"> <option v-for="item in Object.keys原创 2021-02-01 11:11:15 · 2010 阅读 · 0 评论 -
微信中使用支付宝进行支付
微信中使用支付宝不能直接使用,由于微信内置浏览器的原因,在微信中使用支付宝时无法跳转出去,支付宝官网给出了实例文档支付宝官网地址下载后将其例子融入到vue中使用步骤:第一步:将ap.js放在vue项目中第二步:在需要使用的页面引入ap.js第三步:使用ap.js里面的方法注意事项:在引入ap.js的时候需要注意,这个跟引入的方式有关联,经测试使用import '../../../src/assets/js/ap';引入没有问题,使用import '@/assets/js/ap';原创 2021-01-27 09:23:13 · 1327 阅读 · 0 评论 -
vue中使用excel导出身份证带有E
在node_modules里面找到vue-json-excelstyle=\"mso-number-format:'\\@';\"原创 2020-11-17 13:54:19 · 902 阅读 · 0 评论 -
vue中全局data全局使用localStorage
保存const info = { name: 'hou', age: 24, id: '001' };const str="haha";localStorage.setItem('hou', JSON.stringify(info));localStorage.setItem('zheng', str);获取var data1 = JSON.parse(localStorage.getItem('hou')); var data2 = localStorage.getItem('zheng原创 2020-11-10 17:12:42 · 1034 阅读 · 0 评论 -
[Vue warn]: Error in mounted hook: “TypeError: element.querySelector is not a function“
原创 2020-09-28 15:47:43 · 1716 阅读 · 0 评论 -
Error in mounted hook: “TypeError: element.querySelector is not a function“
原创 2020-09-28 15:41:56 · 2638 阅读 · 1 评论 -
vue.esm.js?f912:628 [Vue warn]: Property or method “item“ is not defined on the instance but referen
vue.esm.js?f912:628 [Vue warn]: Property or method “item” is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: ht原创 2020-09-24 09:07:50 · 924 阅读 · 1 评论 -
canvas画布操作,图片放大、标注,在canvas图片上面进行线段标注
包含:图片在canvas中移动、在canvas上面进行标注、放大等<!DOCTYPE html><html><head> <meta charset="utf-8"> <title></title> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <style type="text/css">原创 2020-09-16 14:30:59 · 2577 阅读 · 0 评论 -
canvas放大两种方式,图片放大,放大倍数可以调整,根据自己需求修改
第一种:在图形上面进行放大,放大倍数可以调整<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Glass</title> <style type="text/css"> #canvas { display: block; border: 1px原创 2020-09-16 14:24:40 · 6770 阅读 · 0 评论 -
createError.js?fd94:16 Uncaught (in promise) Error: Request failed with status code 400 at creat
createError.js?fd94:16 Uncaught (in promise) Error: Request failed with status code 400 at createError (createError.js?fd94:16) at settle (settle.js?f0aa:17) at XMLHttpRequest.handleLoad (xhr.js?90e9:69)原创 2020-09-09 15:28:52 · 5785 阅读 · 3 评论 -
vue打包后页面空白,提示Uncaught SyntaxError:Unexpected token
使用vue打包完运行时,页面显示空白,F12打开后报错,分析原因,没有找到对应的文件,解决方法很简单。出现这种问题的原因是因为路径找不到如果你是使用命令创建的项目,会有一个config文件,这个里面的一些配置文件,找到index.js文件修改前assetsPublicPath: '/',修改后assetsPublicPath: './',修改前修改后然后重新打包一下就行有点人使用的是UI工具创建的项目,就没有config这个文件,不要慌,下面来介绍一下这种解决方案使用ui工具创.原创 2020-09-07 10:01:06 · 4528 阅读 · 2 评论 -
You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the
You may use special comments to disable some warnings.Use // eslint-disable-next-line to ignore the next line.Use /* eslint-disable */ to ignore all warnings in a file.在webpack.base.conf.js中注释掉原创 2020-08-26 11:04:46 · 320 阅读 · 0 评论 -
You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the
You may use special comments to disable some warnings.Use // eslint-disable-next-line to ignore the next line.Use /* eslint-disable */ to ignore all warnings in a file.在build/webpack.base.conf.js文件中,注释或者删除掉:module->rules中有关eslint的规则...原创 2020-08-04 09:46:08 · 404 阅读 · 0 评论 -
vue Uncaught (in promise) TypeError: _assets_api_api__WEBPACK_IMPORTED_MODULE_0__ is not a function
vue在接收数据时报错Uncaught (in promise) TypeError: _assets_api_api__WEBPACK_IMPORTED_MODULE_0__ is not a function数据能够接收正常,解决方案:原创 2020-07-22 17:54:55 · 6208 阅读 · 15 评论 -
小程序开发前期配置工作
小程序开发前期配置工作开发环境:win10 微信开发者工具微信开发者工具就不做多的介绍了搭建完直接我们可以直接运行,看下能否跑通,如果可以,接着操作,如果不行,继续新建项目,在新建项目的时候需要我们填写appID,这个可以自己去微信公众平台https://mp.weixin.qq.com/注册一个,也可以点击下面的测试号,至此,就已经完成了项目的基本搭建下面来说下开发工具我们可以使用微信的开发者工具,也可以使用hbuilder工具进行开发,这里介绍一下hbuilder工具的使用打开hbui原创 2020-06-19 17:24:53 · 214 阅读 · 0 评论 -
Taro微信小程序
这里默认你已经创建好了一个项目,如果你还没有创建好一个项目,去看另外一篇文章taro环境搭建及创建一个项目在vscode终端中使用cnpm install 安装依赖cnpm run dev:weapp 或者 npm run dev:weapp编译过程中可能会出现错误解决方案:问题根本:这通常是因为运行NPM安装后环境发生了变化。运行“npm重建节点SASS——强制”来为当前环境构建绑定。如何解决:此时运行按照提示执行 cnpm rebuild node-sass 命令,然后再运行 nod原创 2020-06-14 18:36:50 · 436 阅读 · 0 评论 -
Taro环境搭建
Taro官网taro环境搭建在任意位置新建一个文件夹在vscode中打开文件夹安装tarotaro安装方式:1、yarn global add @tarojs/cli使用yarn安装2、cnpm install -g @tarojs/cli使用cnpm安装3、npm install -g @tarojs/cli使用npm安装 这里不建议使用win10安装yarnGet-ExecutionPolicy出现:Restricted 进行下一步 Set-Execution原创 2020-06-14 17:41:20 · 2112 阅读 · 1 评论