Refactor branch/tag selector to Vue SFC (#23421)
Follow #23394
There were many bad smells in old code. This PR only moves the code into
Vue SFC, doesn't touch the unrelated logic.
update: after
5f23218c85
, there should be no usage of the vue-rumtime-compiler anymore
(hopefully), so I think this PR could close #19851
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
d56bb74201
commit
ac8d71ff07
14 changed files with 359 additions and 309 deletions
|
@ -11,7 +11,7 @@ import {
|
|||
import {initUnicodeEscapeButton} from './repo-unicode-escape.js';
|
||||
import {svg} from '../svg.js';
|
||||
import {htmlEscape} from 'escape-goat';
|
||||
import {initRepoBranchTagDropdown} from '../components/RepoBranchTagDropdown.js';
|
||||
import {initRepoBranchTagSelector} from '../components/RepoBranchTagSelector.vue';
|
||||
import {
|
||||
initRepoCloneLink, initRepoCommonBranchOrTagDropdown, initRepoCommonFilterSearchDropdown,
|
||||
initRepoCommonLanguageStats,
|
||||
|
@ -486,7 +486,7 @@ export function initRepository() {
|
|||
// File list and commits
|
||||
if ($('.repository.file.list').length > 0 || $('.branch-dropdown').length > 0 ||
|
||||
$('.repository.commits').length > 0 || $('.repository.release').length > 0) {
|
||||
initRepoBranchTagDropdown('.choose.reference .ui.dropdown');
|
||||
initRepoBranchTagSelector('.js-branch-tag-selector');
|
||||
}
|
||||
|
||||
// Wiki
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue