Vue3利用ref函数获取dom元素内容

vue  前端 

<script setup lang="ts">import { ref } from 'vue'const dom = ref<HTMLDivElement>()function change() { console.log(dom.v

Vue笔记03-声明响应式状态

笔记  vue  前端 

声明响应式状态ref()​在组合式 API 中,推荐使用 ref() 函数来声明响应式状态:import { ref } from 'vue'const count = ref(0)ref() 接收参数,并将其包裹在一个带有 .value 属性的 ref 对象中返回:const co

Vue笔记02-模板语法

笔记  vue  前端 

模板语法文本插值最基本的数据绑定形式是文本插值,它使用的是“Mustache”语法 (即双大括号):<span>Message: {{ msg }}</span>例子:App.vue<script setup>const msg = 10;</script&

Vue笔记01-创建一个 Vue 应用 & 了解vue

笔记  vue  前端 

创建一个 Vue 应用 & 了解vuenpm create vue@latest默认目录结构vscode环境安装第一个项目删除无用文件,重新改下App.vue和router/index.js里面的内容了解main.jsimport './assets/main.css'imp

Typescript 装饰器


装饰器类装饰器const doc:ClassDecorator = (target:any) =>{ console.log(target) target.prototype.name = "meowrain";}@docclass Meowrain {

javascript aes-256-cbc 加密密钥


const crypto = require("crypto");const fs = require("fs");const path = require("path");const configPath = path.join(__di

javascript this指向问题


今天刷js基础题发现个自己忘掉的重要的知识点一个普通函数的 this 指向是:在非严格模式下,this 指向全局对象(浏览器下是 window 对象,Node.js 下是 global 对象)。在严格模式下,this 指向 undefined。在函数作为对象的方法被调用时,this 指向那个对象。在

package.json版本号规则


https://segmentfault.com/a/1190000019935845版本的格式major.minor.patch主版本号.次版本号.修补版本号patch:修复bug,兼容老版本minor:新增功能,兼容老版本major:新的架构调整,不兼容老版本依赖版本号规则

JS Set Map练习


题目要求How many languages are there in the countries object file.Use the countries data to find the 10 most spoken languages:题目要求我们写两个函数来统计这个文本中有多少语言,并且找

Javascript-类型转换复习


//String to Intlet num = '10'//第一种let numInt = parseInt(num)console.log(numInt);//第二种let numInt2 = Number(num);console.log(numInt2);//第三种let n