跳至主要内容

博文

目前显示的是 四月, 2019的博文

小程序自定义modal弹窗封装实现

原文链接 前言 小程序官方提供了 wx.showModal 方法,但样式比较固定,不能满足多元化需求,自定义势在必行~ 老规矩先上图 点击某个按钮,弹出 modal 框,里面的内容可以自定义,可以是简单的文字提示,也可以输入框等复杂布局。操作完点击取消或确定关闭 modal . 如何使用 将下面的 modal.wxml 、 modal.wxss 、 modal.js 、 modal.json 四个文件复制到对应位置即可。 封装完之后调用起来也很简单,看看调用的代码吧 <modal show= "{{showModal}}" height= '60%' bindcancel= "modalCancel" bindconfirm= 'modalConfirm' > <view class= 'modal-content' > <formrow wx: for = '{{goodsList}}' wx:key= '{{index}}' title= "{{item.name}}" placeholder= '库存{{item.store}}' mode= 'input' rowpadding= '10rpx' currentId= "{{index}}" bindinput= 'goodsInput' ></formrow> </view> </modal> 复制代码 在 modal 中定义了 slot ,所以可以将需要展示的任何布局包裹在 modal 中。 上面的代码简化一下就是 <modal show= "{{showModal}}" height= '60%' bindcancel= "modalCancel" bindconfirm= 'modalConfirm' > ...

How to use Time Machine to back up your Mac to a Windows shared folder

原文链接 pple's Time Machine is the go-to backup method for many Mac users. Apple's  termination of the AirPort series  puts some users in a lurch over how they will be continuing to back up their Macs using Time Machine when Time Capsule is no more. Luckily there a few  Apple approved Time Machine backup options   sans  Time Capsule. However, not everyone will be able or willing to use a spare Mac as a backup location or attach yet  another  external drive or even buy an expensive Time Machine capable NAS. There do exist other hacked solutions that will allow you to use any networked location — including a Windows share. Although this method cobbles together various utilities to make it function (and as such could be subject to points of failure), you can easily set up Time Machine to use a non-approved location for backups. Here's how! The problem Create a Windows share location Make the remote share automatically mount make Time Machine use...