Browse Source

geodata: WIP geodata column type

pull/4140/head
flisowna 2 years ago
parent
commit
57ba3d11d5
  1. 18
      packages/nc-gui/components/cell/GeoData.vue

18
packages/nc-gui/components/cell/GeoData.vue

@ -19,7 +19,11 @@ const vModel = useVModel(props, 'modelValue', emits)
const editEnabled = inject(EditModeInj) const editEnabled = inject(EditModeInj)
const latitudeInput = ref(vModel?.value?.latitude || '') const latitudeInput = ref(vModel?.value?.latitude || '')
const longitudeeInput = ref(vModel?.value?.latitude || '') const longitudeInput = ref(vModel?.value?.latitude || '')
const onSubmit = () => {
alert('SUBMIT')
}
// const isOpen = ref(false) // const isOpen = ref(false)
@ -44,14 +48,14 @@ const longitudeeInput = ref(vModel?.value?.latitude || '')
<div> <div>
Test222 Test222
{{ JSON.stringify(vModel) }} {{ JSON.stringify(vModel) }}
<div v-if="vModel" :style="{ display: 'flex', flexDirection: 'column' }"> <div :style="{ display: 'flex', flexDirection: 'column' }">
<label for="latitude">latitude</label> <label for="latitude">latitude</label>
<a-input v-if="editEnabled" id="latitude" v-model="vModel.latitude" /> <a-input v-if="editEnabled" id="latitude" v-model="latitudeInput" />
<span v-else class="text-sm">{{ vModel.latitude }}</span> <span v-else class="text-sm">{{ latitudeInput }}</span>
<label for="longitude">longitude</label> <label for="longitude">longitude</label>
<a-input v-if="editEnabled" id="longitude" v-model="vModel.longitude" /> <a-input v-if="editEnabled" id="longitude" v-model="longitudeInput" />
<span v-else class="text-sm">{{ vModel.longitude }}</span> <span v-else class="text-sm">{{ longitudeInput }}</span>
<a-button type="primary">Ok</a-button> <a-button type="primary" @click="onSubmit">Ok</a-button>
</div> </div>
</div> </div>
</template> </template>

Loading…
Cancel
Save