const{createApp}=Vue const{createVuetify,useGoTo,useDisplay}=Vuetify var data={alert:{show:false,color:'success',text:'',timeout:0,},theme:{dark:false,},nav:{showDrawer:false,showTOC:true,tocPanel:0,tab:'account',post:{discussionId:7866,currentPage:1,targetPage:1,total:26,anchor:0,goToOptions:{container:null,duration:0,easing:'easeInOutCubic',offset:-100,},worker:null,task:[],active:[],apiLock:[],originLike:new Map([]),},related:{block:1,}},search:{width:80,text:null,loading:false,},tags:[{id:17,url:'/t/327878556a045c76677716150f0d',name:'Apple',color:'#66BB6A',icon:'mdi-apple',},],posts:[{id:101081,num:0,uid:13074,content:'背景:\u003Cp\u003E1.我有一个 Macbookpro 2014 款2.现购入了一个 MacminiM4\u003C/p\u003E原本计划:\u003Cp\u003E在不新增屏幕键盘触控板的情况下,通过 Macmini 的屏幕共享,在 MacBook Pro 上远程办公使用,但是昨天连接后挺卡的,效果不是很好。办公室环境:两台机器都是通过 wifi 连接互联网在同一局域网中,但是局域网 ip 之间无法通信,互联网带宽最大每秒 1M 。我是通过方案 1:tailscale 虚拟组网,方案 2:连接同一个手机的网络,把两台设备置于同一个局域网下,进行屏幕共享的。\u003C/p\u003E问题:\u003Cp\u003E1.兄弟们有没有别的办法能组装这两台机器,通过 MacBook Pro 的键盘和触控板、屏幕操控 Macmini 。2.如果不行,只能二手卖掉,在提高预算入 MBA 了(提高预算得费很大劲)。\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 09:26:18',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101082,num:1,uid:3886,content:'买个显示器键盘鼠标也就千多块钱,27 寸 4k 体验不比你的 2014 款 MacBook Pro 好多了 ?',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 09:52:12',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101083,num:2,uid:8285,content:'“高性能”适用于「搭载 Apple 芯片」且运行 macOS Sonoma 14 或更高版本的 Mac 电脑,具体取决于下方列出的要求和限制。\u003Cbr\u003E\u003Cbr\u003EMac 上的屏幕共享类型选项 - 官方 Apple 支持 (中国)\u003Cbr\u003Ehttps://support.apple.com/zh-cn/guide/mac-help/mchl1883115d/mac\u003Cbr\u003E\u003Cbr\u003E---\u003Cbr\u003E\u003Cbr\u003E不如报个价出给我 \u003Cimg src\u003D\"https://i.imgur.com/agAJ0Rd.png\"\u003E,参考拼多多新机 2998 元。',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 09:54:35',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101084,num:3,uid:13074,content:'主要还是用了十几年触控板了,突然一下子搞键鼠套心理上有点隔音,不过其实你说的也没毛病。',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 09:54:36',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101085,num:4,uid:80,content:'2014 ?哥么一台电脑用了 11 年还不换吗?,现在的新款 air 也不算很贵吧,7000 不到,吃饭的家伙搞得这么抠抠搜搜',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 10:01:02',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101086,num:5,uid:14471,content:'我的建议是 mac mini + 显示器 +机械键盘 + 妙控触控板;不管用什么镜像,还是感觉延迟明显,你现在有了 mac mini ,显示器买个 1k 多,妙控现在国补 600 多 \u003Cimg src\u003D\"https://i.imgur.com/agAJ0Rd.png\"\u003E\u003Cimg src\u003D\"https://i.imgur.com/agAJ0Rd.png\"\u003E。',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 10:01:11',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101087,num:6,uid:4076,content:'买个显示器键盘触控板吧,用平替,全套下来 1500 也差不多了',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 10:02:55',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101088,num:7,uid:11109,content:'1 、你搜索 universal control ,就可以用 macbook 的键盘和触摸板控制同网同账户的机器\u003Cbr\u003E2 、universal control 需要系统是 12+,14 年的机器通过 opencore legacy 工具升级至 macOS12 即可。',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 10:08:37',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[15,],mentionUsers:[],likeUsers:[],},{id:101089,num:8,uid:11109,content:'补充 2 的连接: https://dortania.github.io/OpenCore-Legacy-Patcher/',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 10:09:15',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101090,num:9,uid:11109,content:'补充 1 的链接: https://support.apple.com/en-sg/102459\u003Cbr\u003EmacOS Monterey 12.4 or later supported',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 10:10:40',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101091,num:10,uid:985,content:'卖了换 Air 或者老 Pro ,这里有不止一个帖子就是图便宜买个 mini 然后发现搭配老 Mac 怎么用怎么不舒服,真没啥必要。另外外置触控板我始终用不惯,用一天下来手酸,内置的没啥问题,你买个外置的很可能也达不到你的预期。现在桌面办公我基本只用游戏鼠标',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 10:14:42',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101092,num:11,uid:1167,content:'建議把你的 macbook 800 塊錢閒魚賣了換個觸控板\u003Cbr\u003Euniversal control 只能偶爾跨設備用用,延遲還是有明顯感知的',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 10:18:36',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101093,num:12,uid:8118,content:'不如闲鱼收 m1pro 的 mbp',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 10:22:13',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101094,num:13,uid:5766,content:'14 款太远古了吧',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 10:23:27',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101095,num:14,uid:13945,content:'和 OP 有点类似,我是 2019 款的 mbp ,也是通过 tailscale 组网然后远程,如果只是 terminal 问题到不大,一旦用屏幕共享就很卡(延迟 20 ~ 100ms 不稳定),不确定高性能模式的屏幕共享会好多少。\u003Cbr\u003E\u003Cbr\u003E现在还是老老实实各用各的,家里就做低负载的事情,高负载的活就把 macmini 背回去,毕竟也不重。',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 10:34:59',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101096,num:15,uid:17319,content:'#7 这种方法还需要 mac mini 配个屏幕,我现在用的,感觉还挺好。但息屏后,每次都要手动重新连接,挺麻烦,不知道是不是我使用方式不对?',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 10:39:59',updatedAt:'2025-04-11 17:48:34',mentionNum:7,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101097,num:16,uid:4619,content:'你这个问题的根源在于手里的 14 款 pro 性能太差了,如果是一台 m4air 去远程,效果应该能好不少。如果坚决不给 mini 配显示器和触控板的话,建议卖掉换一台 air 直接用。但我还是更建议你给 mini 配上这两样,加起来小 2000 应该够了,然后就可以爽用 mini 了,偶尔出门办公应急时候用 2014pro 远程就好了',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 11:07:13',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101098,num:17,uid:13429,content:'工作用就 macbook air 和 pro , 别图省钱用 mini',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 11:13:06',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101099,num:18,uid:13074,content:'感谢各位兄弟建议,思考良久,还是决定卖了 mini ,等回头用教育优惠整个 MBA ,mini4 月 9 日激活,使用不到两天时间,明盘 3000 ,包邮,有需要的联系,id 即 WX ,走小黄鱼顺风,出手不退。',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 11:14:28',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:101100,num:19,uid:2572,content:'我就是卖了 mini m4 买的 air m4 ,5700+说实话感觉挺合适的',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 11:14:36',updatedAt:'2025-04-11 17:48:34',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},],usersMap:new Map([[17319,{uid:17319,url:'/u/0b26535f6a045d70636b5f6f391f2406',avatar:'/a/0b26535f6a045d70636b5f6f391f2406',username:'connectsixboy🤖',}],[8285,{uid:8285,url:'/u/3906480f6a045c7f6262536f110a3a3d',avatar:'/a/3906480f6a045c7f6262536f110a3a3d',username:'WillBeethoven🤖',}],[13945,{uid:13945,url:'/u/227a0b1a6a045d74696e536f23253772',avatar:'/a/227a0b1a6a045d74696e536f23253772',username:'crossoverJie🤖',}],[5766,{uid:5766,url:'/u/172702006a045c72676c506f2213190c',avatar:'/a/172702006a045c72676c506f2213190c',username:'h272377502🤖',}],[11109,{uid:11109,url:'/u/0c036a386a045d76616a5f6f1c241b1f',avatar:'/a/0c036a386a045d76616a5f6f1c241b1f',username:'rebounce🤖',}],[985,{uid:985,url:'/u/150f0a296a045c776962536f050d1570',avatar:'/a/150f0a296a045c776962536f050d1570',username:'dilidilid🤖',}],[80,{uid:80,url:'/u/282d07226a045c776062566f431f1005',avatar:'/a/282d07226a045c776062566f431f1005',username:'zdw189803631🤖',}],[13074,{uid:13074,url:'/u/28385a5a6a045d74606d526f3b051f1e',avatar:'/a/28385a5a6a045d74606d526f3b051f1e',username:'wxd21020🤖',}],[14471,{uid:14471,url:'/u/20317e016a045d73646d576f121b3b72',avatar:'/a/20317e016a045d73646d576f121b3b72',username:'YummyCocoa🤖',}],[4076,{uid:4076,url:'/u/6c0a5a036a045c73606d506f3b5c3074',avatar:'/a/6c0a5a036a045c73606d506f3b5c3074',username:'ZeekChatCom🤖',}],[13429,{uid:13429,url:'/u/110000286a045d7464685f6f13010623',avatar:'/a/110000286a045d7464685f6f13010623',username:'peteretep🤖',}],[2572,{uid:2572,url:'/u/103865596a045c75656d546f27211030',avatar:'/a/103865596a045c75656d546f27211030',username:'Aviciii🤖',}],[4619,{uid:4619,url:'/u/1926781d6a045c73666b5f6f1227102b',avatar:'/a/1926781d6a045c73666b5f6f1227102b',username:'football🤖',}],[3886,{uid:3886,url:'/u/3930402c6a045c746862506f3c582b28',avatar:'/a/3930402c6a045c746862506f3c582b28',username:'xixibb🤖',}],[8118,{uid:8118,url:'/u/3825010a6a045c7f616b5e6f0610253d',avatar:'/a/3825010a6a045c7f616b5e6f0610253d',username:'yangzzzzzz🤖',}],[1167,{uid:1167,url:'/u/627b04376a045c76616c516f0006117e',avatar:'/a/627b04376a045c76616c516f0006117e',username:'showonder🤖',}],]),related:[{title:'mac mini m4 32G 扩容到 2T,能当黑奴部署 sd 或 flux 么',url:'/d/203e71236a045c77606a567a445c616a03040937',},{title:'pdd macmini 2979 了,忍不住还是下单了',url:'/d/293a610b6a045c77606a567a4458606a1b706767',},{title:'求 macOS 好用的录音软件,关键录微信通话和电话, wiretap 下架了。无论软件启动顺序总是能录下才是王。。。',url:'/d/120c45386a045c77606a567a455e616a07341262',},{title:'Spotlight 图标竟然穿模了, macOS 15 越来越不苹果了',url:'/d/0c0a54216a045c77606a567a455c676a38082b3d',},{title:'MacOS 15.4 休眠 Bug:休眠后以太网会断开连接, Wi-Fi 不会',url:'/d/360a785e6a045c77606a567a465a646a2b2f6b2b',},{title:'mac mini pro 64 和 mac studio',url:'/d/000443266a045c77606a56754e58626a5e266611',},{title:'刚买的 mba m4,试用 crossover 玩玩暗黑 2,黑屏啊',url:'/d/3d7a45266a045c77606a56754f506a6a2f240660',},{title:'京东 19199 买 MBP M4pro 14 核 48G 1T 国家补贴+教育优惠',url:'/d/227a745e6a045c77606a56754f50666a5934253d',},{title:'诡异! Enter 键自动唤醒 apple music 并自动播放',url:'/d/2071601d6a045c77606a56754f5a626a04002663',},{title:'IOS 18.4 safari 发热严重',url:'/d/121366206a045c77606a5675425c626a0d280366',},{title:'IOS 18.4 中文 intelligence 大家有啥想吐槽的么(非国行机)',url:'/d/380854296a045c77606a5675425a626a34731a2a',},{title:'macos Sequoia 15.4 中 chronod 一直占用 100%+ CPU',url:'/d/3b7c73236a045c77606a56754350646a58202b1f',},{title:'intel 的 mac 远程连接 m 芯片 mac 最佳姿势是什么?',url:'/d/2f08582f6a045c77606a5675435e656a29252322',},{title:'M1 iPad pro 耗电惊人',url:'/d/353b470e6a045c77606a5675435e606a25171411',},{title:'苹果这次 iOS 18.4 只有中国国内更新了 5G-A 吗?',url:'/d/09277c096a045c77606a5675435f656a3d283d1d',},{title:'日经贴:推荐个 mac 下适用的机械键盘',url:'/d/3f3978016a045c77606a5675435f666a030f042a',},{title:'MacBook 的 AC+ 是不是只有意外险的作用,并没有延长保修?',url:'/d/387c475e6a045c77606a5675435c666a272c3f17',},{title:'iPhone 的 Apple Intelligence 需要下载多久?',url:'/d/1b2f48196a045c77606a5675435a636a02731d1e',},{title:'mac mini 放办公室摸鱼怎么样?',url:'/d/68395e0b6a045c77606a56754359646a182a241e',},{title:'macOS 15.4 稳定出现一个大 bug',url:'/d/3b0e5b1b6a045c77606a567544506b6a08112708',},],} const App={setup(){const goTo=useGoTo() const{mdAndUp}=useDisplay() return{goTo,mdAndUp}},data(){return data;},mounted(){const themeDark=localStorage.getItem("themeDark") if(themeDark!==null){this.theme.dark=JSON.parse(themeDark)} if(this.nav.post.total>(this.nav.post.currentPage-1)*100+20){let moreLen=100 if(this.nav.post.total({id:null,num:(this.nav.post.currentPage-1)*100+v,uid:null,content:null,ipRegion:null,updatedByUid:null,createdAt:null,updatedAt:null,mentionNum:null,mentionedBy:null,mentionUsers:null,likeUsers:null,})) this.posts.push(...morePosts.slice(20))} this.workerStart() const hash=window.location.hash const match=hash.match(/#(\d+)/) if(match){const n=parseInt(match[1],10) if(n>=(this.nav.post.currentPage-1)*100&&n{this.jumpTo(n)})}} this.$nextTick(()=>{this.addHeadingIds() tocbot.init({tocSelector:'.toc',contentSelector:'#post-content-0',headingSelector:'h2, h3, h4',headingsOffset:100,scrollSmoothOffset:-100,scrollSmooth:true,collapseDepth:6,onClick:function(e){setTimeout(()=>{history.replaceState(null,'',window.location.pathname+window.location.search)},0)},}) tocbot.refresh()});},beforeUnmount(){this.workerStop() if(this.quill){this.quill.destroy() this.quill=null}},computed:{dposts(){return this.posts.slice(20);},},created(){},methods:{successAlert(msg){this.alert={show:true,color:'success',text:msg,timeout:1500,}},failureAlert(msg){this.alert={show:true,color:'error',text:msg,timeout:5000,}},flipThemeDark(){this.theme.dark=!this.theme.dark localStorage.setItem("themeDark",JSON.stringify(this.theme.dark))},toSearch(){if(!this.search.text){this.failureAlert('搜索词不能为空') return} let keywords=this.search.text.trim() if(keywords.length<1){this.failureAlert('搜索词不能为空') return} if(keywords.length>100){this.failureAlert('搜索词过长') return} this.doSearch(keywords)},toReg(){window.location.href="/reg"},toLogin(){window.location.href="/login"},toPage(){let url=window.location.href url=url.replace(/(\/\d+)?(#[0-9]+)?$/,this.nav.post.targetPage>1?`/${this.nav.post.targetPage}`:'') window.location.href=url},toLoadRelated({done}){if(this.my&&this.my.uid){this.apiLoadRelated({done})}else{done('ok')}},workerStart(){this.nav.post.worker=setInterval(()=>{this.workerLoad()},500);},workerStop(){if(this.nav.post.worker){clearInterval(this.nav.post.worker);this.nav.post.worker=null;}},async jumpTo(num){const page=Math.floor(num/100)+1 const i=num-(page-1)*100 if(page===this.nav.post.currentPage){this.goTo("#post-"+num,this.nav.post.goToOptions) if(!this.posts[i].id){const block=Math.floor(num/20)+1 this.nav.post.apiLock[block]=true await this.apiLoadPosts(block) this.$nextTick(()=>{this.goTo("#post-"+num,this.nav.post.goToOptions)})}}else{let url=window.location.href url=url.replace(/(\/\d+)?(#[0-9]+)?$/,page>1?`/${page}`:'') url=url+"#"+num window.location.href=url}},postIntersect(num){return(isIntersecting,entries,observer)=>{if(isIntersecting){this.nav.post.task.push(num) this.nav.post.active.push(num) this.nav.post.active=this.nav.post.active.filter(item=>Math.abs(item-num)<=5) this.nav.post.active.sort((a,b)=>a-b)}else{this.nav.post.active=this.nav.post.active.filter(item=>item!==num)} if(this.nav.post.active[0]){this.nav.post.anchor=this.nav.post.active[0]}else{this.nav.post.anchor=0}}},async apiLoadPosts(block){try{const response=await axios.post('/fapi/v1/post/block/'+block,{discussionId:this.nav.post.discussionId,}) if(response.data.code===0){response.data.data.posts.forEach(post=>{const i=post.num%100 Object.assign(this.posts[i],post)}) response.data.data.users.forEach(user=>{this.usersMap.set(user.uid,user)})}else{this.failureAlert('回帖数据加载失败: '+response.data.msg)}}catch(error){this.failureAlert('回帖数据加载失败: '+error)} this.nav.post.apiLock[block]=false},workerLoad(){while(this.nav.post.task.length){const num=this.nav.post.task.pop() const i=num-(this.nav.post.currentPage-1)*100 if(!this.posts[i].id){const block=Math.floor(num/20)+1 if(!this.nav.post.apiLock[block]){this.nav.post.apiLock[block]=true this.apiLoadPosts(block)}}}},getTimeInfo(t){if(!t){return ""} const now=new Date();const then=new Date(t);const diff=now-then;const minute=60*1000;const hour=minute*60;const day=hour*24;const month=day*30;const year=month*12;if(diffpost.num===num) if(!post){return "#"+num} const uid=post.uid const username=this.usersMap.get(uid)?.username if(!username){return "#"+num} return username},getUsernameByPostId(id){const post=this.posts.find(post=>post.id===id) if(!post){return "#"+this.getPostNumByPostId(id)} const uid=post.uid const username=this.usersMap.get(uid).username if(!username){return "#"+this.getPostNumByPostId(id)} return username},getPostNumByPostId(id){const post=this.posts.find(post=>post.id===id) return post.num},getPostById(id){const post=this.posts.find(post=>post.id===id) return post},getPostByNum(num){const post=this.posts.find(post=>post.num===num) return post},getAvatarByUid(uid){const avatar=this.usersMap.get(uid)?.avatar if(!avatar){return this.getRandomAvatar()} return avatar},getAvatarByPostNum(num){const post=this.posts.find(post=>post.num===num) if(!post){return this.getRandomAvatar()} const uid=post.uid return this.getAvatarByUid(uid)},getRandomAvatar(){const num=Math.floor(Math.random()*100) return "https://randomuser.me/api/portraits/men/"+num+".jpg"},getUrlByUid(uid){const url=this.usersMap.get(uid)?.url if(!url){return ""} return url},getTextByPostNum(num){const post=this.posts.find(post=>post.num===num) if(!post||!post.content){return '点击跳转到#'+num+'查看'} const parser=new DOMParser() const doc=parser.parseFromString(post.content,'text/html') const text=doc.body.textContent||'' return text.slice(0,100)},addHeadingIds(){const content=document.getElementById('post-content-0') if(!content){this.nav.showTOC=false return} const headings=content.querySelectorAll('h2, h3, h4') headings.forEach((heading,index)=>{if(!heading.id){heading.id=`toc-nav-${index}`}}) if(headings.length==0){this.nav.showTOC=false}},async doSearch(keywords){this.search.loading=true try{const response=await axios.post('/fapi/v1/search',{keywords:keywords,}) if(response.data.code===0){if(response.data.data.hash&&response.data.data.hash.length===32){window.location.href="/s/"+response.data.data.hash}else{this.failureAlert('搜索失败: 搜索服务异常')}}else{this.failureAlert('搜索失败: '+response.data.msg)}}catch(error){this.failureAlert('搜索失败: '+error)} this.search.loading=false},debounce(fn,delay){let timer=null return function(...args){if(timer)clearTimeout(timer) timer=setTimeout(()=>{fn.apply(this,args)},delay);};},},watch:{'nav.post.targetPage':{handler:async function(newV,oldV){this.toPage()},immediate:false},},} const vuetify=createVuetify({defaults:{global:{ripple:true,},},}) const app=createApp(App) app.use(vuetify).mount("#app")