Files
admin-govern/src/views/govern/device/fileService/CustomInput.vue
2024-09-25 16:36:53 +08:00

39 lines
692 B
Vue

<!-- 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>