修改测试bug
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
<Icon class="ba-icon-dark" v-if="field.render == 'icon'" :name="fieldValue ? fieldValue : field.default ?? ''" />
|
||||
|
||||
<!-- switch -->
|
||||
<el-switch v-if="field.render == 'switch'" @change="onChangeField" :model-value="fieldValue.toString()"
|
||||
:loading="row.loading" active-value="1" inactive-value="0" />
|
||||
<el-switch v-if="field.render == 'switch'" @change="onChangeField(field, $event)"
|
||||
:model-value="fieldValue.toString()" :loading="row.loading" inline-prompt :active-value="field.activeValue" :active-text="field.activeText"
|
||||
:inactive-value="field.inactiveValue" :inactive-text="field.inactiveText" />
|
||||
|
||||
<!-- image -->
|
||||
<div v-if="field.render == 'image' && fieldValue" class="ba-render-image">
|
||||
@@ -124,8 +125,10 @@ if (props.field.renderFormatter && typeof props.field.renderFormatter == 'functi
|
||||
fieldValue.value = props.field.renderFormatter(props.row, props.field, fieldValue.value, props.column, props.index)
|
||||
}
|
||||
|
||||
const onChangeField = (value: any) => {
|
||||
TableStore.onTableAction('field-change', { value: value, ...props })
|
||||
const onChangeField = (row: any, value: any) => {
|
||||
row.onChangeField && row.onChangeField(props.row, value)
|
||||
|
||||
// TableStore.onTableAction('field-change', { value: value, ...props })
|
||||
}
|
||||
|
||||
const onButtonClick = (btn: OptButton) => {
|
||||
|
||||
Reference in New Issue
Block a user