修复自定义指令lemon-contextmenu报错的问题

This commit is contained in:
范君
2021-02-01 15:16:37 +08:00
parent 134353495f
commit 740d9a527d
36 changed files with 16518 additions and 691 deletions
+9 -5
View File
@@ -53,7 +53,7 @@ export function timeFormat(t, format) {
return format;
}
export function fastDone(event, callback) {
export function funCall(event, callback) {
if (isFunction(event)) {
event(() => {
callback();
@@ -70,7 +70,14 @@ export function fastDone(event, callback) {
export function arrayIntersect(a, b) {
return a.filter(x => b.includes(x));
}
//清除字符串内的所有HTML标签
export function clearHtml(str){
return str.replace(/<.*?>/ig,"");
}
//清除字符串内的所有HTML标签,除了IMG
export function clearHtmlExcludeImg(str){
return str.replace(/<(?!img).*?>/ig, "");
}
export function error(text) {
throw new Error(text);
}
@@ -96,9 +103,6 @@ export function mergeDeep(o1, o2) {
return o1;
}
export function toEmojiName(str) {
return str.replace(/<img emoji-name=\"([^\"]*?)\" [^>]*>/gi, "[!$1]");
}
export function formatByte(value) {
if (null == value || value == "") {
return "0 Bytes";