我正在寻找如何在 vue js 中自动填充输入的解决方案。我有一个表格,其包括输入类型文本,选择下拉,数量等我的要被选择的选择下拉时,那么数量vCPU,vRAM以及Storage Capacity将被自动根据所选择的填充值Server Flavor。
我试过选择Flavor Server 的Flavor 1options,vCPU马上填4,vRAM填2,存储容量填10,但是数量没有出现。
但在价格估算中,数字是正确的,即 vCPU (4)、vRAM (2)、存储容量 (10)
我很困惑,把if条件中<base-quantity>的@updateQuantity自定义事件或v-if属性。这里有没有人可以帮我解决这个问题?
完整的源代码在这个codesandbox => https://codesandbox.io/s/suspicious-almeida-rjyy9
精简版
<template>
<div class="container">
<h2 class="font-size-26 txt-secondary">Deka Flexi</h2>
<div class="row">
<div class="col-12">
<form @submit.prevent="submitFormLite">
<div class="form-group form-group--border">
<label class="font-size-22 txt-secondary txt-semibold">Commitment Type</label>
<select name="commitment" id="" class="select-custom" v-model="selectedCommitTypeLite">
<option v-for="ctl in commitTypeLite" :key="ctl.name" :value="ctl.value">{{ ctl.name }}</option>
</select>
</div>
<div class="form-group form-group--border">
<label class="font-size-22 txt-secondary txt-semibold">Server Name</label> …Run Code Online (Sandbox Code Playgroud) 我正在使用谷歌分析进行增强的电子商务跟踪。我正在遵循 gtag.js 中的现有实现。我有 4 个结帐步骤,包括运输方式数据、付款方式数据、待付款和已付款(购买)。我已经为以下每个步骤编写了代码:
1. 运送方式
<script>
gtag('event', 'set_checkout_option', {
"checkout_step": 1,
"checkout_option": "shipping method",
"value": ""
});
</script>
Run Code Online (Sandbox Code Playgroud)
2. 付款方式
<script>
gtag('event', 'set_checkout_option', {
"checkout_step": 2,
"checkout_option": "payment method",
"value": ""
});
</script>
Run Code Online (Sandbox Code Playgroud)
3. 待付款
$("#order-now-action").on('click', function() {
gtag('event', 'set_checkout_option', {
"checkout_step": 3,
"checkout_option": "pending",
"id": ""
});
})
Run Code Online (Sandbox Code Playgroud)
这是结帐行为菜单中的报告。发货方式已记录,但为什么步骤2(付款方式)到步骤4(购买)没有记录?

步骤 1-3 位于 1 个页面中,而购买(步骤 4)是我在后端使用单个 url 进行的。是因为只有一页所以没有记录吗?
javascript google-analytics google-analytics-api measurement-protocol enhanced-ecommerce