Skip to content

Instantly share code, notes, and snippets.

View loveyunk's full-sized avatar
🌻
Grinding

yw loveyunk

🌻
Grinding
  • 克莱登
  • Beijing, China
View GitHub Profile
html {
font-family: sans-serif;
}
body {
margin: 0;
}
form {
width: 90%;
<!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>Form</title>
</head>
<body>
<div id="app">
<!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>Vue Todo</title>
<style>
html,
body {
@loveyunk
loveyunk / copyToClipBoard.html
Created August 9, 2019 07:30
copyToClipBoard
<!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>copyToClipBoard</title>
</head>
<body>
<div class="hl7MsgBox">
@loveyunk
loveyunk / nativeJavaScript.js
Created June 4, 2019 12:19 — forked from alexhawkins/nativeJavaScript.js
Implementation of Native JavaScript Methods (forEach, Map, Filter, Reduce, Every, Some)
'use strict';
/*****************NATIVE forEACH*********************/
Array.prototype.myEach = function(callback) {
for (var i = 0; i < this.length; i++)
callback(this[i], i, this);
};
//tests
const { createStore } = require('redux');
const initialState = {
age: 21
};
const myReducer = (state = initialState, action) => {
let newState = { ...state };
if (action.type === 'ADD') {
newState.age += 1;
import React, { useState } from 'react';
import className from 'classnames';
import CSSModules from 'react-css-modules';
import styles from './Foo.module.scss';
export interface FooProps {
className?: string;
prefixCls?: string;
}
import React from 'react';
import classNames from 'classnames';
import CSSModules from 'react-css-modules';
import styles from './Foo.module.scss';
export interface FooProps {
className: string;
prefixCls: string;
type: 'default' | 'primary' | 'danger';
}
// 参考:https://github.com/yanatan16/nanoajax
// Best place to find information on XHR features is:
// https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
function ajax(params, callback) {
var reqfields = [
'responseType', 'withCredentials', 'timeout', 'onprogress'
];
// Simple and small ajax function
// Takes a parameters object and a callback function
<!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>
</head>