欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

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

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

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

組件樣式

組件功能

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

開發(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)文章

  • VUE實(shí)現(xiàn)自身整體組件銷毀的示例代碼

    VUE實(shí)現(xiàn)自身整體組件銷毀的示例代碼

    這篇文章主要介紹了VUE實(shí)現(xiàn)自身整體組件銷毀的示例代碼,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2020-01-01
  • vue-devtools?開發(fā)工具插件之支持vue3?chrome?瀏覽器插件

    vue-devtools?開發(fā)工具插件之支持vue3?chrome?瀏覽器插件

    這篇文章主要介紹了vue-devtools?開發(fā)工具插件之支持vue3?chrome?瀏覽器插件,用這個(gè)版本主要是為了支持vue3?推薦直接下載,文中給大家提供了下載地址,感興趣的朋友跟隨小編一起看看吧
    2022-01-01
  • vue2.0 自定義組件的方法(vue組件的封裝)

    vue2.0 自定義組件的方法(vue組件的封裝)

    這篇文章主要介紹了vue2.0 自定義組件的方法(vue組件的封裝),本文通過實(shí)例代碼相結(jié)合的形式給大家介紹的非常詳細(xì),需要的朋友可以參考下
    2018-06-06
  • vue3 watch和watchEffect的使用以及有哪些區(qū)別

    vue3 watch和watchEffect的使用以及有哪些區(qū)別

    這篇文章主要介紹了vue3 watch和watchEffect的使用以及有哪些區(qū)別,幫助大家更好的理解和學(xué)習(xí)vue框架,感興趣的朋友可以了解下
    2021-01-01
  • 淺談Vue 函數(shù)式組件的使用技巧

    淺談Vue 函數(shù)式組件的使用技巧

    這篇文章主要介紹了淺談Vue 函數(shù)式組件的使用技巧,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2020-06-06
  • vue中監(jiān)聽scroll事件失效的問題及解決

    vue中監(jiān)聽scroll事件失效的問題及解決

    這篇文章主要介紹了vue中監(jiān)聽scroll事件失效的問題及解決,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2022-09-09
  • vue3不同語法格式對(duì)比的實(shí)例代碼

    vue3不同語法格式對(duì)比的實(shí)例代碼

    vue3發(fā)布已有一段時(shí)間了,文檔也大概看了一下,不過對(duì)于學(xué)一門技術(shù),最好的方法還是實(shí)戰(zhàn),這篇文章主要給大家介紹了關(guān)于vue3不同語法格式對(duì)比的相關(guān)資料,需要的朋友可以參考下
    2021-08-08
  • 解決vue-cli中stylus無法使用的問題方法

    解決vue-cli中stylus無法使用的問題方法

    這篇文章主要介紹了解決vue-cli中stylus無法使用的問題方法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-06-06
  • vue ssr 指南詳讀

    vue ssr 指南詳讀

    這篇文章主要介紹了vue ssr 指南詳讀,詳細(xì)的介紹了什么是SSR以及如何使用,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2018-06-06
  • vue-cli項(xiàng)目使用mock數(shù)據(jù)的方法(借助express)

    vue-cli項(xiàng)目使用mock數(shù)據(jù)的方法(借助express)

    現(xiàn)如今前后端分離開發(fā)越來越普遍,前端人員寫好頁面后可以自己模擬一些數(shù)據(jù)進(jìn)行代碼測(cè)試,這樣就不必等后端接口,提高了我們開發(fā)效率。今天就來分析下前端常用的mock數(shù)據(jù)的方式是如何實(shí)現(xiàn)的,需要的朋友可以參考下
    2019-04-04

最新評(píng)論