---
title: "明 (@zm144) | Hashnode"
description: "learn. Read the latest articles by 明 on Hashnode."
url: "https://hashnode.com/@zm144"
---

@zm144

# 明

@zm144 · Joined May 2022

learn

### [js 获取视频封面](https://zmblog.hashnode.dev/js-1?utm_source=hashnode&utm_medium=feed)

// 获取封面 drawVideo(video) { return new Promise((res, rej) => { const canvas = document.createElement('canvas') const ctx = canvas.getContext('2d') canvas.width = video.width canvas.height = video.height ...

1 min read · [zmblog.hashnode.dev](https://zmblog.hashnode.dev/js-1?utm_source=hashnode&utm_medium=feed)

[Apr 3, 2024](https://hashnode.com/posts/js-1/660cb8a36b946d8284fc95b5)

### [vue 父子传参](https://zmblog.hashnode.dev/vue-1-1?utm_source=hashnode&utm_medium=feed)

// 子组件传递多个参数 当前页面接受多个参数 <column-form @value="(e,e2)=>test(e,e2,row,row2)"></column-form> // 子组件传递一个参数 当前页面接受多个参数 <column-form @value="test($event,row,row2)"></column-form>

1 min read · [zmblog.hashnode.dev](https://zmblog.hashnode.dev/vue-1-1?utm_source=hashnode&utm_medium=feed)

[Oct 24, 2023](https://hashnode.com/posts/vue-1-1/6537397061748d2e7ec8c3c6)

### [js 数组方法](https://zmblog.hashnode.dev/js?utm_source=hashnode&utm_medium=feed)

一、增删改方法 push()方法接收任意数量的参数，并将它们添加到数组末尾，返回数组的最新长度 unshift()在数组开头添加任意多个值，然后返回新的数组长度 pop() 方法用于删除数组的最后一项，同时减少数组的 length 值，返回被删除的项 shift()方法用于删除数组的第一项，同时减少数组的 length 值，返回被删除的项 splice功能强大，可以同时对数组进行增删改的操作 二、搜索和位置方法 indexOf()返回要查找的元素在数组中第一次出现的下标，如果没找到则返回 -1 ...

1 min read · [zmblog.hashnode.dev](https://zmblog.hashnode.dev/js?utm_source=hashnode&utm_medium=feed)

[Oct 16, 2023](https://hashnode.com/posts/js/652ced004a92fda4b2f1e394)

### [Server-Sent Events（SSE）](https://zmblog.hashnode.dev/server-sent-eventssse?utm_source=hashnode&utm_medium=feed)

Server-Sent Events（SSE）是一种用于实现服务器向客户端实时推送数据的Web技术。与传统的轮询和长轮询相比，SSE提供了更高效和实时的数据推送机制。 SSE基于HTTP协议，允许服务器将数据以事件流（Event Stream）的形式发送给客户端。客户端通过建立持久的HTTP连接，并监听事件流，可以实时接收服务器推送的数据。 SSE的主要特点包括： 简单易用：SSE使用基于文本的数据格式，如纯文本、JSON等，使得数据的发送和解析都相对简单。 单向通信：SSE支持服务器向客户...

1 min read · [zmblog.hashnode.dev](https://zmblog.hashnode.dev/server-sent-eventssse?utm_source=hashnode&utm_medium=feed)

[Sep 21, 2023](https://hashnode.com/posts/server-sent-eventssse/650bdb9eb6443a5a6c1c4d4d)

### [使用flex布局实现滚动的效果-不用计算高度](https://zmblog.hashnode.dev/flex?utm_source=hashnode&utm_medium=feed)

<div class="meta-container flex flex-col"> <div class="search-input p-\[10px\]"> <search-input /> </div> <div class="body flex-1 min-h-0"> <div class="max-h-\[100%\] overflow-y-auto"> <div v-for="item in 60" :key="item"> ...

1 min read · [zmblog.hashnode.dev](https://zmblog.hashnode.dev/flex?utm_source=hashnode&utm_medium=feed)

[Aug 31, 2023](https://hashnode.com/posts/flex/64f04bc154cebe4535befbb7)
