mirror of
				https://github.com/Tencent/tmagic-editor.git
				synced 2025-11-04 02:28:04 +08:00 
			
		
		
		
	chore(editor): 解决warning
This commit is contained in:
		
							parent
							
								
									96149bd2ae
								
							
						
					
					
						commit
						b3cf919273
					
				@ -252,7 +252,7 @@ const closedHandler = () => {
 | 
				
			|||||||
  changedValue.value = undefined;
 | 
					  changedValue.value = undefined;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const parentFloating = inject<Ref<HTMLDivElement>>('parentFloating');
 | 
					const parentFloating = inject<Ref<HTMLDivElement | null>>('parentFloating', ref(null));
 | 
				
			||||||
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
 | 
					const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
defineExpose({
 | 
					defineExpose({
 | 
				
			||||||
 | 
				
			|||||||
@ -318,6 +318,6 @@ const addDialogVisible = defineModel<boolean>('visible', { default: false });
 | 
				
			|||||||
const addFromJsonDialogVisible = defineModel<boolean>('visible1', { default: false });
 | 
					const addFromJsonDialogVisible = defineModel<boolean>('visible1', { default: false });
 | 
				
			||||||
const { height: editorHeight } = useEditorContentHeight();
 | 
					const { height: editorHeight } = useEditorContentHeight();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const parentFloating = inject<Ref<HTMLDivElement>>('parentFloating');
 | 
					const parentFloating = inject<Ref<HTMLDivElement | null>>('parentFloating', ref(null));
 | 
				
			||||||
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
 | 
					const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
				
			|||||||
@ -250,6 +250,6 @@ const toggleValue = (row: MockSchema, key: 'enable' | 'useInEditor', value: bool
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const addDialogVisible = defineModel<boolean>('visible', { default: false });
 | 
					const addDialogVisible = defineModel<boolean>('visible', { default: false });
 | 
				
			||||||
const { height: editorHeight } = useEditorContentHeight();
 | 
					const { height: editorHeight } = useEditorContentHeight();
 | 
				
			||||||
const parentFloating = inject<Ref<HTMLDivElement>>('parentFloating');
 | 
					const parentFloating = inject<Ref<HTMLDivElement | null>>('parentFloating', ref(null));
 | 
				
			||||||
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
 | 
					const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,7 @@ import { Ref, ref } from 'vue';
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import { UiService } from '@editor/services/ui';
 | 
					import { UiService } from '@editor/services/ui';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const useNextFloatBoxPosition = (uiService?: UiService, parent?: Ref<HTMLDivElement>) => {
 | 
					export const useNextFloatBoxPosition = (uiService?: UiService, parent?: Ref<HTMLDivElement | null>) => {
 | 
				
			||||||
  const boxPosition = ref({
 | 
					  const boxPosition = ref({
 | 
				
			||||||
    left: 0,
 | 
					    left: 0,
 | 
				
			||||||
    top: 0,
 | 
					    top: 0,
 | 
				
			||||||
 | 
				
			|||||||
@ -111,8 +111,8 @@
 | 
				
			|||||||
        :key="config.$key ?? index"
 | 
					        :key="config.$key ?? index"
 | 
				
			||||||
        v-if="floatBoxStates[config.$key]?.status"
 | 
					        v-if="floatBoxStates[config.$key]?.status"
 | 
				
			||||||
        v-model:visible="floatBoxStates[config.$key].status"
 | 
					        v-model:visible="floatBoxStates[config.$key].status"
 | 
				
			||||||
        v-model:width="columnLeftWidth"
 | 
					 | 
				
			||||||
        v-model:height="columnLeftHeight"
 | 
					        v-model:height="columnLeftHeight"
 | 
				
			||||||
 | 
					        :width="columnLeftWidth"
 | 
				
			||||||
        :title="config.text"
 | 
					        :title="config.text"
 | 
				
			||||||
        :position="{
 | 
					        :position="{
 | 
				
			||||||
          left: floatBoxStates[config.$key].left,
 | 
					          left: floatBoxStates[config.$key].left,
 | 
				
			||||||
 | 
				
			|||||||
@ -55,13 +55,12 @@ const dataSourceConfig = ref<FormConfig>([]);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const { height: editorHeight } = useEditorContentHeight();
 | 
					const { height: editorHeight } = useEditorContentHeight();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const parentFloating = inject<Ref<HTMLDivElement>>('parentFloating');
 | 
					const parentFloating = inject<Ref<HTMLDivElement | null>>('parentFloating', ref(null));
 | 
				
			||||||
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
 | 
					const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
watchEffect(() => {
 | 
					watchEffect(() => {
 | 
				
			||||||
  initValues.value = props.values;
 | 
					  initValues.value = props.values;
 | 
				
			||||||
  dataSourceConfig.value = services?.dataSourceService.getFormConfig(initValues.value.type) || [];
 | 
					  dataSourceConfig.value = services?.dataSourceService.getFormConfig(initValues.value.type) || [];
 | 
				
			||||||
  console.log(dataSourceConfig.value);
 | 
					 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const submitHandler = (values: any) => {
 | 
					const submitHandler = (values: any) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -68,9 +68,6 @@
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.m-editor-slide-list-box {
 | 
					.m-editor-slide-list-box {
 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  min-width: 240px;
 | 
					 | 
				
			||||||
  min-height: 500px;
 | 
					 | 
				
			||||||
  > div {
 | 
					  > div {
 | 
				
			||||||
    &:first-child {
 | 
					    &:first-child {
 | 
				
			||||||
      min-width: 240px;
 | 
					      min-width: 240px;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user