- 博客(5)
- 收藏
- 关注
原创 根据key值获取url参数
// 根据key值获取url参数 public getUrlKey(key: any) { return ( decodeURIComponent( ((new RegExp("[?|&]" + key + "=" + "([^&;]+?)(&|#|;|$)").exec( location.href ) || [, ""]) as any)[1].replace(/\+/g, "%20") ).
2021-11-02 15:10:01
484
原创 获取当天开始时间
/** * 获取当天开始时间 */ public getStartTime() { return ( new Date().toLocaleDateString().replace(/\//g, "-") + " " + "00:00:00" ); }
2021-11-02 15:09:25
293
原创 格式化时间
// 格式化时间 public formatDate(time: any, fmt?: any) { fmt = fmt || "yyyy-MM-dd hh:mm:ss"; if (!time) return null; time = new Date(time || Date.now()); var o: any = { "M+": time.getMonth() + 1, //月份 "d+": time.getDate(), //日 .
2021-11-02 15:07:59
144
原创 原生js实现窗口拖拽方法封装
/**窗口拖拽方法 * @param {HTMLElement} oDrag div元素 * @param {HTMLElement} handle 标题内容 */ drag(oDrag, handle) { if (!(oDrag instanceof HTMLElement)) { return } if (handle && !(handle instanceof HTMLElement)) { ...
2021-11-02 15:05:57
175
转载 5个Vue高级实战技巧
动注册组件我们平时可能这样引入注册组件。每次都得需要在头部引入,然后注册,最后在模板上使用。<template><divid="app"><HelloWorldmsg="WelcometoYourVue.jsApp"/></div></template><script>importHelloWorldfrom'./components/HelloWorld.vue'expor...
2021-11-02 11:39:02
268
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅