因為箭頭函數(shù)本身沒有this,它是根據(jù)當前的作用域鏈向上查找this的指向,你的題目當前this的指向是Window對象,所以才會出現(xiàn)最后的編譯結果
給上傳圖片添加fileName。
好像官方文檔也沒有說賦值初始值的,我一般這樣用:
<el-select v-model="postForm.articleclassify" filterable remote placeholder="搜索分類" :remote-method="remoteArticleClassifyList">
<el-option v-for="(item,index) in ArticleClassifyList" :key="index" :label="item.name" :value="item.value">
</el-option>
</el-select>
加載的時候,初始值是postForm.articleclassify 選項的值通過后面的迭代出來。
我前段時間正好寫過electron的下載,正常的electron實現(xiàn)下載是怎樣的呢?
先要說下electron的ipc通信,ipcMain,ipcRenderer
electron內(nèi)主進程和渲染進程是通過ipc通信的
主進程(main.js)定義 監(jiān)控 函數(shù)
ipcMain.on('download', (evt, args) => {
let url = JSON.parse(args);
downloadUrl = url.downloadUrl;
saveUrl = url.saveUrl;
mainWindow.webContents.downloadURL(downloadUrl);
});
渲染進程(頁面)調(diào)用ipcRenderer來觸發(fā)
ipcRenderer.send('download', JSON.stringify({
downloadUrl: `${ipURL()}${url}`,
saveUrl: result[0]
}));
這樣就可以觸發(fā)主進程的下載動作,至于下載動作是怎樣的我就不寫了,官方上都有,
如果向阻止electron只要把main.js里的
ipcMain.on('download', (evt, args) => {
let url = JSON.parse(args);
downloadUrl = url.downloadUrl;
saveUrl = url.saveUrl;
//mainWindow.webContents.downloadURL(downloadUrl);
});
注釋掉就行了
當然每個人的寫法可能不一樣,但是都是通過ipc從渲染進程發(fā)送給主進程的,找到主進程里開始下載的動作,關掉就可以了
weex最終給你的是個view啊 想怎么放都行
你需要一個叫路由的東東
elementA+elementB
選擇所有緊隨elementA
的elementB
。
在你的css的文件頭部加上encoding聲明:
@charset "UTF-8";
否則瀏覽器按操作系統(tǒng)編碼去解析css文件,在windows下(非utf8編碼)就亂碼,也就找不到文件了。
es5和es6的區(qū)別
大...大哥,這應該不是閉包吧
根據(jù)選擇的類型,要么直接把不符合要求的直接過濾掉,或者在點擊的時候進行判斷
如果想在你標示的外部代碼
里寫,那是不可能的。
以前有人也有和你一樣的問題,然后就有了commonjs
、requirejs
等,現(xiàn)在模塊加載已經(jīng)成了ES6
的標準。
所以如果你有強迫癥,那就不能嫌麻煩,把模塊加載相關的姿勢擼了吧。
img.onload 哪個教程或者文檔告訴你 它是帶參的
自說自話的,加了三個參數(shù)進去,
img.onload 是被誰調(diào)用的,先要搞清楚
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<input type="file" onchange='fileChoosed(event)'>
<img id='a'>
<script>
function fileChoosed(event) {
console.log('aa');
let file = event.target.files[0],
fileName = file.name,
img = document.getElementById('a'),
fr = new FileReader(),
ts = this;
fr.addEventListener("load", () => {
let blob = 'a';
console.log(fileName, img, blob); //這里能獲取到三個變量
img.onload = () => { //不建議在瀏覽器里直接用箭頭函數(shù),支持不好
debugger;
console.log(fileName, img, blob); 經(jīng)過測試是可以打印這三個變量的
};
img.src = fr.result;
});
fr.readAsDataURL(file);
}
</script>
</body>
</html>
https://packagist.org/package...
雖然不知道你為什么要下載那么古老的 2.0.5
的版本,但是 composer 官網(wǎng)上的 yiisoft/yii2-app-advanced
包并沒 2.0.5 版本。
現(xiàn)在 yiisoft/yii2-app-advanced
的最新版本是 2.0.14
,可以使用如下命令進行下載:
composer create-project yiisoft/yii2-app-advanced advanced 2.0.14
實際上,到目前為止,yii2框架核心的版本已經(jīng)是 2.0.15.1,安裝時composer 會自動將其升級為最新版本。
[/tmp] ]$composer create-project yiisoft/yii2-app-advanced advanced 2.0.14
Installing yiisoft/yii2-app-advanced (2.0.14)
- Installing yiisoft/yii2-app-advanced (2.0.14): Loading from cache
Created project in advanced
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 59 installs, 0 updates, 0 removals
- Installing yiisoft/yii2-composer (2.0.6): Loading from cache
- Installing swiftmailer/swiftmailer (v5.4.9): Loading from cache
- Installing bower-asset/jquery (3.2.1): Loading from cache
- Installing bower-asset/yii2-pjax (2.0.7.1): Loading from cache
- Installing bower-asset/punycode (v1.3.2): Loading from cache
- Installing cebe/markdown (1.1.2): Loading from cache
- Installing ezyang/htmlpurifier (v4.10.0): Loading from cache
- Installing bower-asset/inputmask (3.3.11): Loading from cache
- Installing yiisoft/yii2 (2.0.15.1): Loading from cache
- Installing yiisoft/yii2-swiftmailer (2.0.7): Loading from cache
- Installing bower-asset/bootstrap (v3.3.7): Loading from cache
- Installing yiisoft/yii2-bootstrap (2.0.8): Loading from cache
- Installing yiisoft/yii2-debug (2.0.13): Loading from cache
- Installing bower-asset/typeahead.js (v0.11.1): Loading from cache
- Installing phpspec/php-diff (v1.1.0): Loading from cache
- Installing yiisoft/yii2-gii (2.0.6): Loading from cache
- Installing fzaninotto/faker (v1.7.1): Loading from cache
- Installing yiisoft/yii2-faker (2.0.4): Loading from cache
- Installing doctrine/instantiator (1.0.5): Loading from cache
- Installing phpunit/php-text-template (1.2.1): Loading from cache
- Installing sebastian/recursion-context (2.0.0): Loading from cache
- Installing sebastian/exporter (2.0.0): Loading from cache
- Installing phpunit/phpunit-mock-objects (3.4.4): Loading from cache
- Installing codeception/stub (1.0.2): Loading from cache
- Installing sebastian/diff (1.4.3): Loading from cache
- Installing sebastian/version (2.0.1): Loading from cache
- Installing sebastian/code-unit-reverse-lookup (1.0.1): Loading from cache
- Installing phpunit/php-file-iterator (1.4.5): Loading from cache
- Installing sebastian/resource-operations (1.0.0): Loading from cache
- Installing sebastian/comparator (1.2.4): Loading from cache
- Installing webmozart/assert (1.3.0): Loading from cache
- Installing phpdocumentor/reflection-common (1.0.1): Loading from cache
- Installing phpdocumentor/type-resolver (0.4.0): Loading from cache
- Installing phpdocumentor/reflection-docblock (3.3.2): Loading from cache
- Installing phpspec/prophecy (1.7.5): Loading from cache
- Installing myclabs/deep-copy (1.7.0): Loading from cache
- Installing phpunit/php-token-stream (1.4.12): Loading from cache
- Installing sebastian/environment (2.0.0): Loading from cache
- Installing phpunit/php-code-coverage (4.0.8): Loading from cache
- Installing phpunit/php-timer (1.0.9): Loading from cache
- Installing sebastian/global-state (1.1.1): Loading from cache
- Installing sebastian/object-enumerator (2.0.1): Loading from cache
- Installing symfony/yaml (v3.4.8): Downloading (100%)
- Installing phpunit/phpunit (5.7.27): Loading from cache
- Installing codeception/phpunit-wrapper (6.0.9): Downloading (100%)
- Installing behat/gherkin (v4.5.1): Downloading (100%)
- Installing symfony/polyfill-mbstring (v1.7.0): Loading from cache
- Installing symfony/dom-crawler (v3.4.8): Downloading (100%)
- Installing symfony/css-selector (v3.4.8): Downloading (100%)
- Installing symfony/browser-kit (v3.4.8): Downloading (100%)
- Installing symfony/event-dispatcher (v3.4.8): Downloading (100%)
- Installing psr/log (1.0.2): Loading from cache
- Installing symfony/debug (v3.4.8): Downloading (100%)
- Installing symfony/console (v3.4.8): Downloading (100%)
- Installing symfony/finder (v3.4.8): Downloading (100%)
- Installing psr/http-message (1.0.1): Loading from cache
- Installing guzzlehttp/psr7 (1.4.2): Loading from cache
- Installing codeception/base (2.4.1): Downloading (100%)
- Installing codeception/verify (0.3.3): Loading from cache
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.1)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
phpunit/phpunit suggests installing ext-xdebug (*)
symfony/browser-kit suggests installing symfony/process ()
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/event-dispatcher suggests installing symfony/http-kernel ()
symfony/console suggests installing symfony/lock ()
symfony/console suggests installing symfony/process ()
codeception/base suggests installing aws/aws-sdk-php (For using AWS Auth in REST module and Queue module)
codeception/base suggests installing codeception/phpbuiltinserver (Start and stop PHP built-in web server for your tests)
codeception/base suggests installing codeception/specify (BDD-style code blocks)
codeception/base suggests installing flow/jsonpath (For using JSONPath in REST module)
codeception/base suggests installing league/factory-muffin (For DataFactory module)
codeception/base suggests installing league/factory-muffin-faker (For Faker support in DataFactory module)
codeception/base suggests installing phpseclib/phpseclib (for SFTP option in FTP Module)
codeception/base suggests installing stecman/symfony-console-completion (For BASH autocompletion)
codeception/base suggests installing symfony/phpunit-bridge (For phpunit-bridge support)
Writing lock file
Generating autoload files
你需要用一個數(shù)組,或者是綁定到item上面的某個屬性
computed,數(shù)據(jù)分一下吧
pdf.js用法不對,請學習官方文檔
https://github.com/mozilla/pd...
北大青鳥APTECH成立于1999年。依托北京大學優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學院和江蘇省首批服務外包人才培訓基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術與教育服務機構,發(fā)展為教育服務業(yè)的綜合性企業(yè)集團,成為集合面授教學培訓、網(wǎng)
達內(nèi)教育集團成立于2002年,是一家由留學海歸創(chuàng)辦的高端職業(yè)教育培訓機構,是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍懿科技有限責任公司從事總經(jīng)理職務負責iOS教學及管理工作。
浪潮集團項目經(jīng)理。精通Java與.NET 技術, 熟練的跨平臺面向對象開發(fā)經(jīng)驗,技術功底深厚。 授課風格 授課風格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術顧問,美國Dachieve 系統(tǒng)架構師,美國AngelEngineers Inc. 系統(tǒng)架構師。