摘要: 报错: EISDIR: illegal operation on a directory, read Internal server error: EISDIR: illegal operation on a directory, read 原因:引入子组件时,子组件是xxx/文件夹名/index. 阅读全文
posted @ 2023-05-15 19:00 jiazq 阅读(7311) 评论(1) 推荐(2) 编辑
摘要: 父组件使用v-model绑定 child.vue export default { props: { value: { type: String, default: '' }, }, model: { prop: 'value', event: 'change' } methods: { // va 阅读全文
posted @ 2023-05-10 20:09 jiazq 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 在ie下,设置width: max-content、fit-content不适配 width: max-content;改为: width: auto; white-space: nowrap; width: fit-content修改父元素display: flex,然后改为width: auto 阅读全文
posted @ 2023-05-10 19:55 jiazq 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 设置dom元素的scrollTop属性为0 直接设(可能存在闪动,看需求): document.querySelector('.xxx').scrollTop = 0 动画平滑滚动: toTop () { let timer = null timer = requestAnimationFrame( 阅读全文
posted @ 2023-03-06 19:57 jiazq 阅读(531) 评论(0) 推荐(0) 编辑
摘要: /** * 关闭子页面 * @param {*} reflash 是否刷新父页面 */ export function closeChildPage(reflash) { if (reflash) window.opener.parent.location.reload() // 刷新父页面 win 阅读全文
posted @ 2023-03-01 20:19 jiazq 阅读(11) 评论(0) 推荐(0) 编辑
摘要: /** * 截至日期格式示例:2022-06-02 15:00:00 * true:到了截止时间,false:未到截止时间 */ export function getDeadline(str) { const myDate = new Date() const year = myDate.getF 阅读全文
posted @ 2023-02-27 19:32 jiazq 阅读(96) 评论(0) 推荐(0) 编辑
摘要: vue-router点击相同的路由链接会报错NavigationDuplicated { "_name": "NavigationDuplicated", "name": "NavigationDuplicated", "message": "Navigating to current locati 阅读全文
posted @ 2022-12-21 19:35 jiazq 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 需要在对应元素的css样式中添加 word-break: break-all; word-wrap: break-word; 阅读全文
posted @ 2022-12-07 19:57 jiazq 阅读(117) 评论(0) 推荐(0) 编辑
摘要: vue使用window.addEventListener('scroll', this.scroll)监听滚动事件不生效 window.addEventListener('scroll', this.scroll) 写在mounted里面 html,body的高度别限制, 如height: 100% 阅读全文
posted @ 2022-11-08 18:55 jiazq 阅读(622) 评论(0) 推荐(0) 编辑
摘要: const router = this.$router.resolve({ path: '/path' }) window.open(router.href, '_blank') 阅读全文
posted @ 2022-11-04 20:00 jiazq 阅读(52) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示