fix: bug#11218
This commit is contained in:
parent
9b7b78fe33
commit
947f34bed5
|
@ -65,10 +65,12 @@ const handleOptions = computed(() => {
|
|||
{
|
||||
label: _item.trueText || true,
|
||||
value: _item.trueValue || true,
|
||||
id: _item.trueValue || true,
|
||||
},
|
||||
{
|
||||
label: _item.falseText || false,
|
||||
value: _item.falseValue || false,
|
||||
id: _item.falseValue || false,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
@ -77,6 +79,7 @@ const handleOptions = computed(() => {
|
|||
return {
|
||||
label: i.text,
|
||||
value: i.value,
|
||||
id: i.value,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
@ -136,10 +136,12 @@ const handleOptions = computed(() => {
|
|||
{
|
||||
label: _item.trueText || true,
|
||||
value: _item.trueValue || true,
|
||||
id: _item.trueValue || true,
|
||||
},
|
||||
{
|
||||
label: _item.falseText || false,
|
||||
value: _item.falseValue || false,
|
||||
id: _item.falseValue || false,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
@ -148,6 +150,7 @@ const handleOptions = computed(() => {
|
|||
return {
|
||||
label: i.text,
|
||||
value: i.value,
|
||||
id: i.value,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ const handleBoolean = (key: string) => {
|
|||
const click = (e: any) => {
|
||||
const _key = ['true', 'false'].includes(e.key) ? handleBoolean(e.key) : e.key
|
||||
const option = getOption(myOptions.value, _key, props.valueName)
|
||||
myValue.value = _key
|
||||
myValue.value = e.key
|
||||
emit('update:value', _key)
|
||||
emit('click', _key, {
|
||||
key: _key,
|
||||
|
@ -71,7 +71,7 @@ const click = (e: any) => {
|
|||
}
|
||||
|
||||
watch(() => props.value, () => {
|
||||
myValue.value = props.value
|
||||
myValue.value = isBoolean(props.value) ? String(props.value) : props.value
|
||||
}, { immediate: true})
|
||||
</script>
|
||||
|
||||
|
|
|
@ -162,6 +162,7 @@ watchEffect(() => {
|
|||
const option = getOption(_options, props.value as string, props.valueName) // 回显label值
|
||||
myValue.value = props.value
|
||||
mySource.value = props.source
|
||||
console.log(option, _options, props.valueName)
|
||||
if (option) {
|
||||
label.value = option[props.labelName] || option.name
|
||||
treeOpenKeys.value = openKeysByTree(_options, props.value, props.valueName)
|
||||
|
|
|
@ -177,8 +177,8 @@ const handOptionByColumn = (option: any) => {
|
|||
|
||||
if (option.dataType === 'boolean') {
|
||||
valueOptions.value = option.options?.map((item: any) => ({ ...item, label: item.name, value: item.id})) || [
|
||||
{ label: '是', value: true },
|
||||
{ label: '否', value: false },
|
||||
{ label: '是', value: true, id: true },
|
||||
{ label: '否', value: false, id: false },
|
||||
]
|
||||
} else if(option.dataType === 'enum') {
|
||||
valueOptions.value = option.options?.map((item: any) => ({ ...item, label: item.name, value: item.id})) || []
|
||||
|
|
|
@ -92,8 +92,8 @@ export default defineConfig(({ mode}) => {
|
|||
[env.VITE_APP_BASE_API]: {
|
||||
// target: 'http://192.168.33.22:8800',
|
||||
// target: 'http://192.168.32.244:8881',
|
||||
target: 'http://120.77.179.54:8844', // 120测试
|
||||
// target: 'http://192.168.33.46:8844', // 本地开发环境
|
||||
// target: 'http://120.77.179.54:8844', // 120测试
|
||||
target: 'http://192.168.33.46:8844', // 本地开发环境
|
||||
ws: 'ws://192.168.33.46:8844',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
|
|
Loading…
Reference in New Issue