vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in created hook: “TypeError: Object(...) is not a func

简介: vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in created hook: “TypeError: Object(...) is not a func

前几天一个月薪35k的兄弟,给我推了一个人工智能学习网站,看了一段时间挺有意思的。包括语音识别、机器翻译等从基础到实战都有,很详细,分享给大家。

从后端拿取数据渲染到表格数据。结果明明写的没错,但是却报错

定位到代码中。

引入后端接口

引入的这个js,要用大括号包起来,不然就被当作方法调用,所以就会报错的呀

参考:vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in created hook: "TypeError: Object(…) is not a func 报错)

原文链接:vue.runtime.esm.js?2b0e:619 [Vue warn]:

结束

// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})// 伪代码
import { IDomEditor } from '@wangeditor/editor'
let editor: IDomEditor | null = null
ajax(url, res => {
  editor = createEditor({
    // content 或 html
    // 其他属性
  })
})


目录
相关文章
|
JavaScript
vue学习(7)Object.defineProperty
vue学习(7)Object.defineProperty
232 3
|
JavaScript 前端开发 开发者
讲述Vue框架中用于对象响应式变化的Object.defineProperty函数。
综上所述,Vue.js通过 `Object.defineProperty()`提供了强大的响应式能力,使得状态管理变得简洁高效。这种能力是Vue.js受到广大开发者青睐的重要原因之一。尽管Vue 3.x使用Proxy替代了该方法,但对于Vue 2.x及其之前版本,`Object.defineProperty()`是理解Vue.js内部工作机制不可或缺的一部分。
425 27
|
JavaScript API
vue使用hook:声明周期来监听子组件的声明周期
本文介绍了如何在Vue中使用生命周期钩子来监听子组件的生命周期事件,包括在子组件内部监听和在父组件中监听子组件的生命周期钩子。
341 0
|
JavaScript 索引
炸裂!Vue3 中使用 Hook 实现按住 Shift 快速勾选el-table 功能,太丝滑了!
炸裂!Vue3 中使用 Hook 实现按住 Shift 快速勾选el-table 功能,太丝滑了!
炸裂!Vue3 中使用 Hook 实现按住 Shift 快速勾选el-table 功能,太丝滑了!
|
设计模式 JavaScript 前端开发
js中new和object.creat区别
【10月更文挑战第29天】`new` 关键字和 `Object.create()` 方法在创建对象的方式、原型链继承、属性初始化以及适用场景等方面都存在差异。在实际开发中,需要根据具体的需求和设计模式来选择合适的方法来创建对象。
|
JavaScript API
vue3知识点:自定义hook函数
vue3知识点:自定义hook函数
344 2
|
JavaScript
Vue 的响应式原理中 Object.defineProperty 有什么缺陷
Vue 的响应式原理主要依赖于 `Object.defineProperty`,但该方法存在一些缺陷:无法检测到对象属性的添加和删除,且对大量数据进行代理时性能较差。Vue 3 中改用了 Proxy 来解决这些问题。
|
存储 JavaScript 前端开发
JS篇(Array、Object)
JS篇(Array、Object)
409 1
|
JavaScript API
【vue3】写hook这几天,治好了我不会组件封装的弱点。
【vue3】写hook这几天,治好了我不会组件封装的弱点。
|
JavaScript API 数据格式
【Vue 3】如何封装一个超级好用的 Hook!
【Vue 3】如何封装一个超级好用的 Hook!