Skip to content

Instantly share code, notes, and snippets.

View Eviwang's full-sized avatar
🎯
Focusing

EviWang Eviwang

🎯
Focusing
View GitHub Profile
<template>
<div>
<q-tooltip ref="tooltip" v-for="item of 3" :key="item">
</q-tooltip>
<ul>
<li style="width:100px;border:solid 1px red;" v-for="i of 20" :key="i"
@mouseenter="enter($event,i)"
@mouseleave="leave($event)"
const argv = require("yargs").argv;
const env = argv.env || "development";
import {
baseUrl
} from './env'
export default async(url = '', data = {}, type = 'GET', method = 'fetch') => {
type = type.toUpperCase();
url = baseUrl + url;
if (type == 'GET') {
let dataStr = ''; //数据拼接字符串
参考链接:
https://github.com/dimsemenov/PhotoSwipe/issues/741
@Eviwang
Eviwang / TransitionRouter.js
Last active April 26, 2019 10:48
react 路由动画 React Router + CSSTransition
import React, { Component } from "react";
import {
HashRouter as Router,
Link,
Route,
Redirect,
Switch,
NavLink
} from "react-router-dom";
import { CSSTransition, TransitionGroup } from "react-transition-group";
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
<style>
.box {
width: 400px;
<template>
<div class="box" ref="scrollBox" @scroll="loadMore">
<ul>
<li v-for="i of items" >{{i}}</li>
</ul>
</div>
</template>
<script>
import _ from "lodash";
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div id="app">
<template>
<div class="box">
<transition v-for="ball of balls" name="fade" @after-enter="afterEnter" @enter="enter" @before-enter="beforeEnter">
<div v-show="ball.isShow" class="ball" >
<div class="inner"></div>
</div>
</transition>
{{count}}
<transition name="scroll">
<span class="icon-dec" v-show="isScrollShow" @click="count--" >-</span>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
<style>
.box,
.inner {