|
|
@ -77,6 +77,11 @@ |
|
|
if (isFunction(compProps)) { |
|
|
if (isFunction(compProps)) { |
|
|
compProps = compProps({ text: val, record, column, index }) ?? {}; |
|
|
compProps = compProps({ text: val, record, column, index }) ?? {}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 用临时变量存储 onChange方法 用于 handleChange方法 获取,并删除原始onChange, 防止存在两个 onChange |
|
|
|
|
|
compProps.onChangeTemp = compProps.onChange; |
|
|
|
|
|
delete compProps.onChange; |
|
|
|
|
|
|
|
|
const component = unref(getComponent); |
|
|
const component = unref(getComponent); |
|
|
const apiSelectProps: Recordable = {}; |
|
|
const apiSelectProps: Recordable = {}; |
|
|
if (component === 'ApiSelect') { |
|
|
if (component === 'ApiSelect') { |
|
|
@ -186,7 +191,7 @@ |
|
|
} else if (isString(e) || isBoolean(e) || isNumber(e) || isArray(e)) { |
|
|
} else if (isString(e) || isBoolean(e) || isNumber(e) || isArray(e)) { |
|
|
currentValueRef.value = e; |
|
|
currentValueRef.value = e; |
|
|
} |
|
|
} |
|
|
const onChange = unref(getComponentProps)?.onChange; |
|
|
const onChange = unref(getComponentProps)?.onChangeTemp; |
|
|
if (onChange && isFunction(onChange)) onChange(...arguments); |
|
|
if (onChange && isFunction(onChange)) onChange(...arguments); |
|
|
|
|
|
|
|
|
table.emit?.('edit-change', { |
|
|
table.emit?.('edit-change', { |
|
|
@ -404,8 +409,7 @@ |
|
|
column: this.column, |
|
|
column: this.column, |
|
|
index: this.index, |
|
|
index: this.index, |
|
|
}) |
|
|
}) |
|
|
: (this.getValues ?? "\u00A0") |
|
|
: (this.getValues ?? "\u00A0")} |
|
|
} |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
{!this.column.editRow && <FormOutlined class={`${this.prefixCls}__normal-icon`} />} |
|
|
{!this.column.editRow && <FormOutlined class={`${this.prefixCls}__normal-icon`} />} |
|
|
</div> |
|
|
</div> |
|
|
|