Skip to content

Commit

Permalink
feat: 代码列表页高亮
Browse files Browse the repository at this point in the history
  • Loading branch information
rehiy committed Nov 25, 2023
1 parent e8d602d commit c1e7b8f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/apps/script/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export default class ScriptList extends Vue {
public tableColumns = [
{ colKey: 'Name', title: '名称', ellipsis: true },
{ colKey: 'CommandType', title: '类型', ellipsis: true },
{ colKey: 'Content', title: '脚本', ellipsis: true },
{ colKey: 'WorkDirectory', title: '执行路径', ellipsis: true },
{ colKey: 'Timeout', title: '超时', ellipsis: true },
{ colKey: 'Operation', title: '操作', width: "110px" },
]
}
Expand Down Expand Up @@ -77,7 +78,7 @@ export default class ScriptList extends Vue {
新建脚本
</t-button>
</template>
<t-table :data="scriptList" :columns="tableColumns" row-key="Id" hover>
<t-table :data="scriptList" :columns="tableColumns" row-key="Id" hover expand-on-row-click>
<template #Operation="{ row }">
<t-link theme="primary" hover="color" @click="updateModal.open(row)">
修改
Expand All @@ -88,6 +89,13 @@ export default class ScriptList extends Vue {
</t-link>
</t-popconfirm>
</template>
<template #expandedRow="{ row }">
<pre v-highlight max-height="500">
<code v-if="row.CommandType == 'SHELL'" class="language-shell">{{ row.Content }}</code>
<code v-if="row.CommandType == 'POWERSHELL'" class="language-powershell">{{ row.Content }}</code>
<code v-if="row.CommandType == 'BAT'" class="language-bat">{{ row.Content }}</code>
</pre>
</template>
</t-table>
</t-card>

Expand Down
2 changes: 1 addition & 1 deletion src/apps/taskline/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class TasklineList extends Vue {
this.historyList = res.Items
}
// 侧边栏开关
// 展开详情
public expanded = false
Expand Down

0 comments on commit c1e7b8f

Please sign in to comment.