我很难使用我的Ant设计模态组件。组件可见性在本地状态下设置。在此模式中,我必须使用以下代码选择付款方式:
use Illuminate\Http\Request;
public function index(Request $request)
{
$limit = $request->input('limit');
$offset = $request->input('offset');
$books = PartnersBooks::where('is_direct', '=', 1)
->with('direct')
->whereHas('direct', function ($query) {
$query->enable()
->select(['id', 'book_id', 'name', 'devices', 'flow', 'restrictions', 'countries', 'targeting']);
})
->offset($offset) // This should have an default value until the user pass a value through url
->limit($limit) // This should have an default value until the user pass a value through url
->orderBy('id', 'asc')
->get(['id', 'category', 'description']);
$status = !is_null($books) ? 200 : 204;
return response()->json($books, $status);
}
但是,不是在当前模态上设置付款方式,而是在前面发生另一个模态。当我完成并关闭我的模态时,我必须关闭另一个(第一个)。
我想要设置状态并保持一个openi模态。有什么建议?
谢谢!
答案 0 :(得分:0)
您可以尝试使用
this.setState({
state: Object.assign({}, this.state, tempState)
});