会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
yangAL
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
下一页
2020年3月13日
Javascript:window.close()不起作用?
摘要: 一般的窗口关闭的JS如下写法: window.close() 但是呢,chrome,firefox等中有时候会不起作用。 改为下面的写法: window.open("about:blank","_self").close() 或者 window.open("","_self").close() 如果
阅读全文
posted @ 2020-03-13 16:08 yangAL
阅读(828)
评论(0)
推荐(0)
2019年11月11日
合同开发记录
摘要: 1:表格里有四列:折扣率、成交价、数量、金额。每改变一项,其他三项会改变。 刊例价不能被更改。 上面是dom表格代码,v model连接数据,@change 方法 改变其他的三项,传两个参数,第一个参数是此列的属性值,第二个参数是当前行的数据。 虽然数量 表格里写了 type="number" st
阅读全文
posted @ 2019-11-11 15:19 yangAL
阅读(173)
评论(0)
推荐(0)
2019年4月1日
指定某个git的版本代码拉取新的分支
摘要: 在本地找到一个目录,执行 git clone http://gitlab.xxxxx.com/xxxxx/xxxxx.git cd xxxxx/ git log //找到对应版本的SHA值 例如2b1c225dcbbc4e1da11164af945344d88bc8f559 git checkout
阅读全文
posted @ 2019-04-01 13:40 yangAL
阅读(1477)
评论(0)
推荐(0)
2019年3月14日
eslint规范项目代码
摘要: 安装一系列eslint插件后,填写eslint配置,配置如下 .editorconfig root = true [ ] charset = utf 8 indent_style = space indent_size = 2 end_of_line = lf insert_final_newlin
阅读全文
posted @ 2019-03-14 11:04 yangAL
阅读(903)
评论(0)
推荐(0)
2019年3月13日
一些工具方法
摘要: ``` getCookie (name) { // 获取cookie const cookieContent = '; ' + document.cookie const cookies = cookieContent.split( ) return cookies.length 1 ? cooki
阅读全文
posted @ 2019-03-13 18:56 yangAL
阅读(115)
评论(0)
推荐(0)
一些filter
摘要: ``` Vue.filter('money', (value, symbol = '', currency = '¥', decimals = 0) = { const digitsRE = /(\d{3})(?=\d)/g value = parseFloat(value) if (!isFini
阅读全文
posted @ 2019-03-13 18:52 yangAL
阅读(208)
评论(0)
推荐(0)
将数据缓存到sessionStorage中
摘要: ``` //获取侧边栏 if (sessionStorage.getItem( )) { const leftMenu = JSON.parse(sessionStorage.getItem( )) store.dispatch('setLeftMenu', leftMenu) } else { i
阅读全文
posted @ 2019-03-13 18:49 yangAL
阅读(2371)
评论(0)
推荐(0)
打开一个新标签,并且跳到此标签页
摘要: ``` objWin = window.open(routeUrl.href, obj.code) objWin.focus() ```
阅读全文
posted @ 2019-03-13 18:45 yangAL
阅读(254)
评论(0)
推荐(0)
每天不同时间段,认领状态判断问题
摘要: 需求每天多个时间段里可认领,在可认领时间段的倒计时一小时内,显示倒计时;在可认领时间段内,按钮为亮色;不在可认领时间段内,按钮为灰色 解决: const timeSolts = res.data.data.limitTime // const timeSolts = '10:40 11:00;12:
阅读全文
posted @ 2019-03-13 18:42 yangAL
阅读(345)
评论(0)
推荐(0)
睡眠几秒代码
摘要: ``` // 睡眠 await this.sleep(300) sleep (ms) { return new Promise((resolve, reject) => { setTimeout(() => { resolve() }, ms) }) }, ```
阅读全文
posted @ 2019-03-13 18:33 yangAL
阅读(901)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告