分类目录归档:Frontend

[ 图片粘贴[js] ]


粘贴图片使用

  1. 通过document.addEventListener('paste', function (event) {}) 改写原本的粘贴事件
  2. 查找粘贴版里的图片内容, 存在则上传图片到我自己的服务器
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>图片粘贴</title>
    <script src="https://cdn.jsdelivr.

< Read more >

[ Vue3-组件传参-监控 ]


Vue3组件使用, watch监控组件参数

1. 父组件

  • 传给子组件的数据类型为ref
  • 而且前面要写v-model:才是<父组件>-<子组件>数据双向传递

xxx.vue

<template>
    <notebookmain v-model:editor_content="editor_content_ref" v-model:editor_title="editor_title_ref"></notebookmain>
</template>

<script>

< Read more >

[ tiptap快捷键 ]


快捷键(需要先注册才能使用)

基本功能 复制粘贴撤回

Command Windows/Linux macOS
Bold Control B Cmd B
Italicize Control I Cmd I
Underline Control U Cmd U
Strikethrough Control Shift X Cmd Shift X
Highlight Control Shift H Cmd Shift H
Code Control E Cmd E

代码块等..

Apply normal text style Control Alt 0 Cmd

< Read more >

[ vue3请求axios使用 ]


Axios基本在Vue3使用

1. 安装

npm install axios

2. 注册

main.js

import { createApp } from 'vue'
import App from './App.vue'
import router from './router.js'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import axios from 'axios'
import './assets/ma

< Read more >