91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

vue遍歷對象中的數組取值示例

發布時間:2020-09-10 13:05:01 來源:腳本之家 閱讀:275 作者:Deamy8023 欄目:web開發

前幾天小項目,沒考慮周全,讓后端改接口,改成數組中包含對象中包含數組的形式,后來越琢磨越不對,后臺把所有數據放在了一個對象里,我拿彈窗數據不好拿,索性又改了回來,把后端折騰夠嗆,自己也折騰夠嗆,發上來,以示警戒

改前拿數據

<div class='your-container'>
		<div class="sortText">
			<div>綜合排序</div>
			<div class="sortHot" @click="mostHot"><p>最熱</p><div class="sortImg"><img src="../../assets/imgs/mosthot.png" alt=""></div></div>
			<div class="sortHot" @click="mostNew"><p>最新</p><div class="sortImg"><img src="../../assets/imgs/mostview.png" alt=""></div></div>
			<div class="adhibition" @click="adhibition(0)">應用</div>
			<div class="adhibition" @click="adhibition(1)">算法</div>
		</div>
		<!-- bind your configurations -->
		<vue-scroll :ops="ops">
					<div class='your-content'>
							<ul class="listBox" @handle-resize="handleResize">
								<li v-for="(item,index) in list" :key="index" class="lis">
										<div class="listIcon">
											<img src="../../assets/imgs/jicon.png" alt="">
										</div>
										<div class="listText">
											<div class="names">{{item.ename}}</div>
											<div class="introduce">
												{{item.introduce}}
												<div class="details" @click="detailsClick">詳情</div>
											</div>
											<div class="spans" v-for='(value,key,idx) in item' :key='idx'>
												<p v-if='Object.prototype.toString.call(value).slice(8,-1) == "Array"'><span>{{value[0]}}:</span><span class="lastname">{{value[1]}}</span></p>
											</div>
											<div class="lineBox">
												<div class="lineoneBox"><img src="../../assets/imgs/line1.png" alt=""></div>
												<div class="whiteBox"></div>
											</div>
										</div>
								</li>
							</ul>
						</div>
  </vue-scroll>
				<detailsPopUp @manage="manshow" v-if="manageshow"/>
 </div>

改后

<div class='your-container'>
		<div class="sortText">
			<div>綜合排序</div>
			<div class="sortHot" @click="mostHot"><p>最熱</p><div class="sortImg"><img src="../../assets/imgs/mosthot.png" alt=""></div></div>
			<div class="sortHot" @click="mostNew"><p>最新</p><div class="sortImg"><img src="../../assets/imgs/mostview.png" alt=""></div></div>
			<div class="adhibition" @click="adhibition(0)">應用</div>
			<div class="adhibition" @click="adhibition(1)">算法</div>
		</div>
		<!-- bind your configurations -->
		<vue-scroll :ops="ops">
					<div class='your-content'>
							<ul class="listBox" @handle-resize="handleResize">
								<li v-for="(item,index) in list" :key="index" class="lis">
										<div class="listIcon">
											<img src="../../assets/imgs/jicon.png" alt="">
										</div>
										<div class="listText">
											<div class="names">{{item.ename}}</div>
											<div class="introduce">
												{{item.introduce}}
												<div class="details" @click="detailsClick(item.version,item.trade,item.interfaceClassName)">詳情</div>
											</div>
											<div class="spans" >
												<p><span>提供廠商:</span><span class="lastname">{{item.manufacturerName}}</span></p>
												<p v-show="item.type==0"><span>使用總次數:</span><span class="lastname">{{item.totalCount}}</span></p>
												<p v-show="item.type==0"><span>安裝時間:</span><span class="lastname">{{item.createTime}}</span></p>
												<p v-show="item.type==1"><span>平均響應時間:</span><span class="lastname">{{item.avgResponseTime}}</span></p>
												<p v-show="item.type==1"><span>準確率:</span><span class="lastname">{{item.accuracyRate}}%</span></p>
												<p v-show="item.type==0"><span>占用內存:</span><span class="lastname">{{item.memory}}</span></p>
											</div>
											<div class="lineBox">
												<div class="lineoneBox"><img src="../../assets/imgs/line1.png" alt=""></div>
												<div class="whiteBox"></div>
											</div>
										</div>
								</li>
							</ul>
						</div>
  </vue-scroll>
				<detailsPopUp @manage="manshow" v-if="manageshow" :scrollDataverson="detailsverson" :scrollDatatrade="detailstrade" :scrollDatainterfaceClassName="detailsinterfaceClassName"/>
 </div>

以上這篇vue遍歷對象中的數組取值示例就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持億速云。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

福安市| 莆田市| 阿巴嘎旗| 册亨县| 温宿县| 安宁市| 延长县| 什邡市| 云和县| 龙泉市| 广灵县| 皋兰县| 崇州市| 辛集市| 澄迈县| 灯塔市| 松溪县| 岳池县| 灵台县| 鄂伦春自治旗| 炉霍县| 祁东县| 汉阴县| 太仓市| 宣恩县| 内乡县| 怀化市| 阿鲁科尔沁旗| 长治县| 峨眉山市| 郸城县| 滦平县| 军事| 广东省| 灵石县| 昂仁县| 咸宁市| 平安县| 卫辉市| 桑日县| 光山县|