init: antdv-next

This commit is contained in:
dap
2026-01-08 20:56:07 +08:00
parent 1383f63361
commit a208034539
251 changed files with 417 additions and 401 deletions

View File

@@ -1,7 +1,6 @@
import { defineComponent, h } from 'vue';
import { Button } from 'ant-design-vue';
import buttonProps from 'ant-design-vue/es/button/buttonTypes';
import { Button } from 'antdv-next';
import { omit } from 'lodash-es';
/**
@@ -9,12 +8,18 @@ import { omit } from 'lodash-es';
*/
export const GhostButton = defineComponent({
name: 'GhostButton',
props: omit(buttonProps(), ['type', 'ghost', 'size']),
props: omit({}, ['type', 'ghost', 'size']),
setup(props, { attrs, slots }) {
return () =>
h(
Button,
{ ...props, ...attrs, type: 'primary', ghost: true, size: 'small' },
{
...props,
...attrs,
type: 'primary',
ghost: true,
size: 'small',
},
slots,
);
},

View File

@@ -1,6 +1,6 @@
import type { App } from 'vue';
import { Button as AButton } from 'ant-design-vue';
import { Button as AButton } from 'antdv-next';
import { GhostButton } from './button';
@@ -8,7 +8,7 @@ import { GhostButton } from './button';
* 全局组件注册
*/
export function setupGlobalComponent(app: App) {
app.use(AButton);
app.component('AButton', AButton);
// 表格操作列专用按钮
app.component('GhostButton', GhostButton);
}