Fluid
  • 首页
  • 归档
  • 分类
  • 标签
  • 关于

JS实现手机号隐藏中间4位

使用字符串分割的方式实现1234let str = '12345678922';let pre = str.substr(0,3);let next = str.substr(7,4);let result = `${pre}****${next}`; 使用数组方法实现123456let tel = '1234567892
2020-11-26
代码片段 > JavaScript

js实现base64加密

解密 12345let b64EncodeUnicode = (str) => {//解密 return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) { return String.fromCharCode('0x'
2020-10-23
代码片段 > JavaScript

vue中使用vue-quill-editor

rich-text-editor.vue1234567891011121314151617181920212223242526<template> <div class="editor-container"> <quill-editor v-model="content" ref="rich
2020-09-30
代码片段 > Vue

tsconfig提示aliased imports are not supported解决方案

问题详情:react-ts项目中配置路径提示不支持别名导入 compilerOptions. paths must not be set (aliased imports are not supported) 解决方案: 12345678910111213141516171819//新建tsconfig.paths.json文件//在该文件中写入路径配置{ "compiler
2020-08-30
解决方案 > TypeScript

TypeScript引入第三方模块提示无法找到该模块的声明文件解决方案

一 安装该模块的typeScript版本 1@types/xxxx 二 项目根目录新建types文件夹 在tsconfig.json中include处添加types 在types文件夹中新建声明文件 1234declare module 'XXX' { const content: any export = content}
2020-08-09
解决方案 > TypeScript

CSS实现自定义虚线

1234567.line { width: 100%; height: 1px; background-image: linear-gradient(to right, rgba(193, 193, 193, .8) 0%, rgba(193, 193, 193, .8) 50%, transparent 50%); backgro
2020-07-20
代码片段 > CSS

React笔记五:使用state

1、新建组件 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748import React, { useState } from 'react';import VelButton from '../velButton'
2020-06-11
React学习笔记

React笔记四:使用props

1、之前的例子 1234567891011121314151617181920//index.tsx文件import React from 'react';import styles from './styles.module.scss';function VelButton(props) {//接收props return (
2020-06-11
React学习笔记

React笔记三:创建第一个组件

1、src文件夹下新建一个components文件夹 2、在components文件夹中新建一个button文件夹 3、在button文件夹中新建index.tsx文件和styles.module.scss文件 4、编写第一个组件 1234567891011//index.tsx文件import React from 'react';import styles from &#x
2020-06-11
React学习笔记

React笔记二:使用sass

1、安装模块 1npm install node-sass -s 2、文件中使用 123//创建后缀为scss的文件//引入scssimprot styles from './styles.scss';
2020-06-09
React学习笔记
123456…8

搜索

Hexo Fluid
载入天数... 载入时分秒...
总访问量 次 总访客数 人
豫ICP备18039751号