{"id":3608,"date":"2023-08-23T13:12:14","date_gmt":"2023-08-23T05:12:14","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=3608"},"modified":"2023-08-23T13:12:14","modified_gmt":"2023-08-23T05:12:14","slug":"webclip%e8%bf%94%e5%9b%9e%e4%ba%8b%e4%bb%b6%e6%80%8e%e4%b9%88%e5%81%9a%e5%88%a4%e6%96%ad%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/3608\/","title":{"rendered":"webclip\u8fd4\u56de\u4e8b\u4ef6\u600e\u4e48\u505a\u5224\u65ad\uff1f"},"content":{"rendered":"

WebClip\uff08\u7f51\u9875\u526a\u8f91\uff09\u8fd4\u56de\u4e8b\u4ef6\u662f\u4e00\u4e2a\u6307\u5f53\u7528\u6237\u5c06\u4e00\u4e2a\u7f51\u9875\u4f5c\u4e3a\u684c\u9762\u5e94\u7528\u6dfb\u52a0<\/p>\n

<\/figure>\n<\/p>\n

\u5230\u8bbe\u5907\uff08\u5982\u667a\u80fd\u624b\u673a\u6216\u5e73\u677f\u7535\u8111\uff09\u4e0a\uff0c\u5e76\u5728\u8be5\u5e94\u7528\u4e2d\u8fdb\u884c\u64cd\u4f5c\u540e\uff0c\u901a\u8fc7\u67d0\u79cd\u65b9\u5f0f\u8fd4\u56de\u4e0a\u4e00\u4e2a\u9875\u9762\u7684\u4e8b\u4ef6\u3002\u4e3a\u4e86\u8ba8\u8bba\u8fd9\u4e2a\u8fd4\u56de\u4e8b\u4ef6\u7684\u539f\u7406\u548c\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u6211\u4eec\u9700\u8981\u4e86\u89e3\u51e0\u4e2a\u91cd\u8981\u7684\u6982\u5ff5\u3002<\/p>\n

\u4e00\u3001WebClip\uff08\u7f51\u9875\u526a\u8f91\/\u5feb\u6377\u65b9\u5f0f\uff09<\/p>\n

WebClip \u662f\u4e00\u79cd\u5c06\u7f51\u9875\u4f5c\u4e3a\u4e00\u4e2a\u684c\u9762\u5e94\u7528\u6dfb\u52a0\u5230\u79fb\u52a8\u8bbe\u5907\u4e0a\u7684\u6280\u672f\u3002\u8fd9\u4e00\u529f\u80fd\u5728\u82f9\u679c\u516c\u53f8\u63a8\u51fa\u7684 iOS \u7cfb\u7edf\u4e2d\u88ab\u79f0\u4f5c”Web Clips”\uff0c\u540c\u65f6\u5728\u5176\u4ed6\u64cd\u4f5c\u7cfb\u7edf\u5e73\u53f0\u4e5f\u6709\u7c7b\u4f3c\u529f\u80fd\uff0c\u4f8b\u5982\u5b89\u5353\u7684”PWA”\uff08Progressive Web Apps\uff0c\u6e10\u8fdb\u5f0fWeb\u5e94\u7528\uff09\u3002<\/p>\n

WebClip \u8ba9\u7f51\u9875\u5e94\u7528\u53ef\u4ee5\u50cf\u672c\u5730\u5e94\u7528\u4e00\u6837\uff0c\u5b58\u5728\u4e8e\u7528\u6237\u8bbe\u5907\u7684\u684c\u9762\u4e0a\u3002\u7528\u6237\u70b9\u51fb WebClip \u56fe\u6807\uff0c\u7f51\u9875\u4f1a\u5728\u5185\u7f6e\u6d4f\u89c8\u5668\u6216\u8005\u5168\u5c4f\u6a21\u5f0f\u4e0b\u6253\u5f00\u3002\u8fd9\u79cd\u65b9\u5f0f\u6709\u52a9\u4e8e\u63d0\u9ad8\u7f51\u9875\u5e94\u7528\u7684\u8bbf\u95ee\u4fbf\u6377\u7a0b\u5ea6\uff0c\u540c\u65f6\u4e5f\u652f\u6301\u7f51\u9875\u5e94\u7528\u62e5\u6709\u66f4\u597d\u7684\u8bbe\u5907\u529f\u80fd\u63a5\u53e3\u8c03\u7528\u3002<\/p>\n

\u4e8c\u3001\u8fd4\u56de\u82f9\u679cwebclip\u5220\u9664<\/a>\u4e8b\u4ef6\u7684\u539f\u7406<\/p>\n

\u5bf9\u4e8e\u4f20\u7edf\u7684\u7f51\u9875\u6d4f\u89c8\uff0c\u5728\u6d4f\u89c8\u5668\u5de5\u5177\u680f\u4e0a\u6709\u4e00\u4e2a\u540e\u9000\u6309\u94ae\uff0c\u53ef\u4ee5\u8ba9\u7528\u6237\u627e\u5230\u4e0a\u4e00\u4e2a\u7f51\u9875\u3002\u7136\u800c\uff0c\u5728 WebClip \u4f5c\u4e3a\u684c\u9762\u5e94\u7528\u8fd0\u884c\u65f6\uff0c\u6d4f\u89c8\u5668\u7684\u5de5\u5177\u680f\u662f\u4e0d\u53ef\u89c1\u7684\uff0c\u8fd9\u5c31\u9700\u8981\u53e6\u5916\u4e00\u79cd\u65b9\u6cd5\u6765\u89e6\u53d1\u8fd4\u56de\u4e8b\u4ef6\u3002<\/p>\n

1. \u6d4f\u89c8\u5668\u5185\u7f6e\u7684\u8fd4\u56de\u51fd\u6570<\/p>\n

WebClip \u5e94\u7528\u53ef\u4ee5\u901a\u8fc7 JavaScript \u7684 window.history.back() \u51fd\u6570\u89e6\u53d1\u8fd4\u56de\u4e8b\u4ef6\u3002\u8fd9\u5c06\u4f7f\u7528\u6237\u8fd4\u56de\u5230\u4e4b\u524d\u6d4f\u89c8\u8fc7\u7684\u9875\u9762\uff0c\u7c7b\u4f3c\u4e8e\u70b9\u51fb\u6d4f\u89c8\u5668\u7684\u540e\u9000\u6309\u94ae\u3002\u8fd9\u79cd\u65b9\u6cd5\u901a\u5e38\u9700\u8981\u5f00\u53d1\u8005\u5728\u5e94\u7528\u7684\u9875\u9762\u5185\u8bbe\u7f6e\u4e00\u4e2a\u8fd4\u56de\u6309\u94ae\uff0c\u8be5\u6309\u94ae\u7684\u70b9\u51fb\u4e8b\u4ef6\u4e0e window.history.back() \u5173\u8054\u3002<\/p>\n

2. \u5229\u7528URL\u4e2d\u7684\u54c8\u5e0c(#)<\/p>\n

\u8fd8\u53ef\u4ee5\u901a\u8fc7\u9875\u9762 URL \u4e2d\u7684\u54c8\u5e0c\u503c\u6765\u8868\u793a\u4e0d\u540c\u7684\u89c6\u56fe\u5185\u5bb9\uff0c\u524d\u7aef\u4ee3\u7801\u53ef\u4ee5\u6839\u636e\u54c8\u5e0c\u503c\u7684\u53d8\u5316\u52a8\u6001\u66f4\u65b0\u9875\u9762\u5185\u5bb9\u3002\u5f53\u7528\u6237\u70b9\u51fb\u8fd4\u56de\u6309\u94ae\u65f6\uff0c\u524d\u7aef\u4ee3\u7801\u5c06\u63a7\u5236\u9875\u9762\u5411\u4e0a\u4e00\u4e2aURL\u54c8\u5e0c\u503c\u5bf9\u5e94\u7684\u5185\u5bb9\u5c55\u793a\u3002\u8fd9\u79cd\u65b9\u6cd5\u4f7f\u7528 HashRouter\uff08\u54c8\u5e0c\u8def\u7531\uff09\u5b9e\u73b0\uff0c\u4fdd\u6301\u9875\u9762\u5355\u9875\u5e94\u7528\u7684\u7279\u70b9\uff0c\u540c\u65f6\u652f\u6301\u8fd4\u56de\u4e8b\u4ef6\u3002<\/p>\n

\u4e09\u3001\u5982\u4f55\u5b9e\u73b0 WebClip \u8fd4\u56de\u4e8b\u4ef6<\/p>\n

1. \u5728 HTML \u9875\u9762\u5185\u6dfb\u52a0\u4e00\u4e2a\u8fd4\u56de\u6309\u94ae\uff1a<\/p>\n

“`html<\/p>\n