- 博客(29)
- 收藏
- 关注
原创 js实现防抖和节流
使用(以下是5s内多次调用只执行第一次,使用时可根据项目需求调整)新建debounce.js,代码如下。新建throttle.js,代码如下。
2025-09-11 11:01:21
185
原创 使用xshell+xftp部署前端代码
3.打开xftp(ctrl+Alt+f ) ——新建——输入主机IP(协议默认SFTP 端口号默认22)——输入用户名和密码。2.打开xshell——新建——输入主机IP(端口号一般默认22)1.下载xshell和xftp安装包。点击连接成功后会出现服务器文件目录。点击连接后出现以下内容就是成功了。点击用户身份验证输入用户名密码。
2025-09-09 12:28:39
160
原创 使用NVM管理node版本
验证是否安装成功 nvm -v //显示版本号,如 1.2.2。1.卸载现有node.js避免冲突。下载完成后一直点击next即可。
2025-08-13 17:58:57
176
原创 vue项目发布线上报错“Uncaught SyntaxError: Unexpected token <“
2. 项目根目录下新建vue.config.js,添加以下代码。1. 在项目router目录下添加mode: "hash"3. 重新打包上传,页面正常显示。
2022-10-19 10:42:47
919
原创 本地项目上传到码云
1.点击要上传的文件夹,右键选择gitbashhere。3.将本地仓库与码云远程仓库进行关联。add后面必须有空格,否则会报错。6.将本地仓库推送到远程仓库。4.将本地文件添加至暂存区。2.在弹出的窗口输入。...
2022-07-26 16:02:56
144
原创 初学react提示node版本过低
创建react项目npx create-react-app my-app提示node版本过低升级node1.检查之前安装node的路径 where node2.官网下载在之前路径下覆盖安装3.node -v查看node版本号再次创建react项目成功npm start 运行
2022-05-07 14:48:28
1735
1
原创 render拿接口数据渲染控件
有时间整理完整import Form from 'ant-design-vue/es/form'; console.log("Form: ", Form); let { Item } = Formexport default { name:"SForm", data(){ return { } }, methods:{ }, render(){ console.log(this); return ...
2022-03-25 16:08:59
474
原创 jeecg-boot相关
yarn add @jeecg/antd-online-mini前端超长字段处理 import JEllipsis from '@/components/jeecg/JEllipsis' components: { RecordModelModal, JEllipsis // 新增 },data () { let ellipsis = (v, l = 20) => (<j-ellipsis value={v} length={l}/&g
2022-03-25 15:44:37
2053
原创 小程序获取接口数据
发起请求:data: { schooList: [], },onLoad: function () { wx.request({ url: 'XXXXXXX', method: 'POST', data: {}, header: { 'content-type': 'application/json' }, success: res => { console.log(
2022-01-19 10:24:12
751
原创 小程序跳转传参
<navigator url="xxxxxxx?details={{item.id}}">查看详情</navigator>onLoad: function (options) { this.setData({ details:options.details, }) },
2022-01-19 10:07:30
329
原创 小程序设置3s后跳转页面
onShow: function(){ // 定时器要放在onshow,放在onLoad里面,跳转到别的界面的时候,还是会一直请求。 setTimeout(function () { wx.reLaunch({ url: "../index" }) }, 3000) console.log("定时器") }...
2021-12-29 14:54:01
1152
1
原创 js取数组中对象的第一项(取对象的key和value)
let types = res.data.result //数组console.log(types, "types") let type = types.map((item) => { return item.type });console.log(type, "type");处理前:处理后:
2021-12-29 14:15:12
11101
原创 微信小程序引入vant
1.npm init初始化项目(完成后会多一个package.json文件)2.npm install --production3.vantui安装命令npm i vant-weapp -S --production4.修改app.json:将 app.json 中的 "style": "v2" 去除.5.修改 project.config.json:{ ... "setting": { ... "packNpmManually": true,
2021-12-21 17:44:07
334
原创 navigator带参跳转与参数接收
1.<navigator :url="'/pages/library/suremessage?title='+item.t+'&time='+item.x" hover-class="text-main-hover" ></navigator>2.接收页面显示<view>{{this.$route.query.title}}{{this.$route.query.time}}</view>// uniapp将接受到的参数作为页面标.
2021-12-13 14:24:20
1849
原创 点击柱状图带参跳转
myChart2.setOption(option2); const that = this myChart2.on('click',function(e){ console.log(e); that.gotolink(e) }gotolink(e){ // this.$router.pus.
2021-11-25 15:15:47
479
1
原创 带参跳转之后作为传参获取数据
<router-link :to="{path:'/credit',query:{couponId:item.id,}}"><h5>{{item.time}} | {{item.title}}<i class="el-icon-right" style="float: right;"></i></h5></router-link>接收方:{{t.
2021-11-25 14:50:24
360
原创 echarts柱状图获取接口数据
(记录学习的过程) var echarts = require('echarts'); //固定 var myChartone = echarts.init(this.$refs.chartone); //定义两个上下箭头的矢量路径 var up = 'path://M286.031,265l-16.025,3L300,223l29.994,45-16.041-3-13.961,69Z'...
2021-09-09 17:33:25
1445
1
原创 vue使用swiper实现轮播图
(记录学习的过程)1.安装插件npm install vue-awesome-swiper@3.1.3 --savenpm install swiper@6.3.5 --save2.main.js中引入import VueAwesomeSwiper from 'vue-awesome-swiper'import 'swiper/swiper-bundle.css'Vue.use(VueAwesomeSwiper)3.<swiper :options="swip..
2021-09-09 17:13:25
485
1
原创 vue引echarts地图
安装jquerynpm install jquery --save需要显示地图的页面添加import $ from 'jquery';vue.config.js中添加const webpack = require("webpack")<div id="main" style="width: 800px;height:400px;"></div> //容器mounted(){ this.myEcharts(); ...
2021-09-08 10:03:22
148
原创 vue无缝滚动插件
(记录学习的过程)1.安装npm install --save vue-seamless-scroll2.main.js中引入import scroll from 'vue-seamless-scroll'Vue.use(scroll);3.h5部分<rank-list title="门诊违规项目排名" /><vue-seamless-scroll :data="listData" class="seamless-warp"> <ul&
2021-08-27 13:53:01
217
原创 echarts的使用
1.npm install echarts@4.2.1 --save //安装依赖2.main.js中引入 import echarts from 'echarts' Vue.prototype.$echarts=echarts;3.图表模板:<div id="myChart" :style="{width: '500px', height: '300px'}" ref="chart"></div>/
2021-08-27 11:42:28
254
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅