Refactor dashboard repo list to Vue SFC (#23405)
Similar to #23394 The dashboard repo list mixes jQuery/Fomantic UI/Vue together, it's very diffcult to maintain and causes unfixable a11y problems. This PR uses two steps to refactor the repo list: 1. move `data-` attributes to JS object and use Vue data as much as possibled3adc0dcac
2. move the code into a Vue SFC7ebe55df6e
Total: +516 −585 Screenshots: <details>    </details> --------- Co-authored-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
b942838bd4
commit
e82f1b15c7
8 changed files with 516 additions and 585 deletions
|
@ -51,7 +51,7 @@
|
|||
|
||||
<script>
|
||||
import VueBarGraph from 'vue-bar-graph';
|
||||
import {initVueApp} from './VueComponentLoader.js';
|
||||
import {createApp} from 'vue';
|
||||
|
||||
const sfc = {
|
||||
components: {VueBarGraph},
|
||||
|
@ -102,8 +102,11 @@ const sfc = {
|
|||
};
|
||||
|
||||
export function initRepoActivityTopAuthorsChart() {
|
||||
initVueApp('#repo-activity-top-authors-chart', sfc);
|
||||
const el = document.getElementById('repo-activity-top-authors-chart');
|
||||
if (el) {
|
||||
createApp(sfc).mount(el);
|
||||
}
|
||||
}
|
||||
|
||||
export default sfc; // this line is necessary to activate the IDE's Vue plugin
|
||||
export default sfc; // activate the IDE's Vue plugin
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue