mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	@@ -1,21 +1,17 @@
 | 
			
		||||
import Vue from 'vue';
 | 
			
		||||
import {createApp} from 'vue';
 | 
			
		||||
import DiffFileTree from '../components/DiffFileTree.vue';
 | 
			
		||||
import DiffFileList from '../components/DiffFileList.vue';
 | 
			
		||||
 | 
			
		||||
export default function initDiffFileTree() {
 | 
			
		||||
  const el = document.getElementById('diff-file-tree-container');
 | 
			
		||||
  const el = document.getElementById('diff-file-tree');
 | 
			
		||||
  if (!el) return;
 | 
			
		||||
 | 
			
		||||
  const View = Vue.extend({
 | 
			
		||||
    render: (createElement) => createElement(DiffFileTree),
 | 
			
		||||
  });
 | 
			
		||||
  new View().$mount(el);
 | 
			
		||||
  const fileTreeView = createApp(DiffFileTree);
 | 
			
		||||
  fileTreeView.mount(el);
 | 
			
		||||
 | 
			
		||||
  const fileListElement = document.getElementById('diff-file-list-container');
 | 
			
		||||
  const fileListElement = document.getElementById('diff-file-list');
 | 
			
		||||
  if (!fileListElement) return;
 | 
			
		||||
 | 
			
		||||
  const fileListView = Vue.extend({
 | 
			
		||||
    render: (createElement) => createElement(DiffFileList),
 | 
			
		||||
  });
 | 
			
		||||
  new fileListView().$mount(fileListElement);
 | 
			
		||||
  const fileListView = createApp(DiffFileList);
 | 
			
		||||
  fileListView.mount(fileListElement);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user