🐛 fix: 修复红包组件数据初始化bug
This commit is contained in:
parent
f09d2983cc
commit
998e70a753
|
@ -41,8 +41,7 @@ export default class addKnockGold extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
...model,
|
||||
isEdit: !!this.props.data?.id /* 是否为编辑 */
|
||||
...model(this.props)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,8 @@ export const week = [
|
|||
export const earlyPerList = ['70', '50', '30', '20'];
|
||||
|
||||
/* 表单数据 */
|
||||
export const model = {
|
||||
export function model(props) {
|
||||
return {
|
||||
model: {
|
||||
channel: '1', // 渠道
|
||||
redPackets_type: '1', // 红包类型
|
||||
|
@ -73,5 +74,7 @@ export const model = {
|
|||
],
|
||||
//预警人数据
|
||||
userSelectList: [],
|
||||
form_data: {}
|
||||
};
|
||||
form_data: {},
|
||||
isEdit: !!props.data?.id /* 是否为编辑 */
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue