Current collected state Current
Observed since 20 Oct, 21:18 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
82tlh-table-demo
## Project setup ``` npm install ```
支持以下功能:
npm install hcfunds-components --save
import {createApp} from 'vue';
import App from '@/App.vue';
import router from './router';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import HcComponents from 'hcfunds-components';
createApp(App).use(router).use(ElementPlus).use(HcComponents).mount('#app');
<template>
<div>
<div ref="toolbar" style="display: flex;justify-content: flex-end;gap: 10px;">
<div>查询</div>
<div>隐藏</div>
<div ref="set"></div>
<div ref="clearCache"></div>
</div>
<div style="border-top: 1px solid cadetblue">查询区域</div>
<hc-table ref="table" :data="tableData" border @cell-click="handleEvent" @sort-change="handleEvent" @multi-sort="multiSort" cacheName="userTable" :toolbar="set" :clearCache="clearCache">
<hc-table-column type="selection" align="center" fixed></hc-table-column>
<hc-table-column label="日期" prop="date" sortable="custom" align="center"></hc-table-column>
<hc-table-column label="姓名" prop="name" sortable="custom">
<template #default="scope">
<el-tag>{{scope.row.name}}</el-tag>
</template>
</hc-table-column>
<hc-table-column label="地址" prop="address">
<template #default="scope">
<el-tag type="danger">{{scope.row.address}}</el-tag>
</template>
</hc-table-column>
</hc-table>
<el-button @click="toggleSelection([tableData[1], tableData[2]])">切换第二、第三行的选中状态</el-button>
</div>
</template>
<script setup>
import { ref } from 'vue'
const table = ref(null)
const set = ref(null)
const clearCache = ref(null)
const tableData = [
{date: '2016-05-01', name: 'Tom1', address: 'No. 181, Grove St, Los Angeles',sex:'男'},
{date: '2016-05-02', name: 'Tom2', address: 'No. 182, Grove St, Los Angeles',sex:'男'},
{date: '2016-05-03', name: 'Tom3', address: 'No. 183, Grove St, Los Angeles',sex:'男'},
{date: '2016-05-04', name: 'Tom4', address: 'No. 184, Grove St, Los Angeles',sex:'男'},
]
const handleEvent = (...args) => {
// console.log(...args)
}
const multiSort = (...args) => {
console.log('multiSort', ...args)
}
const toggleSelection = (rows) => {
if (rows) {
rows.forEach((row) => {
table.value.toggleRowSelection(row)
})
} else {
table.value.clearSelection()
}
}
</script>
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
core-jsEnvironment{
"local_name": "core-js",
"alias": false,
"peer_metadata": null
} | ^3.8.3 | runtime |
element-plusEnvironment{
"local_name": "element-plus",
"alias": false,
"peer_metadata": null
} | ^2.2.16 | runtime |
sortablejsEnvironment{
"local_name": "sortablejs",
"alias": false,
"peer_metadata": null
} | ^1.15.0 | runtime |
vueEnvironment{
"local_name": "vue",
"alias": false,
"peer_metadata": null
} | ^3.2.13 | runtime |
vue-routerEnvironment{
"local_name": "vue-router",
"alias": false,
"peer_metadata": null
} | ^4.1.6 | runtime |
@babel/coreEnvironment{
"local_name": "@babel/core",
"alias": false,
"peer_metadata": null
} | ^7.12.16 | development |
@vue/cli-plugin-babelEnvironment{
"local_name": "@vue/cli-plugin-babel",
"alias": false,
"peer_metadata": null
} | ~5.0.0 | development |
@vue/cli-plugin-routerEnvironment{
"local_name": "@vue/cli-plugin-router",
"alias": false,
"peer_metadata": null
} | ^5.0.8 | development |
@vue/cli-serviceEnvironment{
"local_name": "@vue/cli-service",
"alias": false,
"peer_metadata": null
} | ~5.0.0 | development |
sassEnvironment{
"local_name": "sass",
"alias": false,
"peer_metadata": null
} | ^1.59.3 | development |
sass-loaderEnvironment{
"local_name": "sass-loader",
"alias": false,
"peer_metadata": null
} | ^13.2.0 | development |
Source distribution
{
"integrity": "sha512-7xcIpxOrcbNVB/1bkFKsI6p6czEahOpcEE/qz4WxMW1TR7G5hyPIDhexov3pMbjEaThggQyOvszEWgZtC2PEHA==",
"shasum": "ff9617c34a05a6707e46c096c755dd4400010d32",
"tarball": "https://registry.npmjs.org/82tlh-table-demo/-/82tlh-table-demo-0.1.6.tgz",
"fileCount": 8,
"unpackedSize": 2295167,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQD7Ux9MnqfBSAQTPYcMAF80FrSIpsvEaKJAYl8IF7Vw0gIhAO7+4xq3pbfUAPLhxJ6ti7OmnCZ7bzww07BOxhTrtF1O"
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkF/+VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpJhw//d2lOF1SwmZpObe9YfQ3vFL1D+R7Hl+lU30qZxah9P2ehE25r\r\nQW+/RgF7FMYGJUP4MRrnHkQcFMF8nEd9OjoLL1vCgyXJj32G928FYdNEA6ss\r\nWdtUY0h0GqnWVZSnMqP5hCmL7r8UbZlvW8iCuIUDCiGOCfkFW0rCyztzftrv\r\nc8bI2409NXBxRjUddPH32ClKky/fQ0eVDl8G/c1lDVe2Wgo4ku6jpb5tm6Mw\r\n4o+HCtuMksa8N0WA8/M77FR1N701xVxBZfjB9l+urGCP8Csi8XX3/Zuy13L3\r\nGh8L/nsBVB+wRJwbRd6259uZaVa8sKh4pUUXvAbo27LVFVHIa8vsR561Ruhl\r\njXbbeIquhQPoe1fLXh6llFxcSmD3WxhtqP4oLPHY7prLVJRiUZm542QtQg4C\r\nItr2DAkfZDvqg29quO88D0W/wYeEPafHTc+qn1IC4QFnsieF9ftIA9rmGsn8\r\nOy7daz7Q3dUmpzp6jqmfkxv7GKCe0z5abQeIf9xNooosxXOETV0IcxriZ5BT\r\n5ofaFuXi+OECrFfa5hm+gFMNNuSD/SD038U7oOcUuCNGb2xQmc6vcfwLWKMJ\r\nYH1vuIR9GNDG5mpJQU0opIOIM+Kc4vubxiTTfHHTA/V2hdfjxZA0re7AX3jJ\r\nNERrn4rFuFQZfz8i/LuqsWQZldGDBGF4Mss=\r\n=L13S\r\n-----END PGP SIGNATURE-----\r\n"
}Observed since 20 Oct, 21:18 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:5107e28bb451d7f44b688f7c9a3116a22e54d83b876ee9998d992c4e04432ae0