123456789101112131415161718192021222324252627282930313233343536 |
- import { reactive } from 'vue'
- import type { PageBase } from './PageBase'
-
- /**
- * 业务资源的访问辅助类
- */
- export class TradeResourcesHelper {
- private _page: PageBase
- private _buttonStyle: string = ''
-
- constructor(page: PageBase) {
- this._page = page
- }
-
- /**
- * 获取页面对象
- */
- public get Page(): PageBase {
- return this._page
- }
-
- /**
- * 按钮样式
- */
- public get ButtonStyle(): string {
- return this._buttonStyle
- }
- public set ButtonStyle(value: string) {
- this._buttonStyle = value
- }
- }
-
- // Vue组件封装
- export const useTradeResources = (page: PageBase) => {
- return reactive(new TradeResourcesHelper(page))
- }
|