Remember the problem of using Vue once. The page console prompts, error in mounted hook: typeerror: invalid SRC type
the reason is that mounted mounts unused methods. Delete them.
<template>
<button v-on:click ="add()">add</button>
<button v-on:click ="edit()">edit</button>
</template>
<script>
...
mounted:function(){
this.select();
//this.del(); Delete the superfluous codes
},
methods:{
select(){
},
add(){
},
edit(){
}
}
</script>
Read More:
- [Solved] VUE Error: Error in mounted hook: “TypeError: Cannot read properties of undefined (reading ‘$on‘)“
- [Vue warn]: Error in mounted hook: “Error: please transfer a valid prop path to form item“
- [Vue warn]Error in mounted hook: “Error: please transfer a valid prop path to form item“
- [Solved] VUE D:\project\vueProject\vue-02\src\components\hello.vue 5:5 error Parsing error: x-invalid-end-tag
- [Solved] Error in mounted hook: “Error: please transfer a valid prop
- uniapp [Vue warn]: Error in onLoad hook: “TypeError: Attempting to change the setter of an unconfigu
- [Solved] vue3vite Error: Failed to resolve import “@vue/server-renderer from “src\App.vue“. Does the file exist
- uniapp Use render Function Error: [Vue warn]: Error in beforeCreate hook: “TypeError: Cannot read property ‘_i‘ of
- [Solved] Vue Error: Uncaught TypeError: Vue.createApp is not a function
- Vue a page is mounted to send multiple requests at the same time, and the loading is processed uniformly
- [Solved] ant design pro vue Startup Error: ERROR Failed to compile with 1 error 20:34:09 error in ./src/components/Num
- [Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function
- [Solved] vue.esm.js?efeb:591 [Vue warn]: Error in event handler for “click“: “TypeError: Cannot read property
- vue Error: Uncaught SyntaxError: Invalid shorthand property initializer
- [Solved] Vue echarts Error: Initialize failed: invalid dom.
- Error in created hook: “SyntaxError: Unexpected token u in JSON at position 0
- [Solved] Vue Project Error: “TypeError: Cannot read properties of undefined (reading ‘init‘)“
- [Solved] vue watch Error: Error in callback for watcher “xxx“: “TypeError: Cannot read properties of undefined …
- [Solved] Error in created hook: “SyntaxError: Unexpected token o in JSON at position 1“
- [Solved] Element form method resetfields() error: vue.runtime.esm.js?2b0e:1888 TypeError: Cannot read properties of undefined (reading ‘indexOf’)