feat: (草稿)快速表单支持去掉部分只读字段的灰底

This commit is contained in:
gaoyunqi
2024-02-05 15:25:01 +08:00
parent ec11057a12
commit fd9f4569d2
2 changed files with 33 additions and 8 deletions

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