feat: contracts UI refactor

This commit is contained in:
Alisa | Side.one 2023-05-08 23:33:32 +08:00
parent 4ea1402840
commit d196c35dc8
2 changed files with 34 additions and 24 deletions

View File

@ -93,12 +93,13 @@ const result = ref('');
</script> </script>
<template> <template>
<div> <div>
<VCard> <div class="bg-base-100 px-4 pt-3 pb-4 rounded mb-4 shadow">
<VCardTitle>Contract List of Code: {{ props.code_id }}</VCardTitle> <h2 class="card-title truncate w-full">Contract List of Code: {{ props.code_id }}</h2>
<VTable> <div class="overflow-x-auto">
<table class="table w-full mt-4">
<thead> <thead>
<tr> <tr>
<th>Contract List</th> <th style="position: relative;">Contract List</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
@ -106,16 +107,25 @@ const result = ref('');
<tr v-for="v in response.contracts"> <tr v-for="v in response.contracts">
<td>{{ v }}</td> <td>{{ v }}</td>
<td> <td>
<VBtn size="small" @click="showInfo(v)">contract</VBtn> <button
<VBtn size="small" @click="showState(v)" class="ml-2" class="btn btn-primary btn-sm text-xs mr-2"
>States</VBtn @click="showInfo(v)"
> >contract</button>
<VBtn size="small" @click="showQuery(v)" class="ml-2">Query</VBtn> <button
class="btn btn-primary btn-sm text-xs mr-2"
@click="showState(v)"
>States</button>
<button
class="btn btn-primary btn-sm text-xs"
@click="showQuery(v)"
>Query</button>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</VTable> </table>
</VCard> </div>
</div>
<v-dialog v-model="infoDialog" width="auto"> <v-dialog v-model="infoDialog" width="auto">
<v-card> <v-card>
<VCardTitle>Contract Detail</VCardTitle> <VCardTitle>Contract Detail</VCardTitle>