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

溫馨提示×

溫馨提示×

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

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

vue中怎么使用el-popover

發布時間:2023-04-12 17:49:51 來源:億速云 閱讀:310 作者:iii 欄目:開發技術

本文小編為大家詳細介紹“vue中怎么使用el-popover”,內容詳細,步驟清晰,細節處理妥當,希望這篇“vue中怎么使用el-popover”文章能幫助大家解決疑惑,下面跟著小編的思路慢慢深入,一起來學習新知識吧。

關于el-popover的使用

trigger屬性用于設置何時觸發 Popover,支持四種觸發方式:hover,click,focus 和 manual。

對于觸發 Popover 的元素,有兩種寫法:使用 slot="reference" 的具名插槽,或使用自定義指令v-popover指向 Popover 的索引ref。

<template>
    <div class="listcontent">
      <el-row v-for="(item,index) in datalist" :key="index">
        <el-popover
          placement="right"
          trigger="hover"
        >
            <div class="popup" >
                <h4>{{item.industryName}}</h4>
                <el-row v-for="(zxSysIndustryChildren,cindex) in item.zxSysIndustryChildren" :key="cindex" > 
                    <el-col :span="6" >
                        {{zxSysIndustryChildren.occupationName}}
                    </el-col>
                    <el-col :span="18"  >
                        <el-radio-group v-model="radio" v-for="(zxSysPositionChildren,tindex) in zxSysIndustryChildren.zxSysPositionChildren" :key="tindex">
                            <el-radio-button>{{zxSysPositionChildren.positionName}}</el-radio-button>
                        </el-radio-group>
                    </el-col>
                </el-row>
            </div>
            <el-button type="primary" plain slot="reference" >
                <b>{{item.industryName}}</b>
                <span class="textname" v-for="(zxSysPositionArrayHot,cindex) in item.zxSysPositionArrayHot" :key="cindex">{{zxSysPositionArrayHot.positionName}}</span>
            </el-button>
        </el-popover>
      </el-row>
      <div class="checkmore">
          <el-button type="text" plain>
            顯示全部職位
          </el-button>
      </div>
    </div>
</template>
 
<script>
  export default {
      data() {
        return {
            radio:'',
            datalist:[],
            datalist1:[],
            companynum:7,
        };
      },
      mounted() {
        this.queryZxSysIndustryTree();
      },
      methods: {
        loadmoreCompany(){
          if(this.datalist1.length>=this.companynum){
            this.datalist = this.datalist1.slice(0,this.companynum);
          }
        },
        handleSelect(key, keyPath) {
          this.queryZxSysIndustryTree();
        },
        queryZxSysIndustryTree(){
          //三級聯查
          this.$busapi.zxSysIndustry.zxSysIndustryTree().then((res) => {
                        if (res.code == "0000") {
                          this.datalist1 = res.data
                          this.datalist = res.data.slice(0,this.companynum);
                       } else {
                          this.$message({message: '錯誤原因:' + res.msg, type: 'error'})
                      }
           }).catch((res) => {
              this.$message({message: res.msg, type: 'error'});
          });
        },
      }
 
    };
</script>
 
<style rel="stylesheet/scss" lang="scss" scoped="scoped">
        .listcontent{
            ::v-deep.el-popover__reference-wrapper{
                color: red;
                border-radius: 5px;
                .el-button--primary.is-plain{
                    width: 100%;
                    height: 48px;
                    color: #515151;
                    border-radius: 0px;
                    border: 0rem;
                    background-color: #fff;
                    b{
                        font-size: 16px;
                        color: #000000;
                    }
                    span.textname{
                        font-size: 14px;
                        display: inline-block;
                        margin-left: 20px;
                    }
                }
                .el-button--primary.is-plain:active, .el-button.is-plain:focus, .el-button.is-plain:hover{
                    color: #fff;
                    background-color: $frontNormalColor;
                    b{
                        color: #fff;
                    }
                }
                
            }
            
            .checkmore{
                background-color: #fff;
                border-bottom-left-radius: 8px;
                border-bottom-right-radius: 8px;
                border-top: 1px solid #E4E4E4;
                .el-button{
                    margin-left: 20px;
                    height: 48px;
                    font-size: 16px;
                }
            }
            
        }
    .el-popover{
        color: red;
        h4{
            // margin-bottom: 15px;
        }
        .popup{
            line-height: 2.4375rem;
			::v-deep.el-radio-button__inner{
				border: 0px;
				padding: 12px 16px;
			}
      ::v-deep.el-radio-button:first-child .el-radio-button__inner{
        border-radius: 0px;
      }
      ::v-deep.el-radio-button:last-child .el-radio-button__inner{
        border-radius: 0px;
      }
        }
		
    }
    
</style>

vue點擊關閉el-popover

<el-popover  ref="popover"
                              placement="bottom"  trigger="click" >
                          <div>
                              <el-form     label-width="90px" size="small" :model="formInline">
 
                                  <el-form-item label="數據名稱:">
                                      <el-input v-model="formInline.text"></el-input>
                                  </el-form-item>
 
                                  <el-form-item label="創建人:">
                                      <el-input v-model="formInline.creator"></el-input>
                                  </el-form-item>
 
                                  <el-form-item label="數據類型:">
                                      <el-select v-model="formInline.type" placeholder="請選擇">
                                          <el-option label="請選擇" value />
                                          <el-option  v-for="types in dataTypes" :key="types.id" :value="types.code" v-text="types.name" :label="types.name"/>
 
                                      </el-select>
                                  </el-form-item>
 
 
                                  <el-form-item label="創建時間:">
                                      <el-date-picker
                                              v-model="formInline.timerange"
                                              type="daterange"
                                              range-separator="至"
                                              value-format="yyyy-MM-dd HH:mm:ss"
                                              start-placeholder="開始日期"
                                              end-placeholder="結束日期"
                                      ></el-date-picker>
                                  </el-form-item>
 
                              </el-form>
                              <span slot="footer"  >
                                   <el-button @click="cancel()">取 消</el-button>
                            <el-button @click="resetQuery()">重 置</el-button>
                            <el-button @click="search()" >查 詢</el-button>
                            </span>
                          </div>
 
                          <el-button slot="reference" icon="el-icon-search"  size="middle" >高級查詢</el-button>
                      </el-popover>

方法里面:

            /*取消*/
            cancel(){
                this.$refs.popover.showPopper = false;
            }

讀到這里,這篇“vue中怎么使用el-popover”文章已經介紹完畢,想要掌握這篇文章的知識點還需要大家自己動手實踐使用過才能領會,如果想了解更多相關內容的文章,歡迎關注億速云行業資訊頻道。

向AI問一下細節

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

AI

恩施市| 文登市| 泸定县| 板桥市| 汶上县| 灌云县| 昭苏县| 房产| 武山县| 湘阴县| 云霄县| 桑日县| 石台县| 长沙县| 大荔县| 伊金霍洛旗| 古田县| 石林| 萝北县| 荥经县| 德令哈市| 怀仁县| 汕尾市| 华亭县| 施甸县| 雅江县| 安阳市| 渑池县| 齐齐哈尔市| 稻城县| 诸暨市| 双城市| 贡嘎县| 乐平市| 开远市| 金华市| 宜君县| 方正县| 合川市| 峡江县| 格尔木市|