- 博客(53)
- 收藏
- 关注
原创 vue3使用第三方地图库报错‘get‘ on proxy: property ‘__accessor__‘ is a read-only and non-configurable data prope
vue3+vite项目使用了第三方地图类库,在使用地图功能时报错。问题就出在vue3的这个代理对象身上。所以在使用的时候可以用vue3的。可以将代理对象转为原始对象。
2023-11-30 10:29:32
1061
原创 NVM安装node后没有npm(无法将“npm”项识别为 cmdlet、函数、脚本文件)
NVM安装node后没有npm(无法将“npm”项识别为 cmdlet、函数、脚本文件)
2022-12-06 15:40:09
1849
原创 ::v-deep usage as a combinator has been deprecated. Use :deep(<inner-selector>)警告
::v-deep usage as a combinator has been deprecated. Use :deep(<inner-selector>)警告解决
2022-09-07 17:01:58
1034
原创 vue3+ts报错“ xxx“ is declared but its value is never read
vue3+ts报错is declared but its value is never read
2022-09-02 11:36:33
11099
1
原创 解决antd vue的 Table组件selectedRows翻页后不保留上一页已选中数据
解决antd vue的 Table组件selectedRows翻页后不保留上一页已选中数据
2022-07-01 11:15:38
1932
原创 antd vue 嵌套子表格遇到的问题总结
今天使用antd vue 的嵌套子表格遇到了一个问题,子表格中的操作栏上的按钮需要根据点击变化,也就是说要根据数据来更改状态,但是改变数据后页面没有渲染<a-table :columns="columns" :scroll="{ x: true, y: 450 }" :data-source="data" rowKey="id" @expand="expand" :pagination="ipagination" @
2022-05-19 14:36:11
1413
1
原创 vue 一个倒计时组件
可直接使用<template> <div :style="config.style">{{ lastTime }}</div></template><script>const addZero = function(num) { return num < 10 ? "0" + num : String(num);};export default { props: { /** * @param time
2022-05-17 09:41:51
213
原创 解决error ‘XXX‘ is not defined no-undef且项目没有eslintrc.js文件问题
问题描述这是因为eslint的语法校验导致的问题,文件是通过public的index.html中<script src="xxxxxx.js"></script>引入的,没有定义全局变量,项目没有eslintrc.js文件,但是可以在package.json中配置eslint规则在rules规则下,添加"no-undef": "off"即可...
2022-04-22 11:25:16
11764
3
原创 win11单独设置底部颜色,单独设置任务栏颜色
在win11系统中,默认的任务栏颜色为浅色,它可能会与白色的网页或界面重叠,影响视觉体验,使用起来很不爽,可以单独设置。桌面右键–>个性化–>模式选择成自定义然后把默认windows模式设置成深色即可。如果单独设置成深色,其他应用也会变成深色,所以单独设置要这样进行...
2022-04-21 15:19:27
2913
原创 js数组排序
var sdts = [ {name:"小明",age:30}, {name:"小红",age:20}, {name:"小花",age:40} ]compare(property, desc) { return function (a, b) { var value1 = a[property]; var value2 = b[property]; if (d
2022-04-08 16:42:54
235
原创 antd vue 表格的自动展开行
业务需求是加了二级目录后自动展开该项,开始使用的是 table的 defaultExpandedRowKeys这个属性,然后发现问题,这个属性只是在第一次渲染的时候有效,后面动态增加目录是不起作用,研究后转用 expandedRowKeys这个属性<a-table size="middle" @expand="onExpand" :expandedRowKeys="expandedRowKeys" rowKey="id" :columns="columns" :dataSource="da
2022-03-28 10:38:26
2486
原创 再次使用vue-awesome-swiper做异形轮播
先上效果图依旧是面对百度编程,在vue中使用swiper最重要的就是用对版本,npm i 了几个版本后有各种细节问题,最后找到最佳组合vue-awesome-swiper@3.1.3swiper@4.5.1npm install swiper@5.3.6 --savenpm i vue-awesome-swiper@3 -S 页面按需引入html代码<swiper class="mySwiper" :options="swiperOption" ref="mySwiper"&g
2022-03-11 17:01:28
1890
原创 vue 点击下载图片直接打开问题解决
使用a标签通过download 属性下载文件只适用于同源的文件非同源的时候a标签的download属性无效,会发生跳转,并不会下载情景1:如果存在CORS问题,先将图片转成base64 :(亲测有效)downloadIamge(imgsrc, name) {//下载图片地址和自定义图片名称let image = new Image();// 解决跨域 Canvas 污染问题image.setAttribute("crossOrigin", "anonymous");image.onload =
2022-02-22 18:07:37
1427
原创 关于数组拷贝
需要数组拷贝时,使用了=赋值,slice(),concat()方法都不行,修改了原数组后拷贝数组也变了,原因是这个数组内容是object,而object是引用类型,需要使用深拷贝可以使用JSON.parse(JSON.stringify(arr))来拷贝,这样的两个数组不会相互影响对象拷贝的话 使用{…object}...
2021-12-06 10:19:37
147
原创 antd design for vue的tree组件问题
antd design for vue的tree组件问题首先是去掉组件自带的小箭头可以通过css样式去掉/deep/ .ant-tree li span.ant-tree-switcher{ display: none;}然后是自定义图标照着官网文档可以自定义,主要是根据状态来改变图标这是文档中的根据是否selected来改变注意 其中这个 { selected },是这条数据的状态中的selected根据需求不同可以用不同状态来判断下面是我写的查看不同状态<tem
2021-11-04 18:02:50
593
原创 antd for vue table组件key报错
antd for vue table组件key报错Warning: [antdv: Each record in table should have a unique key prop,or set rowKey to an unique primary key.] Warning: [antdv: Table] Each record in dataSource of table should have a unique key prop, or set rowKey of Table to an u
2021-10-26 10:37:19
653
原创 前端过滤加模糊查询
//前端模糊查询 gainSearch(value) { //value为查询关键字 const list = this.dataList; // this.dataList 为一个要查询的对象数组 object[] let arr = []; list.filter((index) => { // 过滤每一条数据对象 if (index.name.indexOf(value) >= 0) {
2021-09-28 17:13:02
330
原创 uniapp中引入使用leaflet地图
leaflet地图本身支持移动端,但对原生更友好,在uniapp中就较为复杂如果是直接引入,在h5端是正常的,但真机运行后就会发现,地图加载不出来,需要用到uniapp的renderjsrenderjs官方描述<view class="warp"> <view id="map" class='map'> </view> </view> <script module="leaflet" lang="renderjs"> im
2021-08-04 15:20:44
5992
14
原创 vue-awesome-swiper 设置loop循环播放无效
问题: 用vue-awesome-swiper做商品详情页轮播图时,已经设置了loop:true,但是却失效了,轮播到最后一张图片时就停止播放了。解决方法:在swiper上加个v-if=“数据.length>0”判断,等到图片数据有了再来循环渲染图片。...
2021-07-08 16:48:11
508
转载 Proxy error: Could not proxy request错误解决
vue 项目错误原因:跨域解决办法:package.json文件中的scripts调试添加"start": "node index.js", "server": "nodemon index.js --ignore client"这篇文章解释的很清楚https://blog.youkuaiyun.com/Reagan_/article/details/97498160
2021-07-05 09:54:26
13811
1
原创 antd design for vue 中表单验证
首先是不能有空格<a-form-model-item ref="title" label="新闻标题" prop="title"> <a-input v-model="form.title" placeholder="请输入新闻标题" /> </a-form-model-item>title: [ { required: true, message: '请输入新闻标题!', trigger: 'blur' },
2021-06-24 16:21:57
1398
原创 使用vue-awesome-swiper做异形轮播图
先上效果图刚开始对着swiper官网自己摸索,引入swiper依赖启动,当然是直接报错,然后百度各种文章,是版本问题导致报错,后来用vue-awesome-swiper来做这个轮播。我用的是3.1.3的vue-awesome-swiper第一步npm install vue-awesome-swiper@3 --save-dev然后就是最重要的一点 引入文件 这一步了第二步import { swiper, swiperSlide } from 'vue-awesome-swiper'
2021-06-10 16:11:58
1201
原创 CSS -webkit-box-orient: vertical 属性编译后丢失问题
写项目的时候遇到一个问题,需求是标题只显示2行,超出显示…-webkit-box-orient: vertical; // 从上到下垂直排列子元素(设置伸缩盒子的子元素排列方式)但是代码经过编译后就把-webkit-box-orient: vertical干掉了/* autoprefixer: off */ -webkit-box-orient: vertical;/* autoprefixer: on */问题完美解决...
2021-05-21 14:30:46
154
原创 antd design vue 禁止选择过去未来时间
<a-date-picker style="width: 100%" placeholder="请选择生日" :disabled-date="disabledDate" v-model="model.birthday" :format="dateFormat" :getCalendarContainer="node => node.parentNode"
2021-05-11 15:41:57
796
原创 vue中style的三元表达写法
<a :style="{'margin-left':'10px','color':record.status==0?'#76CBC2':'gray','cursor':record.status==0?'':'default'}">发布</a>
2021-04-22 15:59:44
1271
原创 使用ant vue遇到的一点问题总结
table中的排序在column数据设置,需要开启的列设置sorter: (a, b) => a.size- b.size, 自定义排序方法{ title: '数据大小(单位/KB)', ellipsis: true, align: 'center', dataIndex: 'size', sorter: (a, b) => a.size - b.size,//自定义排序 sortDirections: ["descend","ascend"],//先降序后升序
2021-04-21 17:55:17
414
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人