场景:在日期选择器选择后,把结果显示在工作台。页面刷新后仍然保留日期
--------------------------------------template
<a-descriptions style="margin-top: 20px" :column="1" />
当前账期{{ form.billDateName }}
</a-typography-title>
`
`
<a-button type="primary" @click="search"> 搜索</a-button>
--------------------------------------script
// 接收一个 getter 函数,并返回一个可写的 ref 对象。
const form = computed(() => {
return {
billDateName: ' ',
}
})
// 搜索
const search = () => {
// eslint-disable-next-line no-use-before-define
fetchData()
// eslint-disable-next-line no-restricted-globals
location.reload()
}
-------------------------------------