草庐IT

vue3 v-for遍历defineProps或者props接收的数据时,报“xx” is of type ‘unknown‘

项目场景:vue中使用ts,且在使用props或者defineProps进行父传子时,v-for遍历收到的数组,进行取值时,报“xx”isoftype'unknown'问题描述原因分析:提示:ts进行类型推导造成的报错解决方案一:使用接口进行类型声明提示:使用接口进行interfaceITable{date:String,name:String,address:String,phone?:Number,}interfaceIColumns{prop:String,label:String,type?:String,width?:String|Number,}defineProps()解决方案二

安卓下 mount: ‘/system‘ not in /proc/mounts

解决方案1.执行mount-orw,remount-tauto/system2.还是报错’/system’notin/proc/mounts3.改为mount-orw,remount-tauto/如果遇到‘/dev/root’isread-only说明你手机需要刷机了我也是折腾了俩小时才解决的参照这个网址,很顺利。【Android】Pixel2Android9系统ROOT操作(TWRP下载|MagiskManager下载|线刷包下载|线刷9.0系统|ROOT操作)我用的是pixel2L要选择好自己对应的系统附图:

Build step ‘Execute shell‘ marked build as failure

问题现象Jenkins构建时运行脚本报错时:Buildstep'Executeshell'markedbuildasfailureFinished:FAILURE解决方法1.磁盘空间不足导致报错。2.请在执行的shell脚本中第一行加#!/bin/bash#!/bin/bash......注意#!/bin/bash只能放在第一行3.如果2还是不行,那么将#!/bin/bash替换为#!/usr/bin/envbash试试#!/usr/bin/envbash......

【解决】Unknown column ‘xxx‘ in ‘where clause‘

解决Unknowncolumn‘xxx‘in‘whereclause‘当我在insertintotableaccountvalues(5,‘田七’,12345.60)的时候,没有发生任何问题,但是当我按照指定id删除表时,告诉我这样:这说明字段出现看错误,这是什么情况?我试了n次,将mysql重启,再重启,都不行。明明就是id,哪里写错了?太炸裂了。然后,我显示了一下创建时的字段,发现:好像有点奇怪,怎么感觉像是多了一个空格呢?那我创建这张表时的SQL并没有空格啊?其实我是复制过来的SQL,那就有可能是在复制时的格式转换问题了,于是我自己手动又写了一遍,发现:真的这次就不存在空格了。。。所以,

ERROR: Cannot uninstall ‘certifi‘. It is a distutils installed project and thus we cannot accurately

BUG:ERROR:Cannotuninstall‘certifi’.Itisadistutilsinstalledprojectandthuswecannotaccuratelydeterminewhichfilesbelongtoitwhichwouldleadtoonlyapartialuninstall.BUG原因:错误:无法卸载“证书”。这是一个distutils安装的项目,因此我们无法准确确定哪些文件属于它,这只会导致部分卸载。BUG解决方案:pipinstallcertifi--ignore-installedpipinstallcertifi--ignore-installed

vue3+ts 使用parseInt报错Argument of type ‘number‘ is not assignable to parameter of type ‘string‘.

场景在之前习惯使用javascript开发的时候,直接使用parseInt将数字转为整数。而在使用typescript开发时,却出现了报错。报错内容:Argumentoftype'number'isnotassignabletoparameteroftype'string'.报错原因parseInt(string,radix)函数解析字符串并返回整数。第一个参数为要解析的字符串,第二个参数为要转换的进制基数,默认为十进制。javascript里会自动对参数进行隐式转换,因此使用parseInt(100)并不会报错,而typescript时报错了。解决方案1、toString转为字符串const

VUE报错:WebSocket connection to ‘ws:……ws‘ failed: Error in connection establishment: net::ERR_CONNECTI

const{defineConfig}=require('@vue/cli-service')module.exports=defineConfig({devServer:{host:'0.0.0.0',port:3000,client:{webSocketURL:'ws://0.0.0.0:3000/ws',},headers:{'Access-Control-Allow-Origin':'*',}},transpileDependencies:true}) 在vue的vue.config.js里这样设置就不会报错啦,但是我也不知道问什么,纯小白。。。

System has not been booted with systemd as init system (PID 1). Can‘t operate.解决方法

在WSL(WindowsSubsystemforLinux,适用于Linux的Windows子系统)下通过systemctl命令启动某些服务将造成Systemhasnotbeenbootedwithsystemdasinitsystem(PID1).Can’toperate.这样的错误;以启动docker为例:sudosystemctlrestartdocker错误信息如下:Systemhasnotbeenbootedwithsystemdasinitsystem(PID1).Can'toperate.Failedtoconnecttobus:Hostisdown解决方案尝试使用以下方法启动服

【UE】BUILD ERROR: Missing precompiled manifest for ‘****‘.

编译报错完整信息:Error:Missingprecompiledmanifestfor‘***’.Thismodulewasmostlikelynotflaggedforbeingincludedinaprecompiledbuild-set‘PrecompileForTargets=PrecompileTargetsType.Any;’inLaunch.build.cstooverride.解决方式:对应的plugin目录的build.cs文件中在使用PrecompileForTargets=PrecompileTargetsType.Any的代码前加判断示例: if(Target.Ty

git报错fatal: unable to access ‘https://github.com/…’: OpenSSL SSL_read: Connection was reset, errno 1

git报错fatal:unabletoaccess‘https://github.com/…’: OpenSSL SSL_read:Connectionwasreset,errno10054原因:一般是因为服务器的SSL证书没有经过第三方机构的签署,所以才报错解决办法:解除ssl验证后,再次git即可gitconfig--globalhttp.sslVerifyfalse