zhak-test-vmodel
v0.1.9
Published
模块管理包测试版本
Downloads
15
Readme
微模块第一版
包含模块
common 对象 {...,common,...} from zhak-test-vmodel
控制个性化输出
common.consoleStyle(title, msg, status, tip)
- @param {*} title 输出名称
- @param {*} msg 输出内容
- @param {*} status 0:紧急 red ,1:严重 yellow ,2:提示 blue
- @param tip 开启、关闭 顶部提示
页面销毁提示
common.oblose(state = false, text = "确定要离开吗?")
- @param {*} state 注册和销毁
- @param {*} text 提示文字
文字转音频
common.audios(message)
- @param {*} message 可读音频文字
延时承诺
common.timer = (ms)
- @param {*} ms 毫秒数
日期格式化
common.dateFormat(thisDate, fmt)
- @param {*} thisDate 日期 newDate
- @param {*} fmt 格式
自定义倒计时格式
common.timeFormat(timesTart, timeEnd)
- @param {*} timesTart 起始时间
- @param {*} timeEnd 结束时间 -根据结束时间减去起始时间得到相对应的文字描述
文件字节转换
common.bytesToSize(bytes)
- @param {*} bytes 文件字节转换,字节
批量存储 local Storage
common.ssSet(data, type = true)
- @param {*} data 数据 {key:value}
- @param {*} type 存储在浏览器中的位置 localStorage[true]/sessionStorage[false]
批量获取 local Storage
common.ssGet(data, type = true)
- @param {*} data 数据 [key,...]
- @param {*} type 存储在浏览器中的位置 localStorage[true]/sessionStorage[false]
批量删除 local Storage
common.ssRem(data, type = true)
- @param {*} data 数据 [key,...]
- @param {*} type 存储在浏览器中的位置 localStorage[true]/sessionStorage[false]
数组拆分转二维数组
common.splitArray(data, len)
- @param {*} data 数据
- @param {*} len 拆分规则从第几位开始
对象深层拷贝
common.deepCopy(obj)
- @param {*} obj 深层拷贝
element 全屏
common.launchIntoFullscreen(element)
- @param {*} element 需要全屏的 dom 元素
关闭全屏
common.exitFullscreen()
notice 对象 {...,notice,...} from zhak-test-vmodel
< notice ref="mychild"></ notice >
< el-button @click="noticetest">消息测试</ el-button >
noticetest() {
this.$refs.mychild.mqttMessage({
msg: "这里是测试一条消息!",
getTime: "2020 12.12 12:12:12",
type: "消息来源",
sbId: "007563845627281",
sbName: "事件名称",
status: 1,
statusMsg: "注意",
});
},