Git Product home page Git Product logo

cr-vue's Introduction

Netlify Status

基礎から学ぶ Vue.js 書籍用サポートページ

サポートページのコンテンツは、こちらをご覧ください。

🐾

https://cr-vue.mio3io.com/

書籍について

フロントエンドを取り巻く技術の進化によって、フロントエンドの役割は増え、フレームワークもより身近なものになっています。 この本では「Vue.js ってなに?」「フレームワークってなに?」という基礎概念と導入からプロダクトに役立つ情報までを体系的に解説しています。 これから JavaScript のフレームワークを始める方にはもちろん、すでに Vue.js をお使いの方が基礎を学ぶにも最適な1冊です。

  • A5判/ソフトカバー
  • 出版社: シーアンドアール研究所

Amazonで購入

ソースコードのライセンスについて

書籍およびサポートページに記載しているコード、チュートリアルは、すべて MIT ライセンスです。 社内勉強会やハンズオンなど、ご自由にお使い下さい。

質問について

書籍中の Vue.js に関する技術的な質問については、サポートページのリポジトリ Issues または、著者 Twitter までお気軽にどうぞ! 質問の際、質問内容の該当ページをお書き下さい。 書籍と関係のない質問については、お答えできない場合があります。 ご了承下さい🙏

cr-vue's People

Contributors

dependabot[bot] avatar dobby618 avatar fagai avatar kentaasamura avatar mio3io avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cr-vue's Issues

CHAPTER3-section14のセレクトボックス複数選択の場合

P111ページの複数選択のセレクトボックスですが、複数選択できないです。サポートページのDEMO画面と同じように表示されてはおるのですが、DEMO画面でも私の実行環境でも複数選択まではできません。
書籍上だと複数選択できるような記載(AとCを選択している)があるので、どこかおかしいのではと思っています。
サポートページ: https://cr-vue.mio3io.com/guide/chapter3.html#%E3%82%BB%E3%83%AC%E3%82%AF%E3%83%88%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9
お手数お掛け致しますが、よろしくお願いいたします。

Vue CLI3インストール時のエラー

Vue CLI3のインストールについて質問です。
231ページとおまけ-vue-cli-バージョン3を見ています。

npm install -g @vue/cliでインストール時に以下のエラーとワーニングが出てしまいました。
試しにsudoでも実行してみたのですが、別のエラーがでてしまいました。

PCはMacで、npmのバージョンは6.5.0です。

解決方法を教えていただけないでしょうか。

$ npm install -g @vue/cli
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR!   stack:
npm ERR!    "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'",
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mira/.npm/_logs/2019-02-11T06_24_15_731Z-debug.log
$ sudo npm install -g @vue/cli
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead
/usr/local/bin/vue -> /usr/local/lib/node_modules/@vue/cli/bin/vue.js

> [email protected] install /usr/local/lib/node_modules/@vue/cli/node_modules/fsevents
> node install

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v67 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib' 
gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/mira/.node-gyp/11.9.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/.node-gyp'
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=4" "--node_abi_napi=napi"
gyp ERR! cwd /usr/local/lib/node_modules/@vue/cli/node_modules/fsevents
gyp ERR! node -v v11.9.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:197:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/@vue/cli/node_modules/fsevents
node-pre-gyp ERR! node -v v11.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/@vue/cli/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ @vue/[email protected]
updated 1 package in 12.676s

どうぞよろしくお願いいたします。

基礎から学ぶVue.js Page.174のサンプルについて

サンプルを参考に実装してみたのですが、思ったように動かなかったので質問させてください。
slotを使い、子コンポーネントでv-forを実行し、その内容を親コンポーネントに持ってきて
最後に子コンポーネントに渡す処理ですが、どう書いても動きません。

<!-- HTML -->
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Vue.js</title>
    </head>
    <body>
        <div id="app">
            <comp-child-3>
                <li slot-scope="child3">{{ child3.item }}</li>
            </comp-child-3>
        </div>
        <script src="vue.js"></script>
        <script src="main.js"></script>
    </body>
</html>
/* JavaScript */
Vue.component('comp-child-3', {
    template: '<ul class="comp-child-3"><slot v-for="item in list" v-bind:item="item"></slot></ul>'
})
var app = new Vue({
    el: '#app',
    data: {
        list: [
            { item: '1', name: 'name1' },
            { item: '2', name: 'name2' },
            { item: '3', name: 'name3' }
        ]
    }
})

P41 の中頃の v-model.number="count" に関して

v-model の説明の流れで読んで行きますと
修飾子 .number の付加して、値が count に変わってしまっていて、main.js に書いてある message と整合性が取れてないのでエラーになります。

ReferenceError: _ is not defined

P.127の通りVueを編集しました。
P.126で「Loadashなどのライブラリを使用」することが触れられていますが読み込み方法が書いていなかったため表題のエラーが発生しました。

対策としてindex.htmlに以下のJSファイルを読み込むことで解決しました。

<script src="https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js"></script>

取り急ぎ報告まで

教えてください

68ページ目の
◆v-if条件による描画
で、最後2行の意味が理解できませんでした。
補足していただけるとうれしいです。

Layout on iPad

ec12070c-90a7-4308-9f9c-36ec098ac723
The sidebar seems too width on iPad.
Anyway this website is so cute with VuePress 👍

ToDo

  • Lodash を使っている所がわかりにくい Lodash・axios について簡単に説明
  • チュートリアル Twitter Developer の手順を最新版にする

スロットが適している場面

何度もすみません、スロットについて教えてください。
スロットでできることは、普通のコンポーネントのpropsを使ってもできると思うのですが、どのような場合にスロットを使うのが良いのでしょうか。
P169の最初のパラグラフの説明が答えなのかのしれませんが、いまいち理解できず...。
よろしくお願いします。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.