2025-05-08 15:37:28 +08:00
|
|
|
<template>
|
2025-09-26 17:26:06 +08:00
|
|
|
<div>
|
2025-10-10 17:35:28 +08:00
|
|
|
<!-- <SelectTable v-model:data="query" :fields="fields" :tableData="tableData" label="name" objKey="id" :border="true"
|
|
|
|
|
:width="'300px'" placeholder="请选择指定项" @getDataValue="getDataValue" /> -->
|
2025-05-08 15:37:28 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2025-09-26 17:26:06 +08:00
|
|
|
<script setup>
|
|
|
|
|
import { useFingerprint } from '@/utils/useFingerprint';
|
2025-09-29 17:30:02 +08:00
|
|
|
import SelectTable from '@/components/SelectTable/index.vue';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const query = ref(6);
|
|
|
|
|
const fields = [
|
|
|
|
|
{ prop: 'name', label: '名称', width: 150, enablePinyinSearch: true },
|
|
|
|
|
{ prop: 'value', label: '值', width: 150, enablePinyinSearch: true },
|
|
|
|
|
{ prop: 'description', label: '描述', width: 300, showTooltip: true }
|
|
|
|
|
];
|
|
|
|
|
const tableData = [
|
|
|
|
|
{ id: 1, name: '指纹', value: 'fingerprint', description: '唯一标识用户的指纹信息' },
|
|
|
|
|
{ id: 2, name: '浏览器', value: 'browser', description: '用户使用的浏览器信息' },
|
|
|
|
|
{ id: 3, name: '操作系统', value: 'os', description: '用户使用的操作系统信息' },
|
|
|
|
|
{ id: 4, name: 'IP地址', value: 'ip', description: '用户的IP地址信息' },
|
|
|
|
|
{ id: 5, name: '设备信息', value: 'device', description: '用户使用的设备信息' },
|
|
|
|
|
{ id: 6, name: '地理位置', value: 'location', description: '用户使用的地理位置信息' },
|
|
|
|
|
{ id: 7, name: '浏览器语言', value: 'language', description: '用户使用的浏览器语言' },
|
|
|
|
|
{ id: 8, name: '屏幕分辨率', value: 'screen', description: '用户使用的屏幕分辨率信息' },
|
|
|
|
|
{ id: 9, name: '时区', value: 'timezone', description: '用户使用的时区信息' },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getDataValue = (key) => {
|
|
|
|
|
console.log('SelectTable组件绑定对应值:', key);
|
|
|
|
|
}
|
2025-09-26 17:26:06 +08:00
|
|
|
|
|
|
|
|
// 使用自定义hook获取指纹信息
|
|
|
|
|
const {
|
|
|
|
|
fingerprint,
|
|
|
|
|
loading,
|
|
|
|
|
error,
|
|
|
|
|
getFingerprint
|
|
|
|
|
} = useFingerprint();
|
|
|
|
|
|
|
|
|
|
// 重新获取指纹
|
|
|
|
|
const refreshFingerprint = async () => {
|
|
|
|
|
await getFingerprint();
|
|
|
|
|
};
|
2025-05-08 15:37:28 +08:00
|
|
|
</script>
|
|
|
|
|
|
2025-09-26 17:26:06 +08:00
|
|
|
<style scoped></style>
|