| 12 |
- /*! NutUI v1.2.2 Tue May 15 2018 17:51:06 GMT+0800 (中国标准时间) */
- webpackJsonpnutui([85],{1016:function(t,r,a){r=t.exports=a(2)(),r.push([t.i,".button-primary[data-v-5eb27329]{display:inline-block;height:38px;padding:0 10px;color:#555;text-align:center;font-size:12px;line-height:38px;text-decoration:none;white-space:nowrap;background-color:transparent;border-radius:3px;border:1px solid #bbb;cursor:pointer;box-sizing:border-box}.button-primary.curr[data-v-5eb27329]{background-color:#33c3f0;border-color:#33c3f0;color:#fff}",""])},1115:function(t,r){t.exports={render:function(){var t=this,r=t.$createElement,a=t._self._c||r;return a("div",[a("nut-demoheader",{attrs:{name:t.$route.name}}),t._v(" "),a("nut-drag",{attrs:{direction:t.direction,boundary:t.boundary,isSide:t.isSide}}),t._v(" "),a("div",[a("a",{staticClass:"button-primary curr",attrs:{href:"javascript:;"},on:{click:function(r){t.changeMove("h",r)}}},[t._v("垂直移动")]),t._v(" "),a("a",{staticClass:"button-primary",attrs:{href:"javascript:;"},on:{click:function(r){t.changeMove("v",r)}}},[t._v("水平移动")]),t._v(" "),a("a",{staticClass:"button-primary",attrs:{href:"javascript:;"},on:{click:function(r){t.changeMove("n",r)}}},[t._v("任意方向移动")])]),t._v(" "),a("div",{staticStyle:{"margin-top":"20px"}},[a("a",{staticClass:"button-primary curr",attrs:{href:"javascript:;"},on:{click:function(r){t.changeBoundary("y",r)}}},[t._v("有边距")]),t._v(" "),a("a",{staticClass:"button-primary",attrs:{href:"javascript:;"},on:{click:function(r){t.changeBoundary("n",r)}}},[t._v("无边距")])]),t._v(" "),a("div",[a("a",{staticClass:"button-primary curr",attrs:{href:"javascript:;"},on:{click:function(r){t.changeSide(!1,r)}}},[t._v("不吸边")]),t._v(" "),a("a",{staticClass:"button-primary",attrs:{href:"javascript:;"},on:{click:function(r){t.changeSide(!0,r)}}},[t._v("吸边")])])],1)},staticRenderFns:[]}},1208:function(t,r,a){var n=a(1016);"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);a(3)("0659b41a",n,!0,{})},794:function(t,r,a){function n(t){a(1208)}var e=a(1)(a(885),a(1115),n,"data-v-5eb27329",null);t.exports=e.exports},885:function(t,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default={data:function(){return{direction:"h",boundary:{top:50,bottom:20,left:0,right:0},isSide:!1,demo1:'<nut-drag direction="h"></nut-drag>',demo2:'<nut-drag :boundary="{top: 20, bottom: 20}"></nut-drag>',demo3:'<nut-drag :isSide="false"></nut-drag>'}},methods:{changeMove:function(t,r){var a=r.currentTarget,n=a.parentElement.children;this.removeClass(n),a.classList.add("curr"),this.direction=t},changeBoundary:function(t,r){var a=r.currentTarget,n=a.parentElement.children;this.removeClass(n),a.classList.add("curr"),this.boundary="y"==t?{top:50,bottom:20,left:0,right:0}:{top:50,bottom:0,left:0,right:0}},changeSide:function(t,r){var a=r.currentTarget,n=a.parentElement.children;this.removeClass(n),a.classList.add("curr"),a.classList.add("curr"),this.isSide=t},removeClass:function(t){for(var r in t)!0===t.hasOwnProperty(r)&&(t[r].className="button-primary")}}}}});
|