修改 bug
This commit is contained in:
39
src/views/govern/device/fileService/CustomInput.vue
Normal file
39
src/views/govern/device/fileService/CustomInput.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<!-- 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>
|
||||
Reference in New Issue
Block a user