Skip to content

Instantly share code, notes, and snippets.

View ejirocodes's full-sized avatar
Shipping

Ejiro Asiuwhu ejirocodes

Shipping
View GitHub Profile
[
{
name: {
common: "Austria",
official: "Republic of Austria",
nativeName: {
bar: {
official: "Republik Österreich",
common: "Österreich"
}
TypeScript 32 hrs 51 mins ████████████▊░░░░░░░░ 61.1%
Vue.js 17 hrs 10 mins ██████▋░░░░░░░░░░░░░░ 31.9%
Bash 2 hrs 38 mins █░░░░░░░░░░░░░░░░░░░░ 4.9%
CSS 34 mins ▏░░░░░░░░░░░░░░░░░░░░ 1.1%
JSON 23 mins ▏░░░░░░░░░░░░░░░░░░░░ 0.7%
import React, { useState } from 'react';
export default function Image() {
const [imgUrl, setImgUrl] = useState('');
const [imgUpload, setImgUpload] = useState('');
const handleImageChange = (e) => {
console.log(e.target.files[0]);
// use this to display the image on the DOM
setImgUrl(URL.createObjectURL(e.target.files[0]));
<template>
<div>
<date-picker v-model="date" />
</div>
</template>
<script>
export default {
data() {
return {
@ejirocodes
ejirocodes / Login.vue
Created June 13, 2021 13:06
Vue: Passing data from child to parent component - Emit
<script>
export default {
data() {
return {
loginModalState: null,
isDisabled: false,
};
},
props: {
<template>
<section class="svg">
<svg
version="1.1"
id="Capa_1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px"
y="0px"
viewBox="0 0 489.914 489.914"
<template>
<f7-page>
<section id="cart" class="padding">
<div
class="top display-flex align-items-center justify-content-space-between"
>
<f7-link back class="back">
<svg
version="1.1"
width="1rem"
<template>
<f7-page>
<section class="prod-details">
<div
class="top display-flex align-items-center justify-content-space-between"
>
<f7-link back class="back">
<svg
version="1.1"
width="1rem"
<template>
<div id="product">
<div class="item" v-for="product in products" :key="product.id">
<img
:src="product.cover"
:alt="product.title"
class="cover"
@click="handleProduct(product)"
/>
<div
<template>
<f7-page>
<f7-toolbar tabbar bottom>
<f7-link tab-link="#tab-1" tab-link-active>Home</f7-link>
<f7-link tab-link="#tab-2">
<f7-badge color="red">{{ cartItems }}</f7-badge>
<span class="tabbar-label">Cart</span>
</f7-link>
</f7-toolbar>
<f7-tabs animated swipeable>