<view class="app-index">
123465
</view>
.app-index {
color: #333333;
color: $theme_color;
}
undefined
^
Undefined variable: "$theme-color".
at pages\index\index.vue:69
不清楚为什么$theme_color会被预编译成$theme-color
1 个回复
暗眼小子 (作者) - 前端
问题已经解决
最开始是在App.vue中@import "./common/scss/variable.scss"引入$theme_color,预编译的时候被编译成$theme-color,
现在又试了一下,在引入scss变量的页面@import "../../common/scss/variable.scss";然后就不回报错了。
不清楚是什么原因