-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ma-crud里面的 使用表单的字段组件插槽功能时,1怎么取详情信息?2值变化后方便提交吗? #158
Comments
嘿,@bingxinti!很高兴再次遇到你。👋 我正在查看你的问题,很快会给你一个完整的回答。请稍候哦!🚀 |
现在的方案是 弹窗前进行处理的,能否支持 |
To directly access and manipulate
Example: <ma-crud>
<template #form-xxx="{ record }">
<input v-model="formData.xxx" />
</template>
</ma-crud> And in your component script: import { ref } from 'vue';
export default {
setup() {
const formData = ref({
xxx: '' // Initialize with default or loaded data
});
// Populate formData with `record` for edit scenarios
function loadFormData(record) {
formData.xxx = record.xxx;
}
return {
formData,
loadFormData
};
}
}; For editing, ensure Sources
|
例如 我在ma-crud里面使用了代码
<template #form-xxx>
这个时候,这里面我怎么读取到 详情的信息呢?(因为是ma-crud,所以新增和编辑时,有数据的详情信息)
大概意思是:怎么取值 {form} 或者 { record } ,我想读取到 record.xxx 显示,然后页面上改了这个值,最好保存时自动提交上去
The text was updated successfully, but these errors were encountered: