changes
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
@use "sass:list";
|
@use "sass:list";
|
||||||
|
|
||||||
|
.debug {
|
||||||
|
border: 1px solid red !important;
|
||||||
|
}
|
||||||
|
|
||||||
// Font size loops
|
// Font size loops
|
||||||
@for $i from 10 through 50 {
|
@for $i from 10 through 50 {
|
||||||
.fs-#{$i} {
|
.fs-#{$i} {
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ function dynamicComponent(htmlString) {
|
|||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
emits: ["clickevent"],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
var timer = undefined;
|
var timer = undefined;
|
||||||
@@ -264,10 +265,10 @@ const showField = async function (field) {
|
|||||||
showmodal.value = {
|
showmodal.value = {
|
||||||
vbind: {
|
vbind: {
|
||||||
pagename: props.pagename,
|
pagename: props.pagename,
|
||||||
field: field,
|
field,
|
||||||
filters: filters,
|
filters,
|
||||||
filterData: filterData,
|
filterData,
|
||||||
width: width,
|
width,
|
||||||
},
|
},
|
||||||
component: "datatable/ContextMenu",
|
component: "datatable/ContextMenu",
|
||||||
title: field.name,
|
title: field.name,
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ const props = defineProps({
|
|||||||
record: Object,
|
record: Object,
|
||||||
attr: String,
|
attr: String,
|
||||||
position: String,
|
position: String,
|
||||||
mindate: String,
|
mindate: [Date, String],
|
||||||
maxdate: String,
|
maxdate: [Date, String],
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,50 +1,76 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="p-2"
|
class="px-2"
|
||||||
style="width: 300px"
|
style="width: 300px"
|
||||||
>
|
>
|
||||||
<div class="field is-grouped">
|
<div class="is-flex is-gap-1 is-justify-content-space-between is-align-items-stretch h-8">
|
||||||
<div class="control pl-2">
|
<div class="buttons is-gap-0.5 m-0 is-align-items-stretch">
|
||||||
<a
|
<button
|
||||||
class="mr-1"
|
@click="previousYear"
|
||||||
@click="previousYear()"
|
class="button is-text rounded-full"
|
||||||
>
|
>
|
||||||
<SvgIcon v-bind="{ name: 'doubleleft.svg', type: 'gray', size: 18 }"></SvgIcon>
|
<span class="icon">
|
||||||
</a>
|
<Icon
|
||||||
<a
|
name="ic:baseline-keyboard-double-arrow-left"
|
||||||
@click="previousMonth()"
|
:size="24"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
v-if="type === 'days'"
|
v-if="type === 'days'"
|
||||||
|
@click="previousMonth"
|
||||||
|
class="button is-text rounded-full"
|
||||||
>
|
>
|
||||||
<SvgIcon v-bind="{ name: 'left1.svg', type: 'gray', size: 18 }"></SvgIcon>
|
<span class="icon">
|
||||||
</a>
|
<Icon
|
||||||
|
name="ic:baseline-keyboard-arrow-left"
|
||||||
|
:size="24"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control is-expanded has-text-centered">
|
<div class="is-flex is-align-items-center is-gap-0">
|
||||||
<a
|
<button
|
||||||
class="font-bold mr-2"
|
v-if="type === 'days'"
|
||||||
@click="type = 'months'"
|
@click="type = 'months'"
|
||||||
v-if="type === 'days'"
|
class="button is-white p-2 has-text-primary font-bold h-full"
|
||||||
>{{ `T${month}` }}</a
|
|
||||||
>
|
>
|
||||||
<a
|
T{{ month }}
|
||||||
class="font-bold"
|
</button>
|
||||||
|
<button
|
||||||
@click="type = 'years'"
|
@click="type = 'years'"
|
||||||
>{{ caption || year }}</a
|
class="button is-white p-2 has-text-primary font-bold h-full"
|
||||||
>
|
>
|
||||||
|
{{ caption || year }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control pr-2">
|
<div class="buttons is-gap-0.5 m-0 is-align-items-stretch">
|
||||||
<a
|
<button
|
||||||
class="mr-1"
|
class="button is-text rounded-full"
|
||||||
@click="nextMonth()"
|
@click="nextMonth"
|
||||||
v-if="type === 'days'"
|
v-if="type === 'days'"
|
||||||
>
|
>
|
||||||
<SvgIcon v-bind="{ name: 'right.svg', type: 'gray', size: 18 }"></SvgIcon>
|
<span class="icon">
|
||||||
</a>
|
<Icon
|
||||||
<a @click="nextYear()">
|
name="ic:baseline-keyboard-arrow-right"
|
||||||
<SvgIcon v-bind="{ name: 'doubleright.svg', type: 'gray', size: 18 }"></SvgIcon>
|
:size="24"
|
||||||
</a>
|
/>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
@click="nextYear"
|
||||||
|
class="button is-text rounded-full"
|
||||||
|
>
|
||||||
|
<span class="icon">
|
||||||
|
<Icon
|
||||||
|
name="ic:baseline-keyboard-double-arrow-right"
|
||||||
|
:size="24"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr class="mt-0 mb-5" />
|
<hr class="mt-1 mb-5" />
|
||||||
<div v-if="type === 'days'">
|
<div v-if="type === 'days'">
|
||||||
<div class="columns is-mobile mx-0 mb-3">
|
<div class="columns is-mobile mx-0 mb-3">
|
||||||
<div
|
<div
|
||||||
@@ -80,9 +106,9 @@
|
|||||||
<span
|
<span
|
||||||
style="width: 25px; height: 25px"
|
style="width: 25px; height: 25px"
|
||||||
:class="[
|
:class="[
|
||||||
'p-1 rounded-md is-flex is-justify-content-center is-align-items-center',
|
'p-1 rounded-full is-flex is-justify-content-center is-align-items-center',
|
||||||
{
|
{
|
||||||
'has-background-primary-50 has-text-white': m.date === curdate,
|
'has-background-primary has-text-white': m.date === curdate,
|
||||||
'has-background-success-50 has-text-white': m.date === today,
|
'has-background-success-50 has-text-white': m.date === today,
|
||||||
'has-text-grey-light': m.currentMonth !== m.monthCondition,
|
'has-text-grey-light': m.currentMonth !== m.monthCondition,
|
||||||
},
|
},
|
||||||
@@ -96,7 +122,7 @@
|
|||||||
<hr class="my-1" />
|
<hr class="my-1" />
|
||||||
<div class="mt-2 fs-14">
|
<div class="mt-2 fs-14">
|
||||||
<span class="ml-2">Hôm nay: </span>
|
<span class="ml-2">Hôm nay: </span>
|
||||||
<a @click="chooseToday()">{{ $dayjs(today).format("L") }}</a>
|
<a @click="chooseToday">{{ $dayjs(today).format("L") }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<PickMonth
|
<PickMonth
|
||||||
@@ -119,7 +145,7 @@ const { $id, $dayjs, $unique } = useNuxtApp();
|
|||||||
const emit = defineEmits(["date"]);
|
const emit = defineEmits(["date"]);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
date: String,
|
date: String,
|
||||||
maxdate: String,
|
maxdate: [Date, String],
|
||||||
});
|
});
|
||||||
const dates = ref([]);
|
const dates = ref([]);
|
||||||
const dateOfWeek = [
|
const dateOfWeek = [
|
||||||
@@ -255,4 +281,9 @@ watch(
|
|||||||
a {
|
a {
|
||||||
color: var(--bulma-link-60);
|
color: var(--bulma-link-60);
|
||||||
}
|
}
|
||||||
|
.control.has-icons-left .icon,
|
||||||
|
.control.has-icons-right .icon {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
name: String,
|
name: String,
|
||||||
value: String,
|
value: [Number, String],
|
||||||
unit: String,
|
unit: String,
|
||||||
icon: String,
|
icon: String,
|
||||||
color: String,
|
color: String,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
name: String,
|
name: String,
|
||||||
value: Number,
|
value: [Number, String],
|
||||||
icon: String,
|
icon: String,
|
||||||
color: String,
|
color: String,
|
||||||
unit: String,
|
unit: String,
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="is-flex is-align-items-center is-gap-1">
|
<div class="is-flex is-align-items-center is-gap-1">
|
||||||
<div style="width: 18px; height: 18px">
|
<span class="icon">
|
||||||
<Icon
|
<Icon
|
||||||
name="material-symbols:cancel-rounded"
|
name="material-symbols:cancel-rounded"
|
||||||
:size="18"
|
:size="18"
|
||||||
class="has-text-danger-80"
|
class="has-text-danger-80"
|
||||||
/>
|
/>
|
||||||
</div>
|
</span>
|
||||||
<p
|
<p
|
||||||
v-html="content"
|
v-html="content"
|
||||||
class="control is-expanded"
|
class="control is-expanded"
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { defineAsyncComponent } from "vue";
|
|
||||||
import { useStore } from "@/stores/index";
|
import { useStore } from "@/stores/index";
|
||||||
import Info from "@/components/snackbar/Info.vue";
|
import Info from "@/components/snackbar/Info.vue";
|
||||||
import Success from "@/components/snackbar/Success.vue";
|
import Success from "@/components/snackbar/Success.vue";
|
||||||
@@ -10,31 +9,7 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const componentFiles = import.meta.glob("@/components/**/*.vue");
|
setTimeout(() => store.commit("snackbar", undefined), 3900);
|
||||||
const resolvedComponent = shallowRef(null);
|
|
||||||
|
|
||||||
function loadDynamicComponent() {
|
|
||||||
if (!props.component) {
|
|
||||||
resolvedComponent.value = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const fullPath = `/components/snackbar/${props.component}.vue`;
|
|
||||||
const componentPath = Object.keys(componentFiles).find((path) => path.endsWith(fullPath));
|
|
||||||
|
|
||||||
if (componentPath) {
|
|
||||||
resolvedComponent.value = defineAsyncComponent(componentFiles[componentPath]);
|
|
||||||
} else {
|
|
||||||
console.error(`Không tìm thấy component tại: ${fullPath}`);
|
|
||||||
resolvedComponent.value = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Theo dõi sự thay đổi của props.component để load lại nếu cần
|
|
||||||
watchEffect(() => {
|
|
||||||
loadDynamicComponent();
|
|
||||||
});
|
|
||||||
// setTimeout(() => store.commit("snackbar", undefined), 3900);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="is-flex is-align-items-center is-gap-1">
|
<div class="is-flex is-align-items-center is-gap-1">
|
||||||
<div style="width: 18px; height: 18px">
|
<span class="icon">
|
||||||
<Icon
|
<Icon
|
||||||
name="material-symbols:check-circle-rounded"
|
name="material-symbols:check-circle-rounded"
|
||||||
:size="18"
|
:size="18"
|
||||||
class="has-text-success-70"
|
class="has-text-success-70"
|
||||||
/>
|
/>
|
||||||
</div>
|
</span>
|
||||||
<p
|
<p
|
||||||
v-html="content"
|
v-html="content"
|
||||||
class="control is-expanded"
|
class="control is-expanded"
|
||||||
|
|||||||
Reference in New Issue
Block a user