After git pull:
npm install
npx cap sync
ionic capacitor run android -l
// ... | |
<script> | |
import { ref, onMounted, onUnmounted } from '@vue/composition-api' | |
export default { | |
setup(props) { | |
const pageOffset = ref(0) | |
const update = () => { | |
pageOffset.value = window.pageYOffset | |
} |
<template> | |
<div id="app"> | |
<PostsPage :id="currentUser" /> | |
</div> | |
</template> | |
<script> | |
import { fetchUserPosts } from '@/api' | |
import PostsPage from '@/components/PostsPage' | |
const withPostsHOC = (WrappedComponent) => ({ |
<template> | |
<div class="container"> | |
<p v-if="isLoading" class="loading">Posts loading...</p> | |
<template v-else> | |
<div class="topbar" :class="{ open: pageOffset > 120 }"> | |
<div class="container content"> | |
<h3>User #{{ id }} posts</h3> | |
<span class="count">{{ count }} items</span> | |
</div> | |
</div> |
<template> | |
<div class="container"> | |
<p v-if="isLoading" class="loading">Posts loading...</p> | |
<template v-else> | |
<div class="topbar" :class="{ open: pageOffset > 120 }"> | |
<div class="container content"> | |
<h3>User #{{ id }} posts</h3> | |
<span class="count">{{ count }} items</span> | |
</div> | |
</div> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<title>My App</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<script src="lib/vue.js"></script> | |
<script src="lib/vue-router.js"></script> | |
</head> |
export default { | |
template: `<div>About My Site</div>` | |
}; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<title>My App</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<script src="lib/vue.js"></script> | |
<!-- <script src="https://cdn.jsdelivr.net/npm/vue-router/dist/vue-router.js"></script> --> | |
</head> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<title>Page Title</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<script src="lib/vue.js"></script> | |
</head> | |
<body> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<title>Page Title</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<script src="lib/vue.js"></script> | |
</head> | |
<body> |