mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-27 02:53:22 +08:00
init: antdv-next
This commit is contained in:
@@ -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,
|
||||
);
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user