将变量从调用它的父页面传递给 Vue 组件 [英] Passing a variable to a Vue component from the parent page that called it

查看:28
本文介绍了将变量从调用它的父页面传递给 Vue 组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的表格来显示我的所有数据:

主文件.php

<头><tr><th>{{ __('Job Name') }}</th><th>{{ __('Job Description') }}</th><th>{{ __('Job Status') }}</th><th>{{ __('Job Applications') }}</th></tr><tr><td></td><td></td><td></td><td class="non_searchable"></td><td class="non_searchable"></td></tr></thead>
{{ __('Manage') }}
<div id="应用程序"><div id="editJob" class="modal淡入" role="dialog"><div class="modal-dialog"><!-- 模态内容--><div class="modal-content"><edit-job id=""></edit-job>

现在,我有一个编辑按钮,我正在尝试为该特定行打开一个编辑模式:

<a href='' data-id='{$job->id}' class='btn btn-xs btn-danger' data-toggle='modal' data-target='#editJob'><i class='fa fa-close'></i></a>";

href 是我的数据表之一中的位置,我试图将其传递给我的 .vue 文件,以便我可以将其用于获取和发布请求:

myfile.vue