0
@template-productlist-id = 1;
& when (@template-productlist-id = 0) {
import "product-lists/product-list0.less";
}
& when (@template-productlist-id > 0) {
import "product-lists/product-list.less";
}
하지만 작동하지 않는 것 같습니다. 여전히 2 개의 파일을 가져옵니다. 어떻게하면 될까요?변수에 따라 LESS 스타일 시트를 어떻게 가져 옵니까?
이 코드는 나에게 의심을 보인다. 너는 무엇을 기대하고 있니? LESS가 CSS에 컴파일되어 있으므로 @ template-productlist-id 값을 변경하려면 서버 쪽에서 수행 한 다음 컴파일 된 CSS를 다시 처리해야합니다. – Samih