fix: 添加 StyleProvider 以支持 Tailwind 样式覆盖;移除 InputNumber 组件的宽度样式,优化组件适配;antdv 暂不支持
This commit is contained in:
@@ -284,9 +284,7 @@ async function initComponentAdapter() {
|
||||
inputComponent: ElInput,
|
||||
}),
|
||||
Input: withDefaultPlaceholder(ElInput, 'input'),
|
||||
InputNumber: withDefaultPlaceholder(ElInputNumber, 'input', {
|
||||
style: { width: '100%' },
|
||||
}),
|
||||
InputNumber: withDefaultPlaceholder(ElInputNumber, 'input'),
|
||||
RadioGroup: (props, { attrs, slots }) => {
|
||||
let defaultSlot;
|
||||
if (Reflect.has(slots, 'default')) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defineConfig } from '@vben/vite-config';
|
||||
import { defineConfig, viteCssLayerPlugin } from '@vben/vite-config';
|
||||
|
||||
import ElementPlus from 'unplugin-element-plus/vite';
|
||||
|
||||
@@ -7,9 +7,9 @@ export default defineConfig(async () => {
|
||||
application: {},
|
||||
vite: {
|
||||
plugins: [
|
||||
ElementPlus({
|
||||
format: 'esm',
|
||||
}),
|
||||
// element-plus 的 css 包进 @layer el,使 Tailwind 工具类可覆盖组件样式
|
||||
viteCssLayerPlugin({ layerName: 'el', packageName: 'element-plus' }),
|
||||
ElementPlus({ format: 'esm' }),
|
||||
],
|
||||
server: {
|
||||
proxy: {
|
||||
|
||||
Reference in New Issue
Block a user