import { createHashHistory } from 'history'
const history = createHashHistory()
export default history

type Option = {
  value: string
  label: string
  children?: Option[]
}

export const myCity: Option[] = myCityTemp

// -------------------富文本回显-------------------
export const textFu = (val: string) => {
  let TxtRes = ''
  try {
    if (val) {
      let txt = JSON.parse(val)

      if (txt.txtArr && txt.txtArr.length) {
        let txt2: string = txt.txtArr[0].txt
        if (txt2) {
          const txt3 = txt2.replaceAll('<p></p>', '')
          if (txt3) TxtRes = txt2
        }
      }
    }
  } catch (error) {}

  return TxtRes
}
