- a-select 的default-value 传入参数页面无法更新的问题:
解决办法:在select中加一个key,值和default-value的值一样
<a-space direction="vertical" size="large">
{{ defaultValue }}
<a-select
:key="defaultValue"
:popup-visible="false"
:default-value="defaultValue"
:style="{ width: '360px' }"
placeholder="Please select ..."
multiple
allow-clear
ref="selectRef"
@focus="inputFocus"
@input-value-change="changeValue"
>
<!-- @focus="inputFocus" -->
</a-select>
</a-space>
2.a-table使用checkbox 和radio数据回显的问题
<a-table
row-key="name"
:columns="columns"
:data="data"
:pagination="false"
:row-selection="rowSelection"
@pageChange="onPageChange"
@select="selectSingle"
@select-all="selectAll"
/></a-table>
const selectBox = reactive({
type: "checkbox",
showCheckedAll: true,
selectedRowKeys:['Jane Doe'] //回显数据的变量
});
|