0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Vuetifyやーる #Vue #Vuetify

Last updated at Posted at 2021-04-24

1.Private レポジトリを作成

image.png

2.作ったレポジトリをクローン
image.png

image.png

3.Azure Static Web App 拡張機能を入れる
なんかGitHubの権限でエラー出たのでVSCodeからStatic Web Appを作るのやめた
image.png

4.Azureポータルから静的Webアプリを作成する
image.png

image.png

image.png

デプロイが完了したら、URLにアクセス
image.png

Git Actionsでデプロイ中
image.png

完了したらこんな感じ
image.png

5.ローカルで開発

git clone
cd vuetify-samples

npm install
npm run serve
http://localhost:8080/
image.png

vue cliは最初から入っているので以下はやらなくてOK。入れたい場合は、
https://qiita.com/C_HERO/items/318fe65871f8e53e8c80 を参考に

npm install -g @vue/cli
vue --version 
@vue/cli 4.5.12

vue uiを立ち上げる

vue ui

インポート
image.png

フォルダを選ぶ
image.png

プラグインから
image.png

vuetifyをインストール
image.png

インストールを終了する
image.png

起動できる
image.png

http://localhost:8080/
image.png

App.vue

<template>
  <v-app>
    <v-app-bar
      app
      color="primary"
      dark
    >
      <div class="d-flex align-center">
        <v-img
          alt="Vuetify Logo"
          class="shrink mr-2"
          contain
          src="https://cdn.vuetifyjs.com/images/logos/vuetify-logo-dark.png"
          transition="scale-transition"
          width="40"
        />

        <v-img
          alt="Vuetify Name"
          class="shrink mt-1 hidden-sm-and-down"
          contain
          min-width="100"
          src="https://cdn.vuetifyjs.com/images/logos/vuetify-name-dark.png"
          width="100"
        />
      </div>

      <v-spacer></v-spacer>

      <v-btn
        href="https://github.com/vuetifyjs/vuetify/releases/latest"
        target="_blank"
        text
      >
        <span class="mr-2">Latest Release</span>
        <v-icon>mdi-open-in-new</v-icon>
      </v-btn>
    </v-app-bar>

    <v-main>
      <HelloWorld/>
    </v-main>
  </v-app>
</template>

<script>
import HelloWorld from './components/HelloWorld';

export default {
  name: 'App',

  components: {
    HelloWorld,
  },

  data: () => ({
    //
  }),
};
</script>

header
image.png

v-footer
https://vuetifyjs.com/ja/components/footer/#padless-footer
image.png

App.vue

<template>
  <v-app>
    <Header/>
    <v-main>
      <HelloWorld/>
    </v-main>
    <Footer/>
  </v-app>
</template>

<script>
import HelloWorld from './components/HelloWorld';
import Header from './components/Header';
import Footer from './components/Footer';

export default {
  name: 'App',

  components: {
    HelloWorld,
    Header,
    Footer,
  },

  data: () => ({
    //
  }),
};
</script>

vue router
App.vueが書き換わるので注意

<template>
  <div id="app">
    <div id="nav">
      <router-link to="/">Home</router-link> |
      <router-link to="/about">About</router-link>
    </div>
    <router-view/>
  </div>
</template>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>

image.png

image.png

form
https://vuetifyjs.com/ja/components/forms/
image.png

API
image.png

成果物

参考

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?