Commit 07deb2a9 authored by christianrhansen's avatar christianrhansen

mobile: styling cell editor

parent 42e584e0
Pipeline #16832 passed with stage
in 1 minute and 8 seconds
<template lang="pug">
q-list
div
template(v-for="(cell, index) in cellsData", :key="cell._uuid")
// --------------------------------------------------------------------------------------------------------- desktop
q-list.desktop-only(v-for="(cell, index) in cellsData", :key="cell._uuid")
//q-item-separator(v-if="index > 0")
......@@ -45,6 +46,54 @@
@change="value => handleItemChanged(value, cell, spec.path)")
q-item-separator(v-if="index < cellsData.length - 1")
// ---------------------------------------------------------------------------------------------------------- mobile
q-list.mobile-only.q-pt-none(v-for="(cell, index) in cellsData", :key="cell._uuid")
//----- header
q-item.q-py-sm.q-pr-sm
q-item-main.text-dark
strong {{ itemSpecs[cell.component][0].type }}
//
q-item-side.text-right
q-icon(:name="typeToIconName[itemSpecs[cell.component][0].type]", size="20px")
q-item-side.text-dark.text-right
q-btn(@click="", size="sm", flat, round)
q-icon(name="delete", size="20px")
q-item-separator.q-ma-none
//----- preview image
q-item.q-pa-none.bg-red.q-ma-none
img.full-width(v-if="cell.component === 'CellImage'", :src="cell.data.content")
q-item-separator.q-ma-none.q-pa-none(v-if="cell.component === 'CellImage'")
q-item.q-pa-none(v-for="spec in itemSpecs[cell.component]", :key="`${spec.component}-${spec.path}`",
v-if="cell.data.path === spec.path")
q-item-main
//----- input
q-item-tile.q-px-md
q-field(
:helper="spec.help",
:error="spec.error",
:error-label="spec.errorMessage",
style="width: 100%")
template(v-if="spec.inputType === 'select'")
q-select(
:float-label="spec.label",
:options="spec.selectOptions",
@select="value => handleItemChanged(value, cell, spec.path)")
template(v-else)
q-input(
:type="spec.inputType",
:min-rows="1",
:max-height="500",
:value="cell.data[spec.path]",
@change="value => handleItemChanged(value, cell, spec.path)",
hide-underline)
// q-item(v-else)
q-field This cell type is not supported yet: {{ cell.component }}.{{ spec.path }}
</template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment