02 2024 档案
Python 中动态调用函数或类的方法
摘要:使用 importlib # module.py class A: def foo(self): print('this is foo.') @staticmethod def static_method(): print('this is static.') def bar(): print('b
js通过Image()获取图片尺寸
摘要:注意需要在浏览器中使用,需要加载dom对象才能生效,如果直接使用jest将会报错超时 export const getImgSize = (url: string): Promise<{ width: number, height: number }> => { return new Promise