bugifx
This commit is contained in:
@@ -88,6 +88,7 @@ function save() {
|
|||||||
const convertJoinTables = JSON.parse(JSON.stringify(data.joinTables)) as JoinTable<OneOf | string>[];
|
const convertJoinTables = JSON.parse(JSON.stringify(data.joinTables)) as JoinTable<OneOf | string>[];
|
||||||
convertJoinTables.forEach((item) => {
|
convertJoinTables.forEach((item) => {
|
||||||
const meta = getMeta(item.meta as Properties, item.table, true);
|
const meta = getMeta(item.meta as Properties, item.table, true);
|
||||||
|
if (!meta) return;
|
||||||
|
|
||||||
// Process onConditions
|
// Process onConditions
|
||||||
item.onConditions.forEach((condition) => {
|
item.onConditions.forEach((condition) => {
|
||||||
|
|||||||
@@ -104,11 +104,13 @@ const monthClassName = computed(() => {
|
|||||||
return '';
|
return '';
|
||||||
});
|
});
|
||||||
const shortConditionClass = computed(() => {
|
const shortConditionClass = computed(() => {
|
||||||
return funcValue.value !== dateFuncMap[''].value &&
|
const className = 'datetime-condition-combobox';
|
||||||
funcValue.value !== dateFuncMap['FROM_TODAY'].value &&
|
if (isInput()) { return className }
|
||||||
funcValue.value !== dateFuncMap['NOW'].value
|
if (isFromToday() || funcValue.value === dateFuncMap['NOW'].value) {
|
||||||
? 'short datetime-condition-combobox'
|
return className + ' mid';
|
||||||
: 'datetime-condition-combobox';
|
} else {
|
||||||
|
return className + ' short';
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const regex = /^(?<func>\w+)\((?<val>.*)\)$/;
|
const regex = /^(?<func>\w+)\((?<val>.*)\)$/;
|
||||||
@@ -138,9 +140,9 @@ watch(
|
|||||||
inputValue.value = '';
|
inputValue.value = '';
|
||||||
selectValue.value = value || DEFAULT_WEEK_MONTH;
|
selectValue.value = value || DEFAULT_WEEK_MONTH;
|
||||||
} else if (isFromToday() && !(before && isFromToday(before))) {
|
} else if (isFromToday() && !(before && isFromToday(before))) {
|
||||||
// only called when load page
|
// only called when first open page
|
||||||
const split = value.split(', ');
|
const split = value.split(', ');
|
||||||
inputValue.value = split[0].replace('-', '');
|
inputValue.value = split[0] === '0' ? '' : split[0].replace('-', '');
|
||||||
selectValue.value = split[1] || fromOptions[0].value;
|
selectValue.value = split[1] || fromOptions[0].value;
|
||||||
additionSelectValue.value = split[0] ? (split[0].startsWith('-') ? '-' : '+') : '+';
|
additionSelectValue.value = split[0] ? (split[0].startsWith('-') ? '-' : '+') : '+';
|
||||||
}
|
}
|
||||||
@@ -203,17 +205,11 @@ function buildFromTodayResult({
|
|||||||
if (value?.match(/^-?[0-9]+$/)) {
|
if (value?.match(/^-?[0-9]+$/)) {
|
||||||
fromTodayError.value = '';
|
fromTodayError.value = '';
|
||||||
let res = value;
|
let res = value;
|
||||||
if (value && value !== '0') {
|
if (value && value !== '0' && addition === '-') {
|
||||||
if (addition === '-') {
|
if (value.startsWith('-')) {
|
||||||
if (!value.startsWith('-')) {
|
res = res.replace('-', '');
|
||||||
res = '-' + res;
|
} else {
|
||||||
} else {
|
res = '-' + res;
|
||||||
res = res.replace('-', '');
|
|
||||||
}
|
|
||||||
} else if (addition === '+') {
|
|
||||||
if (value.startsWith('-')) {
|
|
||||||
res = res.replace('-', '');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return funcValue.value.replace('%s', select).replace('%d', res);
|
return funcValue.value.replace('%s', select).replace('%d', res);
|
||||||
@@ -234,6 +230,8 @@ function buildResult({ func = funcValue.value, value }: Param) {
|
|||||||
if (isWeek(func) || isMonth(func)) {
|
if (isWeek(func) || isMonth(func)) {
|
||||||
val = value || selectValue.value;
|
val = value || selectValue.value;
|
||||||
val = val === DEFAULT_WEEK_MONTH ? '' : val;
|
val = val === DEFAULT_WEEK_MONTH ? '' : val;
|
||||||
|
} else if (isFromToday(func)) {
|
||||||
|
return func.replace('%d', val || '0').replace('%s', val || 'DAYS');
|
||||||
}
|
}
|
||||||
return func.replace('%s', val || '');
|
return func.replace('%s', val || '');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,16 +82,22 @@
|
|||||||
--kuc-combobox-toggle-width: max(16vw, 200px);
|
--kuc-combobox-toggle-width: max(16vw, 200px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.plugin-kuc-table .kuc-text-input {
|
||||||
|
--kuc-text-input-width: max(15vw, 200px);
|
||||||
|
--kuc-dropdown-toggle-width: max(15vw, 200px);
|
||||||
|
--kuc-combobox-toggle-width: max(15vw, 200px);
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 1820px) {
|
@media screen and (max-width: 1820px) {
|
||||||
.kuc-text-input {
|
.plugin-kuc-table .kuc-text-input {
|
||||||
--kuc-text-input-width: max(14vw, 200px);
|
--kuc-text-input-width: max(13vw, 200px);
|
||||||
--kuc-dropdown-toggle-width: max(14vw, 200px);
|
--kuc-dropdown-toggle-width: max(13vw, 200px);
|
||||||
--kuc-combobox-toggle-width: max(14vw, 200px);
|
--kuc-combobox-toggle-width: max(13vw, 200px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 1740px) {
|
@media screen and (max-width: 1710px) {
|
||||||
.kuc-text-input {
|
.plugin-kuc-table .kuc-text-input {
|
||||||
--kuc-text-input-width: max(12vw, 200px);
|
--kuc-text-input-width: max(12vw, 200px);
|
||||||
--kuc-dropdown-toggle-width: max(12vw, 200px);
|
--kuc-dropdown-toggle-width: max(12vw, 200px);
|
||||||
--kuc-combobox-toggle-width: max(12vw, 200px);
|
--kuc-combobox-toggle-width: max(12vw, 200px);
|
||||||
@@ -156,6 +162,9 @@
|
|||||||
.datetime-condition-combobox {
|
.datetime-condition-combobox {
|
||||||
--kuc-combobox-toggle-width: 130px;
|
--kuc-combobox-toggle-width: 130px;
|
||||||
}
|
}
|
||||||
|
.datetime-condition-combobox.mid {
|
||||||
|
--kuc-combobox-toggle-width: 112px;
|
||||||
|
}
|
||||||
.datetime-condition-combobox.short {
|
.datetime-condition-combobox.short {
|
||||||
--kuc-combobox-toggle-width: 92px;
|
--kuc-combobox-toggle-width: 92px;
|
||||||
}
|
}
|
||||||
@@ -187,12 +196,12 @@
|
|||||||
--kuc-combobox-toggle-width: 86px;
|
--kuc-combobox-toggle-width: 86px;
|
||||||
}
|
}
|
||||||
.from-today-input {
|
.from-today-input {
|
||||||
--kuc-text-input-width: 80px;
|
--kuc-text-input-width: 75px;
|
||||||
--kuc-combobox-toggle-width: 80px;
|
--kuc-combobox-toggle-width: 75px;
|
||||||
}
|
}
|
||||||
.from-today-input.input {
|
.from-today-input.input {
|
||||||
--kuc-text-input-width: 60px;
|
--kuc-text-input-width: 50px;
|
||||||
--kuc-combobox-toggle-width: 60px;
|
--kuc-combobox-toggle-width: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .from-today-input error */
|
/* .from-today-input error */
|
||||||
|
|||||||
Reference in New Issue
Block a user