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