New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ccs-utils

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ccs-utils

> 全局公共方法

latest
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

ccs-utils

全局公共方法

注意:所有的方法都要通过Ccs**的形式暴露给外部使用

utils 方法类 2021-07-05 邵莉

  • 一、CcsUtils为全局公用方法

    • 1、MenuUtils 动态菜单数据处理

      MenuUtils(routers, data) routers vue-router 对象 data获取的路由数据

    需要注意: permission中将MenuUtils 的使用改为ccs-utils 并删除项目中 MenuUtils.js文件

    • 2、isJson // 判断是否是JSON字符串
      isJson(str)
    • 3、changeFileUpload // 判断上传文件是否包含当前文件类型,'text/html','text/javascript' 该方法需要改造
    • 4、parseTime // 日期格式处理
    • 5、validateObjectCode // 验证对象各个字段 验证对象整体字段 ??? 需要规范
    • 6、objectNote // 获取需要验证字段的备注信息 ??? 需要规范
    • 7、deepClone // 深度克隆
    • 8、throttle // 函数节流
    • 9、debounce // 函数防抖
    • 10、RegDesensitization // 手机/邮箱脱敏设置
  • 二、CcsValidate为全局正则校验类方法

目前为空的 综合各个项目中 的全局方法 归纳整合

  • 三、CcsDownloadExl为全局excel下载方法 等同原来的 downloadExl

    需要注意: 1、该方法已经将xlsx第三方插件内置了,大家在项目中不需再额外下载包,
    2、在方法内动态创建了, 大家将index.html中的 删除 import { CcsDownloadExl } from 'ccs-utils'; 全局替换downloadExl为 CcsDownloadExl 即可

FAQs

Package last updated on 13 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts