体验问题 ---- 原先只能在编辑弹窗的输入框里看到网址,要跳转得复制出来、另开标签页、粘贴 —— 多三步,且现场场景下很容易贴错。 改动 ---- 输入框追加一个常驻的「打开」按钮:点一下在新标签页打开,同时输入框始终可编辑。 非法链接(非 http/https)时按钮置灰 + title 提示;误点给出明确 ElMessage, 不做静默失败。两处(list.vue / buyOdoo.vue)交互一致。 ★ 为什么不做「双击解锁编辑」 1) 双击是**隐藏交互**,没有任何视觉提示,用户不会发现; 2) 双击在输入框内与「选中文字」冲突(复制片段时会误触发); 3) 追加按钮零学习成本,且不牺牲可编辑性 —— 两者目标相同,代价更低。 链接的「只看不改」需求若有,应走权限(只读渲染),而不是靠双击切换模式。
Vue 3 + TypeScript + Vite
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
Learn more about the recommended Project Setup and IDE Support in the Vue Docs TypeScript Guide.