修复bug

This commit is contained in:
Jerry
2024-08-16 18:32:03 +08:00
parent 8cb2a391b1
commit d030d84a30
4 changed files with 9 additions and 15 deletions

View File

@@ -23,7 +23,7 @@
</el-link> </el-link>
<div class="right"> <div class="right">
<slot name="right" :data="item" /> <slot name="right" :data="item" />
<el-icon><Close /></el-icon> <el-icon @click="onDeleteItem(item)" style="cursor: pointer"><Close /></el-icon>
</div> </div>
</el-row> </el-row>
</template> </template>
@@ -138,10 +138,10 @@ const onEditItem = (item: ANY_OBJECT | null) => {
emit('edit', item); emit('edit', item);
} }
}; };
// const onDeleteItem = (item: ANY_OBJECT) => { const onDeleteItem = (item: ANY_OBJECT) => {
// if (props.disabled) return; if (props.disabled) return;
// emit('delete', item); emit('delete', item);
// }; };
</script> </script>
<style scoped> <style scoped>

View File

@@ -12,7 +12,7 @@
:change="onValueChange" :change="onValueChange"
@widgetClick="onWidgetClick" @widgetClick="onWidgetClick"
> >
<template v-if="form().mode === 'pc'" v-slot="scope"> <template v-if="form().mode === 'pc' && widget.widgetType !== SysCustomWidgetType.Cascader" v-slot="scope">
<template v-if="widget.widgetType === SysCustomWidgetType.Radio"> <template v-if="widget.widgetType === SysCustomWidgetType.Radio">
<el-radio v-for="item in getAllDropdownData" :key="item.id" :value="item.id"> <el-radio v-for="item in getAllDropdownData" :key="item.id" :value="item.id">
{{ item.name }} {{ item.name }}
@@ -98,10 +98,7 @@ interface IProps extends WidgetProps {
} }
const pps = withDefaults(defineProps<IProps>(), {}); const pps = withDefaults(defineProps<IProps>(), {});
console.log('widget pps', pps);
const form = inject('form', () => { const form = inject('form', () => {
console.error('OnlineCustomWidget: form not injected');
return { isEdit: false } as ANY_OBJECT; return { isEdit: false } as ANY_OBJECT;
}); });
const parentWidget = inject<ANY_OBJECT | null>('parentWidget', null); const parentWidget = inject<ANY_OBJECT | null>('parentWidget', null);
@@ -430,7 +427,6 @@ const onValueChange = (
dictData: dictData, dictData: dictData,
selectRow: selectRow, selectRow: selectRow,
}); });
onValueInput(tempVal);
}; };
const loadDropdownData = () => { const loadDropdownData = () => {

View File

@@ -899,6 +899,7 @@ const onBindFormTypeChange = () => {
// 流程绑定表单页面改变 // 流程绑定表单页面改变
const onEntryPageChange = () => { const onEntryPageChange = () => {
formFlowEntryData.value.defaultFormId = undefined; formFlowEntryData.value.defaultFormId = undefined;
defaultFormIdWidget.setDirty(true);
entryDatasource = null; entryDatasource = null;
}; };
const getFormShareInfo = (form: ANY_OBJECT) => { const getFormShareInfo = (form: ANY_OBJECT) => {

View File

@@ -130,19 +130,16 @@ interface IProps extends ThirdProps {
dialog?: DialogProp<ANY_OBJECT>; dialog?: DialogProp<ANY_OBJECT>;
} }
const props = withDefaults(defineProps<IProps>(), { const props = withDefaults(defineProps<IProps>(), {
flowEntry: () => { flowEntry: undefined,
return {};
},
}); });
const { thirdParams } = useThirdParty(props); const { thirdParams } = useThirdParty(props);
const formItemSize = computed(() => { const formItemSize = computed(() => {
return layoutStore.defaultFormItemSize || thirdParams.value.defaultFormItemSize?.value; return layoutStore.defaultFormItemSize || thirdParams.value.defaultFormItemSize?.value;
}); });
const entryXml = ref<string>(); const entryXml = ref<string>();
const dialogParams = computed(() => { const dialogParams = computed(() => {
return { return {
flowEntry: props.flowEntry || thirdParams.value.flowEntry, flowEntry: props.flowEntry || thirdParams.value.flowEntry || {},
}; };
}); });
/** /**