前端转vue
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TradeResourcesHelper.ts 724B

123456789101112131415161718192021222324252627282930313233343536
  1. import { reactive } from 'vue'
  2. import type { PageBase } from './PageBase'
  3. /**
  4. * 业务资源的访问辅助类
  5. */
  6. export class TradeResourcesHelper {
  7. private _page: PageBase
  8. private _buttonStyle: string = ''
  9. constructor(page: PageBase) {
  10. this._page = page
  11. }
  12. /**
  13. * 获取页面对象
  14. */
  15. public get Page(): PageBase {
  16. return this._page
  17. }
  18. /**
  19. * 按钮样式
  20. */
  21. public get ButtonStyle(): string {
  22. return this._buttonStyle
  23. }
  24. public set ButtonStyle(value: string) {
  25. this._buttonStyle = value
  26. }
  27. }
  28. // Vue组件封装
  29. export const useTradeResources = (page: PageBase) => {
  30. return reactive(new TradeResourcesHelper(page))
  31. }