vue-el-steps 使用2[代碼示例]

效果圖

代碼

element代碼

<template>

? ? <div class="app-container">

? ? ? <el-form :model="queryForm" ?size="small" :inline="true">

? ? ? ? <el-form-item label="內容狀態">

? ? ? ? ? ? <el-button-group>

? ? ? ? ? ? ? ? <el-button type="primary">全部</el-button>

? ? ? ? ? ? ? ? <el-button type="primary">通過</el-button>

? ? ? ? ? ? ? ? <el-button type="primary">待審核</el-button>

? ? ? ? ? ? ? ? <el-button type="primary">待支付</el-button>

? ? ? ? ? ? ? ? <el-button type="primary">拒絕</el-button>

? ? ? ? ? ? ? ? <el-button type="primary">已下架</el-button>

? ? ? ? ? ? </el-button-group>

? ? ? ? </el-form-item>

? ? ? ? <el-form-item>

? ? ? ? ? <el-button type="primary" icon="el-icon-plus" @click="handleAddInfoReleas">新增發布</el-button>

? ? ? ? </el-form-item>

? ? ? </el-form>

? ? ? <el-table

? ? ? ? v-loading="loadingInfos"

? ? ? ? :data="infoReleasData">

? ? ? ? <el-table-column prop="orderNum" label="id" width="100"></el-table-column>

? ? ? ? <el-table-column prop="orderNum" label="標題" width="100"></el-table-column>

? ? ? ? <el-table-column prop="orderNum" label="圖片" ></el-table-column>

? ? ? ? <el-table-column prop="orderNum" label="內容" width="100"></el-table-column>

? ? ? ? <el-table-column prop="orderNum" label="分類" width="100"></el-table-column>

? ? ? ? <el-table-column prop="orderNum" label="發布人" width="100"></el-table-column>

? ? ? ? <el-table-column prop="orderNum" label="置頂類型" width="100"></el-table-column>

? ? ? ? <el-table-column prop="orderNum" label="發布時間" width="100"></el-table-column>

? ? ? ? <el-table-column prop="orderNum" label="刷新時間" width="100"></el-table-column>

? ? ? ? <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">

? ? ? ? ? ? <template slot-scope="scope">

? ? ? ? ? ? ? ? <el-button

? ? ? ? ? ? ? ? ? ? size="mini"

? ? ? ? ? ? ? ? ? ? type="text"

? ? ? ? ? ? ? ? ? ? icon="el-icon-edit"

? ? ? ? ? ? ? ? ? ? >通過

? ? ? ? ? ? ? ? </el-button>

? ? ? ? ? ? ? ? <el-button

? ? ? ? ? ? ? ? ? ? size="mini"

? ? ? ? ? ? ? ? ? ? type="text"

? ? ? ? ? ? ? ? ? ? icon="el-icon-search"

? ? ? ? ? ? ? ? ? ? >拒絕

? ? ? ? ? ? ? ? </el-button>

? ? ? ? ? ? ? ? <el-button

? ? ? ? ? ? ? ? ? ? size="mini"

? ? ? ? ? ? ? ? ? ? type="text"

? ? ? ? ? ? ? ? ? ? icon="el-icon-delete"

? ? ? ? ? ? ? ? ? ? >刪除

? ? ? ? ? ? ? ? </el-button>

? ? ? ? ? ? ? ? <el-button

? ? ? ? ? ? ? ? ? ? size="mini"

? ? ? ? ? ? ? ? ? ? type="text"

? ? ? ? ? ? ? ? ? ? icon="el-icon-edit"

? ? ? ? ? ? ? ? ? ? >查看

? ? ? ? ? ? ? ? </el-button>

? ? ? ? ? ? ? ? <el-button

? ? ? ? ? ? ? ? ? ? size="mini"

? ? ? ? ? ? ? ? ? ? type="text"

? ? ? ? ? ? ? ? ? ? icon="el-icon-search"

? ? ? ? ? ? ? ? ? ? >編輯

? ? ? ? ? ? ? ? </el-button>

? ? ? ? ? ? ? ? <el-button

? ? ? ? ? ? ? ? ? ? size="mini"

? ? ? ? ? ? ? ? ? ? type="text"

? ? ? ? ? ? ? ? ? ? icon="el-icon-delete"

? ? ? ? ? ? ? ? ? ? >刷新

? ? ? ? ? ? ? ? </el-button>

? ? ? ? ? ? ? ? <el-button

? ? ? ? ? ? ? ? ? ? size="mini"

? ? ? ? ? ? ? ? ? ? type="text"

? ? ? ? ? ? ? ? ? ? icon="el-icon-edit"

? ? ? ? ? ? ? ? ? ? >更換分類

? ? ? ? ? ? ? ? </el-button>

? ? ? ? ? ? ? ? <el-button

? ? ? ? ? ? ? ? ? ? size="mini"

? ? ? ? ? ? ? ? ? ? type="text"

? ? ? ? ? ? ? ? ? ? icon="el-icon-search"

? ? ? ? ? ? ? ? ? ? >上架

? ? ? ? ? ? ? ? </el-button>

? ? ? ? ? </template>

? ? ? ? </el-table-column>

? ? ? </el-table>

? ? ? <!--增加用戶-->

? ? ? <el-dialog :title="dialogTitle" :visible.sync="visbleOpen" width="600px" ?class="aboutDialog">

? ? ? ? <el-steps :active="active" finish-status="success" simple style="margin-top: 20px">

? ? ? ? ? ? <el-step title="選擇分類"></el-step>

? ? ? ? ? ? <el-step title="填寫信息"></el-step>

? ? ? ? ? ? <el-step title="完成發布"></el-step>

? ? ? ? </el-steps>

? ? ? ? <el-form :model="releasForm" :rules="rulesReleas" style="margin-top: 10px;">

? ? ? ? ? ? <el-form-item label="" label-width="120px" prop="name" v-if="active == 0 ">

? ? ? ? ? ? ? ? <el-radio v-model="releasForm.type" label="1" border style="margin-top: 10px;margin-left: 0px;">房屋租售</el-radio>

? ? ? ? ? ? ? ? <el-radio v-model="releasForm.type" label="2" border style="margin-top: 10px;margin-left: 0px;">請求廣告</el-radio>

? ? ? ? ? ? ? ? <el-radio v-model="releasForm.type" label="3" border style="margin-top: 10px;margin-left: 0px;">房屋租售</el-radio>

? ? ? ? ? ? ? ? <el-radio v-model="releasForm.type" label="4" border style="margin-top: 10px;margin-left: 0px;">請求廣告</el-radio>

? ? ? ? ? ? </el-form-item>

? ? ? ? ? ? <el-form-item label="區域" label-width="120px" prop="name" v-if="active == 1 ">

? ? ? ? ? ? ? ? <el-select v-model="releasForm.value" placeholder="請選擇">

? ? ? ? ? ? ? ? </el-select>

? ? ? ? ? ? </el-form-item>

? ? ? ? ? ? <el-form-item label="圖片" label-width="120px" prop="name" v-if="active == 1 ">

? ? ? ? ? ? ? ? <ImageUpload></ImageUpload>

? ? ? ? ? ? </el-form-item>

? ? ? ? ? ? <el-form-item label="詳情描述" label-width="120px" prop="name" v-if="active == 1 ">

? ? ? ? ? ? ? ? <el-input type="textarea" v-model="releasForm.desc"></el-input>

? ? ? ? ? ? </el-form-item>

? ? ? ? ? ? <el-form-item label="標簽" label-width="120px" prop="name" v-if="active == 1 ">

? ? ? ? ? ? ? ? <span

? ? ? ? ? ? ? ? ? ? :class="[item.beal==true?'p_yx_span span_active ':'span p_yx']"

? ? ? ? ? ? ? ? ? ? @click="onTagSelect(index)"

? ? ? ? ? ? ? ? ? ? v-for="(item,index) in tagList"

? ? ? ? ? ? ? ? ? ? :key="index"

? ? ? ? ? ? ? ? ? ? >{{item.name}}

? ? ? ? ? ? ? ? </span>

? ? ? ? ? ? </el-form-item>

? ? ? ? ? ? <el-form-item label="聯系人" label-width="120px" prop="name" v-if="active == 1 ">

? ? ? ? ? ? ? ? <el-input v-model="releasForm.value" placeholder="請輸入內容"></el-input>

? ? ? ? ? ? </el-form-item>

? ? ? ? ? ? <el-form-item label="聯系電話" label-width="120px" prop="name" v-if="active == 1 ">

? ? ? ? ? ? ? ? <el-input v-model="releasForm.value" placeholder="請輸入內容"></el-input>

? ? ? ? ? ? </el-form-item>

? ? ? ? ? ? <el-form-item label="發布時間" label-width="120px" prop="name" v-if="active == 1 ">

? ? ? ? ? ? ? ? <el-date-picker

? ? ? ? ? ? ? ? ? ? v-model="releasForm.value"

? ? ? ? ? ? ? ? ? ? type="date"

? ? ? ? ? ? ? ? ? ? placeholder="選擇日期">

? ? ? ? ? ? ? ? </el-date-picker>

? ? ? ? ? ? </el-form-item>

? ? ? ? </el-form>

? ? ? ? <div slot="footer" class="dialog-footer">

? ? ? ? ? ? <el-button @click="visbleOpen = false" type="primary" round>取 消</el-button>

? ? ? ? ? ? <el-button style="margin-top: 12px;" @click="upBtn" v-if=" active > 0 && active<=1" type="primary" round>上一步</el-button>

? ? ? ? ? ? <el-button style="margin-top: 12px;" @click="nextBtn" v-if="active < 1 " type="primary" round>下一步</el-button>

? ? ? ? ? ? <el-button style="margin-top: 12px;" @click="nextBtn" v-if="active == 1 " type="primary" round>保 存</el-button>

? ? ? ? </div>

? ? ?</el-dialog>

? ? </div>

? </template>

js代碼

? <script>

? export default {

? ? name: "InfoReleas",

? ? data() {

? ? ? return {

? ? ? ? loadingInfos:false,

? ? ? ? infoReleasData:[],

? ? ? ? queryForm:{},

? ? ? ? // 對話框

? ? ? ? dialogTitle:"",

? ? ? ? visbleOpen:false,

? ? ? ? releasForm:{

? ? ? ? ? ? tagSelect:[]

? ? ? ? },

? ? ? ? rulesReleas:{},

? ? ? ? // 進度條

? ? ? ? active: 0,

? ? ? ? // 標簽值

? ? ? ? tagList:[

? ? ? ? ? ? {id: 1, name: 'tag 1',beal:false},

? ? ? ? ? ? {id: 2, name: 'tag 2',beal:false},

? ? ? ? ? ? {id: 3, name: 'tag 3',beal:false},

? ? ? ? ? ? {id: 4, name: 'tag 4',beal:false},

? ? ? ? ? ? {id: 5, name: 'tag 5',beal:false},

? ? ? ? ? ? {id: 6, name: 'tag 6',beal:false}

? ? ? ? ],

? ? ? ?// 標簽選中值

? ? ? ? tagChooseData:[],

? ? ? };

? ? },

? ? created() {

? ? },

? ? methods: {

? ? ? ? handleAddInfoReleas(){

? ? ? ? ? ? this.dialogTitle="新增發布";

? ? ? ? ? ? this.visbleOpen=true;

? ? ? ? },

? ? ? ? // 上一步

? ? ? ? upBtn(){

? ? ? ? ? ? if (this.active-- > 2) this.active = 0;

? ? ? ? },

? ? ? ? // 下一步

? ? ? ? nextBtn(){

? ? ? ? ? ? if (this.active++ > 2) this.active = 0;

? ? ? ? ? ? console.log(this.active);

? ? ? ? },

? ? ? ? // 標簽選擇

? ? ? ? onTagSelect(e){

? ? ? ? ? ? this.tagList[e].beal = !this.tagList[e].beal; ?//點擊后改變狀態

? ? ? ? ? ? if (this.tagList[e].beal == true) {

? ? ? ? ? ? ? ? this.tagChooseData.push(this.tagList[e].name); ? //如果點擊后是true那么直接添加

? ? ? ? ? ? } else {

? ? ? ? ? ? ? ? //如果不是true的話說明這個標簽已經存在了,那么就要查找然后刪除

? ? ? ? ? ? ? ? var index = this.tagChooseData.map(item => item).indexOf(this.tagList[e].name);

? ? ? ? ? ? ? ? if (index != -1) {

? ? ? ? ? ? ? ? this.tagChooseData.splice(index, 1);

? ? ? ? ? ? ? ? }

? ? ? ? ? ? }

? ? ? ? }

? ? }

? };

? </script>

演示

? <style scoped>

? </style>

? <style>

? .limited-width {

? ? width: 200px; /* 設置寬度為200像素 */

? }

.span {

? display: inline-block;

? padding: 0 10px;

? height: 20px;

? line-height: 20px;

? background: rgba(255, 255, 255, 1);

? box-shadow: 0px 1px 4px 0px rgba(141, 141, 141, 0.3);

? border-radius: 4px;

? font-size: 12px;

? font-family: Microsoft YaHei;

? font-weight: 400;

? color: rgba(34, 34, 34, 1);

? margin-left: 10px;

? cursor: pointer;

? min-width: 44px;

? text-align: center;

}

.span_active {

? background: rgba(236, 173, 64, 1);

? color: #fff;

}

.p_yx {

? color: #222;

}

.p_yx_span {

? display: inline-block;

? padding: 0 10px;

? height: 20px;

? line-height: 20px;

? background: rgb(76, 96, 193);

? box-shadow: 0px 1px 4px 0px rgba(141, 141, 141, 0.3);

? border-radius: 4px;

? font-size: 12px;

? font-family: Microsoft YaHei;

? font-weight: 400;

? color: rgba(34, 34, 34, 1);

? margin-left: 10px;

? cursor: pointer;

? min-width: 44px;

? text-align: center;

}

? </style>

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/20521.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/20521.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/20521.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Docker 容器中運行Certbot獲取和管理 SSL 證書

如果你在 Docker 容器中運行 Nginx 并希望使用 Certbot 獲取和管理 SSL 證書&#xff0c;可以使用 Certbot 的官方 Docker 鏡像來完成這項工作。以下是使用 Docker 和 Certbot 獲取 SSL 證書并配置 Nginx 的詳細步驟&#xff1a; 1. 拉取 Certbot Docker 鏡像 首先&#xff0…

window下C語言程序報錯

Thread 1 received signal SIGSEGV, Segmentation fault. ___chkstk_ms () at ../../../../../src/gcc-8.1.0/libgcc/config/i386/cygwin.S:126 126 ../../../../../src/gcc-8.1.0/libgcc/config/i386/cygwin.S: No such file or directory. 參考&#xff1a;不同平臺下對…

代碼隨想錄訓練營Day 46|力扣完全背包、518. 零錢兌換 II、377. 組合總和 Ⅳ

1.完全背包 視頻講解&#xff1a;帶你學透完全背包問題&#xff01; 和 01背包有什么差別&#xff1f;遍歷順序上有什么講究&#xff1f;_嗶哩嗶哩_bilibili https://programmercarl.com/%E8%83%8C%E5%8C%85%E9%97%AE%E9%A2%98%E7%90%86%E8%AE%BA%E5%9F%BA%E7%A1%80%E5%AE%8C%E…

as keyof GlobalStore

解釋 as keyof GlobalStore 在 TypeScript 中&#xff0c;as keyof GlobalStore 是一種類型斷言語法。它告訴 TypeScript&#xff0c;返回的值是一個特定類型的值&#xff0c;這里是 GlobalStore 類型的鍵。這在編譯時有助于確保類型安全。 關鍵點&#xff1a; 類型斷言&…

【三國戰紀game】

編寫一個完整的《三國戰紀》游戲是一個龐大的項目&#xff0c;需要一個專業的游戲開發團隊和大量的時間。但是&#xff0c;我可以給你一個簡化的概念&#xff0c;幫助你開始這個過程。 游戲概念&#xff1a;三國戰紀 《三國戰紀》是一個以中國三國時期為背景的策略游戲&#…

構建智慧銀行保險系統的先進技術架構

隨著科技的不斷發展&#xff0c;智慧銀行保險系統正日益受到關注。在這個數字化時代&#xff0c;構建一個先進的技術架構對于智慧銀行保險系統至關重要。本文將探討如何構建智慧銀行保險系統的先進技術架構&#xff0c;以提升服務效率、降低風險并滿足客戶需求。 ### 1. 智慧銀…

qwen-moe

一、定義 qwen-moe 代碼講解&#xff0c; 代碼qwen-moe與Mixtral-moe 一樣&#xff0c; 專家模塊qwen-moe 開源教程Mixture of Experts (MoE) 模型在Transformer結構中如何實現&#xff0c;Gate的實現一般采用什么函數&#xff1f; Sparse MoE的優勢有哪些&#xff1f;MoE是如…

C++學習 const 上

&#x1f308; C Primer 的學習筆記 前言 這篇blog 主要是想具體講講新學到的const 當然不止是const 而是基于這個const引申出來的指針和引用。還是需要捋一捋的&#xff0c;這還是有點困難的。 我會把每一節的重點都摘出來&#xff0c;放在前面~ 1??首先講講const 2??…

Linux C/C++動態庫制作

概念&#xff1a;程序在編譯時不會把庫文件的二進制代碼鏈接到目標程序中&#xff0c;而是在運行時候才被載入。 如果多個進程中用到了同一動態庫中的函數或類&#xff0c;那么在內存中只有一份&#xff0c;避免了空間浪費問題。 特點&#xff1a; 程序運行在運行的過程中&…

統計信號處理基礎 習題解答10-6

題目 在例10.1中&#xff0c;把數據模型修正為&#xff1a; 其中是WGN&#xff0c;如果&#xff0c;那么方差&#xff0c;如果&#xff0c;那么方差。求PDF 。把它與經典情況PDF 進行比較&#xff0c;在經典的情況下A是確定性的&#xff0c;是WGN&#xff0c;它的方差為&#…

5.算法講解之-二分查找(簡單易懂)

1.簡介 1.二分查找的思路簡單易懂&#xff0c;較難的是如何處理查找過程中的邊界條件&#xff0c;當較長時間沒寫二分查找的時候就容易忘記如何處理邊界條件。 2.只有多寫代碼&#xff0c;多做筆記就不易忘記邊界條件 2.算法思路 正常查找都是從頭到尾查找一個數字是否在數組中…

使用pycharm+opencv進行視頻抽幀(可以用來擴充數據集)+ labelimg的使用(數據標準)

一.視頻抽幀 1.新創建一個空Pycharm項目文件&#xff0c;命名為streach zhen 注&#xff1a;然后要做一個前期工作 創建opencv環境 &#xff08;1&#xff09;我們在這個pycharm項目的終端里面輸入下面的命令&#xff1a; pip install opencv-python --user -i https://pypi.t…

SettingWithCopyWarning: A value is trying to be set on a copy of a slice fro

SettingWithCopyWarning: A value is trying to be set on a copy of a slice fro 錯誤代碼&#xff1a; while i < len(data_csv_data):if data_csv_data[flowmember][i] j:data_csv_data[label][i] data_csv_label[label][j-1]data_csv_data[classes][i]data_csv_label[…

[數據集][目標檢測]獼猴桃檢測數據集VOC+YOLO格式1838張1類別

數據集格式&#xff1a;Pascal VOC格式YOLO格式(不包含分割路徑的txt文件&#xff0c;僅僅包含jpg圖片以及對應的VOC格式xml文件和yolo格式txt文件) 圖片數量(jpg文件個數)&#xff1a;1838 標注數量(xml文件個數)&#xff1a;1838 標注數量(txt文件個數)&#xff1a;1838 標注…

企業級寬表建設

1 寬表概述 寬表&#xff0c;從字面意義上講就是字段比較多的數據庫表&#xff0c;通常情況下是講很多相關的數據&#xff0c;包括實時表、維度表、指標等格言錄在一起形成的一張數據表。 2 寬表的優點 2.1 開發效率提升 由于把不同的信息放在同一張表存儲&#xff0c;寬表…

sensitive-word 敏感詞 v0.17.0 新特性之 IPV4 檢測

敏感詞系列 sensitive-word-admin 敏感詞控臺 v1.2.0 版本開源 sensitive-word-admin v1.3.0 發布 如何支持分布式部署&#xff1f; 01-開源敏感詞工具入門使用 02-如何實現一個敏感詞工具&#xff1f;違禁詞實現思路梳理 03-敏感詞之 StopWord 停止詞優化與特殊符號 04-…

詳解 Spark 核心編程之 RDD 持久化

一、問題引出 /** 案例&#xff1a;對同一份數據文件分別做 WordCount 聚合操作和 Word 分組操作 期望&#xff1a;針對數據文件只進行一次分詞、轉換操作得到 RDD 對象&#xff0c;然后再對該對象分別進行聚合和分組&#xff0c;實現數據重用 */ object TestRDDPersist {def …

Jupyter Notebook快速搭建

Jupyter Notebook why Jupyter Notebook Jupyter Notebook 是一個開源的 Web 應用程序&#xff0c;允許你創建和分享包含實時代碼、方程、可視化和解釋性文本的文檔。其應用包括&#xff1a;數據清洗和轉換、數值模擬、統計建模、數據可視化、機器學習等等。 Jupyter Notebo…

東芝機械人電池低報警解除與機器人多旋轉數據清零

今天啟動一臺設備,觸摸屏一直顯示機器人報警(翻譯過后為電池電量低),更換電池后關機重啟后也不能消除,所以打開示教器,下面就來說說怎么解決此項問題(可以參考官方發的手冊,已手冊為主)。 一,設備 下面來看看機械手的照片與示教器的照片 四軸機械手(六軸機器人有可…

可視化大屏也在卷組件化設計了?分享一些可視化組件

hello&#xff0c;我是大千UI工場&#xff0c;這次分享一些可視化大屏的組件&#xff0c;供大家欣賞。&#xff08;本人沒有源文件提供&#xff09;