Skip to content

Instantly share code, notes, and snippets.

View YanceyOfficial's full-sized avatar
🎯
Focusing

Yancey Leo YanceyOfficial

🎯
Focusing
View GitHub Profile
// 父组件
<template>
<div class="home">
<Child
staticTxt="向子组件传递静态文字"
:propValue="propValue"
@parentMethod2="parentMethod2"
:parentMethod3="parentMethod3"
/>
</div>
@YanceyOfficial
YanceyOfficial / sass_memorandum.scss
Last active July 24, 2019 09:44
Sass Memorandum
@charset "UTF-8";
// 数组的两种定义 有逗号/无逗号
$font_family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
$margin: 10px 5px 10px 5px;
body {
font-family: $font_family;
margin: $margin;
}
@YanceyOfficial
YanceyOfficial / robot.html
Created January 25, 2019 16:32
调戏图灵机器人
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Robot</title>
<style>
#feedback{
display: flex;
flex-direction: column;
@YanceyOfficial
YanceyOfficial / App.js
Last active January 28, 2019 09:31
[源码] 尝试创建一个React通用UI组件
import React, { Component } from 'react';
import Button from './components/Button/Button';
import { useState } from 'react';
import { library } from '@fortawesome/fontawesome-svg-core';
import {
faSpinner,
faTrashAlt,
faSave,
} from '@fortawesome/free-solid-svg-icons';
@YanceyOfficial
YanceyOfficial / license-badges.md
Created March 9, 2019 12:28 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

@YanceyOfficial
YanceyOfficial / BOM.js
Created March 19, 2019 10:05
BOM一些好玩的东西
// 全屏/关闭全屏
document.documentElement.requestFullscreen.call(document.documentElement)
document.webkitCancelFullScreen.call(document)
@YanceyOfficial
YanceyOfficial / ws.vue
Created April 15, 2019 09:07
[demo] sock.js + stomp.js
<template lang="pug">
SomeComponent(:data="data")
</template>
<script lang="ts">
import Vue from 'vue';
import Component from 'vue-class-component';
import { Watch } from 'vue-property-decorator';
import SockJS from 'sockjs-client';
import Stomp from 'stompjs';
@YanceyOfficial
YanceyOfficial / fe_pagination_search.vue
Last active May 17, 2019 03:13
Vue + Element UI Table + TypeScript + 前端分页 + 前端模糊查询
<template lang='pug'>
.wrapper
el-input(
placeholder='请输入检索条件'
prefix-icon='el-icon-search',
v-model='searchValue',
)
el-table(
:data='tables.slice((curPage - 1) * curPageSize, curPage * curPageSize)',
stripe,
enum Direction {
  Up = 1,
  Down,
  Left,
  Right
}
import axios, { AxiosError, AxiosResponse, AxiosRequestConfig } from 'axios'
import { Observable } from 'rxjs'
const { CancelToken } = axios
// config timeout
axios.defaults.timeout = 30 * 1000
// config cookie
// axios.defaults.withCredentials = true;