ICode9

精准搜索请尝试: 精确搜索
  • php运行报Call to undefined function curl_init()的解决办法2022-07-26 07:31:15

      1、在php的安装目录中找到php.ini(如果安装环境时没改的话是php.ini-development);   2、打开php.ini,在里面搜索extension=php_curl.dll,如果这行前面有分号,请删除分号开启该扩展;    3、在同一目录下找到libeay32.dll,libssh2.dll,ssleay32.dll这三个文件,复制粘贴到apache

  • js中的 ?? 与.?2022-07-20 15:04:05

    ?? 表示:只有左侧的值为null或undefined的时候才使用右侧的值。 ?. 表示:可选链操作符( ?. )允许读取位于连接对象链深处的属性的值,而不必明确验证链中的每 个引用是否有效。操作符的功能类似于 . 链式操作符,不同之处在于,在引用为空(null 或者 undefined) 的情况下不会引起错误,该表达式

  • dedecms编辑器支持Word一键粘贴2022-07-19 09:31:26

    ​ 项目需求可发布文章 需求涉及到富文本编辑器 经过查阅我选择了较为简便 不需要后端支持可独立完成的tinymce框架 官方文档也是相当完整 虽然都是全英文 但是有强大的 谷歌~ 没问题的 编辑器,tinymce 不需要后端配合 只需要把最终编辑完的富文本传给后端就好 很简单 下载tinymce

  • Error in render: "TypeError: Cannot read properties of undefined (reading 'category2Name&#2022-07-15 20:32:45

    在发送请求获取数据成功,渲染数据成功 却报错 报错 在undefined里面找不到category2Name,那么category2Name的上一级是undefined      环境:   已经拿到数据  1 computed: { 2 // 拿取数据 3 ...mapState('detail', ['detailList']), 4 },  用插值表达式渲染数据,因

  • npm ERR! Cannot read property 'insert' of undefined解决方案2022-07-12 21:34:32

    问题 npm ERR! Cannot read property 'insert' of undefined!! 问题报错样式(代码如下) npm ERR! Cannot read property 'insert' of undefined npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-07-12T08_52_38_745Z-deb

  • 使用node环境直接 运行js文件时,打印的window 为 undefined2022-07-12 10:34:07

    使用node环境直接 运行js文件时,打印的window 为 undefined; 是因为这里的运行实际是运行的 node,程序中的this是指向window,而 window 属于浏览器环境中的全局变量,在 node 中肯定拿不到的。所以会显示undefined。

  • ES6-新增变量常量声明标识符-let-const2022-07-11 23:02:09

    ES5用var声明变量时有一些缺陷,ES6新增了let声明变量的标识符,const常量来弥补var的不足 一,let的特性 1,与var类似,但没有隐式提前-若没有声明,不能先访问变量 console.log(a) //报错 let a=10 2,只能在let声明的代码块内使用 for(let a=0;a<10;a++){ console.log(a)//0,1,2,

  • 解决:TypeError: Cannot read properties of undefined (reading 'service')2022-07-11 17:04:32

    vue 3.x 版本加载转圈圈实例有变更,按下面导入 import { ElLoading} from 'element-plus' this.loadingInstance = ElLoading.service({ target: '.main', text: '玩命加载中', background: 'rgba(0,0,0,0.5)

  • 解构2022-07-09 09:01:46

    解构 数组解构 // 报错 let [foo] = 1; let [foo] = false; let [foo] = NaN; let [foo] = undefined; let [foo] = null; let [foo] = {}; // 可以正常解构 let [a] = 'hello'; a // 'h' 只有具有 iterator 接口,才能数组解构 在解构过程中,我们也可以赋默认值,这个默认值可

  • Vue3项目运行时报错误:TypeError Cannot read properties of undefined (reading 'filter')2022-07-08 13:04:22

    let matched = this.$route.mached.filter(item => item.name);方法报错:TypeError Cannot read properties of undefined (reading 'filter')。   原因分析:   这个问题不要慌,要么是打错字了,要么就是忘记传这个字段了,导致了在另一个页面没有找到这个'filter'字段。   经过仔细

  • es6运算符- ?.与??与??=与&&=与!!2022-07-08 12:01:41

    ?. 链判断运算符 左侧的对象是否为null或undefined,若是则不再往下运算,而是返回undefined,否则一直运算下去,直到返回最后一个值。 链判断运算符?.读取深度嵌套在对象链中的属性值,而不必验证每个值。当值为空时,表达式停止计算并返回 undefined。 let person = { name: '拾柒',

  • ?? 和 | | 容易被忽略的地方。2022-07-07 12:03:10

    ?? =》 空值合并运算符。 只会判断 null 和 undefined。    | | =》 短路运算。 不仅会判断 null 和undefined, ‘’ 和0 也都会判断!!!   ex:  const a = null(undefined) ?? 1 => a === 1  const b = null(undefined)  || 1 => a === 1 const aa = ''(0) ?? 1  =>  a === ''

  • ZBlog支持Word一键粘贴2022-07-06 10:34:56

    ​ 项目需求可发布文章 需求涉及到富文本编辑器 经过查阅我选择了较为简便 不需要后端支持可独立完成的tinymce框架 官方文档也是相当完整 虽然都是全英文 但是有强大的 谷歌~ 没问题的 编辑器,tinymce 不需要后端配合 只需要把最终编辑完的富文本传给后端就好 很简单 下载tinymce

  • 解决:Uncaught TypeError: Cannot read properties of undefined (reading 'validate')2022-07-05 15:03:18

    Vue的版本不同,写法不太一样 问题:用validate进行判定,结果没有生效 解决:el-form中没写ref=“loginForm” 加上,不用在ref前加:号 <template> <div id="login-container"> <el-form :rules="rules" ref="form" :model="form"

  • null和undefined区别2022-07-05 11:01:54

    1. null和undefined的区别: null 是一个表示"无"的 对象的初始值,空对象的引用 ; 转为数值时为 0 null 用来表示尚未存在的对象,常用来表示函数企图返回一个不存在的对象 undefined 是一个表示"无"的原始值的初始值 ; 未定义 ; 转为数值时为 NaN 当声明的变量还未被初始化时,变量的

  • 引用的类被废弃undefined method think\Loader::import()(thinkPHP5.0--5.1)2022-07-05 10:32:58

    文件上传导入的引用undefined method think\Loader::import() use use PhpOffice\PhpSpreadsheet\IOFactory; 原来的引用5.0 Loader::import('.PHPExcel.PHPExcel.IOFactory'); $objReader = new \PHPExcel_Reader_Excel2007(); 修改成 $objReader = IOFactory::createReader(&

  • 关于Vue项目中 `Uncaught TypeError: Cannot read property ‘toLowerCase‘ of undefined`的情况2022-06-30 09:35:16

    问题:     原因:    在全局注册组件时采用遍历组件池的方法,此时,每个组件都应该具备name属性,否则会出现如标题的错:   Uncaught TypeError: Cannot read property 'toLowerCase' of undefined 解决: 在组件中加入name属性,标注组件名称 <script> export default { name: 'Ta

  • 快速入门2022-06-25 14:35:47

    一,引入Javascript 1.内部标签     <!--内部标签--> <script> alert("hello,world!") </script>==========弹窗     2.外部引入 需要一个js文件,在html中链接      ==========      效果一样,注意,script标签尽量不要自闭和   二,基本语法入门 变量定义  

  • js中“??“和“?.“怎么用?2022-06-23 11:33:31

    ??:空值合并操作符 逻辑操作符,左侧为null和undefined时,才返回右侧的数const sum = null ?? 12console.log(sum);//输出12const sum1 = 12 ?? 23console.log(sum1);//输出12const sum2 = undefined ?? 12console.log(sum2);//输出12?. :可选链操作符可以读取位于连接对象链深处属性的

  • React事件处理方法中this指向为undefined的四种解决方案2022-06-21 21:36:20

    React事件处理方法中this指向为undefined的四种解决方案: 1. 定义事件后使用bind绑定this return ( <div> <button onClick={this.clickHander.bind(this)}>Click</button> </div> ) 2. 在构造函数内部声明this指向 constructor() { super()

  • Cannot read properties of undefined (reading 'setState')2022-06-19 03:01:30

      this的指向不对,需要用bind绑定this 例如 constructor(props){ super(props) this.state=store.getState() this.changeInputValue=this.changeInputValue.bind(this)//绑定 store.subscribe(this.storeChange)//订阅 }  

  • JS中的一些不常见高效运算符 可选链 空值合并运算符2022-06-18 17:35:22

         let b=1;         let c=b.value?.v // ?. 可选链 只有当前面的对象存在时才能执行 否则返回undefined         console.log('c: ',c)        c??=5 // ?? 空值合并运算符  a??b 如果 a为真 就返回a 否则返回b 于||的区别是只能识别null和undefined切

  • JS:逗号运算符2022-06-18 12:32:49

    逗号运算符: 会把逗号隔开的表达式全部执行 最后一个运行的表达式的结果就是逗号运算符的结果   例: var a = (1, 2, 3, 4, 5, 6); console.log(a); //6   隐式操作   例: var a,b,c,d = 2; //等价于 var a;var b;var c;var d = 2;

  • ZBlog编辑器支持一键粘贴2022-06-16 10:35:34

    ​ 项目需求可发布文章 需求涉及到富文本编辑器 经过查阅我选择了较为简便 不需要后端支持可独立完成的tinymce框架 官方文档也是相当完整 虽然都是全英文 但是有强大的 谷歌~ 没问题的 编辑器,tinymce 不需要后端配合 只需要把最终编辑完的富文本传给后端就好 很简单 下载tinymce

  • JS数据类型相关面试题2022-06-15 23:33:27

    1、JS 有哪些数据类型,如何判断这些数据类型 6种基本数据类型:String, Number ,Boolean, undefined, null, Symbol 1种引用类型:Object对象:Array(数组),Function(函数),Data(时间) 检测数据类型的4种方式 typeof instanceof constructor Object.prototype.toString.call() 2、typ

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有