all files / src/ constants.ts

100% Statements 7/7
100% Branches 2/2
100% Functions 1/1
100% Lines 7/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33                                                   
export interface Action {
  okText: string
}
 
export interface GlobalOptions {
  title?: string
  message?: string
  dialogType?: DIALOG_TYPES
  okText: string,
  cancelText: string
  html?: string
  actions?: null | Array<Action>
  vnode?: any
}
 
export enum DIALOG_TYPES {
  ALERT   = 'ALERT',
  CONFIRM = 'CONFIRM',
  PROMPT  = 'PROMPT',
  ACTIONS = 'ACTIONS',
  DIALOG  = 'DIALOG'
}
 
export const DEFAULT_OPTIONS: GlobalOptions = {
  title: '提示',
  message: '',
  dialogType: DIALOG_TYPES.ALERT,
  okText: '确认',
  cancelText: '取消',
  html: '',
  actions: null
}