insert auto-completed link button for mandarake
This commit is contained in:
parent
4735899c39
commit
142a422052
1 changed files with 11 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, nextTick } from 'vue'
|
import { ref, nextTick } from 'vue'
|
||||||
import { useMerchApi } from '@/api/merch.js'
|
import { useMerchApi } from '@/api/merch.js'
|
||||||
|
import { BASE_MANDARAKE_LINK } from '@/main.js'
|
||||||
|
|
||||||
const { updateMerch } = useMerchApi()
|
const { updateMerch } = useMerchApi()
|
||||||
|
|
||||||
|
|
@ -99,9 +100,19 @@ const confirmClearLink = async () => {
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
emit('cancel-edit')
|
emit('cancel-edit')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const insertAutoCompletedLink = () => {
|
||||||
|
tempValue.value = BASE_MANDARAKE_LINK+props.name
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div v-if="props.origin === 'mandarake'" class="center-button-container mb-10">
|
||||||
|
<n-button type="warning" class="center-button" @click="insertAutoCompletedLink"
|
||||||
|
>Insert auto-completed link</n-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
<div class="editing-area">
|
<div class="editing-area">
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="tempValue"
|
v-model:value="tempValue"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue