marktext/src/renderer/components/sideBar/icon.vue
冉四夕 dc79014147
Support Side Bar、 Tabs and Quick Open in Mark Text (#317)
* 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
2018-06-04 11:23:51 -05:00

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>