今天在WWDC上,苹果全面发布了最新消息,包括https://www.zdnet.com/article/ipados-15-features-release-date-apple-wwdc-2021/“>iPadOS 15,iOS 15,和WWDC 2021:苹果用新的指标提升健康能力,共享功能
今年秋天,Apple Watch将推出一系列新功能,包括:
- 钱包:通过兼容的配件,您的Apple Watch可以作为解锁家中或车辆的钥匙。一些州还支持数字驾驶执照,因此您可以在TSA机场安检通道上使用它。
- 信息:数字皇冠可以用于滚动到您想要编辑信息的确切位置,同时您还可以将听写、涂鸦和表情符号组合在一条信息中。快速的GIF搜索即将到来,通过信息和邮件共享音乐。
- 照片:更改手表表面是定制Apple watch体验的方法之一。有了watchos8,你现在可以使用iPhone上的肖像模式照片,把你的家人和朋友放在手腕的正前方。你也可以有照片记忆服务到你的手表每天与马赛克网格视图。照片现在也可以通过信息和邮件共享。
- 家庭:改进了对智能家庭设备的支持,包括智能类似活动和可容纳所有摄像头的房间。
- 健康和健康:呼吸已重命名为正念,现在提供基于主题的冥想课程。呼吸和反思课程也会以心意分钟和心率的总结结束。通过呼吸频率数据,睡眠状况有所改善。我们仍然看不到Garmin、Fitbit和其他公司的手表中的睡眠分数,但很高兴看到睡眠跟踪继续改善。
- 锻炼:您的Apple Watch上添加了普拉提和太极作为锻炼。
还有其他一些改进,功能,以及watchOS 8随附的功能,这些功能在Apple上有详细介绍>2021年企业最佳手机计划
Garmin forefunner 55和945 LTE宣布:面向新的和联网的跑步者的GPS运动手表
a, .nav-item > a, .dropdown-menu a');
allLinks.forEach(link => {
let href = link.getAttribute('href');
if (!href || href === '#' || href === 'javascript:;') return;
// 4. 提取菜单中的核心路径
// 例如 /articles.html -> articles
let cleanHref = href.replace(/^\/|\/$/g, '').replace(/\.(html|php)$/, '').toLowerCase();
let isMatch = false;
// 5. 精确匹配逻辑
if (cleanHref === 'index') {
// 只有当前是首页时,才高亮首页
if (cleanPath === 'index') isMatch = true;
} else {
// 如果当前路径完全等于菜单路径 (如 /articles 匹配 /articles)
// 或者当前路径以 "菜单路径/" 开头 (如 /articles/154 匹配 /articles)
// 或者当前路径包含 "菜单路径." (防某些带点号的特殊情况)
if (cleanPath === cleanHref || cleanPath.startsWith(cleanHref + '/')) {
isMatch = true;
}
}
// 6. 如果匹配成功,加上高亮
if (isMatch) {
link.classList.add('active');
// 如果匹配的是下拉菜单里的子项,顺便把它的父级分类也高亮
const parentNavItem = link.closest('.nav-item');
if (parentNavItem && !parentNavItem.classList.contains('active')) {
const parentLink = parentNavItem.querySelector('a');
if (parentLink) parentLink.classList.add('active');
}
}
});
})();
// ================= 移动端菜单逻辑 =================
const toggle = document.getElementById("menuToggle");
const nav = document.getElementById("navLinks");
// 1. 汉堡按钮:切换主菜单显示/隐藏
if (toggle && nav) {
toggle.addEventListener("click", function (e) {
e.stopPropagation();
const expanded = this.getAttribute("aria-expanded") === "true";
this.setAttribute("aria-expanded", String(!expanded));
nav.classList.toggle("active");
});
}
// 2. 处理下拉子菜单的展开/折叠
if (window.innerWidth <= 768) {
const navItems = document.querySelectorAll(".nav-item");
navItems.forEach((item) => {
const titleLink = item.querySelector("a");
const dropdownMenu = item.querySelector(".dropdown-menu");
const arrowIcon = item.querySelector(".arrow-icon");
if (titleLink && dropdownMenu) {
titleLink.addEventListener("click", function (e) {
e.preventDefault(); // 阻止链接跳转
e.stopPropagation();
// 手风琴效果:收起其他已展开的菜单
navItems.forEach((otherItem) => {
if (otherItem !== item) {
const otherMenu = otherItem.querySelector(".dropdown-menu");
const otherArrow = otherItem.querySelector(".arrow-icon");
if (otherMenu) otherMenu.classList.remove("active");
if (otherArrow) otherArrow.style.transform = "rotate(0)";
}
});
// 切换当前菜单
dropdownMenu.classList.toggle("active");
if (arrowIcon) {
arrowIcon.style.transform = dropdownMenu.classList.contains(
"active",
)
? "rotate(180deg)"
: "rotate(0)";
}
});
}
});
}
// 3. 点击普通菜单项后,自动关闭整个主菜单
if (nav) {
nav.querySelectorAll("a").forEach(function (link) {
if (!link.querySelector(".arrow-icon")) {
link.addEventListener("click", function () {
nav.classList.remove("active");
if (toggle) toggle.setAttribute("aria-expanded", "false");
});
}
});
}
// ================= 返回顶部逻辑 =================
(function () {
const backToTop = document.getElementById("backToTop");
window.addEventListener("scroll", function () {
if (window.scrollY > 300) {
backToTop.classList.add("show");
} else {
backToTop.classList.remove("show");
}
});
backToTop.addEventListener("click", function () {
window.scrollTo({ top: 0, behavior: "smooth" });
});
})();
// 多语言
document.addEventListener("DOMContentLoaded", function() {
let path = window.location.pathname;
let isEn = path.startsWith('/en/');
if (isEn) {
document.cookie = "my_lang=en; path=/; max-age=" + (30 * 24 * 3600);
} else {
document.cookie = "my_lang=zh; path=/; max-age=" + (30 * 24 * 3600);
}
// 【2. 首页记忆】如果访问的是首页(没带 en),但记忆是英文,前端自动跳去英文首页
if (!isEn && (path === '/' || path === '/index.html')) {
if (document.cookie.includes('my_lang=en')) {
window.location.replace('/en' + path);
return;
}
}
// 【3. 菜单不掉线】如果是英文页面,自动给菜单链接加上 /en/
if (isEn) {
document.querySelectorAll('a').forEach(function(link) {
let href = link.getAttribute('href');
// 站内链接,且没带 /en/
if (href && href.startsWith('/') && !href.startsWith('/en/') && !href.startsWith('http')) {
link.setAttribute('href', '/en' + href);
}
});
}
});