前端哥

【Vue3】使用ref与reactive创建响应式对象

2024-02-23先来简单介绍一下ref,它可以定义响应式的变量let xxx = ref(初始值)。**返回值:**一个RefImpl的实例对象,简称ref对象或refref对象的value属性是响应式的。JSxxx.value,但模板中不需要.value,直接使用即可。对于let name = ref('张三')来说,name不是响应式的,name.value是响应式的。下面我们看一看上图红框中代表的意思是,我们哪里需要响应就在哪个里面导入上述代码即可。

https://www.qianduange.cn//article/2506.html 分类:前端知识

js实现动态数字滚动,插件jquery.counterup.min.js的使用方式

2024-02-22推荐一个常用的数字滚动动画插件,jquery.counterup.js 该插件可以控制动画的延迟时间和动画过渡时间。引入 jquery.waypoints.js (点击下载)监听页面滚动事件。引入jquery.counterup.js (点击下载)数字动画插件。在页面添加js代码,$('.counter').countUp();在需要的滚动的数字上添加class类名counter作为数字的容器。从而实现页面滚动到数字可视窗口,实现让数字从零到指定数值的滚动。首先引入jQuery.js。_jquery countup

https://www.qianduange.cn//article/2505.html 分类:前端知识

echarts里type为custom,自定义配置renderItem为柱状形状

2024-02-21echarts里type为custom,自定义配置renderItem为柱状形状echarts里type为custom,自定义配置renderItem为柱状形状echarts里type为custom,自定义配置renderItem为柱状形状主要功能:文本超过柱状形状就隐藏否则就显示,移入每一个柱状显示tooltip。<!DOCTYPE html><html lang=""><head> <title>ECharts Custom Rend_echarts type: 'custom

https://www.qianduange.cn//article/2430.html 分类:前端知识

jQuery发送ajax请求出现跨域问题(请求头XXX不被允许)

2024-02-19解决报错:Access to XMLHttpRequest at 'http://127.0.0.1:8000/jQuery-server?a=100&b=200' from origin 'http://127.0.0.1:5500' has been blocked by CORS policy: Request header field d is not allowed by Access-Control-Allow-Headers in preflight response._jquery ajax post header 跨域

https://www.qianduange.cn//article/2301.html 分类:前端知识

jQuery 和 Zepto 的区别? 各自的使用场景?

2024-02-19所以,这种场景,jQuery 使用 .outerWidth() / .outerHeight();Zepto 使用 .width() / .height()。Zepto 使用 .width() 返回 ,使用 .css('width') 返回 0px。jQuery 使用 .width() 和 .css('width') 都返回 ,高度也一样;Zepto.js: 返回 top 、 left 、 width 、 height。Zepto.js: 无法获取宽高;jQuery: 可以获取。

https://www.qianduange.cn//article/2297.html 分类:前端知识

Uncaught TypeError: Cannot read properties of null (reading ‘getAttribute‘)

2024-02-19vue项目报错,Uncaught TypeError: Cannot read properties of null (reading 'getAttribute'),翻译:无法读取null属性(读取'getAttribute'),解析:getAttribute()是js获取属性方法,就是getAttribute不能读取null的属性,这种错误一般出现在使用Echarts和地图后,当切换到空白页面后,重置页面时,就回报类似错误,解决方法就是在报错之前做判断处理;_cannot read properties of null (reading 'getattribute')

https://www.qianduange.cn//article/2293.html 分类:前端知识

vue版本问题导致:Syntax Error: TypeError: Cannot read properties of undefined (reading ‘parseComponent‘)

2024-02-19vue小白上路翻车记_syntax error: typeerror: cannot read properties of undefined (reading 'parse

https://www.qianduange.cn//article/2279.html 分类:前端知识

Vue | Vue.js 高级语法系列

2024-02-19h("h2", null, `当前计数:${counter.value}`),h("h2", null, `当前计数:${this.counter}`),-- 哈哈哈 -->console.log("插件被安装:",app,options)console.log("插件被安装:",app,options)console.log("传入的函数直接被执行:",app)// h传递3个参数 (标签名) ({ 对应的属性 }) (内容)_import { h } from 'vue

https://www.qianduange.cn//article/2246.html 分类:前端知识

jquery treetable,初步使用

2024-02-17myTreeTable 是一个treetable要用的一个容器,treeTableList是需要从后端拿到数据后,用js动态生成相应的dom结构,在添加进去。initialState: 'collapsed', // 初始展开状态,默认为 'collapsed'expandable: true, // 是否允许展开/折叠,默认为 true。indent: 20 , // 每个层级的缩进量,默认为 19。//这个true,如果是会刷新树的话,要带上。var root='0' //根节点。_jquery treetable

https://www.qianduange.cn//article/2240.html 分类:前端知识

如何在vue2里面使用echarts

2024-02-17data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']第五步写echatr使用的时候直接使用this.$echarts.xxx就可以了。-- 为 ECharts 准备一个定义了宽高的 DOM -->ok,如果你想使用其他的示例图表可以去官网替换掉 option里面的东西。// 基于准备好的dom,初始化echarts实例。// 使用刚指定的配置项和数据显示图表。3. 使用 -main.js(在这里使用第二种)第三步在main.js(在这里使用第二种)_vue2 使用echarts

https://www.qianduange.cn//article/2230.html 分类:前端知识

562条数据,当前50/57

最近搜索

会员中心 联系我 留言建议 回顶部