This commit is contained in:
2022-12-27 18:55:47 +00:00
parent 4ef5a0ffe1
commit 7d0a00cb19
168 changed files with 70186 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<template>
<v-text-field
dense
v-bind="$attrs"
type="url"
prepend-icon="$sockiExternalLinkAlt"
v-on="$listeners"
@click:prepend="openUrl"
></v-text-field>
</template>
<script>
export default {
methods: {
openUrl() {
if (
this.$el &&
this.$el.attributes &&
this.$el.attributes.value &&
this.$el.attributes.value.value
) {
let link = this.$el.attributes.value.value;
link = link.indexOf("://") === -1 ? "//" + link : link;
window.open(link, "_blank");
}
}
}
};
</script>