Browse Source
- 创建了插件选项的 createContext 功能 - 定义了 VbenPluginsOptions 接口结构 - 添加了表单、模态框、消息和组件的插件选项接口 - 提供了插件选项的注入和提供功能pull/7729/head
2 changed files with 30 additions and 0 deletions
@ -0,0 +1,6 @@ |
|||
import type { VbenPluginsOptions } from './types'; |
|||
|
|||
import { createContext } from '@vben-core/shadcn-ui'; |
|||
|
|||
export const [injectPluginsOptions, providePluginsOptions] = |
|||
createContext<VbenPluginsOptions>('VbenPluginsOptions'); |
|||
@ -0,0 +1,24 @@ |
|||
import type { Component } from 'vue'; |
|||
|
|||
export interface VbenPluginsFormOptions { |
|||
useVbenForm: (...args: any[]) => any; |
|||
} |
|||
|
|||
export interface VbenPluginsModalOptions { |
|||
useVbenModal?: () => any; |
|||
} |
|||
|
|||
export interface VbenPluginsMessageOptions { |
|||
useMessage?: () => any; |
|||
} |
|||
|
|||
export interface VbenPluginsComponentsOptions { |
|||
[key: string]: Component; |
|||
} |
|||
|
|||
export interface VbenPluginsOptions { |
|||
form?: VbenPluginsFormOptions; |
|||
modal?: VbenPluginsModalOptions; |
|||
message?: VbenPluginsMessageOptions; |
|||
components?: VbenPluginsComponentsOptions; |
|||
} |
|||
Loading…
Reference in new issue