标签:product amp cli checked list data function ora nbsp
1、代码片段截取
checkAll: function(flag){ this.checkAllFlag = flag; this.productList.forEach(function(value,index){ value.checked = flag; }) this.calcTotalPrice(); },
2、es6语法,解构赋值
const {shell} = require(‘electron’);大括号什么意思
3、本地存取;
/**
* 向localStorage中设置数据
* @param key 字符串
* @param value 数组
*/
function SetDataIntoLocalStorage(key, value) {
localStorage.setItem(key, JSON.stringify(value));
};
/**
* 从localStorage中获取数据
* @param key 字符串
*/
function GetDataFromLocalStorage(key) {
return JSON.parse(localStorage.getItem(key));
}
$timeout(function(){
//ipcRenderer.send(‘settingsWindowInitFinished‘);
});
}]);
4、比较函数
sort(function(a,b){
return a -b ;
})
5、Electron clipboard 模块
Electron clipboard 模块 clipboard 模块提供方法来供复制和粘贴操作 . 下面例子展示了如何将一个字符串写道 clipboard 上: const clipboard = require(‘electron‘).clipboard; clipboard.writeText(‘Example String‘); 在 X Window 系统上, 有一个可选的 clipboard. 你可以为每个方法使用 selection 来控制它: clipboard.writeText(‘Example String‘, ‘selection‘); console.log(clipboard.readText(‘selection‘));
标签:product amp cli checked list data function ora nbsp
原文地址:http://www.cnblogs.com/sxz2008/p/6812188.html