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