close 逻辑