Skip to content

Commit

Permalink
show tab name
Browse files Browse the repository at this point in the history
  • Loading branch information
as6325400 committed Jul 7, 2024
1 parent 479ca1e commit 9329abb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/views/page_main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ const closeModal = () => {
ret.value = "0";
};
const show_tab_name = (tab_name) => {
if(tab_name.length > 8) return tab_name.slice(0, 6) + "...";
return tab_name;
};
const SubmitModal = () => {
if (ret === null) return;
let copy = parseInt(ret.value);
Expand Down Expand Up @@ -159,7 +164,7 @@ const setactiveIndex = (index) => {
<div
class="w-[8rem] text-center"
v-if="!tabIsEditing[index]">
{{ tab.name }}
{{ show_tab_name(tab.name) }}
</div>
<input
v-else
Expand Down

0 comments on commit 9329abb

Please sign in to comment.