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;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const parentFloating = inject<Ref<HTMLDivElement>>('parentFloating');
 | 
			
		||||
const parentFloating = inject<Ref<HTMLDivElement | null>>('parentFloating', ref(null));
 | 
			
		||||
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
 | 
			
		||||
 | 
			
		||||
defineExpose({
 | 
			
		||||
 | 
			
		||||
@ -318,6 +318,6 @@ const addDialogVisible = defineModel<boolean>('visible', { default: false });
 | 
			
		||||
const addFromJsonDialogVisible = defineModel<boolean>('visible1', { default: false });
 | 
			
		||||
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);
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
@ -250,6 +250,6 @@ const toggleValue = (row: MockSchema, key: 'enable' | 'useInEditor', value: bool
 | 
			
		||||
 | 
			
		||||
const addDialogVisible = defineModel<boolean>('visible', { default: false });
 | 
			
		||||
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);
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ import { Ref, ref } from 'vue';
 | 
			
		||||
 | 
			
		||||
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({
 | 
			
		||||
    left: 0,
 | 
			
		||||
    top: 0,
 | 
			
		||||
 | 
			
		||||
@ -111,8 +111,8 @@
 | 
			
		||||
        :key="config.$key ?? index"
 | 
			
		||||
        v-if="floatBoxStates[config.$key]?.status"
 | 
			
		||||
        v-model:visible="floatBoxStates[config.$key].status"
 | 
			
		||||
        v-model:width="columnLeftWidth"
 | 
			
		||||
        v-model:height="columnLeftHeight"
 | 
			
		||||
        :width="columnLeftWidth"
 | 
			
		||||
        :title="config.text"
 | 
			
		||||
        :position="{
 | 
			
		||||
          left: floatBoxStates[config.$key].left,
 | 
			
		||||
 | 
			
		||||
@ -55,13 +55,12 @@ const dataSourceConfig = ref<FormConfig>([]);
 | 
			
		||||
 | 
			
		||||
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);
 | 
			
		||||
 | 
			
		||||
watchEffect(() => {
 | 
			
		||||
  initValues.value = props.values;
 | 
			
		||||
  dataSourceConfig.value = services?.dataSourceService.getFormConfig(initValues.value.type) || [];
 | 
			
		||||
  console.log(dataSourceConfig.value);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const submitHandler = (values: any) => {
 | 
			
		||||
 | 
			
		||||
@ -68,9 +68,6 @@
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.m-editor-slide-list-box {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  min-width: 240px;
 | 
			
		||||
  min-height: 500px;
 | 
			
		||||
  > div {
 | 
			
		||||
    &:first-child {
 | 
			
		||||
      min-width: 240px;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user