--wip-- [skip ci]
This commit is contained in:
parent
741a4a24b7
commit
390e8e14e7
|
@ -1,10 +1,10 @@
|
||||||
.custom-table {
|
.custom-table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
& > thead > th {
|
& > thead > th, & > thead > tr > th {
|
||||||
@apply text-left px-6 text-gray-200 font-semibold py-3 border-gray-600 border-b;
|
@apply text-left px-6 text-gray-200 font-semibold py-3 border-gray-600 border-b;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > tr {
|
& > tr, & > tbody > tr {
|
||||||
@apply text-gray-200 transition-all duration-300 rounded hover:bg-gray-800;
|
@apply text-gray-200 transition-all duration-300 rounded hover:bg-gray-800;
|
||||||
& > td {
|
& > td {
|
||||||
@apply py-1 px-6;
|
@apply py-1 px-6;
|
||||||
|
@ -12,10 +12,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.custom-table-sm {
|
&.custom-table-sm {
|
||||||
& > thead > th {
|
& > thead > th, & > thead > tr > th {
|
||||||
@apply px-3 py-2;
|
@apply px-3 py-2;
|
||||||
}
|
}
|
||||||
& > tr {
|
& > tr, & > tbody > tr {
|
||||||
& > td {
|
& > td {
|
||||||
@apply py-1 px-3;
|
@apply py-1 px-3;
|
||||||
}
|
}
|
||||||
|
@ -32,11 +32,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
.custom-table > * {
|
|
||||||
display: table-row;
|
|
||||||
}
|
|
||||||
.custom-table > * > * {
|
|
||||||
display: table-cell;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<a v-tooltip="tooltip" :href="href" :target="blank ? '_BLANK' : '_SELF'" class="inline-flex btn btn-sm">
|
<a v-tooltip="tooltip" :href="href" :target="blank ? '_BLANK' : '_SELF'" class="inline-flex btn btn-sm">
|
||||||
<ui-sprite :src="icon"></ui-sprite>
|
<ui-sprite :src="icon" />
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script lang="ts" setup>
|
||||||
defineProps({
|
const {tooltip, icon, blank = false, href = '#'} = defineProps<{
|
||||||
tooltip: {
|
tooltip: string,
|
||||||
required: true,
|
href?: string,
|
||||||
type: String,
|
blank?: boolean,
|
||||||
},
|
icon: string,
|
||||||
href: {
|
}>();
|
||||||
type: String,
|
|
||||||
default: () => '#',
|
|
||||||
required: false,
|
|
||||||
},
|
|
||||||
blank: {
|
|
||||||
type: Boolean,
|
|
||||||
default: () => false,
|
|
||||||
required: false,
|
|
||||||
},
|
|
||||||
icon: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,6 +2,5 @@
|
||||||
<svg v-bind="$attrs" class="fill-current"><use :xlink:href="`/sprite.svg#${$attrs.src}`" /></svg>
|
<svg v-bind="$attrs" class="fill-current"><use :xlink:href="`/sprite.svg#${$attrs.src}`" /></svg>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts" setup>
|
||||||
export default {};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,22 +2,25 @@
|
||||||
<div class="flex-none w-maxc flex flex-col justify-between border-b-2 group-[.is-popup]:border-zinc-500 mb-3">
|
<div class="flex-none w-maxc flex flex-col justify-between border-b-2 group-[.is-popup]:border-zinc-500 mb-3">
|
||||||
<div class="flex space-x-1 px-2">
|
<div class="flex space-x-1 px-2">
|
||||||
<a v-for="(item, index) in entries" :key="index" href="#" class="rounded-t-lg py-1 px-3 text-zinc-300"
|
<a v-for="(item, index) in entries" :key="index" href="#" class="rounded-t-lg py-1 px-3 text-zinc-300"
|
||||||
:class="index === modelValue ? `group-[.is-popup]:bg-zinc-600` : ''" @click.prevent="openMenu(index)"
|
:class="index === modelValue ? `group-[.is-popup]:bg-zinc-600` : ''" @click.prevent="openMenu(index)"
|
||||||
v-text="item.title"></a>
|
v-text="item.title"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts" setup>
|
||||||
export default {
|
defineProps<{
|
||||||
props: {
|
modelValue: number,
|
||||||
modelValue: {},
|
entries: {title: string}[]
|
||||||
entries: {},
|
}>();
|
||||||
},
|
|
||||||
methods: {
|
const emits = defineEmits<{
|
||||||
openMenu(index) {
|
'update:modelValue': [number],
|
||||||
this.$emit('update:modelValue', index);
|
}>();
|
||||||
},
|
|
||||||
},
|
function openMenu(index: number) {
|
||||||
};
|
emits('update:modelValue', index);
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue