自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(36)
  • 收藏
  • 关注

原创 记录一次安装包报错

过程: 尝试1:安装node 20版本, 但是还是不行, 会报Expected version “8||10||12||14||16”:(忽略引擎版本检查)

2024-01-19 14:41:50 387

原创 根据对象数组的key进行分组

【代码】根据对象数组的key进行分组。

2023-07-19 01:58:22 333

原创 js原生实现步骤条

1.定義一個流程數組和一个步骤状态2.遍历这个流程数组,如果步骤状态大于流程,checked=true,3.页面输出遍历的流程数组,checked的div点亮

2022-12-06 14:49:51 1009 1

转载 vue 点击div以外的地方隐藏

点击div以外的地方隐藏; 1.给目标div加ref, 2.给document添加点击监听, 判断optionDom.contains

2022-12-05 18:15:21 1678

原创 如何在vscode中編輯和預覽markdown文檔

創建.md文件並用vscode打開,輸入符合markdown語法的內容。3.在對應的文檔目錄下在終端輸入。, 把md文件轉換成docx文件。在vscode中右鍵,選。2.在vscode中安裝。

2022-08-14 11:05:28 358

原创 flutter 修改app名字和图标(安卓)

安卓修改名字:找到flutter项目下面的android>app>src>main>AndroidManifest.xml修改里面的android:label="改成你要的名字"修改图标:找到android>app>src>main>res里面的mipmap-xx文件夹修改里面的图标...

2022-02-20 17:44:13 1573 1

原创 flutter 输入框maxLines动态变化

TextField(maxLines: null), TextField(minLines: 2, maxLines: 4)

2022-01-20 10:47:24 2002

原创 flutter margin 负边距

flutter container给边距写负值会报错:'margin == null ||I/flutter ( 3173): margin.isNonNegative': is not true.child: Container( color: Colors.white, transform: Matrix4.translationValues(0.0, -50.0, 0.0),),

2022-01-17 16:22:39 4835

原创 flutter 实心三角形

代码class TrianglePainter extends CustomPainter { final Color strokeColor; final PaintingStyle paintingStyle; final double strokeWidth; TrianglePainter( {this.strokeColor = Colors.black, this.strokeWidth = 3, this.paintingStyle =

2022-01-14 16:52:19 2294

原创 flutter 获取上下文,flutter获取dom元素位置

flutter 获取上下文,flutter获取dom元素位置.GlobalKey anchorKey = GlobalKey();Text( 'context',key:anchorKey);var renderBox = anchorKey.currentContext?.findRenderObject() as RenderBox;var offset = renderBox.globalToLocal(Offset(100, renderBox.size.height));

2022-01-14 11:22:25 2194 1

原创 js原生获取某个div下的所有子节点

var parentNode = document.getElementById('wrapper');var inputArray = parentNode.getElementsByTagName('input');

2021-12-21 10:33:28 6859

原创 js原生实现for循环渲染数组

<!DOCTYPE html><html><title>js原生实现for循环渲染数组</title><head><style type="text/css">#wrapper { background-color: pink;}#wrapper .row { border: 1px solid #000;}.row div{ border: 1px solid #000; displa

2021-12-20 18:21:33 3716 2

原创 时间字符串转时间戳

let date = '2021-12-08 12:00:00' date = date.substring(0, 19) date = date.replace(/-/g, '/') const endTimeTamp = new Date(date).getTime()

2021-12-08 14:27:49 129

原创 flutter 使用for循环

Wrap( children: <Widget>[ for (int i = 0; i < (data.secList?.length ?? 0); i++) Text('#关键词$i') ], ),

2021-12-07 14:23:28 3056

原创 使用Hexo搭建gihub博客

1.安装环境1.1 安装node.jsnode官网>>1.2 安装Hexonpm install -g hexo-cli2.初始化项目2.1 这里初始化了一个名字叫myBlog的项目hexo init myBlog2.2 进入新建的项目文件夹cd myBlog2.3 将 Hexo 编译生成 HTML 代码hexo generate运行hexo generate时, 突然遇到一个报错-- Usage: hexo <command>, 执行npm ins

2021-11-24 19:24:38 406

原创 vue 表格固定首行首列(纯css)

<template><div className="table_wrap"> <table> <thead> <tr> <th v-for="(n,i) of 6" :key="i">表头{{i}}</th> </tr> </thead> <tbody>

2021-11-15 21:10:41 2433

原创 vue报错 Maximum call stack size exceeded

<template> <div>{{_timeFormat(date)}}</div></template>报错原因在html中使用了_

2021-11-11 10:30:15 565

原创 vue3 slot插槽传值

https://www.cnblogs.com/whenwei123/p/14638149.html

2021-11-10 10:48:34 4835

原创 vue中toggle切换(在html中写)

<span @click="isShowFinanceBox=!isShowFinanceBox">切换</span>

2021-11-09 11:42:27 663

原创 vue启动报错‘vue-cli-service serve‘

vue启动报错’vue-cli-service serve’我百度了很多’vue-cli-service serve’报错解决, 最后发现我忽略了一句很重要的’ Cannot find module ‘vue-loader-v16/package.json’解决’Cannot find module ‘vue-loader-v16/package.json’npm i --save-dev vue-loader-v16参考:https://stackoverflow.com/questions/6

2021-11-07 23:31:17 1246

原创 左头像右边2行文本

<html lang=""> <body> <div class="box"> <img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fgaitaobao2.alicdn.com%2Ftfscom%2Fi3%2F3405278688%2FO1CN01izE1Eb2E39VGjxEcq_%21%213405278688.jpg_300x300.jpg

2021-10-14 14:18:25 152

原创 H5页面自动撑满使用100vh, 但是在ios中出现滚动条

H5页面自动撑满使用100vh,在安卓手机上没有问题, 但是在ios中出现滚动条。.box { height: 100vh; width: 100%; background-color:pink;}改成使用绝对定位.box { position: absolute; height: 100%; width: 100%; background-color:pink;}...

2021-10-09 19:42:23 1985 1

原创 PostCSS received undefined instead of CSS string

報錯:PostCSS received undefined instead of CSS string解決:npm install --registry=https://registry.npm.taobao.org

2021-10-09 19:31:45 60

原创 vue 动态更换网页icon

public>index.html<head> <link rel="shortcut icon" type="image/x-icon" href="./biniu.png"> </head><script>(function() { var newHostname=window.location.hostname; console.log('hostName',newHostn

2021-09-13 17:29:31 1113

原创 vue3.x使用i18n和i18n Ally自动化翻译

以下为vue3.x 使用i18n和i18n Ally自动化翻译的步骤, vue2.x配置i18n步骤>>vue 版本> 3.0.0vue/cli 版本 4.5.13vue-i18n 版本 > 9.1.71.安装 i18nnpm install vue-i18n@next 2.在vscode中安装i18n Ally插件3.配置vscode setting.json{ "i18n-ally.localesPaths": ["src/locales"], // 翻

2021-08-17 19:44:26 2353

原创 vue 使用i18n和i18n Ally自动化翻译

vue 使用i18n和i18n Ally自动化翻译1.安装 i18nnpm install vue-i18n --save-dev2.在vscode中安装i18n Ally插件3.配置vscode setting.json{ "i18n-ally.localesPaths": ["src/locales"], // 翻译文件路径 "i18n-ally.keystyle": "nested", "i18n-ally.translate.saveAsCandidates": true,

2021-08-16 14:53:35 6702 1

原创 vue 如何引入全局scss变量

如何引入全局scss变量1.新建一个全局scss文件variables.scss$common-color: #ff233c;2.在vue.config.js中配置module.exports = { devServer: {}, css: { loaderOptions: { sass: { additionalData: ` @import "@/assets/style/variables.scss"; `

2021-08-07 14:35:41 695

原创 使用react.memo()

使用react.memo()优化函数组件性能function TestComponent(props) { let {name} = props console.log('Rendering:', props) return ( <div> { props } </> )}TestComponent.defaultProps = { name: ''}TestComponent.pro

2021-05-18 20:18:59 107

原创 react 文字水平滚动 文字走马灯

/** * 文字水平滚动 * 用法: */import React, { PureComponent } from ‘react’;let dataArr = [];let distanceArr = [];export default class Marquee extends PureComponent {constructor(props) {super(props);this...

2020-04-01 02:37:34 6444 1

原创 管理后台H5页面可视化编辑参考

https://blog.csdn.net/weixin_30341745/article/details/95434132https://www.youzan.com/v2/showcase/feature/design#/edit/83251420

2020-03-30 18:08:06 1910

原创 el-date-picker编辑时无法调用change

新增时,有触发change,但是编辑时,有原来的值,不触发change参考

2020-02-27 21:38:38 3982

原创 npm i 提示 unable to verify the first certificate

npm i 提示 unable to verify the first certificatenpm i --no-strict-ssl

2019-12-24 14:41:17 525

原创 typescript安装使用base64

1.安装$ npm install --save @types/js-base64我在vscode里面安装的, 不知道为什么一直报错然后我换了一个终端就安装成功了2. 使用引入import { Base64 } from 'js-base64';Base64.encode('apple');...

2019-04-10 12:00:50 5910 2

原创 next styled-jsx教程 react中使用styled-jsx

styled-jsx使用styled-jsx安装如何使用组件内样式公共样式styled-jsxstyled-jsx是一个支持jsx方式编写的css-in-js插件安装1.用npm安装styled-jsxnpm install --save styled-jsx2.在babel的plugins中配置styled-jsx/babel{ "plugins": [ "style...

2019-03-25 20:25:50 3822 1

原创 vue h5移动端禁止缩放

安卓在index.html里面写&lt;meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"&gt;ios在APP.vue里面写&lt;script&gt;window.onload = function() { ...

2019-01-18 17:18:47 5322 2

原创 小程序禁止五秒内发送重复请求 js防止重复请求

<view bindtap="togetherSteps"></view>data:{ isTogether:false,//默认是false, 可点击},//点击事件togetherSteps(){let that = thisif (!this.data.isTogether){ this.setData({ isTogether:...

2019-01-16 19:41:12 2942

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除