Commit c6f6da79 by haojie

1

parent 8a22c915
<template>
<CustomTTable :columns="columns" :list="RecordList.list"></CustomTTable>
</template>
<script lang="ts" setup>
import CustomTTable from '@/components/custom/TTable.vue';
import { reactive } from 'vue';
const RecordList = reactive({
// 绘图列表
list: [],
});
// 绘图记录
const columns = [
{
title: '账号',
colKey: 'name',
},
{
title: '套餐',
colKey: 'packages',
align: 'center',
className: 'n_quantity',
},
{
title: '状况',
colKey: 'n_funds',
align: 'center',
className: 'n_funds',
},
{
title: '到期时间',
colKey: 'operation',
align: 'right',
},
];
</script>
<style lang="less"></style>
...@@ -5,20 +5,34 @@ ...@@ -5,20 +5,34 @@
:class="{ :class="{
active: item.value == DefaultTable, active: item.value == DefaultTable,
}" }"
@click="changeTable(item)"
v-for="item in label_list" v-for="item in label_list"
:key="item.value" :key="item.value"
>{{ item.label }}</span >{{ item.label }}</span
> >
</div> </div>
<CustomTTable :columns="columns" :list="RecordList.list"></CustomTTable> <div v-show="DefaultTable == 'img'">
<MappingRecord></MappingRecord>
</div>
<template v-if="is_first">
<div v-show="DefaultTable == 'text'">
<CustomTTable
:columns="columns2"
:list="RecordList.textlist"
></CustomTTable>
</div>
</template>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import CustomTTable from '@/components/custom/TTable.vue'; import CustomTTable from '@/components/custom/TTable.vue';
import MappingRecord from './components/MappingRecord.vue';
import { reactive, ref } from 'vue'; import { reactive, ref } from 'vue';
// 默认展示绘图记录 // 默认展示绘图记录
const DefaultTable = ref<'img' | 'text'>('img'); const DefaultTable = ref<'img' | 'text'>('img');
const is_first = ref(false);
const RecordList = reactive({ const RecordList = reactive({
// 绘图列表 // 绘图列表
list: [], list: [],
...@@ -35,7 +49,9 @@ const label_list = [ ...@@ -35,7 +49,9 @@ const label_list = [
value: 'text', value: 'text',
}, },
]; ];
const columns = [
// 文案记录
const columns2 = [
{ {
title: '账号', title: '账号',
colKey: 'name', colKey: 'name',
...@@ -58,6 +74,10 @@ const columns = [ ...@@ -58,6 +74,10 @@ const columns = [
align: 'right', align: 'right',
}, },
]; ];
const changeTable = (item: any) => {
is_first.value = true;
DefaultTable.value = item.value;
};
</script> </script>
<style lang="less"> <style lang="less">
...@@ -68,8 +88,13 @@ const columns = [ ...@@ -68,8 +88,13 @@ const columns = [
font-weight: 600; font-weight: 600;
font-size: @font-size-18; font-size: @font-size-18;
margin-bottom: 16px; margin-bottom: 16px;
transition: all 0.3s;
.active { .active {
color: #00f9f9; color: #00f9f9;
transition: all 0.3s;
}
span {
cursor: pointer;
} }
& > :not(:first-child) { & > :not(:first-child) {
margin-left: 12px; margin-left: 12px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment