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

如何使用?vxe-table?將行數(shù)據(jù)標(biāo)記為刪除狀態(tài)

 更新時(shí)間:2025年01月21日 09:22:08   作者:qaz666  
vxe-table支持將數(shù)據(jù)標(biāo)記為待刪除狀態(tài),通過(guò)調(diào)用setPendingRow方法,本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),感興趣的朋友跟隨小編一起看看吧

vxe-table 如何將行標(biāo)記為刪除狀態(tài),不是直接刪除

官網(wǎng):https://vxetable.cn

vxe-table 支持直接將數(shù)據(jù)標(biāo)記待刪除狀態(tài),通過(guò)調(diào)用 setPendingRow 方法標(biāo)記為待刪除狀態(tài)

<template>
  <div>
    <vxe-button status="error" @click="pendingSelectEvent(true)">批量標(biāo)記除</vxe-button>
    <vxe-button status="info" @click="pendingSelectEvent(false)">批量取消標(biāo)記</vxe-button>
    <vxe-button status="success" @click="getPendingEvent">獲取已標(biāo)記數(shù)據(jù)</vxe-button>
    <vxe-table
      border
      show-overflow
      keep-source
      height="400"
      ref="tableRef"
      :edit-config="editConfig"
      :data="tableData">
      <vxe-column type="checkbox" width="70"></vxe-column>
      <vxe-column field="name" title="Name" :edit-render="{name: 'input'}"></vxe-column>
      <vxe-column field="sex" title="Sex" :edit-render="{name: 'input'}"></vxe-column>
      <vxe-column field="age" title="Age" :edit-render="{name: 'input'}"></vxe-column>
      <vxe-column field="action" title="操作" width="200">
        <template #default="{ row }">
          <vxe-button mode="text" status="error" @click="pendingRow(row, true)">標(biāo)記</vxe-button>
          <vxe-button mode="text" @click="pendingRow(row, false)">取消</vxe-button>
        </template>
      </vxe-column>
    </vxe-table>
  </div>
</template>
<script>
import { VxeUI } from 'vxe-pc-ui'
export default {
  data () {
    const tableData = [
      { id: 10001, name: 'Test1', role: 'Develop', sex: 'Man', age: 28, address: 'test abc' },
      { id: 10002, name: 'Test2', role: 'Test', sex: 'Women', age: 22, address: 'Guangzhou' },
      { id: 10003, name: 'Test3', role: 'PM', sex: 'Man', age: 32, address: 'Shanghai' },
      { id: 10004, name: 'Test4', role: 'Designer', sex: 'Women', age: 24, address: 'Shanghai' }
    ]
    const editConfig = {
      trigger: 'click',
      mode: 'cell',
      showStatus: true
    }
    return {
      tableData,
      editConfig
    }
  },
  methods: {
    async pendingRow (row, status) {
      const $table = this.$refs.tableRef
      if ($table) {
        $table.setPendingRow(row, status)
      }
    },
    async pendingSelectEvent (status) {
      const $table = this.$refs.tableRef
      if ($table) {
        const selectRecords = $table.getCheckboxRecords()
        if (selectRecords.length > 0) {
          await $table.setPendingRow(selectRecords, status)
          await $table.clearCheckboxRow()
        } else {
          VxeUI.modal.message({
            content: '未選擇數(shù)據(jù)',
            status: 'info'
          })
        }
      }
    },
    getPendingEvent () {
      const $table = this.$refs.tableRef
      if ($table) {
        const pendingRecords = $table.getPendingRecords()
        VxeUI.modal.alert(`標(biāo)記:${pendingRecords.length} 行`)
      }
    }
  }
}
</script>

https://gitee.com/x-extends/vxe-table

到此這篇關(guān)于使用PythonDEAP庫(kù)實(shí)現(xiàn)簡(jiǎn)單遺傳算法的文章就介紹到這了,更多相關(guān)使用PythonDEAP庫(kù)實(shí)現(xiàn)簡(jiǎn)單遺傳算法內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • vue使用axios跨域請(qǐng)求數(shù)據(jù)問(wèn)題詳解

    vue使用axios跨域請(qǐng)求數(shù)據(jù)問(wèn)題詳解

    這篇文章主要為大家詳細(xì)介紹了vue使用axios跨域請(qǐng)求數(shù)據(jù)的問(wèn)題,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-10-10
  • Vue?動(dòng)態(tài)路由的實(shí)現(xiàn)詳情

    Vue?動(dòng)態(tài)路由的實(shí)現(xiàn)詳情

    這篇文章主要介紹了Vue?動(dòng)態(tài)路由的實(shí)現(xiàn),動(dòng)態(tài)路由是一個(gè)常用的功能,根據(jù)后臺(tái)返回的路由json表,前端動(dòng)態(tài)顯示可跳轉(zhuǎn)的路由項(xiàng),本文主要實(shí)現(xiàn)的是后臺(tái)傳遞路由,前端拿到并生成側(cè)邊欄的一個(gè)形勢(shì),需要的朋友可以參考一下
    2022-06-06
  • Vue 按鍵修飾符處理事件的方法

    Vue 按鍵修飾符處理事件的方法

    這篇文章主要介紹了Vue 按鍵修飾符的相關(guān)資料,vue中新增按鍵修飾符和系統(tǒng)修飾符來(lái)處理類(lèi)似的事件,具體內(nèi)容詳情大家參考下本文
    2018-05-05
  • ant design vue導(dǎo)航菜單與路由配置操作

    ant design vue導(dǎo)航菜單與路由配置操作

    這篇文章主要介紹了ant design vue導(dǎo)航菜單與路由配置操作,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2020-10-10
  • vue+springboot用戶(hù)注銷(xiāo)功能實(shí)現(xiàn)代碼

    vue+springboot用戶(hù)注銷(xiāo)功能實(shí)現(xiàn)代碼

    這篇文章主要介紹了vue+springboot用戶(hù)注銷(xiāo)功能,本文通過(guò)示例代碼給大家介紹的非常詳細(xì),感興趣的朋友跟隨小編一起看看吧
    2024-05-05
  • Vue實(shí)現(xiàn)全局異常處理的幾種方案

    Vue實(shí)現(xiàn)全局異常處理的幾種方案

    本文主要介紹了使用pyscript在網(wǎng)頁(yè)中撰寫(xiě)Python程式的方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2022-05-05
  • 在Vue?3中使用OpenLayers加載GPX數(shù)據(jù)并顯示圖形效果

    在Vue?3中使用OpenLayers加載GPX數(shù)據(jù)并顯示圖形效果

    本文介紹了如何在Vue 3中使用OpenLayers加載GPX格式的數(shù)據(jù)并在地圖上顯示圖形,通過(guò)使用OpenLayers的GPX解析器,我們能夠輕松地處理和展示來(lái)自GPS設(shè)備的地理數(shù)據(jù),需要的朋友可以參考下
    2024-12-12
  • Vue中使用Tailwind CSS的具體方法

    Vue中使用Tailwind CSS的具體方法

    本文主要介紹了Vue中使用Tailwind CSS的具體方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2023-04-04
  • vue.js template模板的使用(仿餓了么布局)

    vue.js template模板的使用(仿餓了么布局)

    這篇文章主要介紹了vue.js template模板的使用,主要是模仿餓了么布局,用到了4個(gè)組件,分別是header.vue,goods.vue,ratings.vue,seller.vue,感興趣的朋友跟隨腳本之家小編一起看看實(shí)現(xiàn)代碼
    2018-08-08
  • uniapp中使用u-loadmore,loadText內(nèi)容不隨status改變刷新方式

    uniapp中使用u-loadmore,loadText內(nèi)容不隨status改變刷新方式

    這篇文章主要介紹了uniapp中使用u-loadmore,loadText內(nèi)容不隨status改變刷新方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2024-05-05

最新評(píng)論