<template>
  <div>
    <el-input v-model='inputValue' /> 
    <el-button @click='handleClick'>Click Me</el-button>
  </div>
</template>
<script setup>
import { ref } from 'vue';
import { ElButton, ElInput } from 'element-plus';

const inputValue = ref('');
const handleClick = () => {
  console.log(inputValue.value);
};

</script>
Vue3 Script Setup: 使用 Element Plus 创建文本框和按钮

原文地址: https://www.cveoy.top/t/topic/mxVZ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录