feat: mml管理>UDM操作
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user