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-NJSRCux7uDJKGHchfgmyP6pjN4Mh7QAQMqCzLFKjou0nNKtJfieGg74qq7A8s4DVCrJdtEUtUq9Vu6fonmlB6w==",
"shasum": "67710b441cea6b0535a7b22d6e5edffb6f31ca02",
"tarball": "https://registry.npmjs.org/82tlh-table-demo/-/82tlh-table-demo-0.1.7.tgz",
"fileCount": 5,
"unpackedSize": 1788292,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQCLNByOMk9dIrFyYKJNlYyja6lAb7+gRcI9DTXpYTNWwAIhAJpnN6T1xpGZFHBAI37EcnJGvYN/yAO8D/6nHfB2VawG"
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGAa+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoF1A//RUJSmZwUPMnxNt/exlqWZJeCZ6x4+PZhD996bl25RG+zbQ9b\r\noT0X024K6wLGuVy1aV+LlMJY8xvYtnPXM92ztW/LFGAmMy4+Tuj4PBGViga+\r\nsLYDPCmG+ePwjM9Z5YljwOWapxYpU9DGd9z5t3phSH4bOjc6JXJUS5ivfq/n\r\n5KKGIrBzBTgmet4E4YvO5k6y/YIjGyW1NwMDkXTNmmBvCkhlQWR6KEHrQkLD\r\n22y8wRSmQd3PVee6tb0MNuxxPeKJSrroWB7XhfOD7Zu6XHk3aEJU+nSJgwdg\r\nh8hntMp8LvdM8Ol8vIuDLHHPrhJ/le9AQe0KR/9DGPFy9YvSzBdp3IOvciAE\r\nJDTlHG95tLLHGl7YcopwipFkCLWYp5Cj/SxGjvRL2X0FyFFa+GNdwsYCzB5O\r\nFFnH28OcoB04fhmIi9ukHBEE3vZ/XQNu7Dj8ldZtNGAUMFpI1NDqJgP9LqWU\r\n82dwMM0ivOz2MPidqHhq08J32wc03RU8wXQdRI9suVH30yU+R4JEY/OmYOH+\r\nJkZjOrcd9CNEprS04DiO06/59nU/afuIAAKHdtXneTI9c8i4MzQePynIGNiv\r\n5V6CjvGV14DUdXnPtWFdm1jaCK/4XbD9N2iT+/W1NerTqx5umGwUiIK4p8f6\r\nTj8s9DzEkUq3pXxRVnTTe2NrDjWsUtRYqus=\r\n=3Ldw\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:730f200e318bb319da8efd0b053b4acf44ee0abea26071ec8b9a2906d8a786ba