最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

vue懸浮表單復(fù)合組件開(kāi)發(fā)詳解

 更新時(shí)間:2022年04月11日 15:34:45   作者:Cardhu丶  
這篇文章主要為大家詳細(xì)介紹了vue懸浮表單復(fù)合組件開(kāi)發(fā),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了vue懸浮表單復(fù)合組件開(kāi)發(fā)的具體代碼,供大家參考,具體內(nèi)容如下

組件樣式

組件功能

卡片形式展示篩選條件
點(diǎn)擊添加篩選后展示懸浮表單
表單內(nèi)完成條件選擇后點(diǎn)擊保存,新增一個(gè)卡片

開(kāi)發(fā)

<div class="form-label">篩選條件:</div>
<template v-for="(item, index) in fitter">
? <div :key="index" class="form-input-tab">
? ? <span :title="item">{{ item }}</span>
? ? <span @click="deleteTab(item)" class="form-input-close"><a-icon type="close" /></span>
? </div>
</template>
<a-popover
? trigger="click"
? placement="bottom"
? :visible="visible"
? @visibleChange="handleClickChange"
>
? <template slot="content">
? ? <div style="width: 420px; height: 220px; position: relative">
? ? ? <TipMes message="編輯篩選"></TipMes>
? ? ? <a-row>
? ? ? ? <a-col :span="12">
? ? ? ? ? <div class="select-title">字段</div>
? ? ? ? ? <a-select
? ? ? ? ? ? allowClear
? ? ? ? ? ? style="width: 189px"
? ? ? ? ? ? placeholder="請(qǐng)選擇字段"
? ? ? ? ? ? v-model="selectField"
? ? ? ? ? ? @change="getQueryConditions"
? ? ? ? ? >
? ? ? ? ? ? <a-select-option
? ? ? ? ? ? ? v-for="(item, index) in editField"
? ? ? ? ? ? ? :value="item.fieldName + '//' + item.fieldType"
? ? ? ? ? ? ? :key="index"
? ? ? ? ? ? ? >{{ item.fieldName }}</a-select-option
? ? ? ? ? ? >
? ? ? ? ? </a-select>
? ? ? ? </a-col>
? ? ? ? <a-col :span="12">
? ? ? ? ? <div class="select-title">運(yùn)算符</div>
? ? ? ? ? <a-select
? ? ? ? ? ? allowClear
? ? ? ? ? ? style="width: 189px"
? ? ? ? ? ? placeholder="請(qǐng)選擇運(yùn)算符"
? ? ? ? ? ? v-model="conditionName"
? ? ? ? ? >
? ? ? ? ? ? <a-select-option
? ? ? ? ? ? ? v-for="(item, index) in condition"
? ? ? ? ? ? ? :value="item.conditionName"
? ? ? ? ? ? ? :key="index"
? ? ? ? ? ? >
? ? ? ? ? ? ? {{ item.conditionDesc }}
? ? ? ? ? ? </a-select-option>
? ? ? ? ? </a-select>
? ? ? ? </a-col>
? ? ? </a-row>
? ? ? <div v-show="this.conditionName !== 'NotExists' && this.conditionName !== 'Exists'">
? ? ? ? <div class="select-title">值</div>
? ? ? ? <a-select
? ? ? ? ? allowClear
? ? ? ? ? style="width: 399px"
? ? ? ? ? placeholder="請(qǐng)選擇值"
? ? ? ? ? v-model="conditionContent"
? ? ? ? ? v-show="selectField && selectField.split('//')[1] === 'boolean'"
? ? ? ? >
? ? ? ? ? <a-select-option value="true" :key="0">true</a-select-option>
? ? ? ? ? <a-select-option value="false" :key="1">false</a-select-option>
? ? ? ? </a-select>
? ? ? ? <a-input
? ? ? ? ? allowClear
? ? ? ? ? v-model="conditionContent"
? ? ? ? ? style="width: 399px"
? ? ? ? ? placeholder="請(qǐng)輸入值"
? ? ? ? ? v-show="(selectField && selectField.split('//')[1] !== 'boolean') || !selectField"
? ? ? ? />
? ? ? </div>
? ? ? <div class="button-container">
? ? ? ? <a-button style="margin-right: 10px; width: 75px" @click="cancelSearch"
? ? ? ? ? >取消</a-button
? ? ? ? >
? ? ? ? <a-button type="primary" style="width: 75px" @click="saveSearch">保存</a-button>
? ? ? </div>
? ? </div>
? </template>
? <div class="add-text">
? ? <svg-icon class="add-svg" icon-class="topic-push" />
? ? <span style="margin-left: 22px">添加篩選</span>
? </div>
</a-popover>

JS:

//刪除篩選條件
deleteTab(item) {
? this.fitter.splice(this.fitter.indexOf(item), 1);
? this.queryParams.conditionDeatils.splice(
? ? this.queryParams.conditionDeatils.indexOf(item.split(':')[0]),
? ? 1
? );
? this.getSearchList();
},
//展示篩選框
handleClickChange(visible) {
? this.visible = visible;
},
//取消篩選條件的添加
cancelSearch() {
? this.visible = false;
? this.selectField = undefined;
? this.conditionName = undefined;
? this.conditionContent = undefined;
? this.condition = [];
},
//保存篩選條件
saveSearch() {},

CSS

.form-label {
? margin: 10px 0 15px 20px;
? display: inline-block;
? float: left;
? color: rgba(0, 0, 0, 0.85);
}
.form-input-tab {
? display: inline-block;
? float: left;
? height: 26px;
? margin: 10px 4px;
? padding: 0 5px 0 10px;
? line-height: 22px;
? color: #333333;
? border: 1px solid #c6d3e3;
? border-radius: 4px;
? cursor: default;
}
.form-input-close {
? color: #4f6785;
? cursor: pointer;
? margin-left: 1px;
? float: right;
}
.select-title {
? font-size: 14px;
? color: #333333;
? font-weight: 500;
? margin: 8px 0 6px 0;
}
.button-container {
? position: absolute;
? bottom: 10px;
? right: 20px;
}
.add-text {
? display: inline-block;
? position: relative;
? margin: 10px 0 15px 10px;
? color: #0f88ff;
? cursor: pointer;
}
.add-svg {
? width: 18px;
? height: 18px;
? position: absolute;
? top: 3px;
}

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • vite環(huán)境變量配置小結(jié)

    vite環(huán)境變量配置小結(jié)

    Vite環(huán)境變量配置是Vite開(kāi)發(fā)環(huán)境下重要的一環(huán),它能夠根據(jù)不同的環(huán)境變量對(duì)項(xiàng)目進(jìn)行不同的配置,使得項(xiàng)目更加靈活和可維護(hù),本文就來(lái)介紹一下vite環(huán)境變量配置小結(jié),感興趣的可以了解一下
    2023-11-11
  • vue+elementUI配置表格的列顯示與隱藏

    vue+elementUI配置表格的列顯示與隱藏

    這篇文章主要為大家詳細(xì)介紹了vue+elementUI配置表格的列顯示與隱藏,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2022-04-04
  • vue 組件數(shù)據(jù)加載解析順序的詳細(xì)代碼

    vue 組件數(shù)據(jù)加載解析順序的詳細(xì)代碼

    Vue.js的解析順序可以概括為:模板編譯、組件創(chuàng)建、數(shù)據(jù)渲染、事件處理和生命周期鉤子函數(shù)執(zhí)行,接下來(lái)通過(guò)本文給大家介紹vue 組件數(shù)據(jù)加載解析順序的完整代碼,感興趣的朋友跟隨小編一起看看吧
    2024-03-03
  • Vue3使用pinia進(jìn)行數(shù)據(jù)添加、修改和刪除的操作代碼

    Vue3使用pinia進(jìn)行數(shù)據(jù)添加、修改和刪除的操作代碼

    Pinia?是?Vue?3?的官方狀態(tài)管理庫(kù),旨在提供一種簡(jiǎn)單、靈活且類(lèi)型安全的狀態(tài)管理解決方案,Pinia?的設(shè)計(jì)理念與?Vuex?類(lèi)似,但更加輕量且易于使用,文旨在全面解析?Vue?3?中如何使用?Pinia?進(jìn)行數(shù)據(jù)的添加、修改和刪除,需要的朋友可以參考下
    2025-03-03
  • Vue修改項(xiàng)目啟動(dòng)端口號(hào)方法

    Vue修改項(xiàng)目啟動(dòng)端口號(hào)方法

    今天小編就為大家分享一篇Vue修改項(xiàng)目啟動(dòng)端口號(hào)方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2019-11-11
  • ant design vue嵌套表格及表格內(nèi)部編輯的用法說(shuō)明

    ant design vue嵌套表格及表格內(nèi)部編輯的用法說(shuō)明

    這篇文章主要介紹了ant design vue嵌套表格及表格內(nèi)部編輯的用法說(shuō)明,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2020-10-10
  • Vue.js第二天學(xué)習(xí)筆記(vue-router)

    Vue.js第二天學(xué)習(xí)筆記(vue-router)

    這篇文章主要為大家詳細(xì)介紹了Vue.js第二天的學(xué)習(xí)筆記,關(guān)于vue-router的使用方法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2016-12-12
  • Vue+Element實(shí)現(xiàn)網(wǎng)頁(yè)版?zhèn)€人簡(jiǎn)歷系統(tǒng)(推薦)

    Vue+Element實(shí)現(xiàn)網(wǎng)頁(yè)版?zhèn)€人簡(jiǎn)歷系統(tǒng)(推薦)

    這篇文章主要介紹了Vue+Element實(shí)現(xiàn)網(wǎng)頁(yè)版?zhèn)€人簡(jiǎn)歷系統(tǒng),需要的朋友可以參考下
    2019-12-12
  • vue打印功能實(shí)現(xiàn)的兩種方法總結(jié)

    vue打印功能實(shí)現(xiàn)的兩種方法總結(jié)

    在項(xiàng)目中,有時(shí)需要打印頁(yè)面的表格,所以下面這篇文章主要給大家介紹了關(guān)于vue打印功能實(shí)現(xiàn)的兩種方法,以及批量打印的完整代碼,需要的朋友可以參考下
    2021-06-06
  • @vue/cli4升級(jí)@vue/cli5?node.js?polyfills錯(cuò)誤的解決方式

    @vue/cli4升級(jí)@vue/cli5?node.js?polyfills錯(cuò)誤的解決方式

    最近在升級(jí)vue/cli的具有了一些問(wèn)題,解決問(wèn)題的過(guò)程也花費(fèi)了些時(shí)間,所以下面這篇文章主要給大家介紹了關(guān)于@vue/cli4升級(jí)@vue/cli5?node.js?polyfills錯(cuò)誤的解決方式,需要的朋友可以參考下
    2022-09-09

最新評(píng)論

庆阳市| 延边| 通河县| 调兵山市| 卢龙县| 云浮市| 图们市| 金门县| 剑川县| 阜平县| 临西县| 肥西县| 潢川县| 左贡县| 兴业县| 安塞县| 衡阳市| 沐川县| 拉萨市| 汝阳县| 娄底市| 西乌珠穆沁旗| 加查县| 绥江县| 郸城县| 石台县| 天气| 彝良县| 响水县| 白山市| 信丰县| 靖州| 桑植县| 外汇| 蒙阴县| 监利县| 星座| 漳平市| 高淳县| 渝中区| 龙游县|