|
@ -57,7 +57,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import { ref, computed, useAttrs, toRaw, watch } from 'vue'; |
|
|
import { ref, computed, useAttrs, toRaw, watch, onMounted } from 'vue'; |
|
|
import { Tools, axios } from '@/platform'; |
|
|
import { Tools, axios } from '@/platform'; |
|
|
import { FormFieldProps } from '@/platform/components/form/FormField.ts'; |
|
|
import { FormFieldProps } from '@/platform/components/form/FormField.ts'; |
|
|
import { FormFieldMethods } from '../form/FormField'; |
|
|
import { FormFieldMethods } from '../form/FormField'; |
|
@ -66,6 +66,10 @@ const textSelectRef = ref(); |
|
|
const attrs = useAttrs(); |
|
|
const attrs = useAttrs(); |
|
|
const modelValue = defineModel<string | Array<string>>(); |
|
|
const modelValue = defineModel<string | Array<string>>(); |
|
|
const modelObjectValue = ref(<any>[]); // 模型值包含实际值与显示值的对象集合。 |
|
|
const modelObjectValue = ref(<any>[]); // 模型值包含实际值与显示值的对象集合。 |
|
|
|
|
|
|
|
|
|
|
|
// { value: xxx, displayvalue: xxx } |
|
|
|
|
|
// { value: xxx, displayvalue: xxx } |
|
|
|
|
|
|
|
|
const gridRef = ref(); |
|
|
const gridRef = ref(); |
|
|
|
|
|
|
|
|
const isShow = ref(false); |
|
|
const isShow = ref(false); |
|
@ -279,6 +283,10 @@ const setObjectValueByValue = async (value) => { |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
|
setObjectValueByValue(modelValue.value); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
defineExpose({ |
|
|
defineExpose({ |
|
|
validate: fieldMethodsClass.validate, |
|
|
validate: fieldMethodsClass.validate, |
|
|
setValue: fieldMethodsClass.setValue, |
|
|
setValue: fieldMethodsClass.setValue, |
|
|