提交 3281ee10 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新

上级 7ed48ea7
......@@ -23,10 +23,10 @@
{{/if}}
{{#if (eq item.columnType 'UAGRIDCOLUMN')}}
{{!-- <ibizToolbar
:toolbarModel="state.actionModel"
@toolbarEvent="handleToolbarEvent"
:toolbarModel="record.{{lowerCase item.codeName}}"
:context="state.context"
:viewParams="state.viewParams"/> --}}
:viewParams="state.viewParams"
@toolbarEvent="($event: ) => handleToolbarEvent()"/> --}}
{{/if}}
</div>
{{/if}}
......@@ -38,7 +38,12 @@ export class GridControl extends MainControl {
* @memberof GridControl
*/
public gridDataChange(rowIndex: number, name: string, value: any){
this.controlState.items[rowIndex][name] = value;
if (this.controlState.items[rowIndex][name] !== value) {
this.controlState.items[rowIndex][name] = value;
if (!this.controlState.items[rowIndex]["rowDataState"]) {
this.controlState.items[rowIndex]["rowDataState"] = "update";
}
}
}
/**
......
......@@ -53,11 +53,13 @@ const rowClassName = (record: IParam, index: number) => {
const customRow = (record: IParam, index: number) => {
return {
onClick: () => {
state.selectedRowKeys = [record.srfkey];
if (!record.children) {
emit("ctrlEvent",{ tag: state.controlName, action: "selectionChange", data: [deepCopy(record)] })
if (Object.is(props.rowActiveMode, 1)) {
emit("ctrlEvent",{ tag: state.controlName, action: "rowClick", data: [deepCopy(record)] })
if (!props.rowEditState) {
state.selectedRowKeys = [record.srfkey];
if (!record.children) {
emit("ctrlEvent",{ tag: state.controlName, action: "selectionChange", data: [deepCopy(record)] })
if (Object.is(props.rowActiveMode, 1)) {
emit("ctrlEvent",{ tag: state.controlName, action: "rowClick", data: [deepCopy(record)] })
}
}
}
},
......@@ -70,6 +72,9 @@ const customRow = (record: IParam, index: number) => {
}
// 表格选择功能配置
const rowSelectionOption = computed(() => {
if (props.rowEditState || props.selectFirstDefault) {
return false;
}
return {
columnWidth: {{#neq ctrl.aggMode 'NONE'}}90{{else}}50{{/neq}},
selectedRowKeys: state.selectedRowKeys,
......@@ -102,7 +107,7 @@ const handleChange = (pagination: IParam, filters: IParam, sorter: IParam, data:
<a-table
bordered
sticky
class="ibiz-grid"
class="ibiz-grid{{#if ctrl.psSysCss}} {{ctrl.psSysCss.cssName}}{{/if}}"
:rowKey="rowKey"
:showHeader="{{#if ctrl.hideHeader}}false{{else}}true{{/if}}"
:scroll="gridScrollOption"
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册