小编Shi*_*ngh的帖子

如何在vue中动态加载组件

<template>
  <div>
    <v-container fluid id="main">
      <v-card class="white lighten-4 elevation-3">

        <li v-for="stop in stop_name_arr">
          {{stop}}
        </li>

        <direct_bus_travel_time_in_between_stops>
        </direct_bus_travel_time_in_between_stops>

        <direct_bus_travel_distance_in_between_stops>
        </direct_bus_travel_distance_in_between_stops>

      </v-card>
    </v-container>
  </div>
</template>
Run Code Online (Sandbox Code Playgroud)

我有两个组件direct_bus_travel_time_in_between_stops,并在完成执行direct_bus_travel_distance_in_between_stops后加载<li v-for="stop in stop_name_arr">{{stop}}</li>.

是否有任何方法可以在函数内动态附加组件以在需要加载时加载它?

vue.js vue-component vuejs2

7
推荐指数
1
解决办法
1万
查看次数

使用 vuetify 动态单击按钮时如何添加两个 v-text-fields

我如何在单击按钮时添加两个 v-text-fields,如果我需要更多 v-text-fields,我点击按钮,它会出现在我的内容中。我想类似这样

我希望你能明白。

<v-container fluid>
  <v-row align="center" >
   <v-col >
      <v-text-field color="info" v-model="new.name" label="Name" required></v-text-field>
   </v-col>
   <v-col>
     <v-select color="info" :items="arrResp"  v-model="new.idResp" label="Boss" required></v-select>
   </v-col>
 </v-row>
</v-container>
Run Code Online (Sandbox Code Playgroud)

感谢您的帮助。

javascript forms button vue.js vuetify.js

2
推荐指数
1
解决办法
2286
查看次数

标签 统计

vue.js ×2

button ×1

forms ×1

javascript ×1

vue-component ×1

vuejs2 ×1

vuetify.js ×1