fix: 修复 input-table 中存在公式表达式值没有及时更新的问题 Close: #8263 (#8364)

This commit is contained in:
liaoxuezhi 2023-10-12 16:56:03 +08:00 committed by GitHub
parent 79728ddad4
commit a55144c36d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 46 additions and 23 deletions

View File

@ -3,32 +3,18 @@ export default {
remark: 'bla bla bla',
body: {
type: 'crud',
api: '/api/sample',
name: 'thelist',
api: {
method: 'get',
url: '/api/sample',
sendOn: '${mode}'
},
mode: 'list',
draggable: true,
saveOrderApi: {
url: '/api/sample/saveOrder'
},
orderField: 'weight',
filter: {
title: '条件搜索',
submitText: '',
body: [
{
type: 'input-text',
name: 'keywords',
placeholder: '通过关键字搜索',
addOn: {
label: '搜索',
type: 'submit'
}
},
{
type: 'plain',
text: '这只是个示例, 目前搜索对查询结果无效.'
}
]
},
affixHeader: true,
bulkActions: [
{
@ -63,6 +49,44 @@ export default {
],
quickSaveApi: '/api/sample/bulkUpdate',
quickSaveItemApi: '/api/sample/$id',
headerToolbar: [
{
type: 'form',
mode: 'inline',
wrapWithPanel: false,
submitOnChange: true,
submitOnInit: true,
target: 'thelist',
body: [
{
type: 'select',
name: 'mode',
className: 'mb-0',
selectFirst: true,
options: [
{
label: '模式 1',
value: 'mode1'
},
{
label: '模式 2',
value: 'mode2'
}
]
},
{
type: 'input-text',
name: 'keywords',
placeholder: '通过关键字搜索',
className: 'mb-0',
addOn: {
label: '搜索',
type: 'submit'
}
}
]
}
],
listItem: {
actions: [
{

View File

@ -252,7 +252,7 @@ export function HocStoreFactory(renderer: {
props.store?.storeType === 'ComboStore'
? undefined
: syncDataFromSuper(
store.data,
props.data,
(props.data as any).__super,
(prevProps.data as any).__super,
store,

View File

@ -61,12 +61,11 @@ export const CRUDStore = ServiceStore.named('CRUDStore')
// 因为会把数据呈现在地址栏上。
return createObject(
createObject(self.data, {
...self.query,
items: self.items.concat(),
selectedItems: self.selectedItems.concat(),
unSelectedItems: self.unSelectedItems.concat()
}),
{}
{...self.query}
);
},