会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
我的祈愿
following the life...
博客园
首页
新随笔
联系
订阅
管理
2020年11月5日
Vue3+TS项目中,父组件用ref方式调用子组件方法时报错导致编译不通过
摘要: this.$refs.permissionModal.childMethods() ERROR: Object is of type 'unknown'. 尝试解决成功的一种方法: 在子组件的生命周期函数中 mounted() { //将this抛给父组件,让父组件能够调用本组件的方法 this.$
阅读全文
posted @ 2020-11-05 16:58 我的祈愿
阅读(6715)
评论(0)
推荐(0)
2020年10月25日
Property 'setYear' does not exist on type 'Date'
摘要: setYear()函数已过时。之所以提供这个方法,只是为了向后兼容。 所以请改用setFullYear函数
阅读全文
posted @ 2020-10-25 21:55 我的祈愿
阅读(544)
评论(0)
推荐(0)
在Vue3+TS项目的script中用this访问变量报错Property 'xxx(变量)' does not exist on type ' ...(vue的组件内容)'
摘要: 解决方案: 1. 在script中import { defineComponent } from 'vue' 2. 将 export default { ... } 的形式改成 export default defineComponent({ ... })的形式即可
阅读全文
posted @ 2020-10-25 21:53 我的祈愿
阅读(4426)
评论(0)
推荐(0)
2020年10月14日
Vite项目中用process.env.VUE_APP_XXX_SERVICE_URL访问.env.文件中的VUE_APP_XXX_SERVICE_URL为undefined
摘要: 1、.env.文件中的路径变量命名为VITE_APP_XXX_SERVICE_URL 2、在项目文件中通过import.meta.env.VITE_APP_XXX_SERVICE_URL获取
阅读全文
posted @ 2020-10-14 11:21 我的祈愿
阅读(9879)
评论(0)
推荐(0)
2020年2月21日
flutter run 报'Failed to rename directory because access was denied. This may be caused by a virus scanner or having a file in the directory open in another application.'的错误
摘要: 停用或卸载电脑上运行的杀毒/安全软件可能会起作用,如McAfee、360等
阅读全文
posted @ 2020-02-21 12:34 我的祈愿
阅读(2092)
评论(0)
推荐(0)
2020年2月20日
解决夜神模拟器启动后 VSCode仍然No Device问题
摘要: 1.搜索cmd进入终端; 2.cd进入夜神模拟器安装处的bin目录下,如:D:\Nox\bin; 3.执行命令:nox_adb.exe connect 127.0.0.1:62001。 再次打开vscode时,如果还出现No Device问题,而夜神模拟器设备已经建立了连接:already conn
阅读全文
posted @ 2020-02-20 23:19 我的祈愿
阅读(3045)
评论(0)
推荐(0)
2019年11月15日
基于vue-cli脚手架创建的项目打包部署到服务器上发布
摘要: 正常情况下用vue-cli创建的vue项目,直接执行npm run build命令后,确实能够得出一个dist文件夹,但打开其中的index.html后,显示一片空白,控制台报出的警告表示无法加载指定路径的脚本资源。 为了解决这个问题,需要在打包前先对输出路径进行一些声明处理,比如,在src的同级目
阅读全文
posted @ 2019-11-15 10:00 我的祈愿
阅读(3389)
评论(0)
推荐(0)
2019年11月4日
算法思考:求数组中相反数的量
摘要: 判断一个只存在整型数的数组中有多少对相反数 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>求数组中相反数的量</title> <script> var arr = [8,9,4,3,-2,5,-8,7,-4
阅读全文
posted @ 2019-11-04 15:22 我的祈愿
阅读(558)
评论(0)
推荐(0)
关于元素水平垂直居中显示的一些方法
摘要: 参考来源:CSS水平居中+垂直居中+水平/垂直居中的方法总结 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>center</title> <style> /*#outer{ width: 500px; he
阅读全文
posted @ 2019-11-04 11:32 我的祈愿
阅读(152)
评论(0)
推荐(0)
关于利用CSS绘制三角形的一些方法
摘要: 参考来源:CSS绘制三角形—border法 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>triangleCSS</title> <style> #triangle{ width: 0; height: 0
阅读全文
posted @ 2019-11-04 10:54 我的祈愿
阅读(225)
评论(0)
推荐(0)
下一页
公告