GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ModusCreateOrg/ionic-vue at dev

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

322 Commits
322 Commits

Folders and files

NameName
Last commit message
Last commit date
.circleci
.circleci
 
 
build
build
 
 
scripts
scripts
 
 
src
src
 
 
test
test
 
 
.babelrc
.babelrc
 
 
.editorconfig
.editorconfig
 
 
.eslintrc.js
.eslintrc.js
 
 
.gitignore
.gitignore
 
 
.prettierrc
.prettierrc
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
jest.config.js
jest.config.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
sonar-project.properties
sonar-project.properties
 
 
tsconfig.json
tsconfig.json
 
 
tslint.json
tslint.json
 
 

Repository files navigation

Ionic-Vue

CircleCI codecov SonarQube PRs Welcome MIT Licensed

Ionic 5 integration adapters for Vue 3.

@modus/ionic-vue

Status: Alpha

This is a prerelease, most of the functionality is in there such as the router, animations, input and overlay components. Since we are building on top of prereleases of Vue and VueRouter there may be breaking changes and bugs. The prerelease is created for early adopters to test the library and provide feedback, bug reports and feature requests.

Roadmap

Please consult the projects page for more details.

Installing / Getting started

A quick introduction of the minimal setup you need to get a hello world up and running.

npm install @ionic/core @modus/ionic-vue

Now you can use it during the initialization step of your Vue app. Note that createRouter is imported from @modus/ionic-vue and not vue-router this will allow you to get Ionic transitions between your routes out of the box.

import { createApp } from "vue";
import { createWebHistory } from "vue-router";
import { IonicVue, createRouter } from "@modus/ionic-vue";

// Ionic core styles
import "@ionic/core/css/ionic.bundle.css";

import App from "./App.vue";
import Home from "./components/Home.vue";
import Page from "./components/Page.vue";

const history = createWebHistory();
const router = createRouter({
  history,
  routes: [
    { path: "/", component: Home },
    { path: "/page", component: Page },
  ],
});

const globalIonicConfig = { mode: 'ios' };

const app = createApp(App)
  .use(IonicVue, globalIonicConfig)
  .use(router);

  IonicVue.isReady().then(() => {
    router.isReady().then(() => {
      app.mount("#app");
    });
  });

All components should be explicitly imported now, this allows for smaller build sizes and improved tree-shaking. Import IonApp and IonRouterView from @modus/ionic-vue, this will be your app's entry point.

<template>
  <ion-app>
    <ion-router-view />
  </ion-app>
</template>

<script>
import { IonApp, IonRouterView } from "@modus/ionic-vue";

export default {
  name: "App",
  components: {
    IonApp,
    IonRouterView
  },
};
</script>

Everything is a component now, here's an example of how you could trigger a modal

<template>
  <div class="ion-page">
    <ion-header>
      <ion-toolbar>
        <ion-title>Home</ion-title>
        <ion-buttons slot="start">
          <ion-back-button />
        </ion-buttons>
      </ion-toolbar>
    </ion-header>

    <ion-content>
      <p>{{ msg }}</p>
      <ion-button @click="openModal">Open modal</ion-button>
    </ion-content>

    <ion-modal :isOpen="isOpen" @willDismiss="closeModal">
      <h1>My modal content</h1>
      <ion-item>
        <ion-label>My input</ion-label>
        <ion-input v-model="msg" :clearInput="true" />
      </ion-item>
    </ion-modal>
  </div>
</template>

<script>
import {
  IonHeader,
  IonToolbar,
  IonTitle,
  IonButtons,
  IonBackButton,
  IonContent,
  IonButton,
  IonModal,
  IonItem,
  IonLabel,
  IonInput
} from '@modus/ionic-vue';

export default {
  name: 'Home',
  components: {
    IonHeader,
    IonToolbar,
    IonTitle,
    IonButtons,
    IonBackButton,
    IonContent,
    IonButton,
    IonModal,
    IonItem,
    IonLabel,
    IonInput,
  },
  data() {
    return {
      isOpen: false,
      msg: "",
    }
  },
  methods: {
    openModal() {
      this.isOpen = true;
    },
    closeModal(e) {
      console.log(e);
      this.isOpen = false;
    },
  }
}
</script>

IonicVue Router

IonicVue Router binds Ionic transitions and routing functionalities to Vue Router. It is an extension of the official Vue Router thus it can be used as a drop-in replacement with all of the methods, hooks, etc. working as expected.

Developing

Clone the repo's dev branch and install dependencies to get started with development.

git clone https://github.com/moduscreateorg/ionic-vue.git -b dev
cd ionic-vue/
npm install

We recommend trying out your ionic-vue changes in an actual app. You can do that with npm link:

cd ionic-vue/
npm link
cd ../sample-app/
npm link @modus/ionic-vue

Building

Rollup automatically creates distribution packages.

For development build run:

npm run dev

For automatic rebuild on changes run:

npm run watch

For production build run:

npm run prod

Static Analysis

The ionic-vue project uses SonarQube's SonarCloud product for static analysis scans.

Our publicly available dashboard for the project can be found here

Modus Create

Modus Create is a digital product consultancy. We use a distributed team of the best talent in the world to offer a full suite of digital product design-build services; ranging from consumer facing apps, to digital migration, to agile development training, and business transformation.

Modus Create

This project is part of Modus Labs.

Modus Labs

Licensing

This project is MIT licensed.

About

Vuejs integration for Ionic versions 4 and 5

Topics

hacktoberfestionicvuevue-routervuejs

Resources

Readme
License

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

267 stars

Watchers

15 watching

Forks

24 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.