正在使用 Laravel 和 Vue。数据从 Laravel 返回到 Vue。发送给 Vue 子组件的 Vue prop 是一个 json 对象数组,但是,子组件在读取它时出错。控制台中的错误是:"TypeError: Cannot read property 'id' of undefined". Any help would be greatly appreciated.这是从 Laravel
2020-04-27
我有 v-for form-group 组件,我迭代了 select 的值(整数)。我想获取迭代 v-model 的值,但似乎无法正确获取TEMPLATE<b-form-groupid="input-group-1"label="Jumlah Lowongan:"label-for="selectJumlahLow"description="Silahkan pilih satu."v-if="s
我有一个名为 Authenthicator 的类,它位于文件 Authenticator.js 中。我想在我的 vue 应用程序中使用它的功能,特别是在文件 Login.vue 中。如何导出 Authenticator 类并将其导入 Login.vue?我收到以下错误:Uncaught TypeError:无法读取未定义的属性“match”at patch (webpack-internal://
2020-02-25
如何向数组添加新项目?我尝试添加一个项目,但它返回错误。请参阅下面的屏幕截图和我的代码。屏幕截图JavaScript 代码var roles = [{id: 8, display_name: "test", description: "test", created_at: "2020-02-20 11:34:22", updated_at: "2020-02-20 11:34:22"}8: {id
2020-02-21
我尝试从外部源获取新闻文章,它返回 JSON 对象。我想将其 articles 属性分配给组件中的变量。不知何故发生了此错误。未捕获(在承诺中)TypeError:无法设置未定义的属性“articles”关于如何克服此问题的任何建议?export default {name: "blog",data() {return {articles: [],};},mounted() {// API cal
2020-02-11
我正在尝试访问嵌套对象属性。<th data-toggle="tooltip" data-placement="bottom" v-for="schedule in employee.daily_schedules">{{schedule.start}}-{{schedule.end}}-{{schedule.employee_function.name}}</th>当我尝试获取 schedul
2022-11-29
我有一个 Firestoreusers文档,其内容如下:{currentCompanyId: "123",displayName: "Mary Jane"}还有一个 Firestorewebsites文档,其内容如下:{companyId: "123",homePageUrl: "https://www.google.com/"}现在,我尝试使用 VueUseuseFirestore()包装器来显
2022-09-14
我无法通过VUE 3中的$插槽对象循环以使所有插槽从父母到孩子,$插槽对象在子组件中似乎是空的。我如何通过$插槽循环对象将所有父插槽传递给子零件?我在运行代码时会遇到此错误:TypeError:无法读取Null的属性(读取'键')这是关于我的沙盒问题,您可以取消第5行以查看完整的结果:bush-g7c9h?file =/src/pages/index.vuegithub示例:https://git
2022-02-09
我想使用双花括号表示法在我的 VueJS 应用中显示从 Axios 数据提取中检索到的数据。我认为这很简单。但是,用于访问我的数据对象属性的点表示法不起作用。知道为什么吗?分配给 Vue 实例的数据属性中的“usd”的数据对象等于:{ "code": "USD", "symbol": "$", "rate": "46,531.5152", "description": "United St
我尝试使用 JSON 对象获取 id:"object1":[{"name":"Station A","cycleTime":5,"object2":{"id":"60","time":032820200122}}],此对象正在 Visual Studio Code 上的 json 服务器中运行Vue.js 代码:<template><div><div v-for="object1 in stati
2021-03-28
我有一个 Vuex 存储,它将状态定义为 null:const state = {Product: null // I could do Product:[] but that causes a nested array of data};const getters = {getProduct: (state) => state.Product};const actions = {loadPro
我正在使用 Vue.js 和 laravel 5.8 创建评论系统。我想在博客文章页面 (show.blade.php) 中显示评论,但出现错误Error in render: "TypeError: Cannot read property 'user' of null"在我的 chrome vue dev 工具中,我可以获取对象,但无法显示评论。I want to retrieve and s
2019-10-08
代码如下所示:getSections () {if (!this.document) {return []}return Object.keys(this.document.Sections).filter(x => this.document.Sections[x])}this.document.Sections 是包含属性(也是对象)的对象。如何摆脱这个错误?
2019-06-20
我在 main.js 中添加了一组函数Vue.prototype.elantana = require("./shared/elantana.js").default;,因为我的应用程序都需要这些函数。访问这组函数非常简单。我将“this”对象作为参数传递以访问 vue 对象<div v-if="elantana.CheckPermission(this, 'fabrics@add_fabric'
2019-03-08
我想使用 vue js 和 laravel 在搜索结果中创建函数加载更多。这是我尝试的。我的表单代码用于搜索<form @submit.prevent="search"><input v-model="term" type="search"><button class="btn btn-success" type="submit">Search</button></form>这里显示搜索结果<tr
2019-01-03