From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 src/components/AppLinkInput/index.vue |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/src/components/AppLinkInput/index.vue b/src/components/AppLinkInput/index.vue
new file mode 100644
index 0000000..ff71382
--- /dev/null
+++ b/src/components/AppLinkInput/index.vue
@@ -0,0 +1,43 @@
+<template>
+  <el-input v-model="appLink" placeholder="杈撳叆鎴栭�夋嫨閾炬帴">
+    <template #append>
+      <el-button @click="handleOpenDialog">閫夋嫨</el-button>
+    </template>
+  </el-input>
+  <AppLinkSelectDialog ref="dialogRef" @change="handleLinkSelected" />
+</template>
+<script lang="ts" setup>
+import { propTypes } from '@/utils/propTypes'
+
+// APP 閾炬帴杈撳叆妗�
+defineOptions({ name: 'AppLinkInput' })
+// 瀹氫箟灞炴��
+const props = defineProps({
+  // 褰撳墠閫変腑鐨勯摼鎺�
+  modelValue: propTypes.string.def('')
+})
+// 褰撳墠鐨勯摼鎺�
+const appLink = ref('')
+// 閫夋嫨瀵硅瘽妗�
+const dialogRef = ref()
+// 澶勭悊鎵撳紑瀵硅瘽妗�
+const handleOpenDialog = () => dialogRef.value?.open(appLink.value)
+// 澶勭悊 APP 閾炬帴閫変腑
+const handleLinkSelected = (link: string) => (appLink.value = link)
+
+// getter
+watch(
+  () => props.modelValue,
+  () => (appLink.value = props.modelValue),
+  { immediate: true }
+)
+
+// setter
+const emit = defineEmits<{
+  'update:modelValue': [link: string]
+}>()
+watch(
+  () => appLink.value,
+  () => emit('update:modelValue', appLink.value)
+)
+</script>

--
Gitblit v1.8.0