fix img autosize
This commit is contained in:
parent
de07347087
commit
18abb97f16
|
@ -30,6 +30,7 @@
|
||||||
:src="cell.value as string"
|
:src="cell.value as string"
|
||||||
:alt="cell.value as string"
|
:alt="cell.value as string"
|
||||||
:class="$style.viewImage"
|
:class="$style.viewImage"
|
||||||
|
@load="emitContentSizeChanged"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -90,6 +91,7 @@ watch(() => [cell, cell.value.value], () => {
|
||||||
// 中身がセットされた直後はサイズが分からないので、次のタイミングで更新する
|
// 中身がセットされた直後はサイズが分からないので、次のタイミングで更新する
|
||||||
nextTick(emitContentSizeChanged);
|
nextTick(emitContentSizeChanged);
|
||||||
}, { immediate: true });
|
}, { immediate: true });
|
||||||
|
|
||||||
watch(() => cell.value.selected, () => {
|
watch(() => cell.value.selected, () => {
|
||||||
if (cell.value.selected) {
|
if (cell.value.selected) {
|
||||||
rootEl.value?.focus();
|
rootEl.value?.focus();
|
||||||
|
|
|
@ -42,7 +42,7 @@ import MkButton from '@/components/MkButton.vue';
|
||||||
|
|
||||||
const columnSettings: ColumnSetting[] = [
|
const columnSettings: ColumnSetting[] = [
|
||||||
{ bindTo: 'selected', icon: 'ti-trash', type: 'boolean', editable: true, width: 34 },
|
{ bindTo: 'selected', icon: 'ti-trash', type: 'boolean', editable: true, width: 34 },
|
||||||
{ bindTo: 'url', icon: 'ti-icons', type: 'image', editable: false, width: 50, validators: [required] },
|
{ bindTo: 'url', icon: 'ti-icons', type: 'image', editable: false, width: 'auto', validators: [required] },
|
||||||
{ bindTo: 'name', title: 'name', type: 'text', editable: true, width: 140, validators: [required] },
|
{ bindTo: 'name', title: 'name', type: 'text', editable: true, width: 140, validators: [required] },
|
||||||
{ bindTo: 'category', title: 'category', type: 'text', editable: true, width: 140 },
|
{ bindTo: 'category', title: 'category', type: 'text', editable: true, width: 140 },
|
||||||
{ bindTo: 'aliases', title: 'aliases', type: 'text', editable: true, width: 140 },
|
{ bindTo: 'aliases', title: 'aliases', type: 'text', editable: true, width: 140 },
|
||||||
|
|
|
@ -110,7 +110,7 @@ type RegisterLogItem = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const columnSettings: ColumnSetting[] = [
|
const columnSettings: ColumnSetting[] = [
|
||||||
{ bindTo: 'url', icon: 'ti-icons', type: 'image', editable: true, width: 50, validators: [required] },
|
{ bindTo: 'url', icon: 'ti-icons', type: 'image', editable: true, width: 'auto', validators: [required] },
|
||||||
{ bindTo: 'name', title: 'name', type: 'text', editable: true, width: 140, validators: [required] },
|
{ bindTo: 'name', title: 'name', type: 'text', editable: true, width: 140, validators: [required] },
|
||||||
{ bindTo: 'category', title: 'category', type: 'text', editable: true, width: 140 },
|
{ bindTo: 'category', title: 'category', type: 'text', editable: true, width: 140 },
|
||||||
{ bindTo: 'aliases', title: 'aliases', type: 'text', editable: true, width: 140 },
|
{ bindTo: 'aliases', title: 'aliases', type: 'text', editable: true, width: 140 },
|
||||||
|
@ -122,7 +122,7 @@ const columnSettings: ColumnSetting[] = [
|
||||||
|
|
||||||
const registerLogColumnSettings: ColumnSetting[] = [
|
const registerLogColumnSettings: ColumnSetting[] = [
|
||||||
{ bindTo: 'failed', title: 'failed', type: 'boolean', editable: false, width: 50 },
|
{ bindTo: 'failed', title: 'failed', type: 'boolean', editable: false, width: 50 },
|
||||||
{ bindTo: 'url', icon: 'ti-icons', type: 'image', editable: false, width: 50 },
|
{ bindTo: 'url', icon: 'ti-icons', type: 'image', editable: false, width: 'auto' },
|
||||||
{ bindTo: 'name', title: 'name', type: 'text', editable: false, width: 140 },
|
{ bindTo: 'name', title: 'name', type: 'text', editable: false, width: 140 },
|
||||||
{ bindTo: 'error', title: 'log', type: 'text', editable: false, width: 'auto' },
|
{ bindTo: 'error', title: 'log', type: 'text', editable: false, width: 'auto' },
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue