File tree Expand file tree Collapse file tree 2 files changed +27
-32
lines changed
jscomposition/system/table/cell Expand file tree Collapse file tree 2 files changed +27
-32
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ import Recommendations from "../../components/Recommendations.vue"
6060import ProgressLoader from "../common/ProgressLoader.vue" ;
6161import AddToBundle from "./AddToBundle.vue" ;
6262
63+ export * from "../../../jscomposition/base/table/index" ;
64+ export * from "../../../jscomposition/system/index" ;
65+
6366export {
6467 AddToProjectModal ,
6568 BasicSearch ,
Original file line number Diff line number Diff line change 11<template >
22 <div class =" tw-flex tw-justify-left" >
3- <span
4- :class =" `tw-inline-flex tw-items-center tw-text-xs tw-border-1 tw-rounded-lg
3+ <span :class =" `tw-inline-flex tw-items-center tw-text-xs tw-border-1 tw-rounded-lg
54 tw-bg-${color}-100 tw-px-2 tw-py-1 tw-text-${color}-500`" >
65 {{ label }}
76 </span >
87 </div >
98</template >
10- <script >
11- import { defineComponent , computed } from " vue" ;
9+ <script setup >
10+ import { computed } from " vue" ;
1211import { t } from " i18next" ;
12+ import { get } from " lodash" ;
1313
14- export const statuses = {
14+ const statuses = {
1515 DRAFT : {
1616 color: " red" ,
1717 label: ` ${ t (" Draft" )} ` ,
@@ -46,34 +46,26 @@ export const statuses = {
4646 },
4747};
4848
49- export default defineComponent ({
50- props: {
51- columns: {
52- type: Array ,
53- default : () => [],
54- },
55- column: {
56- type: Object ,
57- default : () => ({}),
58- },
59- row: {
60- type: Object ,
61- default : () => ({}),
62- },
49+ const props = defineProps ({
50+ columns: {
51+ type: Array ,
52+ default : () => [],
6353 },
64- setup (props , { emit }) {
65- const color = computed (() => (
66- statuses[props .row [props .column .field ]].color || statuses .IN_PROGRESS .color
67- ));
68-
69- const label = computed (() => (
70- statuses[props .row [props .column .field ]].label || statuses .IN_PROGRESS .label
71- ));
72-
73- return {
74- color,
75- label,
76- };
54+ column: {
55+ type: Object ,
56+ default : () => ({}),
57+ },
58+ row: {
59+ type: Object ,
60+ default : () => ({}),
7761 },
7862});
63+
64+ const color = computed (() => (
65+ statuses[get (props .row , props .column .field )].color || statuses .IN_PROGRESS .color
66+ ));
67+
68+ const label = computed (() => (
69+ statuses[get (props .row , props .column .field )].label || statuses .IN_PROGRESS .label
70+ ));
7971 </script >
You can’t perform that action at this time.
0 commit comments