up.
This commit is contained in:
parent
28712780ff
commit
f86878fce0
@ -91,3 +91,7 @@ export function strToBind(type: string, bindStr: string): any {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
export function valueToStr(type: string, value: any) {
|
||||
return value;
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref, onMounted, toRaw} from "vue";
|
||||
import { strToValue } from "@/utils/sys-config";
|
||||
import {strToValue, valueToStr, valueToStr} from "@/utils/sys-config";
|
||||
|
||||
const props = defineProps<{
|
||||
name: string;
|
||||
@ -94,7 +94,11 @@ onMounted(() => {
|
||||
});
|
||||
defineExpose({
|
||||
getDataValue(){
|
||||
return [props.name, toRaw(dataValue.value)];
|
||||
/*
|
||||
* 格式化value为数据库可存储的字符串结构之后
|
||||
* 返回 name->value
|
||||
*/
|
||||
return [props.name, valueToStr(toRaw(dataValue.value))];
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user