feat: 更新移动端页面,添加新活动展示和分类图标,优化样式
This commit is contained in:
@ -30,19 +30,6 @@ export default defineNuxtConfig({
|
||||
},
|
||||
postcss: {
|
||||
plugins: [
|
||||
// 将 rpx 单位仅在移动端样式中转换为 px(在 px->vw 之前)
|
||||
{
|
||||
postcssPlugin: 'rpx-to-px-mobile-only',
|
||||
Declaration(decl) {
|
||||
const file = decl.source && decl.source.input && decl.source.input.file
|
||||
if (!file) return
|
||||
const normalized = file.replace(/\\/g, '/');
|
||||
if (!/\/pages\/mobile\//.test(normalized)) return
|
||||
if (typeof decl.value === 'string' && decl.value.includes('rpx')) {
|
||||
decl.value = decl.value.replace(/(-?\d*\.?\d+)rpx/g, (_, n) => `${n}px`)
|
||||
}
|
||||
},
|
||||
},
|
||||
postcsspxtoviewport({
|
||||
unitToConvert: 'px',
|
||||
viewportWidth: 750,
|
||||
|
||||
Reference in New Issue
Block a user