hw-descriptions
v2.1.1
Published
`pnpm i hw-descriptions@latest`
Readme
安装
pnpm i hw-descriptions@latest
使用示例
import HwDescriptions from 'hw-descriptions'
import 'hw-descriptions/dist/hw-descriptions.css'
const app = createApp(App)
app.use(createPinia())
app.use(router)
app.component('HwDescriptions', HwDescriptions)
app.mount('#appP')<script setup lang="tsx">
const columns = [
{
label: "报送单位",
prop: "reportOrgName",
renderLabel: label => {
// jsx 使用:前提得安装 @vitejs/plugin-vue-jsx
return <div style={{ color: 'pink', background: '#d1e6fb' }}>{label}</div>
// return h('div', { style: { color: 'green', background: '#d1e6fb' } }, label as string)
}
},
{
label: "报送时间",
prop: "reportTime"
},
]
const info = reactive({
reportOrgName: '天津市派出所',
reportTime: '2025-09-01'
})
</script>
<template>
<!-- <MobileDescriptions
column="1"
:columns="columns"
:data="info"
>
</MobileDescriptions> -->
<HwDescriptions
column="1"
:columns="columns"
:data="info"
>
</HwDescriptions>
</template>