|
@@ -560,19 +560,22 @@ const { currentSlide } = storeToRefs(slidesStore)
|
|
|
const { createFrameElement } = useCreateElement()
|
|
const { createFrameElement } = useCreateElement()
|
|
|
const { createSlide, createSlideByTemplate } = useSlideHandler()
|
|
const { createSlide, createSlideByTemplate } = useSlideHandler()
|
|
|
|
|
|
|
|
-const handleUrlInput = () => {
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+import _ from 'lodash'
|
|
|
|
|
+
|
|
|
|
|
+const handleUrlInput = _.debounce(() => {
|
|
|
const url = webpageUrl.value.trim()
|
|
const url = webpageUrl.value.trim()
|
|
|
if (!url) {
|
|
if (!url) {
|
|
|
isValidUrl.value = null
|
|
isValidUrl.value = null
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
- // 改进的URL格式验证,支持查询参数
|
|
|
|
|
- const urlRegex = /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*(\?[\w=&-]+)?\/?$/i
|
|
|
|
|
|
|
+ // 简化的URL格式验证,支持各种复杂URL
|
|
|
|
|
+ const urlRegex = /^https?:\/\/.+/
|
|
|
isValidUrl.value = urlRegex.test(url)
|
|
isValidUrl.value = urlRegex.test(url)
|
|
|
}
|
|
}
|
|
|
console.log('URL输入:', webpageUrl.value, '验证结果:', isValidUrl.value)
|
|
console.log('URL输入:', webpageUrl.value, '验证结果:', isValidUrl.value)
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
|
|
+}, 300)
|
|
|
const uploadWebpageLink = async () => {
|
|
const uploadWebpageLink = async () => {
|
|
|
if (!webpageUrl.value || isValidUrl.value !== true) {
|
|
if (!webpageUrl.value || isValidUrl.value !== true) {
|
|
|
// 可以添加提示信息
|
|
// 可以添加提示信息
|
|
@@ -1019,7 +1022,7 @@ const handleParsingClose = () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&.active {
|
|
&.active {
|
|
|
- background: #eef3ff;
|
|
|
|
|
|
|
+ background: #fff5e5;
|
|
|
box-shadow: 0 2px 8px rgba(40, 92, 245, 0.15);
|
|
box-shadow: 0 2px 8px rgba(40, 92, 245, 0.15);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1065,7 +1068,7 @@ const handleParsingClose = () => {
|
|
|
width: 0;
|
|
width: 0;
|
|
|
min-width: 0;
|
|
min-width: 0;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
- transition: all 0.3s ease;
|
|
|
|
|
|
|
+ // transition: all 0.3s ease;
|
|
|
background: #fff;
|
|
background: #fff;
|
|
|
border-radius: 0 12px 12px 0;
|
|
border-radius: 0 12px 12px 0;
|
|
|
z-index: 100;
|
|
z-index: 100;
|