<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>【vue】タグの記事一覧｜ミトラボ</title>
	<atom:link href="https://mito-lab.com/tag/vue/feed/" rel="self" type="application/rss+xml" />
	<link>https://mito-lab.com</link>
	<description>フリーランスWebデザイナーの実験と備忘録</description>
	<lastBuildDate>Tue, 07 Mar 2023 21:54:45 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.6.17</generator>

<image>
	<url>https://mito-lab.com/wp-content/uploads/2019/11/cropped-fav_mitolab2.0-1-32x32.jpg</url>
	<title>【vue】タグの記事一覧｜ミトラボ</title>
	<link>https://mito-lab.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>TypeScriptでVue.js(Vue2のclass-style,Vue-CLI)</title>
		<link>https://mito-lab.com/typescript-vue-jsvue2-class-style/</link>
					<comments>https://mito-lab.com/typescript-vue-jsvue2-class-style/#respond</comments>
		
		<dc:creator><![CDATA[mito]]></dc:creator>
		<pubDate>Tue, 07 Mar 2023 21:54:45 +0000</pubDate>
				<category><![CDATA[コーディングの勉強]]></category>
		<category><![CDATA[vue]]></category>
		<guid isPermaLink="false">https://mito-lab.com/?p=3210</guid>

					<description><![CDATA[いつもは2023年3月現在、推奨されているVue3でVite環境で開発していますが、バージョンを下げ、Vue2のclass-styleを使い、Vue-CLI環境で開発をしたのでVue3との違いも含めてまとめます。 ]]></description>
										<content:encoded><![CDATA[<p>こんにちは、mito(<a href="https://twitter.com/mito_works" target="_blank">@mito_works</a>)です。</p>
<div class="balloon-box balloon-right balloon-none balloon-bg-gray clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2024/01/fukidashi.jpg" alt="mito" width="80" height="80"></div>
<div class="icon-name">mito</div>
<div class="balloon-serif">
<div class="balloon-content">Vueを学びコードを書く面白さに目覚め始めました！</div>
</div></div>
<p>いつもは2023年3月現在、推奨されているVue3でVite環境で開発していますが、バージョンを下げ、Vue2のclass-styleを使い、Vue-CLI環境で開発をしたのでVue3との違いも含めてまとめます。</p>
<div class="balloon-box balloon-left balloon-gray balloon-bg-none clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2019/05/dog2.jpg" alt="momo" width="80" height="80"></div>
<div class="icon-name">momo</div>
<div class="balloon-serif">
<div class="balloon-content">特に<span class="marker"><strong>typescriptのclass-styleの書き方</strong></span>が公式ドキュメントも1ページしかなく試行錯誤したのでもしお困りの方いらっしゃたら参考になればうれしいです！</div>
</div></div>
<p>&nbsp;</p>
<h2>開発環境</h2>
<p>以下、使用したパッケージのバージョン情報です。</p>
<div class="simple-box2">
<p>Vue-CLI 5.0.8</p>
<p>Vue.js 2.6.14</p>
<p>typescript 4.9.5</p>
<p>Node.js 16.13.2</p>
<p>npm 8.1.2</p>
</div>
<div class="simple-box6">
<p>Vue-CLI公式ページ(<a href="https://cli.vuejs.org/" target="_blank" rel="noopener">https://cli.vuejs.org/</a>)</p>
</div>
<div class="balloon-box balloon-right balloon-none balloon-bg-gray clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2024/01/fukidashi.jpg" alt="mito" width="80" height="80"></div>
<div class="icon-name">mito</div>
<div class="balloon-serif">
<div class="balloon-content">Vue-CLIは古いバージョンを使用すると、ほかのパッケージとの互換性でエラーがでるので<span class="marker"><strong>最新バージョン</strong></span>がよさそうです！</div>
</div></div>
<div class="balloon-box balloon-left balloon-gray balloon-bg-none clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2019/05/dog2.jpg" alt="momo" width="80" height="80"></div>
<div class="icon-name">momo</div>
<div class="balloon-serif">
<div class="balloon-content">エラーを読み解き解消を試みたけど、結局は最新にバージョン上げたら解決したね！</div>
</div></div>
<div class="balloon-box balloon-right balloon-none balloon-bg-gray clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2024/01/fukidashi.jpg" alt="mito" width="80" height="80"></div>
<div class="icon-name">mito</div>
<div class="balloon-serif">
<div class="balloon-content">そう！<code>@types/vue</code>を入れるとよさそうなどいろいろ試しましたが、パッケージの開発が終了していたり&#8230;。色々勉強になりました！</div>
</div></div>
<h2>Vue-CLIでプロジェクトを作る</h2>
<h3>ターミナルで以下のコマンドを実行。</h3>
<pre class="language-markup"><code>vue create sample-app</code></pre>
<p>&nbsp;</p>
<div class="balloon-box balloon-left balloon-gray balloon-bg-none clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2019/05/dog2.jpg" alt="momo" width="80" height="80"></div>
<div class="icon-name">momo</div>
<div class="balloon-serif">
<div class="balloon-content">sample-appの部分は<span class="marker"><strong>プロジェクト名になるよ(好きな名前でOK)</strong></span>！</div>
</div></div>
<h3>Presetを選んでいく</h3>
<p><span class="marker"><strong>Manually select features</strong></span>を選び独自に設定していきます。</p>
<img class="alignnone size-full wp-image-3211" src="https://mito-lab.com/wp-content/uploads/2023/03/vue1.png" alt="" width="655" height="240" srcset="https://mito-lab.com/wp-content/uploads/2023/03/vue1.png 655w, https://mito-lab.com/wp-content/uploads/2023/03/vue1-300x110.png 300w" sizes="(max-width: 655px) 100vw, 655px" />
<div class="balloon-box balloon-left balloon-gray balloon-bg-none clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2019/05/dog2.jpg" alt="momo" width="80" height="80"></div>
<div class="icon-name">momo</div>
<div class="balloon-serif">
<div class="balloon-content">色々選択項目が出てくるけど大事なことは、typescriptでclass-styleの書き方がしたいので<span class="marker"><strong>Use class-style component syntax? Yes</strong></span>とすること。</div>
</div></div>
<img class="alignnone size-full wp-image-3212" src="https://mito-lab.com/wp-content/uploads/2023/03/vue2.png" alt="" width="646" height="229" srcset="https://mito-lab.com/wp-content/uploads/2023/03/vue2.png 646w, https://mito-lab.com/wp-content/uploads/2023/03/vue2-300x106.png 300w" sizes="(max-width: 646px) 100vw, 646px" />
<p>最後まで質問に答えるとインストールが始まります。</p>
<h3>ローカルサーバーを立ち上げる</h3>
<p>完了すると次の指示が表示されます。</p>
<img class="alignnone size-full wp-image-3225" src="https://mito-lab.com/wp-content/uploads/2023/03/vue3-1.png" alt="" width="385" height="370" srcset="https://mito-lab.com/wp-content/uploads/2023/03/vue3-1.png 385w, https://mito-lab.com/wp-content/uploads/2023/03/vue3-1-300x288.png 300w" sizes="(max-width: 385px) 100vw, 385px" />
<p>&nbsp;</p>
<p>ターミナルの指示通り進みます。</p>
<pre class="language-markup"><code>cd sample-app
npm run serve</code></pre>
<div class="balloon-box balloon-right balloon-none balloon-bg-gray clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2024/01/fukidashi.jpg" alt="mito" width="80" height="80"></div>
<div class="icon-name">mito</div>
<div class="balloon-serif">
<div class="balloon-content">コンパイルが成功して問題もなし！という情報が出たら成功です！</div>
</div></div>
<img class="alignnone size-full wp-image-3215" src="https://mito-lab.com/wp-content/uploads/2023/03/vue4.png" alt="" width="423" height="213" srcset="https://mito-lab.com/wp-content/uploads/2023/03/vue4.png 423w, https://mito-lab.com/wp-content/uploads/2023/03/vue4-300x151.png 300w" sizes="(max-width: 423px) 100vw, 423px" />
<p>無事、サイトが立ち上がりました！</p>
<img class="alignnone size-full wp-image-3216" src="https://mito-lab.com/wp-content/uploads/2023/03/vue5.png" alt="" width="922" height="663" srcset="https://mito-lab.com/wp-content/uploads/2023/03/vue5.png 922w, https://mito-lab.com/wp-content/uploads/2023/03/vue5-300x216.png 300w, https://mito-lab.com/wp-content/uploads/2023/03/vue5-768x552.png 768w" sizes="(max-width: 922px) 100vw, 922px" />
<h2>Vue3で書いた場合</h2>
<p>プロジェクト作成に時間がかかるのでその間にVue3で書いたコードを紹介します。</p>
<p>仕様はこちら↓</p>
<div class="simple-box6">
<p><a href="https://github.com/mito-work/vue-vite-goodnews" target="_blank" rel="noopener">mito-work/vue-vite-goodnews – GitHub</a></p>
</div>
<div class="balloon-box balloon-right balloon-none balloon-bg-gray clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2024/01/fukidashi.jpg" alt="mito" width="80" height="80"></div>
<div class="icon-name">mito</div>
<div class="balloon-serif">
<div class="balloon-content">要約すると、<span class="marker"><strong>ユーザーが入力したテキストがローカルストレージに登録される。登録したものを削除できる</strong></span>。といった簡単な投稿アプリです。</div>
</div></div>
<pre class="language-javascript"><code>&lt;script setup lang="ts"&gt;
import { isTemplateNode } from "@vue/compiler-core";
import { ref, computed } from "vue";
const newsList = ref([
  {
    id: 0,
    description: "新しい靴を買ったこと",
  },
  {
    id: 1,
    description: "好きなアニメの続編が公開された",
  },
]);
const disabled = ref&lt;boolean&gt;(true);
const limitInputCheck = computed(() =&gt; {
  if (inputDescriotion.value.length &gt;= 30 || inputDescriotion.value.length &lt;= 0) {
    disabled.value = true;
  } else {
    disabled.value = false;
  }
  return inputDescriotion.value.length &gt;= 20 ? "20文字以内でお願いします&#x1f62e;" : "";
});
const inputDescriotion = ref&lt;string&gt;("");
const input = () =&gt; {
  const news = { id: Date.now(), description: inputDescriotion.value };
  newsList.value.push(news);
  inputDescriotion.value = "";
};
const deleteItem = (id: number) =&gt; {
  newsList.value = newsList.value.filter((value) =&gt; {
    return value.id != id;
  });
};
&lt;/script&gt;

&lt;template&gt;
  &lt;div&gt;
    &lt;h1&gt;&#x1f389;Post Good News of the week&#x1f389;&lt;/h1&gt;
    &lt;div class="l-container"&gt;
      &lt;div class="l-container__form"&gt;
        &lt;label for="post"&gt;今週のうれしかったこと、楽しかったことを共有してください&lt;/label&gt;
        &lt;input type="text" id="post" v-model="inputDescriotion" /&gt;
        &lt;p v-if="limitInputCheck.length &gt; 0" class="p-alert"&gt;{{ limitInputCheck }}&lt;/p&gt;
        &lt;button type="button" class="p-btn-post" @click="input" :disabled="disabled"&gt;Post&lt;/button&gt;
      &lt;/div&gt;
      &lt;div class="l-container__list"&gt;
        &lt;p v-if="newsList.length &lt;= 0"&gt;投稿お待ちしています～&#x1f609;&lt;/p&gt;
        &lt;ul class="p-list"&gt;
          &lt;li v-for="item in newsList" :ley="item.id"&gt;
            &lt;p&gt;{{ item.description }}&lt;/p&gt;

            &lt;button type="button" class="p-btn-delete" @click="deleteItem(item.id)"&gt;Delete&lt;/button&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/template&gt;

&lt;style scoped&gt;
input[type="text"] {
  padding: 0.5rem;
  font-size: 1.5rem;
  width: 500px;
}
.l-container__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.p-btn-post {
  background-color: #f70a8d;
  color: #fff;
}
.p-btn-delete {
  padding: 0 2rem;
  background-color: rgb(128, 194, 233);
  color: #fff;
}
.p-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.p-list li {
  padding: 1rem 0.5rem;
  background-color: rgb(203, 240, 252);
  font-weight: bold;
  width: 500px;
  display: flex;
  justify-content: space-between;
}
.p-alert {
  color: #f70a8d;
  font-weight: bold;
}
&lt;/style&gt;</code></pre>
<p><a href="https://github.com/mito-work/vue-vite-goodnews/blob/main/goodnews-step1/src/App.vue" target="_blank" rel="noopener">vue-vite-goodnews/goodnews-step1/src/App.vue</a></p>
<h2>Vue2のclass-styleで書いた場合</h2>
<p>親子間のデータの受け渡しも実装してみたかったので、コンポーネントを分けました。</p>
<p>簡単なディレクトリは</p>
<p>APP.vue</p>
<p>components</p>
<p>|_Form.vue</p>
<p>|_List.vue</p>
<p>となっています。</p>
<h3>vueファイルの中身</h3>
<pre class="language-javascript"><code>&lt;template&gt;
  &lt;div id="app"&gt;
    &lt;h1&gt;&#x1f389;Post Good News of the week&#x1f389;&lt;/h1&gt;
    &lt;FormItem @input-item="inputParentsItem($event)" /&gt;
    &lt;List :postList="postList" @delete-item="deletParentItem($event)" /&gt;
  &lt;/div&gt;
&lt;/template&gt;

&lt;script lang="ts"&gt;
import { Component, Vue } from "vue-property-decorator";
import FormItem from "./components/Form.vue";
import List from "./components/List.vue";
import { Post } from "./newsItem";

@Component({
  components: {
    FormItem,
    List,
  },
})
export default class App extends Vue {
  postList = [
    {
      id: 0,
      description: "新し靴を買ったこと",
    },
    {
      id: 1,
      description: "早起きできた",
    },
  ];

  inputParentsItem($event: string): void {
    const post: Post = { id: Date.now(), description: $event };
    this.postList.push(post);
  }
  deletParentItem($event: number): void {
    this.postList = this.postList.filter((val) =&gt; {
      return val.id != $event;
    });
  }
}
&lt;/script&gt;

&lt;style&gt;
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;

  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
button {
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
  font-weight: 500;
}
&lt;/style&gt;
</code></pre>
<p><a href="https://github.com/mito-work/vue-cli-goodnews-/blob/main/src/App.vue" target="_blank" rel="noopener">vue-cli-goodnews-/blob/main/src/App.vue</a></p>
<pre class="language-javascript"><code>&lt;template&gt;
  &lt;div class="l-container__form"&gt;
    &lt;label for="post"&gt;今週のうれしかったことを共有してください&lt;/label&gt;
    &lt;input type="text" id="post" v-model="inputDescription" /&gt;
    &lt;p v-if="limitInputCheck" class="p-alert"&gt;{{ limitInputCheck }}&lt;/p&gt;
    &lt;button type="button" class="p-btn-post" @click="inputItem" :disabled="disabled"&gt;Post&lt;/button&gt;
  &lt;/div&gt;
&lt;/template&gt;

&lt;script lang="ts"&gt;
import { Vue, Component, Emit } from "vue-property-decorator";
@Component
export default class Form extends Vue {
  inputDescription = "";
  disabled = true;
  //emit
  @Emit("input-item")
  inputItem(): string {
    return this.inputDescription;
  }
  //computed
  get limitInputCheck(): string | null {
    if (this.inputDescription.length &gt;= 20 || this.inputDescription.length &lt;= 0) {
      this.disabled = true;
    } else {
      this.disabled = false;
    }
    return this.inputDescription.length &gt;= 20 ? "20文字以内でお願いします&#x1f62e;" : "";
  }
}
&lt;/script&gt;

&lt;style scoped&gt;
input[type="text"] {
  padding: 0.5rem;
  font-size: 1.5rem;
  width: 500px;
}
button:disabled {
  border: none;
  filter: opacity(0.4);
  cursor: not-allowed;
}
.l-container__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.p-btn-post {
  background-color: #f70a8d;
  color: #fff;
}
.p-alert {
  color: #f70a8d;
  font-weight: bold;
}
&lt;/style&gt;
</code></pre>
<p><a href="https://github.com/mito-work/vue-cli-goodnews-/blob/main/src/components/Form.vue" target="_blank" rel="noopener">vue-cli-goodnews-/blob/main/src/components/Form.vue</a></p>
<pre class="language-javascript"><code>&lt;template&gt;
  &lt;div class="l-container__list"&gt;
    &lt;!-- &lt;ul&gt;
      &lt;li v-for="post in postList" :key="post.id"&gt;{{ post.id }}&lt;/li&gt;
    &lt;/ul&gt; --&gt;
    &lt;p v-if="postList.length &lt;= 0"&gt;投稿お待ちしています～&#x1f609;&lt;/p&gt;
    &lt;ul class="p-list"&gt;
      &lt;li v-for="post in postList" :key="post.id"&gt;
        &lt;p&gt;{{ post.description }}&lt;/p&gt;
        &lt;button type="button" class="p-btn-delete" @click="deleteItem(post.id, post.description)"&gt;Delete&lt;/button&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
&lt;/template&gt;

&lt;script lang="ts"&gt;
import { Vue, Component, Emit, Prop } from "vue-property-decorator";
import { Post } from "../newsItem";
@Component
export default class List extends Vue {
  @Prop() postList!: Post[];
  @Emit("delete-item")
  deleteItem(id: number, description: string): number | null {
    if (confirm(`${description}を削除してよいですか？`)) {
      return id;
    }
    return null;
  }
}
&lt;/script&gt;

&lt;style scoped&gt;
.p-btn-delete {
  padding: 0 2rem;
  background-color: rgb(128, 194, 233);
  color: #fff;
}
.p-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.p-list li {
  padding: 1rem 0.5rem;
  background-color: rgb(203, 240, 252);
  font-weight: bold;
  width: 500px;
  display: flex;
  justify-content: space-between;
}
&lt;/style&gt;</code></pre>
<p><a href="https://github.com/mito-work/vue-cli-goodnews-/blob/main/src/components/List.vue" target="_blank" rel="noopener">vue-cli-goodnews-/blob/main/src/components/List.vue</a></p>
<h3>型定義ファイルの中身</h3>
<pre class="language-javascript"><code>export type Item = { [key: string]: string | number };
export type Post = {
  id: number;
  description: string;
};</code></pre>
<p><a href="https://github.com/mito-work/vue-cli-goodnews-/blob/main/src/newsItem.ts" target="_blank" rel="noopener">vue-cli-goodnews-/blob/main/src/newsItem.ts</a></p>
<h2>Vue2のclass-styleで書いたコードのポイント</h2>
<div class="balloon-box balloon-right balloon-none balloon-bg-gray clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2024/01/fukidashi.jpg" alt="mito" width="80" height="80"></div>
<div class="icon-name">mito</div>
<div class="balloon-serif">
<div class="balloon-content">最初はvue3の書き方と全然違う！と戸惑いましたが、よく読んでいくと、理解できるようになりました。</div>
</div></div>
<p>ポイントは、以下2つだと思います。</p>
<div class="simple-box2">
<p><span class="marker"><strong>・class構文が使えるような書き方をしていること</strong></span></p>
<p><span class="marker"><strong>・TypeScript特有のデコレーターの書き方でclassを拡張していること</strong></span></p>
</div>
<p>もう少し詳しく書きます。</p>
<p><code><span class="pl-k">import</span> { <span class="pl-smi">Component</span>, <span class="pl-smi">Vue</span> } <span class="pl-k">from</span> <span class="pl-s"><span class="pl-pds">"</span>vue-property-decorator<span class="pl-pds">"</span></span>;</code></p>
<p>とvue-property-decoratorからComponentとVueをインポートしています。vue-property-decoratorはTypeScript固有のclass構文を書くためのパッケージです。</p>
<p>&nbsp;</p>
<div class="balloon-box balloon-left balloon-gray balloon-bg-none clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2019/05/dog2.jpg" alt="momo" width="80" height="80"></div>
<div class="icon-name">momo</div>
<div class="balloon-serif">
<div class="balloon-content"><span class="marker"><strong>「Use class-style component syntax」をyes</strong></span>にすると使えるよ！</div>
</div></div>
<div class="balloon-box balloon-right balloon-none balloon-bg-gray clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2024/01/fukidashi.jpg" alt="mito" width="80" height="80"></div>
<div class="icon-name">mito</div>
<div class="balloon-serif">
<div class="balloon-content"><span class="marker"><strong>property-decoratorによってさまざまなデコレーターが使えるようになっています</strong></span></div>
</div></div>
<p>個人的に違うと感じたポイント</p>
<div class="simple-box2">
<p><strong>・classはvueを拡張したclassとして書く。(<code><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-en">Form</span> <span class="pl-k">extends</span> <span class="pl-e">Vue{}</span></code>)</strong></p>
<p><strong>・@Component,@Emit,@Propなどデコレーターの書き方をしている</strong></p>
<p><strong>・computedはget 関数名で表現する</strong></p>
</div>
<h2>Netlifyでサイトを公開する(おまけ)</h2>
<p>今回は静的サイトを簡単に公開できるnetlifyを使って公開してみました。</p>
<h3>下準備(本番環境用にビルドする)</h3>
<p><code>npm run build</code></p>
<p>を行い、作ったファイルを本番環境用にビルドします。</p>
<div class="balloon-box balloon-left balloon-gray balloon-bg-none clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2019/05/dog2.jpg" alt="momo" width="80" height="80"></div>
<div class="icon-name">momo</div>
<div class="balloon-serif">
<div class="balloon-content"><span class="marker"><strong>本番公開用にdistフォルダが出来上がるよ！</strong></span></div>
</div></div>
<img class="alignnone size-full wp-image-3217" src="https://mito-lab.com/wp-content/uploads/2023/03/netlify4.png" alt="" width="580" height="460" srcset="https://mito-lab.com/wp-content/uploads/2023/03/netlify4.png 580w, https://mito-lab.com/wp-content/uploads/2023/03/netlify4-300x238.png 300w" sizes="(max-width: 580px) 100vw, 580px" />
<h3>netlifyにsign upする</h3>
<div class="balloon-box balloon-right balloon-none balloon-bg-gray clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2024/01/fukidashi.jpg" alt="mito" width="80" height="80"></div>
<div class="icon-name">mito</div>
<div class="balloon-serif">
<div class="balloon-content"><b>githubアカウントを使いました。</b></div>
</div></div>
<img class="alignnone size-full wp-image-3218" src="https://mito-lab.com/wp-content/uploads/2023/03/netlify1.jpg" alt="" width="1842" height="934" srcset="https://mito-lab.com/wp-content/uploads/2023/03/netlify1.jpg 1842w, https://mito-lab.com/wp-content/uploads/2023/03/netlify1-300x152.jpg 300w, https://mito-lab.com/wp-content/uploads/2023/03/netlify1-1024x519.jpg 1024w, https://mito-lab.com/wp-content/uploads/2023/03/netlify1-768x389.jpg 768w, https://mito-lab.com/wp-content/uploads/2023/03/netlify1-1536x779.jpg 1536w" sizes="(max-width: 1842px) 100vw, 1842px" />
<img class="alignnone size-full wp-image-3219" src="https://mito-lab.com/wp-content/uploads/2023/03/netlify2.png" alt="" width="967" height="880" srcset="https://mito-lab.com/wp-content/uploads/2023/03/netlify2.png 967w, https://mito-lab.com/wp-content/uploads/2023/03/netlify2-300x273.png 300w, https://mito-lab.com/wp-content/uploads/2023/03/netlify2-768x699.png 768w" sizes="(max-width: 967px) 100vw, 967px" />
<h3>distフォルダ一式をアップロードする</h3>
<p>Sitesタブに移動し、下準備で作成した<span class="marker"><strong>distファイル</strong></span>をドラッグ&amp;ドロップでアップロードします。</p>
<div class="balloon-box balloon-right balloon-none balloon-bg-gray clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2024/01/fukidashi.jpg" alt="mito" width="80" height="80"></div>
<div class="icon-name">mito</div>
<div class="balloon-serif">
<div class="balloon-content">なんとそれだけでURLが発行されサイトが公開されます！</div>
</div></div>
<img class="alignnone size-full wp-image-3220" src="https://mito-lab.com/wp-content/uploads/2023/03/netlify3.png" alt="" width="1816" height="357" srcset="https://mito-lab.com/wp-content/uploads/2023/03/netlify3.png 1816w, https://mito-lab.com/wp-content/uploads/2023/03/netlify3-300x59.png 300w, https://mito-lab.com/wp-content/uploads/2023/03/netlify3-1024x201.png 1024w, https://mito-lab.com/wp-content/uploads/2023/03/netlify3-768x151.png 768w, https://mito-lab.com/wp-content/uploads/2023/03/netlify3-1536x302.png 1536w" sizes="(max-width: 1816px) 100vw, 1816px" />
<img class="alignnone size-full wp-image-3221" src="https://mito-lab.com/wp-content/uploads/2023/03/netlify5.png" alt="" width="1816" height="577" srcset="https://mito-lab.com/wp-content/uploads/2023/03/netlify5.png 1816w, https://mito-lab.com/wp-content/uploads/2023/03/netlify5-300x95.png 300w, https://mito-lab.com/wp-content/uploads/2023/03/netlify5-1024x325.png 1024w, https://mito-lab.com/wp-content/uploads/2023/03/netlify5-768x244.png 768w, https://mito-lab.com/wp-content/uploads/2023/03/netlify5-1536x488.png 1536w" sizes="(max-width: 1816px) 100vw, 1816px" />
<div class="balloon-box balloon-left balloon-gray balloon-bg-none clearfix">
<div class="balloon-icon maru"><img src="https://mito-lab.com/wp-content/uploads/2019/05/dog2.jpg" alt="momo" width="80" height="80"></div>
<div class="icon-name">momo</div>
<div class="balloon-serif">
<div class="balloon-content"><b>URLを変更したい場合は<span class="marker">Site setting</span>sから変更できるよ！</b></div>
</div></div>
<p>公開したサイトはこちら↓</p>
<img class="alignnone size-full wp-image-3222" src="https://mito-lab.com/wp-content/uploads/2023/03/netlify.png" alt="" width="570" height="232" srcset="https://mito-lab.com/wp-content/uploads/2023/03/netlify.png 570w, https://mito-lab.com/wp-content/uploads/2023/03/netlify-300x122.png 300w" sizes="(max-width: 570px) 100vw, 570px" />
<div class="simple-box6">
<p><a href="https://vuecli-goodnews.netlify.app/" target="_blank" rel="noopener">vuecli-goodnews.netlify.app | netlify</a></p>
</div>
<h2>Special Thanks</h2>
<p>以下サイトとUdemy教材をとても参考にさせていただきました。</p>
<div class="simple-box9">
<p id="post-60167" class="article__title"><a href="https://mae.chab.in/archives/60167#post60167-5" target="_blank" rel="noopener"><span style="font-size: 16px;">TypeScriptでVue.jsを書く – Vue CLIを使った開発のポイントを紹介</span></a></p>
</div>
<div class="simple-box9">
<p><a href="https://www.udemy.com/course/vue-js-complete-guide/" target="_blank" rel="noopener">超Vue.js 2 完全パック (Vue Router, Vuex含む)</a></p>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mito-lab.com/typescript-vue-jsvue2-class-style/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
