<!-- CustomInputRenderer.vue -->
<template>
    <el-input
      ref="inputRef"
      v-model="inputValue"
      type="password"
      placeholder="请输入密码"
      autocomplete="new-password"
    />
  </template>
  
  <script setup>
  import { ref, onMounted } from 'vue';
  
  const props = defineProps({
    value: {
      type: String,
      default: ''
    }
  });
  
  const emit = defineEmits(['update:value']);
  
  const inputValue = ref(props.value);
  
  onMounted(() => {
    emit('update:value', inputValue.value);
  });
  
  const inputRef = ref(null);
  
  function getInputValue() {
    return inputValue.value;
  }
  
  defineExpose({
    getInputValue
  });
  </script>