feat: mml管理>UDM操作

This commit is contained in:
TsMask
2023-10-11 14:17:37 +08:00
parent ed399331ae
commit 5b220260b6
3 changed files with 352 additions and 21 deletions

View File

@@ -16,7 +16,7 @@
import { Codemirror } from 'vue-codemirror';
import { javascript } from '@codemirror/lang-javascript';
import { oneDark } from '@codemirror/theme-one-dark';
import { ref } from 'vue';
import { ref, watch } from 'vue';
const emit = defineEmits(['update:value']);
const props = defineProps({
@@ -49,6 +49,7 @@ const modelValue = ref<string>('');
/**变更时更新绑定值 */
function fnChange(value: string, viewUpdate: any) {
if (props.disabled) return;
emit('update:value', value);
}
@@ -56,6 +57,14 @@ function fnChange(value: string, viewUpdate: any) {
function fnReady(payload: any) {
modelValue.value = props.value;
}
/**监听是否value改变 */
watch(
() => props.value,
val => {
modelValue.value = val;
}
);
</script>
<style lang="less" scoped></style>