Skip to content

Instantly share code, notes, and snippets.

View tomieric's full-sized avatar
🚣‍♂️
free

TommyShao tomieric

🚣‍♂️
free
  • GUANGZHOU,CHINA
View GitHub Profile
{"version":1,"resource":"file:///d%3A/zjtech/workspace/ui/qb-ui/packages/cascader-panel/src/cascader-panel.vue","entries":[{"id":"0iub.vue","timestamp":1653557562879},{"id":"CMPi.vue","timestamp":1653558343794}]}
@tomieric
tomieric / vscode-config.yml
Created December 9, 2019 09:00
vscode-config
ss
@tomieric
tomieric / invalidUrl.js
Last active July 13, 2017 09:14
是否非法网址
function IsInvalid (regs = []) {
/* var regs = [
/^(((http|https):)?(\/\/)?(([^=\?])*\.)?tomieric\.com)/g,
/^(((http|https):)?(\/\/)?mlogin\.tmpal\.com)/g
] */
/* var result = false
regs.forEach(function(reg) {
result = result || reg.test(url)
})
return result*/
@tomieric
tomieric / css-filp.css
Created March 21, 2016 01:38
全兼容css水平翻转
/*
* by zhangxinxu
* http://www.zhangxinxu.com/wordpress/2011/05/css%E5%AE%9E%E7%8E%B0%E5%90%84%E4%B8%AA%E6%B5%8F%E8%A7%88%E5%99%A8%E5%85%BC%E5%AE%B9%E7%9A%84%E5%9E%82%E7%9B%B4%E7%BF%BB%E8%BD%AC%E6%B0%B4%E5%B9%B3%E7%BF%BB%E8%BD%AC%E6%95%88%E6%9E%9C/
*/
/*水平翻转*/
.flipx {
-moz-transform:scaleX(-1);
-webkit-transform:scaleX(-1);
-o-transform:scaleX(-1);
transform:scaleX(-1);
@tomieric
tomieric / mobile-initial-scale
Created August 12, 2015 08:52
手机布局自适应
(function(win){
var dpr, rem, scale;
var docEl = document.documentElement;
var fontEl = document.createElement('style');
var metaEl = document.querySelector('meta[name="viewport"]');
dpr = win.devicePixelRatio || 1;
rem = docEl.clientWidth * 2 / 10;
scale = 1 / dpr;
@tomieric
tomieric / number-secret
Created January 14, 2015 06:55
手机号码隐藏4位
'13800138000'.replace(/(\d{3})(\d{4})(\d{4})/,'$1****$3')
// 138****8000
@tomieric
tomieric / jQuery-Plugin-Boilerplate.js
Last active August 12, 2024 13:03
jQuery插件模板
// jQuery Plugin Boilerplate
// A boilerplate for jumpstarting jQuery plugins development
// version 1.1, May 14th, 2011
// by Stefan Gabos
// 中文 by tomieric
// 定义好插件名字,将以插件形式调用
(function($) {
// 开始上手
@tomieric
tomieric / jquery.placeholder.js
Created March 19, 2013 09:26
placeholder占位符 jquery 插件
(function(){
/**
* 占位符
* @param {object} obj lable对象
* @return
*/
$.fn.placeholder = function(obj) {
return $(this).each(function(){
var _self = $(this);
// 获取lable对象,未配置默认按结构查找