お久しぶりです、気を失っている間に iOS エンジニアではなくなっていた happy_ryo です。 意識を取り戻してからは Instagram と Twitter の API をガンガン叩きながら、Laravel と Vue.js たーのしー!している毎日です。 表題の通り、Vue.js で input タグを用いたファイルのアップロードをする方法をまとめておきます。 環境は Vue.js 2.0 以上、通信には axios を使用します。 input タグの type が file の場合、File に対して readonly 制約がついている関係で v-model で双方向バインディングを構築することが出来ないため、File inputs are read only. Use a v-on:change listener instead.という警告が表示され、値を正確に取得する事が出
こんにちは、エンジニアリンググループの福林 (@fukubaya) です。 2019年3月に僕たちのチームが担当するスマートフォンサイトをリニューアルしました。 リニューアルに際して、せっかくなので新しい技術やフレームワークを採用したいということで、詳しいメンバーはいませんでしたがVue.jsでリニューアルすることにしました*1。 本記事では、Vue.jsがほぼ初心者だけのチームでVue.js製プロジェクトをリリースするまでに得られた知見をまとめます。 すでにバリバリ使いこなしている方には物足りないと思いますが、これからVue.jsを始める方の参考になれば幸いです。 黒部宇奈月温泉駅は富山県黒部市にある北陸新幹線の駅。本文には特に関係ありません。 サービスの概要 開発環境 プロジェクトの管理はVue CLIで Chromeの機能拡張 Vue.js devtoolsは必須 バンドルサイズの確
こんにちは。エンジニアの高崎です。 突然ですが、Webサービスをもっと気軽に作れたらいいのになと思ったことはありませんか? 本格的にWebサービス構築の投資をする前に、需要確認のための動くプロトタイプを作りたい フルスクラッチで作るほどの予算はないんだけど、Webサイトにちょっとした会員限定機能をつけたい など、私達のクライアント様にもそのような課題を抱えている方がたくさんいます。調査した結果、そんな場合の最適解が「Nuxt.js」というフロントエンドのフレームワークと「Firebase」というGoogleが提供しているクラウドサービスを組み合わせて作ることでした。 この記事では「Nuxt.jsとFirebaseを使って簡単なWebサービスを作る」と題して、ハンズオンで簡単なノートを取るWebサービスを作る方法をお送りしたいと思います。 Nuxt.jsって? SPA*フレームワーク。Vue
The Vue.js Cheat Sheet▶︎ Common commands and instructions you'll use in your day-to-day Vue.js coding sessions Jul 10, 2018 → Download my free JavaScript Handbook! <!-- TOC --> DirectivesConditionalsWorking with form elementsModifying eventsMouse event modifiersSubmit an event only if a particular key is pressedKeyboard event modifiersLifecycle HooksBuilt-in componentsGlobal Configuration of the V
<div id="app"> <h2>↓画像↓</h2> <img v-show="uploadedImage" :src="uploadedImage" /> <input type="file" v-on:change="onFileChange"> </div> new Vue({ el: '#app', data() { return { uploadedImage: '', }; }, methods: { onFileChange(e) { let files = e.target.files || e.dataTransfer.files; this.createImage(files[0]); }, // アップロードした画像を表示 createImage(file) { let reader = new FileReader(); reader.onload = (e)
This document provides an introduction and agenda for a session on migrating game server infrastructures to the cloud. It summarizes the experiences of Ubisoft and Behaviour Interactive in migrating their games Dead by Daylight and For Honor from peer-to-peer networking to using Amazon GameLift dedicated servers hosted on AWS. It also discusses how Gearbox Software developed online services for Bo
Typing ImprovementsWe have been receiving requests for better TypeScript integration ever since the release of Vue 2.0. Since the release, we have included official TypeScript type declarations for most of the core libraries (vue, vue-router, vuex). However, the current integration is somewhat lacking when using the out-of-the-box Vue API. For example, TypeScript cannot easily infer the type of th
まえがき ここ最近、Vueを使って実装されたWebアプリが随分と増えてきたように感じます。自分も何度となく実装してきました。すごく小さなデモを作るときにも使えるし、中規模以上のWebアプリを作るときにも使えるし、扱いやすいライブラリでとても好きです。 ある程度の規模になってくると「複数の画面でデータを共有したい」「こっちのComponentの状態をあっちのComponentに伝えたい」といったような問題にぶち当たり、アーキテクチャを導入することでそれらを解決するというのもお馴染みな感じです。特にVueでは双方向データバインディングの特性上、MVVMアーキテクチャが使われることが多いと思います。 今回は、VueでMVVMを実現する際に起き得る設計上の問題について、現時点での私の解決方針をまとめてみました😌 まえがき Vue+MVVMとはどんなものか 一般的なMVVMを理解する View V
vue.js is a progressive JavaScript Framework that focuses on building user interfaces. It is very small and light weight compared to other more complex front-end frameworks like AngularJS, Backbone.js and another kind of javascript frameworks. vue.js Very simple to use and easy to get started. It is important to know that it can do anything with the user interface, it doesn’t care about the model
querySelectorを教えるべきかgetElementByIdとかでやるべきか一瞬迷う(結局querySelectorにする)
VueBeginner Vue.js Tutorial with User LoginLearn how to build a Vue.js application from scratch and add authentication. Look for the 🛠️️ emoji if you'd like to skim through the content while focusing on the build steps. In this article, you'll learn how to build a Vue website that will showcase events hosted by an organization. Users will sign in to view the details page of an event, so you'll al
認証が必要な URL にアクセスした時に、まだログインしていない場合にはログインボタンを表示します。 作成にあたって以下の知識が必要になるので、順に試していきます。 コンポーネント vue-router ルートメタフィールド、ナビゲーションガード Playground として http://codepen.io を使用します。できあがったコードは http://codepen.io/takatama/pen/zoNeWP です。 Vue.js 2.0.7 と vue-router 2.0.2 で動作を確認しました。 なお、Vue.jsについて体系的に学ぶには「Vue.js入門」が超絶オススメです。ログイン、ログアウトについても丁寧に解説されています。 コンポーネント ドキュメントは https://vuejs.org/v2/guide/components.html です。 User コン
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く