title | badge | name | type | prev | next |
---|---|---|---|---|---|
Text 文本显示 |
Text |
BaseComponent |
View |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Carousel } from 'antd-mobile' | |
import { View, Image, StyleSheet } from 'react-native' | |
class SchoolLife extends Component { | |
render () { | |
return ( | |
<Carousel autoplay infinite> | |
<Image | |
source={{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
const path = require('path') | |
const { | |
exec | |
} = require('child_process') | |
const file = process.argv[2] | |
const filename = file.split('.')[0] | |
if (!file) { |
知识图谱:
- HTML/CSS 基本知识
- HTML/CSS 常见布局(Flex布局)
- HTML5/CSS3 新增内容
- React + 底层原理 + 性能优化 + 高阶组件 + Redux
- JavaScript模块化 + cmd/umd/es6 import + React中的使用
- Microtask + Macrotask,事件循环
- 移动端页面适配-REM
- Vue,底层原理,周边生态
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ================你写的================== | |
/** | |
* | |
* @param {String, Object} message | |
* @param {Enum} position | |
*/ | |
const showToast = (message, position = 'middle') => { | |
let iconClass = ['nbsicon'] | |
// 根据message类型处理iconCLass | |
let msg = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) Facebook, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
* | |
*/ | |
/* eslint-disable no-var */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function detectFpsInPeriod(options) { | |
const now = () => performance.now() | |
const startTime = now() | |
let lastOutputTime = now(); | |
let frameCount = 0; | |
const fpsResult = [] | |
let stoped = false; | |
function getFps() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2020-07-30T04:48:13.159Z","extensionVersion":"v3.4.3"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { get, post } from '../demo' | |
import { | |
createApp, | |
HooksApplication | |
} from '@midwayjs/mock' | |
// 纯函数 | |
test('pure function', () => { | |
const result = pureFunction() | |
expect(result).toEqual('pure') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const config = { | |
middleware: [ | |
async (next) => { | |
const ctx = useContext() | |
ctx.name = ctx.request.body.name | |
await next() | |
} | |
] | |
} |