会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
惠鹏曦
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
12
下一页
2023年1月4日
js获取近半年时间
摘要: // 获取近半年时间getNowdate(time = 6) { let date = new Date() let year = date.getFullYear() let month = date.getMonth() let sdate = date.getDate() let olddat
阅读全文
posted @ 2023-01-04 18:06 惠鹏曦
阅读(677)
评论(0)
推荐(0)
2022年8月2日
react antd input组件限制
摘要: 1.限制手机号只能输入数字 <Form.Item label="手机号码" name="mobile" colon={false} style={{ marginLeft: '30px' }} rules={[ { required: true, message: '*请输入手机号码', }, {
阅读全文
posted @ 2022-08-02 11:19 惠鹏曦
阅读(948)
评论(0)
推荐(0)
2022年7月29日
ahook中常用的一些hooks
摘要: 官方文档:https://ahooks.js.org/zh-CN/ 以下总结一些个人认为非常实用的hook: 持续更新中: 1. useRequest 请求 import {useRequest } from 'ahooks'; const getSome = async () => {}; con
阅读全文
posted @ 2022-07-29 16:16 惠鹏曦
阅读(3714)
评论(0)
推荐(0)
2022年7月16日
echart 图表实现
摘要: import { CSSProperties, useEffect, useState } from 'react'; import * as echarts from 'echarts'; import Chart from '@/pages/components/Charts'; import
阅读全文
posted @ 2022-07-16 16:34 惠鹏曦
阅读(160)
评论(0)
推荐(0)
2022年6月10日
vue3中swiper纵向上下叠加轮播图
摘要: <!--纵向轮播--> <template> <div class="swiper-box"> <swiper :direction="'vertical'" :slidesPerView="3.9" :mousewheel="true" :modules="modules" :centeredSl
阅读全文
posted @ 2022-06-10 16:07 惠鹏曦
阅读(1832)
评论(2)
推荐(1)
2022年5月13日
vite中ts中使用scss变量
摘要: 1.我们需要在.scss文件中使用:export导出变量 $menuText: rgba(255, 255, 255, 0.65); $menuActiveText: #409eff; :export { menuText: $menuText; menuActiveText: $menuActiv
阅读全文
posted @ 2022-05-13 10:57 惠鹏曦
阅读(2298)
评论(2)
推荐(0)
2022年5月12日
vue3 slot三种插槽使用,与作用域插槽传值
摘要: 一,默认插槽和具名插槽 // 子组件 <template> // 匿名插槽 <slot/> // 具名插槽 <slot name='title'/> </template> // 父组件 <!-- 具名插槽 --> <template #default> <div class="tab-header
阅读全文
posted @ 2022-05-12 16:28 惠鹏曦
阅读(2399)
评论(0)
推荐(1)
2021年6月22日
vue.config配置 px2rem实现pc端大屏自适应(rem适配)
摘要: 配置前言项目构建:基于vue-cli3构建,使用postcss-px2rem px2rem-loader进行rem适配实现原理:每次打包,webpack通过使用插件postcss-px2rem,帮我们自动将px单位转换成rem单位前方有坑:UI框架部分组件使用JavaScript将css作为内联样式
阅读全文
posted @ 2021-06-22 14:35 惠鹏曦
阅读(1579)
评论(0)
推荐(0)
2021年3月15日
uniapp实现高德地图定位,起点到终点连线
摘要: 首先npm 引入 import AMapLoader from "@amap/amap-jsapi-loader"; 在生命周期里加载实例 data(){ return { amap:{}, // 存放高德地图实例对象 mapObj: {}, // 存放当前绘画出的地图对象 } } mounted(
阅读全文
posted @ 2021-03-15 18:30 惠鹏曦
阅读(5742)
评论(0)
推荐(1)
2021年2月23日
vue解决iframe在ie中切换url不生效问题
摘要: // 判断浏览器是否为IE const isIE = ( /MSIE (\d+\.\d+);/.test(navigator.userAgent) || ~navigator.userAgent.indexOf('Trident/') ) mounted() { // 兼容ie iframe切换路由
阅读全文
posted @ 2021-02-23 18:35 惠鹏曦
阅读(838)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
12
下一页
公告