vuejs
を使用して小さなアプリケーションを構築しています。ここでは、データを取得するためにURLを呼び出しています。私はそれを表示する前にデータを操作する必要があります。応答では、私はフィールドvuejsのデータを操作する方法
client_name: "ABCD Company"
event_type: 3
type: "meeting"
venue: "Mumbai"
with_client: 1
を持っている要素の配列を受けていますまた、私はこのようになりますEVENT_TYPEのデータセットがあります。
events: [
{value: 1, label: "One-on-One meeting"},
{value: 2, label: "Group meeting"},
{value: 3, label: "Broker Roadshow"},
{value: 4, label: "Broker Conference"},
{value: 5, label: "Site Visit"},
{value: 6, label: "Only Management Meet"},
{value: 7, label: "Only IR Meeting"}
],
とwith_client
がtrue
またはfalse
です。
だから、基本的には私の最終的なデータは次のようなもののようになります。
client_name: "ABCD Company",
event_type: "Broker Roadshow",
type: "meeting",
venue: "Mumbai",
with_client: "yes"
現在、私はこのようになりますv-for
ループを持っている:
<tr v-for="(item, index) in meeting_data">
<td class="text-center">{{ index+1 }}</td>
<td class="text-center">{{ item.client_names }}</td>
<td class="text-center">{{ item.type }}</td>
<td class="text-center">{{ item.event_type }}</td>
<td class="text-center">{{ item.with_client }}</td>
<td class="text-center">{{ item.schedule }}</td>
<td class="text-center"><router-link :to="{name: 'interaction-update', params: {id: item.id}}"><i class="fa fa-pencil-square-o text-navy"></i></router-link></td>
<td class="text-center"><a @click.prevent="deleteInteraction(item.id)"><i class="fa fa-trash-o text-navy"></i></a></td>
</tr>
計算された値を使用します。 – Bert
しかし、私は変数のような応答データを取っています: 'モデル:{}'どのように私は計算を呼び出すことができますか? –
小さな実例を教えてもらえますか?または実際のデータですか? Vueコードで正しくフォーマットされています。 – Bert