const common = { /** * 转义富文本标签 * @param { String } temp 后台返回需要处理的富文本 * @return { String } 处理好的富文本 */ unescapeHTML(temp){ if(!temp) return ''; temp = "" + temp; return temp.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'"); }, } export default common