会vue2的不会vue3,上次查找之后,记录一下,
<template><inputv-focustype="text"/></template><script setUp>const vFocus = {//必须以 vNameOfDirective 的形式来命名本地自定义指令,以使得它们可以直接在模板中使用。beforeMount: (el) => {// 在元素上做些操作nextTick(() => {el.focus() //获取焦点})}}</script>
时间:2022-09-23 10:16:50
会vue2的不会vue3,上次查找之后,记录一下,
<template><inputv-focustype="text"/></template><script setUp>const vFocus = {//必须以 vNameOfDirective 的形式来命名本地自定义指令,以使得它们可以直接在模板中使用。beforeMount: (el) => {// 在元素上做些操作nextTick(() => {el.focus() //获取焦点})}}</script>
广西桂林市中考满分作文-为了地球的明天1200字作文素材大全
2024-07-30