Sensing performance and mechanism of carbon dots encapsulated into metal–organic frameworks