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

vue element-ui實現(xiàn)el-table表格多選以及回顯方式

 更新時間:2023年07月03日 10:28:25   作者:兮夏-  
這篇文章主要介紹了vue element-ui實現(xiàn)el-table表格多選以及回顯方式,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教

vue element-ui實現(xiàn)el-table表格多選以及回顯

 <el-table
                    v-loading="roleInfaceLoading"
                    ref="multipleApiTable"
                    :data="data"
                    tooltip-effect="dark"
                    row-key="id"
                    style="width: 100%"
                    @selection-change="handleInfaceSelectionChange"
                >
                    <el-table-column :reserve-selection="true" align="center" type="selection" width="100"></el-table-column>
                    <el-table-column align="center" prop="name" label="接口名稱">
                    </el-table-column>
                    <el-table-column align="center" prop="path" label="接口路徑">
                    </el-table-column>
                </el-table>

1.選中獲取當(dāng)前列表信息

? ? handleInfaceSelectionChange(val) {
? ? ? ? ? ? this.apiIds = val.map(v => {
? ? ? ? ? ? ? ? return v.id
? ? ? ? ? ? })
? ? ? ? },

已知id回顯

?Promise.all([getRoels()]).then((res) => {
? ? ? ? ? ? ? ? this.pageRoleData = res[0].data.data_list
? ? ? ? ? ? ? ? let checkedrow = []
? ? ? ? ? ? ? ? res[0].data.data_list.forEach(item => { // 后臺返回的table數(shù)據(jù)源
? ? ? ? ? ? ? ? ? ? row.role_ids.forEach(v => { 后臺返回的回顯id
? ? ? ? ? ? ? ? ? ? ? ? if (item.id == v) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? checkedrow.push(item) // 相等添加到空數(shù)組中
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? })
? ? ? ? ? ? ? ? })
? ? ? ? ? ? ? ? this.$nextTick(() => {
? ? ? ? ? ? ? ? ? ? checkedrow.forEach(row => {
? ? ? ? ? ? ? ? ? ? ? ? this.$refs.multipleApiTable.toggleRowSelection(row, true) // 回顯
? ? ? ? ? ? ? ? ? ? })
? ? ? ? ? ? ? ? })
? ? ? ? ? ? ? ? this.roleLoading = false
? ? ? ? ? ? })
? ? ? ? ? ? this.data_id = row.id;
? ? ? ? },

關(guān)閉對話框清空選中信息

?resetRoleDialog() {
? ? ? ? ? ? this.$refs.multipleApiTable.clearSelection();
? ? ? ? },

element-ui的table表格實現(xiàn)跨頁多選及回顯效果

效果圖

在這里插入圖片描述

安裝 Element-ui 和 egrid

基于 Element-UI Table 組件封裝的高階表格組件,可無縫支持 element 的 table 組件

npm i element-ui -S
npm i egrid -S

引入 Element-ui 和 Egrid

在 main.js 文件里引入并注冊 ( 這里是 Vue3.0 的模板 )

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'element-ui/lib/theme-chalk/index.css'
import '../public/css/iconfont.css' // 引入字體圖標(biāo)樣式
import '../public/css/reset.css' // 引入初始化樣式
import ElementUI from 'element-ui' // 引入element-ui
import Egrid from 'egrid' // 引入egrid
Vue.use(ElementUI)
Vue.use(Egrid)
Vue.config.productionTip = false
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

在組件中使用form表單

<template>
  <div class='wrapper'>
    <div class='tab-wrap'>
      <el-form>
        <el-form-item>
          <el-button @click='handleRoleDialog'>選擇英雄</el-button>
          <el-table :data='selectedList' max-height='618' style='margin-top: 20px;'>
            <el-table-column label='英雄名稱' prop='name'></el-table-column>
            <el-table-column label='英雄定位' prop='location'></el-table-column>
            <el-table-column label='英雄特長' prop='specialty'></el-table-column>
            <el-table-column label='英雄技能' prop='skill'>
              <template slot-scope='scope'>
                <div class='item' v-for='item in scope.row.skill' :key='item.id'>{{item}}</div>
              </template>
            </el-table-column>
            <el-table-column label='英雄價格' prop='price'></el-table-column>
            <el-table-column label='操作' width='60'>
              <template slot-scope='scope'>
                <a href='javascript:;' @click='handleRoleDel(scope.row)'>刪除</a>
              </template>
            </el-table-column>
          </el-table>
        </el-form-item>
      </el-form>
      <SetHero :visible.sync='show' :selectedList='selectedList' @on-choosed='choosed'></SetHero>
    </div>
  </div>
</template>
<script>
import SetHero from '../components/setHero'
export default {
  components: {
    SetHero
  },
  data () {
    return {
      show: false,
      selectedList: [
        {
          'id': 1,
          'name': '上官婉兒',
          'location': '法師 / 刺客',
          'specialty': '爆發(fā) / 突進(jìn)',
          'skill': ['筆陣', '篆法·疾勢', '飛白·藏鋒', '章草·橫鱗'],
          'price': 13888
        }, {
          'id': 2,
          'name': '王昭君',
          'location': '法師',
          'specialty': '控制 / 冰凍',
          'skill': ['冰封之心', '凋零冰晶', '禁錮寒霜', '凜冬已至'],
          'price': 8888
        }, {
          'id': 3,
          'name': '老夫子',
          'location': '戰(zhàn)士',
          'specialty': '突進(jìn)',
          'skill': ['師道尊嚴(yán)', '圣人訓(xùn)誡', '舉一反三', '圣人之威'],
          'price': 8888
        }
      ]
    }
  },
  methods: {
    handleRoleDialog () {
      this.show = true
    },
    // 刪除英雄
    handleRoleDel (row) {
      if (row.id) {
        var newArr = this.selectedList.filter(function (item, index) {
          return item.id !== row.id
        })
        this.selectedList = newArr
      }
    },
    // 接收子組件傳的值
    choosed (list) {
      this.selectedList = list
    }
  }
}
</script>
<style lang='stylus' scoped>
  .wrapper
    width: 100%;
    background: #fff;
    padding: 50px 0;
    box-sizing: border-box;
    .tab-wrap
      width: 600px;
      margin: 0 auto;
      .item
        cursor: pointer;
</style>

自定義組件 setHero

<template>
  <el-dialog title="選擇英雄" append-to-body @open="open" @close="close" width="40%" :visible.sync="show">
    <el-button @click="resetAllChecked" style="margin-bottom: 20px;">取消全部選擇</el-button>
    <egrid ref="multipleTable"
           :data="heroData"
           :columns="columns"
           :column-type="colType"
           :columns-schema="columnsSchema"
           @selection-change="selectionChange"></egrid>
    <el-pagination layout="prev, pager, next, jumper, sizes, total"
                   :total="totalCount"
                   v-if="totalCount"
                   :page-size="pageSize"
                   :page-sizes="[5, 10, 20, 30, 40, 50]"
                   :current-page="pageNo"
                   @size-change="sizeChange"
                   @current-change="pageChange"></el-pagination>
    <div slot="footer">
      <el-button @click="show = false">取 消</el-button>
      <el-button type="primary" @click=seve>確 定</el-button>
    </div>
  </el-dialog>
</template>
<script>
import Vue from 'vue'
import axios from 'axios'
import tableChecked from '@/mixins/table-checked.js'
const columns = [
  { prop: 'name', label: '英雄名稱' },
  { prop: 'location', label: '英雄定位' },
  { prop: 'specialty', label: '英雄特長' },
  { prop: 'skill', label: '英雄技能' },
  { prop: 'price', label: '英雄價格' }
]
export default {
  mixins: [tableChecked],
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    selectedList: {
      type: Array,
      default () {
        return []
      }
    }
  },
  data () {
    return {
      heroData: [],
      totalCount: 0, // 數(shù)據(jù)總量
      pageSize: 5, // 每頁數(shù)據(jù)量
      pageNo: 1, // 頁數(shù)
      unionKey: ['id'], // 統(tǒng)一標(biāo)識key集合
      // 相當(dāng)于 Element Table-column 的 type 屬性,用于支持功能特殊的功能列(多選、索引、折疊行),不設(shè)置則不顯示功能列
      colType: 'selection',
      // 用于控制表格列渲染
      columns: columns,
      // Object 可以用來單獨(dú)定義 columns 的某一列,這里的設(shè)置會覆蓋 columnsProps 的配置屬性 
      // 使用 Element Table-column 中 label 值進(jìn)行匹配
      columnsSchema: {
        '英雄技能': {
          propsHandler ({ col, row }) {
            return { skill: row[col.prop] }
          },
          component: Vue.extend({
            props: ['skill'],
            render (h) {
              return h('div', this.skill.toString())
            }
          })
        }
      },
      selectedRows: [] // 當(dāng)前列表頁選擇的數(shù)據(jù)項
    }
  },
  computed: {
    show: {
      get () {
        return this.visible
      },
      set (val) {
        this.$emit('update:visible', val)
      }
    }
  },
  methods: {
    getHeroList () {
      this.updateTableSelection(this.heroData, this.selectedRows, this.unionKey)
      // 正在加載時不再重復(fù)請求
      axios.get('/api/table.json').then(res => {
        this.totalCount = res.data.totalCount
        this.heroData = res.data.data.slice((this.pageNo - 1) * this.pageSize, this.pageNo * this.pageSize)
        this.buildTableSelection(this.heroData, 'multipleTable', this.unionKey)
      })
    },
    // 取消全部選擇
    resetAllChecked () {
      this.selectedRows = [] // 清空當(dāng)前列表頁選擇的數(shù)據(jù)項
      this.totalCheckedList = [] // 清空已選擇的數(shù)據(jù)項
      this.$refs.multipleTable.clearSelection() // 清除全部的選中狀態(tài)
    },
    // pageSize 改變時會觸發(fā) 每頁條數(shù)
    sizeChange (size) {
      this.pageSize = size
      this.pageNo = 1
      this.getHeroList()
    },
    // currentPage 改變時會觸發(fā)	當(dāng)前頁
    pageChange (page) {
      this.pageNo = page
      this.getHeroList()
    },
    // Dialog 打開的回調(diào)
    open () {
      this.totalCheckedList = [] // 清空選擇的數(shù)據(jù)項
      this.totalCheckedList.push(...this.selectedList) // 將selectedList放進(jìn)去回顯選中狀態(tài)
      this.getHeroList()
    },
    // Dialog 關(guān)閉的回調(diào)
    close () {
      this.pageNo = 1
      this.heroData = []
    },
    // 當(dāng)選擇項發(fā)生變化時會觸發(fā)該事件
    selectionChange (val) {
      this.selectedRows = val
    },
    // 確定
    seve () {
      this.updateTableSelection(this.heroData, this.selectedRows, this.unionKey)
      // 調(diào)用自定義事件,向父組件傳值
      this.$emit('on-choosed', this.totalCheckedList)
      this.show = false
    }
  }
}
</script>
<style scoped>
</style>

封裝的table-checked.js(重點(diǎn))

// 列表/表格item選中幫助類
// 提供全選、單獨(dú)選擇、切換分頁時記錄之前所有選中的item
// 引用方式:
// import tableChecked from '@/mixins/table-checked.js'
// mixins: [tableChecked]
// 1. table的selection形式
//   1.1 每次請求數(shù)據(jù)之前,調(diào)用該方法,原因是在當(dāng)前頁改變狀態(tài)時不會觸發(fā) totalCheckedList,
//       因此請求數(shù)據(jù)之前需要主動觸發(fā)一次計算全部選擇的列表:
//       this.updateTotalListBySelection(this.heroData, this.multipleSelection, unionKey)
//   1.2 請求數(shù)據(jù)成功后,調(diào)用該方法:
//       this.buildMultipleTableSelection(this.heroData, 'multipleTable', unionKey)
//   1.3 執(zhí)行操作時需要再次調(diào)用1.1中的方法,原因是當(dāng)前頁操作選中狀態(tài)時,不會主動觸發(fā)計算,因此在最終調(diào)用時觸發(fā)一次即可
//   1.4 執(zhí)行操作時,將 totalCheckedList 作為全部選擇的參數(shù)即可
//   1.5 清除全部選擇時,將totalCheckedList 和 selectedRows 的值置為空
export default {
  data () {
    return {
      totalCheckedList: [] // 被選中的列表數(shù)據(jù)
    }
  },
  methods: {
    // 根據(jù) unionKey 構(gòu)建 target 的 unionId
    // @param target 目標(biāo) item
    // @param unionKey 數(shù)組,唯一id標(biāo)識,可能有多個 key
    buildUnionId (target, unionKey) {
      if (target && unionKey && unionKey.length) {
        let unionId = ''
        unionKey.forEach(key => {
          unionId += '-' + target[key] + '-'
        })
        return unionId
      } else {
        return '--'
      }
    },
    // 延遲構(gòu)建 pageData 的選中狀態(tài),必須設(shè)置延遲狀態(tài),否則會多調(diào)用一次 selectionChange 的回調(diào),導(dǎo)致選中狀態(tài)不對
    // 因為 table 的 checkbox 選中狀態(tài)是由 multipleTable 自己維護(hù)的,選中的item會存入 multipleSelection 中,
    // 因此需要重新構(gòu)建 pageData 的選中狀態(tài)
    // @param pageData 當(dāng)前頁 item 列表
    // @param tableRefs 多選 table ref name
    // @param unionKey 統(tǒng)一標(biāo)識key集合
    // @param callback timeout 執(zhí)行完畢后,回調(diào)函數(shù)
    buildTableSelection (pageData, tableRefs, unionKey, callback) {
      setTimeout(() => {
        if (pageData && this.totalCheckedList && this.$refs[tableRefs]) {
          this.$refs[tableRefs].clearSelection()
          pageData.forEach(pageItem => {
            const specItem = this.totalCheckedList.find(totalItem => {
              return this.buildUnionId(pageItem, unionKey) === this.buildUnionId(totalItem, unionKey)
            })
            if (specItem) {
              this.$refs[tableRefs].toggleRowSelection(pageItem, true)
            }
          })
        }
        if (callback && typeof callback === 'function') {
          callback()
        }
      }, 0)
    },
    // 根據(jù) table 多選的狀態(tài)來計算所有已選的 list
    // @param pageData 當(dāng)前頁 list
    // @param currentSelection 當(dāng)前頁選中的 list
    // @param unionKey 統(tǒng)一標(biāo)識key集合
    updateTableSelection (pageData, currentSelection, unionKey) {
      // 如果總記憶中還沒有選擇的數(shù)據(jù),那么就直接取當(dāng)前頁選中的數(shù)據(jù),不需要后面一系列計算
      if (this.totalCheckedList.length <= 0) {
        this.totalCheckedList = currentSelection
        return
      }
      // 最新選中的列表,全部加入到totalCheckedList中去
      currentSelection.forEach(newSelectedItem => {
        const specPageItem = this.totalCheckedList.find(totalItem => {
          return this.buildUnionId(newSelectedItem, unionKey) === this.buildUnionId(totalItem, unionKey)
        })
        if (!specPageItem) {
          this.totalCheckedList.push(newSelectedItem)
        }
      })
      // 不在最新選中列表中的item,如果之前在totalCheckedList,則需要清除
      pageData.forEach(pageItem => {
        const specNewSelectedItem = currentSelection.find(newSelectedItem => {
          return this.buildUnionId(newSelectedItem, unionKey) === this.buildUnionId(pageItem, unionKey)
        })
        if (!specNewSelectedItem) {
          const removeIndex = this.totalCheckedList.findIndex(totalItem => {
            return this.buildUnionId(totalItem, unionKey) === this.buildUnionId(pageItem, unionKey)
          })
          if (removeIndex !== -1) {
            this.totalCheckedList.splice(removeIndex, 1)
          }
        }
      })
    }
  }
}

初始化CSS(reset.css)

@charset "utf-8";
html,body {
  width: 100%;
  height: 100%;
}
html {
  background-color: #fff;
  color: #000;
  font-size: 12px;
}
body, ul, ol, dl, dd, h1, h2, h3, h4, h5, h6, figure, form, fieldset, legend, input, textarea, button, p,
blockquote, th, td, pre, xmp {
  margin: 0;
  padding: 0;
}
body, input, textarea, button, select, pre, xmp, tt, code, kbd, samp {
  line-height: 1.5;
  font-family: tahoma, arial, "Hiragino Sans GB", simsun, sans-serif;
}
h1, h2, h3, h4, h5, h6, small, big, input, textarea, button, select {
  font-size: 100%;
}
h1, h2, h3, h4, h5, h6 {
  font-family: tahoma, arial, "Hiragino Sans GB", "微軟雅黑", simsun, sans-serif;
}
h1, h2, h3, h4, h5, h6, b, strong {
  font-weight: normal;
}
address, cite, dfn, em, i, optgroup, var {
  font-style: normal;
}
caption {
  text-align: inherit;
}
ul, ol, menu {
  list-style: none;
}
fieldset, img {
  border: 0;
}
img, object, input, textarea, button, select {
  vertical-align: middle;
}
article, aside, footer, header, section, nav, figure, figcaption, hgroup, details, menu {
  display: block;
}
audio, canvas, video {
  display: inline-block;
  *display: inline;
  *zoom: 1;
}
blockquote:before, blockquote:after, q:before, q:after {
  content: "\0020";
}
textarea {
  overflow: auto;
  resize: vertical;
}
input, textarea, button, select, a {
  outline: 0 none;
  border: none;
}
button::-moz-focus-inner, input::-moz-focus-inner {
  padding: 0;
  border: 0;
}
mark {
  background-color: transparent;
}
a, ins, s, u, del {
  text-decoration: none;
}
sup, sub {
  vertical-align: baseline;
}
html {
  overflow-x: hidden;
  height: 100%;
  font-size: 50px;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: Arial, "Microsoft Yahei", "Helvetica Neue", Helvetica, sans-serif;
  color: #333;
  font-size: .28em;
  line-height: 1;
  -webkit-text-size-adjust: none;
}
hr {
  height: .02rem;
  margin: .1rem 0;
  border: medium none;
  border-top: .02rem solid #cacaca;
}
a {
  color: #25a4bb;
  text-decoration: none;
}
.el-button {
  height: 30px;
  line-height: 30px;
  padding: 0 14px;
  min-width: 86px;
  font-size: 14px;
  font-family: PingFangSC-Regular;
  font-weight: 400;
  border: 1px solid #256EFF;
  color: #256EFF;
  box-sizing: border-box;
  border-radius: 3px;
}
.el-button:hover {
  background: #D0DFFF;
  color: #256EFF;
}
.el-dialog .el-dialog__footer .el-button {
  border-radius: 1px;
}
.el-button--primary {
  color: #fff;
  background: #256EFF;
  border: 1px solid #256EFF;
}
.el-button--primary:hover {
  background: #1A63F5;
  color: #fff;
}
.el-dialog .el-dialog__footer .el-button {
  border-radius: 1px;
}
.el-button.el-button--text, .el-button.el-button--text:hover {
  border-radius: 1px;
  min-width: 0;
  border: none;
  background: none;
}
.el-button.el-button--text:hover {
  color: rgba(37, 110, 255, 0.8);
}
.el-dialog .el-dialog__header {
  text-align: center;
}
.el-form-item__content {
  line-height: 0;
}
.el-table {
  overflow: inherit;
}
.el-table a:hover {
  color: rgba(37, 110, 255, 0.8);
}
.el-table a {
  color: #256EFF;
  text-decoration: none;
  font-size: 12px;
}
.el-table td {
  padding: 0;
}
.el-table .cell {
  padding: 12px 15px 12px;
  color: #333333;
  font-weight: 400;
  box-sizing: border-box;
}
.el-table th.is-leaf {
  border-bottom: none;
}
.el-table .el-table__header-wrapper {
  border-top: 1px solid #DCDEE0;
  border-bottom: 1px solid #DCDEE0;
}
.el-table .el-table__header th {
  padding: 0;
  background-color: #F2F4F7;
}
.el-table .el-table__header tr th:first-child {
  border-left: 1px solid #DCDEE0;
}
.el-table .el-table__header tr th:last-child {
  border-right: 1px solid #DCDEE0;
}
.el-table .el-table__header .cell {
  padding: 4px 15px;
  font-size: 14px;
}
.el-table .el-table__body-wrapper {
  border-left: 1px solid #DCDEE0;
  border-right: 1px solid #DCDEE0;
}
.el-table thead th, .el-table thead.is-group th {
  background: #fafafa;
  color: #666;
}
.el-table .el-table__body-wrapper {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  box-sizing: border-box;
}
.el-table .el-table__body .cell {
  font-size: 12px;
}
.el-pagination {
  color: #333333;
  font-weight: 400;
  padding: 0;
  text-align: right;
  margin-top: 20px;
}
.el-pagination .el-pager li {
  height: 30px;
  line-height: 30px;
}
.el-pagination .el-pager li.active {
  color: white;
  background: #256EFF;
  min-width: 20px;
  height: 20px;
  line-height: 21px;
  margin: 3px 7.75px 0 7.75px;
  border-radius: 10px;
}
.el-dialog__footer {
  padding: 0 20px 20px;
  text-align: right;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
.el-checkbox:last-child {
  margin-right: 0;
}
.el-checkbox {
  color: #333333;
  font-weight: 400;
  margin-right: 20px;
}
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  background-color: #256EFF;
  border-color: #256EFF;
}
.el-checkbox__inner {
  border: 1px solid #999999;
  border-radius: 1px;
  width: 16px;
  height: 16px;
  background-color: #ffffff;
}
.el-checkbox__inner:after {
  border: 1px solid #ffffff;
  border-left: none;
  border-top: none;
  height: 8px;
  left: 4px;
  position: absolute;
  top: 1px;
  width: 4px;
}
.el-radio {
  color: #333333;
  text-align: left;
  font-weight: 400;
  margin-right: 20px;
  cursor: pointer;
}
.el-radio__inner {
  border: 1px solid #999999;
  width: 18px;
  height: 18px;
  background-color: #ffffff;
}
.el-radio__inner:after {
  width: 10px;
  height: 10px;
  background-color: #256EFF;
}
.el-radio__input:hover {
  color: #256EFF;
}
.el-radio__label {
  font-size: 14px;
  line-height: 20px;
  padding-left: 4px;
}
.el-radio__input.is-checked .el-radio__inner {
  border-color: #256EFF;
  background: #ffffff;
}
::-webkit-scrollbar {
  width: 0;
  height: 0;
  background-color: rgba(0, 0, 0, 0);
}
/*定義滾動條軌道 內(nèi)陰影+圓角*/
::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0);
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0);
}
::-webkit-scrollbar-track:hover {
  -webkit-box-shadow: inset 0 0 1px rgba(239, 239, 239, 239);
  border-radius: 10px;
  background-color: rgba(239, 239, 239, 239);
}
/*定義滑塊 內(nèi)陰影+圓角*/
::-webkit-scrollbar-thumb {
  border-radius: 10px;
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
  background-color: #114D71;
}

Hero.數(shù)據(jù)

{
  "status": true,
  "totalCount": 42,
  "data": [
    {
      "id": 1,
      "name": "上官婉兒",
      "location": "法師 / 刺客",
      "specialty": "爆發(fā) / 突進(jìn)",
      "skill": ["筆陣", "篆法·疾勢", "飛白·藏鋒", "章草·橫鱗"],
      "price": 13888
    }, {
      "id": 2,
      "name": "王昭君",
      "location": "法師",
      "specialty": "控制 / 冰凍",
      "skill": ["冰封之心", "凋零冰晶", "禁錮寒霜", "凜冬已至"],
      "price": 8888
    }, {
      "id": 3,
      "name": "老夫子",
      "location": "戰(zhàn)士",
      "specialty": "突進(jìn)",
      "skill": ["師道尊嚴(yán)", "圣人訓(xùn)誡", "舉一反三", "圣人之威"],
      "price": 8888
    }, {
      "id": 4,
      "name": "狄仁杰",
      "location": "射手",
      "specialty": "",
      "skill": ["迅捷", "六令追兇", "逃脫", "王朝密令"],
      "price": 8888
    }, {
      "id": 5,
      "name": "墨子",
      "location": "法師 / 戰(zhàn)士",
      "specialty": "控制 / 護(hù)盾",
      "skill": ["兼愛非攻", "和平漫步", "機(jī)關(guān)重炮", "墨守成規(guī)"],
      "price": 8888
    }, {
      "id": 6,
      "name": "盤古",
      "location": "戰(zhàn)士",
      "specialty": "突進(jìn) / 收割",
      "skill": ["盤古斧", "狂怒突襲", "壓制之握", "開天辟地", "聚合為一"],
      "price": 13888
    }, {
      "id": 7,
      "name": "豬八戒",
      "location": "坦克",
      "specialty": "團(tuán)控 / 回復(fù)",
      "skill": ["毫發(fā)無傷", "肉彈蹦床", "倒打一耙", "圈養(yǎng)時刻"],
      "price": 13888
    },
    {
      "id": 8,
      "name": "伽羅",
      "location": "射手",
      "specialty": "遠(yuǎn)程消耗 / 團(tuán)隊",
      "skill": ["破魔之箭", "渡靈之箭", "靜默之箭", "純凈之域"],
      "price": 13888
    }, {
      "id": 9,
      "name": "李信",
      "location": "戰(zhàn)士",
      "specialty": "突進(jìn) / 團(tuán)控",
      "skill": ["灰暗利刃", "急速突進(jìn)", "強(qiáng)力斬?fù)?, "力量覺醒·光", "力量覺醒·暗"],
      "price": 13888
    }, {
      "id": 10,
      "name": "云中君",
      "location": "刺客 / 戰(zhàn)士",
      "specialty": "突進(jìn) / 收割",
      "skill": ["云間游", "天隙鳴", "若英·華彩", "風(fēng)雷引"],
      "price": 13888
    }, {
      "id": 11,
      "name": "瑤",
      "location": "輔助",
      "specialty": "團(tuán)隊增益",
      "skill": ["山鬼·白鹿", "若有人兮", "風(fēng)颯木蕭", "獨(dú)立兮山之上"],
      "price": 13888
    }, {
      "id": 12,
      "name": "米萊狄",
      "location": "法師",
      "specialty": "持續(xù)輸出 / 推進(jìn)",
      "skill": ["機(jī)械仆從", "空中力量", "強(qiáng)制入侵", "浩劫磁場"],
      "price": 13888
    }, {
      "id": 13,
      "name": "狂鐵",
      "location": "戰(zhàn)士",
      "specialty": "突進(jìn) / 團(tuán)控",
      "skill": ["無畏戰(zhàn)車", "碎裂之刃", "強(qiáng)襲風(fēng)暴", "力場壓制"],
      "price": 13888
    }, {
      "id": 14,
      "name": "斐擒虎",
      "location": "刺客 / 戰(zhàn)士",
      "specialty": "遠(yuǎn)程消耗 / 收割",
      "skill": ["寸勁", "沖拳式", "氣守式", "虎嘯風(fēng)生"],
      "price": 13888
    },
    {
      "id": 15,
      "name": "明世隱",
      "location": "輔助",
      "specialty": "團(tuán)隊增益",
      "skill": ["大吉大利", "臨卦·無憂", "師卦·飛翼", "泰卦·長生"],
      "price": 13888
    }, {
      "id": 16,
      "name": "沈夢溪",
      "location": "法師",
      "specialty": "消耗 / 加速",
      "skill": ["暴躁節(jié)奏", "貓咪炸彈", "正常操作", "綜合爆款"],
      "price": 13888
    }, {
      "id": 17,
      "name": "夢奇",
      "location": "戰(zhàn)士 / 坦克",
      "specialty": "遠(yuǎn)程消耗 / 團(tuán)控",
      "skill": ["食夢", "夢境縈繞", "夢境揮灑", "夢境漩渦"],
      "price": 13888
    }, {
      "id": 18,
      "name": "奕星",
      "location": "法師",
      "specialty": "消耗 / 團(tuán)控",
      "skill": ["氣合", "定式·鎮(zhèn)神", "定式·倚蓋", "天元"],
      "price": 13888
    }, {
      "id": 19,
      "name": "百里守約",
      "location": "刺客 / 射手",
      "specialty": "遠(yuǎn)程消耗",
      "skill": ["瞄準(zhǔn)", "靜謐之眼", "狂風(fēng)之息", "逃脫"],
      "price": 13888
    }, {
      "id": 20,
      "name": "百里玄策",
      "location": "刺客",
      "specialty": "突進(jìn) / 收割",
      "skill": ["狂熱序章", "神乎鉤鐮", "夢魘鉤鎖", "瞬鐮閃"],
      "price": 13888
    }, {
      "id": 21,
      "name": "魯班大師",
      "location": "輔助",
      "specialty": "",
      "skill": ["稷下科技", "立即清掃", "助手馳援", "強(qiáng)力收納"],
      "price": 13888
    },
    {
      "id": 22,
      "name": "大喬",
      "location": "輔助",
      "specialty": "團(tuán)隊增益",
      "skill": ["川流不息", "鯉躍之潮", "宿命之海", "絕斷之橋", "漩渦之門"],
      "price": 13888
    }, {
      "id": 23,
      "name": "曜",
      "location": "戰(zhàn)士",
      "specialty": "",
      "skill": ["星辰之賜", "裂空斬", "逐星", "歸塵"],
      "price": 13888
    }, {
      "id": 24,
      "name": "西施",
      "location": "法師",
      "specialty": "控制 / 距離增傷",
      "skill": ["少女的把戲", "紗縛之印", "幻紗之靈", "心無旁騖"],
      "price": 13888
    }, {
      "id": 25,
      "name": "蒙犽",
      "location": "射手",
      "specialty": "遠(yuǎn)程消耗",
      "skill": ["熾熱渾天", "狂轟火線", "爆裂重炮", "飛彈援襲"],
      "price": 13888
    }, {
      "id": 26,
      "name": "東皇太一",
      "location": "輔助 / 坦克",
      "specialty": "回復(fù) / 持續(xù)控制",
      "skill": ["暗冕之噬", "日蝕祭典", "曜龍燭兆", "墮神契約"],
      "price": 13888
    }, {
      "id": 27,
      "name": "太乙真人",
      "location": "輔助 / 坦克",
      "specialty": "復(fù)活 / 團(tuán)隊增益",
      "skill": ["黃金閃閃", "意外事故", "第三只手", "大變活人"],
      "price": 13888
    }, {
      "id": 28,
      "name": "蔡文姬",
      "location": "輔助",
      "specialty": "團(tuán)隊增益 / 回復(fù)",
      "skill": ["長歌行", "思無邪", "胡笳樂", "忘憂曲"],
      "price": 13888
    }, {
      "id": 29,
      "name": "干將莫邪",
      "location": "法師",
      "specialty": "爆發(fā) / 超遠(yuǎn)視距",
      "skill": ["比翼同心", "護(hù)主邪冢", "雌雄雙劍·近", "雌雄雙劍·遠(yuǎn)", "劍來"],
      "price": 13888
    }, {
      "id": 30,
      "name": "楊玉環(huán)",
      "location": "法師 / 輔助",
      "specialty": "持續(xù)輸出 / 治療",
      "skill": ["驚鴻調(diào)", "霓裳曲", "胡旋樂", "長恨歌", "驚鴻·清平"],
      "price": 13888
    }, {
      "id": 31,
      "name": "嫦娥",
      "location": "法師 / 坦克",
      "specialty": "持續(xù)輸出 / 法力",
      "skill": ["月盈", "月辰", "月璇", "月芒"],
      "price": 13888
    }, {
      "id": 32,
      "name": "劉備",
      "location": "戰(zhàn)士",
      "specialty": "突進(jìn) / 收割",
      "skill": ["強(qiáng)化霰彈", "雙重射擊", "身先士卒", "以德服人"],
      "price": 13888
    }, {
      "id": 33,
      "name": "蘭陵王",
      "location": "刺客",
      "specialty": "突進(jìn) / 收割",
      "skill": ["秘技·極意", "秘技·分身", "秘技·影蝕", "秘技·暗襲", "秘技·隱匿"],
      "price": 13888
    }, {
      "id": 34,
      "name": "露娜",
      "location": "戰(zhàn)士 / 法師",
      "specialty": "突進(jìn) / 收割",
      "skill": ["月光之舞", "弦月斬", "炙熱劍芒", "新月突擊"],
      "price": 13888
    }, {
      "id": 35,
      "name": "貂蟬",
      "location": "法師 / 刺客",
      "specialty": "持續(xù)輸出 / 真?zhèn)?,
      "skill": ["語·花印", "落·紅雨", "緣·心結(jié)", "綻·風(fēng)華"],
      "price": 13888
    }, {
      "id": 36,
      "name": "達(dá)摩",
      "location": "戰(zhàn)士 / 坦克",
      "specialty": "突進(jìn) / 團(tuán)控",
      "skill": ["真言·心經(jīng)", "真言·無相", "真言·明王", "真言·普渡"],
      "price": 13888
    }, {
      "id": 37,
      "name": "馬可波羅",
      "location": "射手",
      "specialty": "遠(yuǎn)程消耗",
      "skill": ["連鎖反應(yīng)", "華麗左輪", "漫游之槍", "狂熱彈幕"],
      "price": 13888
    }, {
      "id": 38,
      "name": "趙云",
      "location": "戰(zhàn)士 / 刺客",
      "specialty": "突進(jìn)",
      "skill": ["龍鳴", "驚雷之龍", "破云之龍", "天翔之龍"],
      "price": 0
    }, {
      "id": 39,
      "name": "鏡",
      "location": "刺客",
      "specialty": "突進(jìn) / 收割",
      "skill": ["鑄鏡", "開鋒", "裂空", "見影"],
      "price": 18888
    }, {
      "id": 40,
      "name": "馬超",
      "location": "戰(zhàn)士 / 刺客",
      "specialty": "突進(jìn) / 遠(yuǎn)程消耗",
      "skill": ["魔影突襲", "蕭索之刃", "日落孤槍", "萬刃歸鞘"],
      "price": 13888
    }, {
      "id": 41,
      "name": "諸葛亮",
      "location": "法師",
      "specialty": "爆發(fā) / 收割",
      "skill": ["策謀之刻", "東風(fēng)破襲", "時空穿梭", "元?dú)鈴?],
      "price": 18888
    }, {
      "id": 42,
      "name": "雅典娜",
      "location": "戰(zhàn)士",
      "specialty": "突進(jìn)",
      "skill": ["真身覺醒", "神圣進(jìn)軍", "貫穿之槍", "敬畏圣盾"],
      "price": 18888
    }
  ]
}

總結(jié)

以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • 項目開發(fā)中husky的使用詳解

    項目開發(fā)中husky的使用詳解

    這篇文章主要為大家介紹了項目開發(fā)中husky的使用詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2022-11-11
  • 關(guān)于vue項目一直出現(xiàn) sockjs-node/info?t=XX的解決辦法

    關(guān)于vue項目一直出現(xiàn) sockjs-node/info?t=XX的解決辦法

    sockjs-node 是一個JavaScript庫,提供跨瀏覽器JavaScript的API,創(chuàng)建了一個低延遲、全雙工的瀏覽器和web服務(wù)器之間通信通道,這篇文章主要介紹了vue項目一直出現(xiàn) sockjs-node/info?t=XX的解決辦法,需要的朋友可以參考下
    2023-12-12
  • vue3如何優(yōu)雅的實現(xiàn)移動端登錄注冊模塊

    vue3如何優(yōu)雅的實現(xiàn)移動端登錄注冊模塊

    這篇文章主要給大家介紹了關(guān)于vue3如何優(yōu)雅的實現(xiàn)移動端登錄注冊模塊的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2021-03-03
  • Vue+Canvas繪圖使用的講解

    Vue+Canvas繪圖使用的講解

    這篇文章主要介紹了Vue+Canvas繪圖的使用方式,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2022-08-08
  • vue3中動態(tài)組件的踩坑記錄分享

    vue3中動態(tài)組件的踩坑記錄分享

    這篇文章主要為大家詳細(xì)分享一下vue3中動態(tài)組件遇到的問題,分別是動態(tài)組件綁定問題和動態(tài)組件的方法導(dǎo)出問題,有需要的小伙伴可以參考一下
    2024-12-12
  • vue打開子組件彈窗都刷新功能的實現(xiàn)

    vue打開子組件彈窗都刷新功能的實現(xiàn)

    這篇文章主要介紹了vue打開子組件彈窗都刷新功能的實現(xiàn),本文通過實例代碼給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2020-09-09
  • vue如何獲取自定義元素屬性參數(shù)值的方法

    vue如何獲取自定義元素屬性參數(shù)值的方法

    這篇文章主要介紹了vue如何獲取自定義元素屬性參數(shù)值的方法,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-05-05
  • vue2 elementui if導(dǎo)致的rules判斷失效的解決方法

    vue2 elementui if導(dǎo)致的rules判斷失效的解決方法

    文章討論了在使用Vue2和ElementUI時,將if語句放在el-form-item內(nèi)導(dǎo)致rules判斷失效的問題,并提出了將判斷邏輯移到外部的解決方案,感興趣的朋友一起看看吧
    2024-12-12
  • vue 動態(tài)組件用法示例小結(jié)

    vue 動態(tài)組件用法示例小結(jié)

    這篇文章主要介紹了vue 動態(tài)組件用法,結(jié)合實例形式總結(jié)分析了vue 動態(tài)組件基本功能、原理、使用方法及操作注意事項,需要的朋友可以參考下
    2020-03-03
  • vue2.x雙向數(shù)據(jù)綁定原理解析

    vue2.x雙向數(shù)據(jù)綁定原理解析

    雙向數(shù)據(jù)綁定原理主要運(yùn)用了發(fā)布訂閱模式來實現(xiàn)的,通過Object.defineProperty對數(shù)據(jù)劫持,觸發(fā)getter,setter方法,這篇文章主要介紹了vue2.x雙向數(shù)據(jù)綁定原理,需要的朋友可以參考下
    2023-02-02

最新評論