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