mirror of
https://github.com/marktext/marktext.git
synced 2025-05-03 17:51:39 +08:00

* side-bar-view * list files view * update the structure of store, add modules * open project and change select files * add tabs view * listen for file/dir changing, and update in sidebar * delete some unused code * context menu in sidebar * add tool bar and tab bar menu item * save all and save all and close * copy, cut, paste, new file, new directory, move to trash, open in folder * rename in sidebar
29 lines
497 B
Vue
29 lines
497 B
Vue
<template>
|
|
<span :class="className" class="file-icon"></span>
|
|
</template>
|
|
|
|
<script>
|
|
import fileIcons from '../../../editor/fileIcons'
|
|
|
|
export default {
|
|
props: {
|
|
name: {
|
|
type: String,
|
|
required: true,
|
|
default: 'mock.md'
|
|
}
|
|
},
|
|
computed: {
|
|
className () {
|
|
return fileIcons.getClassWithColor(this.name ? this.name : 'mock.md').split(/\s/)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.file-icon {
|
|
margin-right: 5px;
|
|
}
|
|
</style>
|