Rational design and preparation of covalent organic frameworks and their functional mechanism analysis for lithium-ion and lithium sulfur/selenium cells