| | |
| | | console.log('播放暂停,销毁'); |
| | | innerAudioContext.destroy(); |
| | | }); |
| | | innerAudioContext.onStop(function() { |
| | | console.log('播放暂停,销毁'); |
| | | innerAudioContext.destroy(); |
| | | }) |
| | | |
| | | } |
| | | // playSound(e) { |
| | | // // 全局维护一个音频实例,防止缓存溢出 |
| | |
| | | if(!RoleList) { |
| | | RoleList = [ |
| | | /^[a-zA-Z]+$/, |
| | | /\bid$/i |
| | | /id$/i |
| | | ] |
| | | } |
| | | if(!Array.isArray(RoleList)){ |
| | |
| | | } |
| | | } |
| | | |
| | | let FieldListCache = Array(FieldList) |
| | | |
| | | |
| | | let FieldListCache = Array(...FieldList) |
| | | |
| | | RoleList.forEach(role => { |
| | | console.log(FieldListCache.filter(field => !role.test(field.ColmCols))) |
| | | FieldListCache = FieldListCache.filter(field => !role.test(field.ColmCols)) |
| | | FieldListCache = FieldListCache.filter(elem => !role.test(elem.ColmCols)) |
| | | }) |
| | | |
| | | FieldListCache = FieldListCache.filter(elem => !ExcludeKeys.includes(elem.ColmCols)) |
| | | return { |
| | | status: true, |
| | | data: FieldListCache, |
| | | Message: "" |
| | | } |
| | | } |
| | | |
| | | emptyValueFilter(item, fieldList){ |
| | | return fieldList.filter(e => { |
| | | return item[e.ColmCols] |
| | | }) |
| | | } |
| | | } |
| | | |
| | | export const CommonUtils = new commonUtils() |