会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Syinho
博客园
首页
新随笔
管理
上一页
1
2
3
4
5
6
7
···
24
下一页
2024年1月9日
CSS_使图片保持长宽比等比缩放
摘要: 在开发中经常遇到需要图片按某个纵横比显示, 并且等比缩放; 比如现有以下需求: 一张header图片, 按照长宽比5:2进行显示并能进行等比缩放 思路: 当padding/margin 的值是百分比时, 是以父元素的宽度来进行计算的 <div id="container"> <div id="con
阅读全文
posted @ 2024-01-09 09:57 Syinho
阅读(418)
评论(0)
推荐(0)
2024年1月6日
Vue3_defineExpose的用法
摘要: 目录常规示例子组件: /components/testCom1.vue父组件: App.vue监听defineExpose返回的数据的变化实现子组件向父组件传递数据父组件中修改子组件defineExpose抛出的数据, 实现父组件向子组件回传数据 官网说明 defineExpose用于子组件向其父组
阅读全文
posted @ 2024-01-06 12:06 Syinho
阅读(2243)
评论(0)
推荐(0)
2023年12月17日
IndexedDB_1_数据库的创建与连接
摘要: indexedDB通过.open(DBName, version)方法连接数据库, 该方法接收两个参数, 分别代表数据库名与数据库版本; 如果该数据库已存在, 那么将会尝试连接该数据库, 如果该数据库不存在, 将会创建; 调用这个方法会返回一个IDBRequest对象 let db, request
阅读全文
posted @ 2023-12-17 00:03 Syinho
阅读(38)
评论(0)
推荐(0)
2023年11月21日
Vue3_Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
摘要: 今天的开发中发现了这个问题 Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders frag
阅读全文
posted @ 2023-11-21 09:38 Syinho
阅读(1718)
评论(0)
推荐(0)
2023年11月16日
CSS_使用backdrop-filter实现磨玻璃效果
摘要: <div id="container"> <div id="mask"></div> </div> #container { width: 500px; height: 300px; position: relative; border: 1px solid #ccc; background-ima
阅读全文
posted @ 2023-11-16 17:27 Syinho
阅读(18)
评论(0)
推荐(0)
2023年11月13日
Git_ssh公钥的创建
摘要: 跳转到.ssh目录 cd ~/.ssh 生成ssh秘钥 ssh-keygen -t rsa -C [邮箱] 连续按enter键3次即可生成 查看ssh秘钥 cat ./id_rsa.pub 复制以ssh-rsa开头的全部秘文保存到gitee/github的秘钥管理中 检查秘钥连接 ssh -T gi
阅读全文
posted @ 2023-11-13 03:14 Syinho
阅读(54)
评论(0)
推荐(0)
2023年11月11日
Vue2_组件嵌套时的生命周期函数调用顺序
摘要: 以以下代码为例: <div id="app"> <tabs></tabs> </div> tabs为vue实例下的组件 加载渲染过程中 app(beforeCreate)-->app(created)-->app(beforeMount)--> tabs(beforeCreate)-->tabs(c
阅读全文
posted @ 2023-11-11 22:44 Syinho
阅读(111)
评论(0)
推荐(0)
Vue/eslint_vue/no-side-effects-in-computed-properties报错
摘要: 出现这个错误的缘由是因为我在vue3中的computed中, 把computed的回调函数当做数据监听器处理程序, 在里面修改了ref定义的变量数据的值. const curArticle = computed(() => { if (curArticleList.value.length 0) {
阅读全文
posted @ 2023-11-11 00:58 Syinho
阅读(361)
评论(0)
推荐(0)
2023年11月9日
CSS_flex盒子内的元素文本超出部分省略
摘要: 搜索文本超出部分省略, 可以搜索到如下代码 white-space: nowrap; /*超出的空白区域不换行*/ overflow: hidden; /*超出隐藏*/ text-overflow: ellipsis; /*文本超出显示省略号*/ 但是如果某个元素是flex盒子的子项, 且宽度自适应
阅读全文
posted @ 2023-11-09 10:58 Syinho
阅读(823)
评论(0)
推荐(0)
2023年11月8日
JS_数组的深复制
摘要: let arr1=[3,5,7] llet [...arr2]=arr1
阅读全文
posted @ 2023-11-08 23:55 Syinho
阅读(7)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
24
下一页
公告