[1128] nw18 解决locale判断失效
nwutils/nw-builder#357
12升18 应用打包后 navigator.language(s)始终返回en
(1) 可以确保nw Resources/下的*.lproj语言文件 cp到打包后的app内
language(s)重新生效 像nw12一样
nw.build()
.then(() => {
// mac| // ... | |
| /** | |
| * Defer a task to execute it asynchronously. | |
| */ | |
| export const nextTick = (function () { | |
| const callbacks = [] | |
| let pending = false | |
| let timerFunc |
[1128] nw18 解决locale判断失效
nwutils/nw-builder#357
12升18 应用打包后 navigator.language(s)始终返回en
(1) 可以确保nw Resources/下的*.lproj语言文件 cp到打包后的app内
language(s)重新生效 像nw12一样
nw.build()
.then(() => {
// mac[1027] 如何在webpack/react环境中引入at.js
ichord/At.js#411
要在react中加jquery本就别扭 更何况加的是jquery插件
一时无法摆脱jq 只能注意解决摩擦之处
class EditorForm extends Component {
componentDidUpdate () {
const { members } = this.props
$('#editor').atwho({ at: '@', data: members })| // @private | |
| function openWindow (key, opts = {}) { | |
| const dontShow = opts.show === false | |
| opts = Object.assign({ | |
| show: false, | |
| resizable: false | |
| }, opts) | |
| opts.webPreferences = Object.assign({ | |
| nodeIntegration: false, | |
| preload |
| 'use strict' | |
| const co = require('co') | |
| const fs = require('mz/fs') | |
| const sqlite3 = require('../node-sqlite3') // custom version sqlite3 | |
| co(function* () { | |
| try { | |
| yield fs.unlink('old.db') | |
| yield fs.unlink('new.db') | |
| } catch (e) {} |
| var remote = require('remote') | |
| var $ = require('./lib/jquery') | |
| var win = remote.getCurrentWindow() | |
| var isDragging = false | |
| var winPos | |
| var dX, dY // screen - win | |
| $(document).on('mousedown', '.app-drag', function(e) { | |
| e = e.originalEvent || e |
| function agreeReturnMoneyAfterSent($id,$agree,$s){ | |
| if(confirm('确认'+$s+'?')==false){ | |
| //window.event.returnValue=false; | |
| return; | |
| } | |
| $returnValue=false; | |
| $.get("<?php echo WXPAY_REFUND_SELLER_AGREE_URL; ?>",{id:$id,flag:$agree},function(data,textStatus,jhr){ | |
| if(data=="<?php echo WX_SUCCESS_STATUS; ?>"){ | |
| alert("成功"); | |
| //$returnValue=true; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <base href="../s/"> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
| <meta name="keywords" content="月饼, 邮政, 江门, 商城, 订单, 微信"> | |
| <meta name="description" content="江门邮政月饼商城"> | |
| <title>邮政商城</title> | |
| <link rel="stylesheet" href="css/_deps.css"> |
| var spawn = require('child_process').spawn; | |
| var port = 8077; | |
| var server = spawn('./node_modules/.bin/http-server', ['-p', port]); | |
| server.stderr.pipe(process.stderr); | |
| server.stdout.pipe(process.stdout); | |
| server.on('close', function () { | |
| process.exit(); | |
| }); |
| /** | |
| * Created by fritz on 2/15/14. | |
| */ | |
| var Module = require('module'), | |
| path = require('path'); | |
| /** | |
| * easy way for circular module loading | |
| */ | |
| function requireFn(request) { |