周凯,个人博客

  • 前端
  • 嵌入式
  • 工具
  • 后端
  • 随笔
个人记录
vite

vue3 vite element-plus自定义主题色

项目 vue3 vite element-plus 配置 安装 scss yarn add sass 准备定制化文件 在静态资源中创建:@/assets/styles/element.scss /* 只需要重写你需要的即可 */ @forward 'element-plus/theme-chalk/src/common/var.scss' with ( $colors: ('primary': ( // 主色 'base': #27ba9b, ), 'success': ( // 成功色 'base': #1dc7…

2024年 8月 15日 0条评论 1540点热度 1人点赞 周凯 阅读全文
uni-app

uni-app app获取缓存

代码实现 uni-app vue3代码 // 缓存 const cacheSize = ref('0B') function getAppCache() { plus.cache.calculate(function (size) { //size是多少个字节单位是b //做下面相应的处理 if (size < 1024) { cacheSize.value = size + 'B' } else if (size / 1024 >= 1 && s…

2024年 7月 9日 0条评论 1351点热度 0人点赞 周凯 阅读全文
uni-app

uni-app app微信分享 常用方法

import ToastUtil from "@/utils/ToastUtil"; /** * 场景。 * 可取值“WXSceneSession”分享到聊天界面,“WXSceneTimeline”分享到朋友圈,“WXSceneFavorite”分享到微信收藏 * WXSceneSession: 分享到聊天界面 * WXSceneTimeline: 分享到朋友圈 * WXSceneFavorite: 分享到微信收藏 */ type IScene = 'WXSceneSession�…

2024年 6月 12日 0条评论 1498点热度 2人点赞 周凯 阅读全文
uni-app

uni-app 自定义导航栏 计算高度

方法 /** * 获取导航栏信息 */ getSysBar() { return new Promise((resolve, reject) => { uni.getSystemInfo({ success: (e: any) => { console.log(e, 'systemInfo') // this.compareVersion(e.SDKVersion, '2.5.0') let statusBar = 0 let customBar = 0 // #…

2024年 6月 12日 0条评论 1494点热度 0人点赞 周凯 阅读全文
dart

dart 使用part、part of、library拆分库

dart中,通过使用part、part of、library来实现拆分库,这样,就可以将一个庞大的库拆分成各种小库,只要引用主库即可,用法如下: 假设有三个文件,两个子库calculator和logger,一个主库util calculator.dart // 和主库建立连接 part of util; int add(int i, int j) { return i + j; } int sub(int i, int j) { return i - j; } int random(int no) { return…

2024年 4月 26日 0条评论 1107点热度 0人点赞 周凯 阅读全文
编辑器

好用得 jetbrains插件列表

.env files support 可以给 .env 环境配置文件增加语法高亮,给配置文件中定义的变量增加智能索引。另外在使用 Webpack 进行打包的时候,我们会有一些环境变,安装该插件后,就会提示环境变量文件中所拥有的环境变量。 .env files support Plugin for JetBrains IDEs | JetBrains Marketplace CodeGlance:右侧代码小地图 在代码面板的右侧显示一个代码缩略图,像 VSCode 里那样。我看有人在用这个插件,但在下不怎么用,在编辑…

2024年 4月 11日 0条评论 1161点热度 0人点赞 周凯 阅读全文
windows

Windows Terminal配置 美化

Windows 终端自定义提示符设置 | Microsoft Learn 安装 在powerShell 开启远程权限 Set-ExecutionPolicy RemoteSigned -scope CurrentUser scoop 执行 iwr -useb https://gitee.com/glsnames/scoop-installer/raw/master/bin/install.ps1 | iex 如果报错提示:Running the installer as administrator is disab…

2024年 3月 16日 0条评论 880点热度 0人点赞 周凯 阅读全文
linux

manjaro 安装完成配置

系统配置 ~/.vimrc配置 :filetype plugin on :syntax on set spell set mouse="" set incsearch set hlsearch archlinuxcn Arch Linux CN 源使用帮助 编辑 kate /etc/pacman.conf 添加以下内容 [archlinuxcn] Server = https://mirrors.bfsu.edu.cn/archlinuxcn/$arch Server = https://mirrors.tuna…

2024年 3月 3日 0条评论 1035点热度 0人点赞 周凯 阅读全文
uni-app

uni-app 事件冒泡问题

参考官方 文档 阻止事件冒泡 从 catch:tap="xx" 改为 @tap.native.stop="xx" 应用 <view class="parent" @click="parentFun"> <view @click.native.stop="testFun()"> 内容 </view> </view> 这样,点击“内容”就执行了testFun方法,不会向上发…

2024年 2月 22日 0条评论 1453点热度 0人点赞 周凯 阅读全文
debian

debian 修改主机名称

备份当前设置 在进行任何更改之前,备份重要的配置总是明智的。打开终端并运行以下命令: bashCopy code cp /etc/hostname /etc/hostname.bak cp /etc/hosts /etc/hosts.bak 这会创建当前主机名和主机文件的备份副本。 方法一:使用hostnamectl命令 步骤1:检查当前主机名 要查看当前主机名,请运行以下命令: hostnamectl 步骤2:更改主机名 要更改主机名,请执行: sudo hostnamectl set-hostname 新主机名…

2024年 2月 12日 0条评论 1067点热度 0人点赞 周凯 阅读全文
12345…20
搜索
分类
归档

COPYRIGHT © 2022-现在 周凯,个人博客. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

蒙ICP备18004897号