|
|
@ -1,8 +1,10 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
<script setup lang="ts"> |
|
|
|
import { ref, computed } from '#imports' |
|
|
|
import { computed, ref } from '#imports' |
|
|
|
import { ColumnInj } from '~/components' |
|
|
|
import { ColumnInj } from '~/components' |
|
|
|
import { isValidURL } from '~/utils/urlUtils' |
|
|
|
import { isValidURL } from '~/utils/urlUtils' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { modelValue: value } = defineProps<Props>() |
|
|
|
|
|
|
|
const emit = defineEmits(['update:modelValue']) |
|
|
|
const column = inject(ColumnInj) |
|
|
|
const column = inject(ColumnInj) |
|
|
|
const editEnabled = inject<boolean>('editEnabled') |
|
|
|
const editEnabled = inject<boolean>('editEnabled') |
|
|
|
|
|
|
|
|
|
|
@ -10,9 +12,6 @@ interface Props { |
|
|
|
modelValue: string |
|
|
|
modelValue: string |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const { modelValue: value } = defineProps<Props>() |
|
|
|
|
|
|
|
const emit = defineEmits(['update:modelValue']) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const localState = computed({ |
|
|
|
const localState = computed({ |
|
|
|
get: () => value, |
|
|
|
get: () => value, |
|
|
|
set: (val) => { |
|
|
|
set: (val) => { |
|
|
@ -35,7 +34,7 @@ onMounted(() => { |
|
|
|
<input ref="root" v-model="localState" /> |
|
|
|
<input ref="root" v-model="localState" /> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span v-else> |
|
|
|
<span v-else> |
|
|
|
<a class="caption py-2 text-primary underline hover:opacity-75" v-if="isValid" :href="value" target="_blank">{{ value }}</a> |
|
|
|
<a v-if="isValid" class="caption py-2 text-primary underline hover:opacity-75" :href="value" target="_blank">{{ value }}</a> |
|
|
|
<span v-else>{{ value }}</span> |
|
|
|
<span v-else>{{ value }}</span> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|