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
``` 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-3bIAomReKWXZR0rBJFrF3xRk9/EZnf0NwKmRbxB1k55B3WjWKkGYAZ6+/OvkPln/YbNEcZmxruz267JJlDQlfA==",
"shasum": "f5a93a6fd262e7e71a97ba34f723107fa2c81da3",
"tarball": "https://registry.npmjs.org/82tlh-table-demo/-/82tlh-table-demo-0.1.4.tgz",
"fileCount": 20,
"unpackedSize": 43639,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQDZDwQ4hqoZp/ZQlRScnk1zbVxQ6XT2yfkWSNPjhPemawIhAOFuBSI7JhBy2IVwAlRrv4S+r+JpTYESUXD4NFxsymiF"
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFeh5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqHXw/+ImbqAooLFfGs6e9sJON94yY+yJwF0r6xXFr/FA5YKtWALfNF\r\nrAMMDeQQ4VdGlSezjOasM2yhGkdlikmnAma/CtHTZ6wB22uha9vumfzwfCQe\r\niJi/+/o++bsMDtOCw5X3X6C9+uirFXXuQIVaFnlq6wM8krcGAwrCA7r81/oy\r\nhTeiYUP/Y5WBdosf9/rZeZSiQTbG/cJ7bSHzxCq4+1YOFaEDX0KiYrXqNnEW\r\n+1Y1qftNXz2b8oHYwReayBVZhJwwDCLRcxsmxmv2SQ0USR6KFZPc6zPxSmST\r\n8xSdZYcbkSHSzc3WyPSEBBXnarYSEbno//1bVmKurH+GMuiAAx6dkTwLokXF\r\nw15SK9Q1BBcLwSj/pSdY1XReuz3D6wIGaivrNHXHJnXxPPOcqqPVU/f42Rdr\r\nLIxlbff+adKTyTUomK/R0ki2mhYu/QAlTTHngekDz1xKKtbVJDieTVzXzcT5\r\nDwBEigtWL+z47RezkOM5Oe70e6XfR2AKwrnOTVdHfIdxT2t0Xvi35GiN3a6C\r\nMVZhGtAo5Y0SSIjKDEaQTv3Wsqd7o8IM6hOMJvs6Szi3HA426MDwGQzej8yL\r\nGxECOMtSuqUYMOZEGF0P18SI+AKDxI829iW5WdoqgUhZG2WDNlcpVMdWYYYR\r\nybt0uMUSTHYxjZ+EMaXaWYJsZTxcNyYws0U=\r\n=xCMV\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:20a6090da368b3ab12e0f94f56fbc09df1dda2ab10b301a45ee76c26f0698ed9