mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 12:56:45 +08:00
项目中心,编辑回显9
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="modelV.name"
|
v-model:value="modelV.value"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
:show-count="showCount"
|
:show-count="showCount"
|
||||||
:maxlength="maxlength"
|
:maxlength="maxlength"
|
||||||
@@ -22,9 +22,6 @@ const props = defineProps({
|
|||||||
id: {
|
id: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
name: {
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
placeholder: {
|
placeholder: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
@@ -54,12 +51,9 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(["update:value",'update:validated']);
|
const emit = defineEmits(["update:value",'update:validated']);
|
||||||
console.log("setup props.value",props.value)
|
|
||||||
console.log("setup props.onceName",props.onceName)
|
|
||||||
console.log("setup props",props)
|
|
||||||
console.log("setup props.name",props.name)
|
|
||||||
const modelV = ref({
|
const modelV = ref({
|
||||||
value: props.name
|
value: props.value
|
||||||
});
|
});
|
||||||
|
|
||||||
const isExistName = ref(true);
|
const isExistName = ref(true);
|
||||||
@@ -78,14 +72,6 @@ Form.useForm(modelV, rulesRef, { debounce: { wait: 800 } });
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
validateValue()
|
validateValue()
|
||||||
console.log("onMounted validateValue 已完成")
|
|
||||||
console.log("modelV props",props)
|
|
||||||
console.log("modelV props.name",props.name)
|
|
||||||
console.log("onMounted modelV 已完成",modelV)
|
|
||||||
console.log("onMounted modelV.value 已完成",modelV.value)
|
|
||||||
|
|
||||||
console.log("onMounted modelV.value.value 已完成",modelV.value.value)
|
|
||||||
console.log("onMounted props.onceName 已完成",props.onceName)
|
|
||||||
if(props.onceName==modelV.value.value){
|
if(props.onceName==modelV.value.value){
|
||||||
isExistName.value = false;
|
isExistName.value = false;
|
||||||
}else{
|
}else{
|
||||||
@@ -108,7 +94,6 @@ watch(() => modelV.value.value, () => {
|
|||||||
},{immediate: true});
|
},{immediate: true});
|
||||||
|
|
||||||
async function validateValue() {
|
async function validateValue() {
|
||||||
console.log("validateValue modelV 项目中心-项目:",modelV.value)
|
|
||||||
if (!modelV.value.value) {
|
if (!modelV.value.value) {
|
||||||
emit("update:validated", 2);
|
emit("update:validated", 2);
|
||||||
return Promise.reject("请输入名称");
|
return Promise.reject("请输入名称");
|
||||||
|
|||||||
@@ -1579,7 +1579,7 @@ export default {
|
|||||||
}
|
}
|
||||||
function handleEdit(record) {
|
function handleEdit(record) {
|
||||||
console.log("handleEdit gx 项目中心-项目" ,record);
|
console.log("handleEdit gx 项目中心-项目" ,record);
|
||||||
if (record.type === 1 || record.type === 2) {
|
if (record.type === 1 || record.type === 2 || record.type === 3) {
|
||||||
state.doublepro = true;
|
state.doublepro = true;
|
||||||
state.projectInfo = record;
|
state.projectInfo = record;
|
||||||
state.onceName = record.name;
|
state.onceName = record.name;
|
||||||
|
|||||||
Reference in New Issue
Block a user