Browse Source

修复显示值问题

main
likunming 10 months ago
parent
commit
f5d688ed6e
  1. 10
      io.sc.platform.core.frontend/src/platform/components/select/WGridSelect.vue

10
io.sc.platform.core.frontend/src/platform/components/select/WGridSelect.vue

@ -57,7 +57,7 @@
</template>
<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 { FormFieldProps } from '@/platform/components/form/FormField.ts';
import { FormFieldMethods } from '../form/FormField';
@ -66,6 +66,10 @@ const textSelectRef = ref();
const attrs = useAttrs();
const modelValue = defineModel<string | Array<string>>();
const modelObjectValue = ref(<any>[]); //
// { value: xxx, displayvalue: xxx }
// { value: xxx, displayvalue: xxx }
const gridRef = ref();
const isShow = ref(false);
@ -279,6 +283,10 @@ const setObjectValueByValue = async (value) => {
}
};
onMounted(() => {
setObjectValueByValue(modelValue.value);
});
defineExpose({
validate: fieldMethodsClass.validate,
setValue: fieldMethodsClass.setValue,

Loading…
Cancel
Save