Skip to content

Instantly share code, notes, and snippets.

<template id="vueCropper">
<div>
<input type="file" @change="selectFile" />
<div v-if="cropping"
ref="cropperdiv"
:style="cropperDivStyle">
<canvas ref="canvas"
:width="canvasWidth"
:height="canvasHeight"
@mousemove="moveMouse"
<div id="app">
<div class="main-box">
<button @click="add">Add</button>
<div class="main-box-tab">
<i @click="previous"><<</i>
<i @click="next">>></i>
<div class="main-box-tab-content" ref="tabs">
<div class="main-box-tab-roll">
<div v-for="(item,index) in tabs" :key="index"
:class="{'tab-item-action':actionName === item.name ,'tab-item':actionName !== item.name}"
@edwardlorilla
edwardlorilla / index.html
Created May 23, 2021 16:03
vuejs Weekly Expenses app with chart.js
<div id="app">
<canvas ref="myChart" style="width:100%;max-width:600px"></canvas>
<input type="number" v-model="addValue">
<button @click="addChart">Add</button>
<ul>
<li v-for="(transaction, index) in recentTransaction">amount: {{transaction.amount}} <button @click="deleteItem(index)">delete</button></li>
</ul>
</div>
@edwardlorilla
edwardlorilla / index.html
Created May 20, 2021 16:05
【JAVASCRIPT】canvas realizes colorful clock effect
<canvas id="clock" width="500" height="500" ></canvas>
@edwardlorilla
edwardlorilla / index.html
Created May 20, 2021 16:03
vue implements the slide-able delete function
<div id="app">
<div>
<div class="biggestBox">
<ul>
<!-- data-type=0 hide the delete button data-type=1 show the delete button -->
<li class="li_vessel" v-for="(item,index) in lists "data-type="0" :key="index">
<!-- "touchstart" is triggered when the finger touches the screen "touchend" is triggered when the finger leaves the screen "capture" is used for event capture -->
<div @touchstart.capture="touchStart" @touchend.capture="touchEnd" @click="oneself">
<div class="contant">
@edwardlorilla
edwardlorilla / index.html
Created May 17, 2021 15:50
JavaScript implements draggable progress bar
<body>
<ul style='width:100%;margin-top:15rem;'>
<li>
<div class = 'box'>
<div class="scale" id="bar">
<div></div>
<span id="btn"></span>
</div>
</div>
<div class='boxDesc'>
@edwardlorilla
edwardlorilla / index.html
Created May 17, 2021 15:49
vue-table implements adding and deleting
<div id="app">
<div class="table_box">
<h1>Form exercises</h1>
<input type="text" v-model="text"/>
<button @click="add">Add</button>
<table class="table" border="1">
<thead>
<tr>
<th>Serial number</th>
<th>Brand</th>
@edwardlorilla
edwardlorilla / index.html
Created May 14, 2021 15:24
Vue seamless carousel effect (Marquee) using transition
<template id="swiper">
<div class="Sweiper">
<slot></slot>
</div>
</template>
<template id="Sweiper-item">
<transition>
<div class="Sweiper-item" v-show="isShow">
<slot></slot>
</div>