feat: (草稿)快速表单支持去掉部分只读字段的灰底
This commit is contained in:
19
src/components/Form/src/components/Readonly.vue
Normal file
19
src/components/Form/src/components/Readonly.vue
Normal file
@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<div class="field-readonly">{{ fieldValue }}</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
value: String,
|
||||
schema: Object,
|
||||
});
|
||||
const fieldValue = ref(props.value);
|
||||
watch(
|
||||
() => props.value,
|
||||
(newValue) => {
|
||||
fieldValue.value = newValue;
|
||||
},
|
||||
);
|
||||
</script>
|
||||
Reference in New Issue
Block a user