Ubuntu 18升级到22
由于公司的破Windows电脑安装Docker以后,一直提示WSL在执行的时候有异常,所以回来在虚拟机里折腾一下Docker的安装。打开Docker官网文档看了下,Ubuntu版本必须要>=22.04才可以安装,而我虚拟机里还是几年前安装的elementary OS5.0(Ubuntu 18.04),显然需要升级系统。
一. 5.0升级到6.01234# 修改源 将以下文件中的 bionic 替换为 focalsudo vim /etc/apt/sources.listsudo vim /etc/apt/sources.list.d/patches.listsudo vim /etc/apt/sources.list.d/elementary.list
修改后sources.list的内容为:
123456deb http://mirrors.163.com/ubuntu/ focal main restricted multiversedeb http://mirrors.163.com/ubuntu/ focal-updates main restricteddeb htt ...
CSS优惠券打孔样式
CSS优惠券打孔样式
.box {
background: #fff;
padding-top: 100px;
padding-bottom: 100px;
border: 1px solid #f2f2f2;
width: 400px;
}
.hole {
padding-bottom: 25px;
background: #f2f2f2;
margin-bottom: 20px;
overflow: hidden;
position: relative;
width: 100%;
height: 50px;
box-sizing: border-box;
}
.hole::before {
z-index: 1;
position: absolute;
content: '';
border: calc(200px - 18px) solid #fff;
width: 40px;
height: 40px;
border-radius: 50%;
top: 50%;
left: -50%;
...
CSS绘制信封形状的几种写法
CSS 绘制信封形状的几种写法
.card{
background: #fff;
width: 375px;
height: 300px;
overflow: hidden;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
margin-bottom: 20px;
}
.radius {
border-radius: 0 0 200px 200px;
background: #f2f2f2;
height: 178px;
width: auto;
margin: 0 -20px;
overflow: hidden;
position: relative;
}
.radius::after {
content: '';
border-radius: 0 0 200px 200px;
box-shadow: inset 0 -10px 10px rgba(0, 0, 0, 0.3);
position: ...
PHP实时推送功能
1392b2da79a7da20ae679e815d65e13d2922d55df2f416ee7782665fe8539a175bc35750b34df30ee5711a6ee5b21ecc2d66afcb99e1d67a883ab88dde0f4276399b33bd65a38498d5582ec0fc80371c576d633bdd470f3d10f163814daf92dc249a907fbe7fb1843a5431f53eb83e91f34a4adf5221d98f18e27d2ddad990cafc0108ca314826c6c9d3193997bcacc4ca3ee8b37058ce1911e7f7be6e20286d005ff461258b55296d22ccb0b72fd047aec1e5bab59aadeef61e3ea56887a2e2a49cc6cc3d11b81718c08717a10bc05a2d4ae0e0ab7753321214a9b77a9937b8ab2ebd4128761abc5a26e1a6dc0dfa1d69d240bc5a3e233e2 ...
ElementUI设置Table的行间距
ElementUI 设置 Table 的行间距ElementUI 的 Table 组件默认的是行与行挨着,需要更改组件的样式
123456789::v-deep .el-table { &::before { height: 0; } .el-table__body { //-webkit-border-horizontal-spacing: 13px; // 水平间距 -webkit-border-vertical-spacing: 13px; // 垂直间距 }}
.table-wrap {
margin: 0;
overflow: hidden;
}
.el-table::before {
height: 0;
}
.el-table .el-table__body {
-webkit-border-vertical-spacing: 13px;
}
.el-table .warning-row {
background: oldlace;
}
.el ...
Javascript 生成word文档
Javascript 生成word文档1234567891011121314151617181920212223242526<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>word</title> </head> <body> <button id="btn">下载</button> <script> ...
Javascript 录制麦克风声音
Javascript 录制麦克风声音需求: PC端录制声音,通过websocket保存到服务器
服务端代码12345678910111213141516171819202122232425262728293031const WebSocket = require('ws')const fs = require('fs')const ws = new WebSocket.Server({ port: 4000 })ws.on('connection', function (inst) { inst.on('message', function (msg, isBinary) { if (isBinary) { console.log('message') const time = new Date().getTime() fs.writeFile('audio/' + time + ...
uniapp管理APP缓存
uniapp管理APP缓存1234567891011121314151617181920212223242526272829303132// 获取getCacheSize() { // #ifdef APP-PLUS plus.cache.calculate((size) => { const sizeInt = parseInt(size) if (sizeInt < 1024) { this.cacheSize = '0KB' } else if (sizeInt < 1048576) { this.cacheSize = `${(sizeInt / 1024).toFixed(2)}KB` } else { this.cacheSize = `${(sizeInt / 1048576).toFixed(2)}MB` } }) // #endif ...
uniapp管理APP更新
uniapp管理APP更新123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113// 获取import { upgrade } from '@/api/user'export default function upgradeApp(latestTip = '') { plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => { let packageName = '' if (plus.os.name = ...
uniapp踩坑心得
uniapp踩坑心得node-sass安装失败
现象:使用cli构建的uniapp项目依赖的是node-sass,这个玩意儿要从github下载文件,而且安装依赖还会检查python环境vsbuild-tools等等,挺难安装成功的.
解决方案:使用dart-sass替代:
12npm un node-sassnpm i node-sass@npm:dart-sass -D
替换依赖以后,还需要用::v-deep替换全局代码中的/deep/样式穿透
全局样式加载报错
现象:在main.js全局引用样式文件时,打包会报错
1App平台 v3 模式暂不支持在 js 文件中引用"xxx.scss" 请改在 style 内引用
解决方案:删掉main.js中的相关import,修改App.vue
123<style lang="scss">@import '@/assets/styles/common.scss';</style>
打包APP资源无法批量注册自定义的全局组件
现象:在电脑上开发调 ...
