// import { h } from 'vue' import { NDataTable, NInputNumber, NSwitch } from 'naive-ui' import { useModal } from '@/views/Content/hooks/modal' const { openDetailsModal } = useModal() export const useMubiaoDetail = () => { return { showDetailsMubiao } } const detectingLoadColumns = [ { title: '垂直起始角', key: 'minimumClock', width: 180, render(row) { return ( ) }, }, // { // title: '垂直终止角', // key: 'maximumClock', // width: 180, // render(row) { // return ( // // ) // }, // }, { title: '水平起始角', key: 'minimumCone', width: 180, render(row) { return ( ) }, }, { title: '水平终止角', key: 'maximumCone', width: 180, render(row) { return ( ) }, }, { title: '半径', key: 'radius', width: 180, render(row) { return ( ) }, }, { title: '是否开启', key: 'status', render(row) { return }, }, ] const data = ref([ { id: 3, radius: 5000, minimumClock: 20.0, maximumClock: 110.0, minimumCone: 20.0, maximumCone: 90.0, height: 100, status: true, }, ]) function renderMubiaoDetailsContent(mbData) { // return h( // 'div', // {}, // Object.keys(mbData).map(key => h('div', {}, `${key}:${mbData[key]}`)) // ) return () => (
基本信息
{Object.keys(mbData).map(key => (
{key}:{mbData[key]}
))}
探测载荷
row.id} columns={detectingLoadColumns} data={data.value} />
) } function showDetailsMubiao(mbData) { openDetailsModal({ titleString: 'zb详情', contentSlot: renderMubiaoDetailsContent(mbData), }) }