From 5c71382eafadb0d70b6acb0d65548cfbecb090e9 Mon Sep 17 00:00:00 2001 From: h_mo <596417202@qq.com> Date: Fri, 30 Aug 2024 17:31:26 +0800 Subject: [PATCH] chore(tailwind): update tailwind.config.js --- src/pages/demo/index.vue | 6 +++--- tailwind.config.js | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/pages/demo/index.vue b/src/pages/demo/index.vue index 780d07f..61a2040 100644 --- a/src/pages/demo/index.vue +++ b/src/pages/demo/index.vue @@ -10,11 +10,11 @@ const demo = ref('Demo'); iconify 组件 - + - - + + diff --git a/tailwind.config.js b/tailwind.config.js index 99643e6..05a1020 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,11 +1,25 @@ import { getIconCollections, iconsPlugin } from '@egoist/tailwindcss-icons'; import { isMp } from './build/platform'; +const spacing = { + 0: '0px', +}; + +let i = 0; + +while (i <= 750) { + spacing[`${i}px`] = `${i}px`; + spacing[`${i}rpx`] = `${i}rpx`; + i++; +} + /** @type {import('tailwindcss').Config} */ export default { content: ['./public/index.html', './src/**/*.{html,js,ts,jsx,tsx,vue}'], theme: { - extend: {}, + extend: { + spacing, + }, }, corePlugins: { // 小程序去使用 h5 的 preflight 和响应式 container 没有意义