popup.css
.yp-popup {
position: fixed;
z-index: 999;
border: 1px solid #d9d9d9;
}
popup.css.d.ts
declare const styles: {
readonly 'yp-popup': string
}
export default styles
popup.ts
import styles from './popup.css'
function popup() {
return styles['yp-popup']
}
export default popup
console.log(popup) 结果如下:
popup() {
return _popup_css__WEBPACK_IMPORTED_MODULE_0___default.a['yp-popup'];
}
console.log(popup()) 结果为undefined
请教大神,这个哪里不对?万分感谢!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…