热敏打印机无法调整font-size

Web前端需要连接热敏打印机打印小票,但是font-size始终无法调小,最终解决见demo:

Read more   2023/05/12 posted in  Web前端

All about angularjs $formatters and $parsers

The original link

Hi folks, As a front end developers we need to deal with different data models which come from the server side. We have to format them , change them and yes! we need to validate them. Mainly JSON at these days. In most cases back end data not in the way it should be.(Back end developers doesn't bother to format data that much).Hence we are in a dark when we are going to render that data in our view. If you are angularjs user, Hell! you are in the business. Fortunately angularjs developers thought about it and provide few powerful features to us. Formatters, Parsers , validators and asyncValidators.

Read more   2023/05/12 posted in  Web前端

微信JS分享iOS不回调success方法

添加一个setTimeout就好了

...
success: function(results) {
    setTimeout(function() {
        // some
    }, 500);
}
2019/05/27 posted in  Web前端

选中/取消iconfont所有图标

打开控制台,粘贴下面代码,回车


var ls = document.getElementsByClassName('icon-cover-freeze');
var mClick = function(index) {
    if (index == ls.length) return;
    ls[index].firstElementChild.click();
    setTimeout(() => {
        mClick(index + 1);
    }, 5);
};
mClick(0);

2019/03/14 posted in  Web前端

微信redirect_uri #(井号)后参数丢失的问题

2019/03/13 posted in  Web前端

vue-cli3.0.1 多页面超过5个后无法打包

2018/09/03 posted in  Web前端

CommonJS和AMD/CMD

CommonJS根据JS的表现制定规范:

{模块引用(require)} {模块定义(exports)} {模块标识(module)}

NodeJS遵循了CommonJS规范,写法如下:

// foo.js

module.exports = function(x) {
    console.log(x);
};
// index.js

let foo = require('./foo')
foo(1);
Read more   2018/08/29 posted in  Web前端

JwtBearer

JWT Token由以下三部分组成:

Read more   2018/08/20 posted in  Web前端

解决Cannot find module '../lib/completion'

// package.json
{
    "scripts": {
        "build": "gulp build"
    }
}
Read more   2017/10/20 posted in  Web前端