chore(tailwind): update tailwind.config.js

This commit is contained in:
h_mo 2024-08-30 17:31:26 +08:00
parent b9f433a9e5
commit 5c71382eaf
2 changed files with 18 additions and 4 deletions

View File

@ -10,11 +10,11 @@ const demo = ref('Demo');
<view class="mt-30px"> <view class="mt-30px">
iconify 组件 iconify 组件
</view> </view>
<view class="mt-30px center flex flex-row gap-10px"> <view class="mt-30rpx center flex flex-row gap-10px">
<Iconify icon="i-mdi-account-box" size="64" color="blue" /> <Iconify icon="i-mdi-account-box" size="64" color="blue" />
<Iconify icon="i-mdi-account-box" size="48" color="orange" /> <Iconify icon="i-mdi-account-box" size="48" color="orange" />
<Iconify icon="i-mdi-account-box text-green-400" size="32" /> <Iconify icon="i-mdi-account-box" size="32" class="text-green-400" />
<Iconify icon="i-mdi-account-box" /> <Iconify icon="i-mdi-account-box" class="text-red-400" />
<Iconify icon="i-svg-spinners-12-dots-scale-rotate" /> <Iconify icon="i-svg-spinners-12-dots-scale-rotate" />
</view> </view>
</view> </view>

View File

@ -1,11 +1,25 @@
import { getIconCollections, iconsPlugin } from '@egoist/tailwindcss-icons'; import { getIconCollections, iconsPlugin } from '@egoist/tailwindcss-icons';
import { isMp } from './build/platform'; 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} */ /** @type {import('tailwindcss').Config} */
export default { export default {
content: ['./public/index.html', './src/**/*.{html,js,ts,jsx,tsx,vue}'], content: ['./public/index.html', './src/**/*.{html,js,ts,jsx,tsx,vue}'],
theme: { theme: {
extend: {}, extend: {
spacing,
},
}, },
corePlugins: { corePlugins: {
// 小程序去使用 h5 的 preflight 和响应式 container 没有意义 // 小程序去使用 h5 的 preflight 和响应式 container 没有意义