| 12 |
- /*! NutUI v1.2.8 Wed Jun 27 2018 20:09:26 GMT+0800 (CST) */
- webpackJsonpnutui([90],{1039:function(t,n,r){(t.exports=r(1)()).push([t.i,"\n.button-primary[data-v-5eb27329] {\n display: inline-block;\n height: 38px;\n padding: 0 10px;\n color: #555;\n text-align: center;\n font-size: 12px;\n line-height: 38px;\n text-decoration: none;\n white-space: nowrap;\n background-color: transparent;\n border-radius: 3px;\n border: 1px solid #bbb;\n cursor: pointer;\n box-sizing: border-box;\n}\n.button-primary.curr[data-v-5eb27329] {\n background-color: #33C3F0;\n border-color: #33C3F0;\n color: #fff;\n}\n",""])},1177:function(t,n){t.exports={render:function(){var t=this,n=t.$createElement,r=t._self._c||n;return r("div",[r("nut-demoheader",{attrs:{name:t.$route.name}}),t._v(" "),r("nut-drag",{attrs:{direction:t.direction,boundary:t.boundary,isSide:t.isSide}}),t._v(" "),r("div",[r("a",{staticClass:"button-primary curr",attrs:{href:"javascript:;"},on:{click:function(n){t.changeMove("h",n)}}},[t._v("垂直移动")]),t._v(" "),r("a",{staticClass:"button-primary",attrs:{href:"javascript:;"},on:{click:function(n){t.changeMove("v",n)}}},[t._v("水平移动")]),t._v(" "),r("a",{staticClass:"button-primary",attrs:{href:"javascript:;"},on:{click:function(n){t.changeMove("n",n)}}},[t._v("任意方向移动")])]),t._v(" "),r("div",{staticStyle:{"margin-top":"20px"}},[r("a",{staticClass:"button-primary curr",attrs:{href:"javascript:;"},on:{click:function(n){t.changeBoundary("y",n)}}},[t._v("有边距")]),t._v(" "),r("a",{staticClass:"button-primary",attrs:{href:"javascript:;"},on:{click:function(n){t.changeBoundary("n",n)}}},[t._v("无边距")])]),t._v(" "),r("div",[r("a",{staticClass:"button-primary curr",attrs:{href:"javascript:;"},on:{click:function(n){t.changeSide(!1,n)}}},[t._v("不吸边")]),t._v(" "),r("a",{staticClass:"button-primary",attrs:{href:"javascript:;"},on:{click:function(n){t.changeSide(!0,n)}}},[t._v("吸边")])])],1)},staticRenderFns:[]}},1248:function(t,n,r){var a=r(1039);"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);r(3)("590608cb",a,!0,{})},828:function(t,n,r){var a=r(2)(r(927),r(1177),function(t){r(1248)},"data-v-5eb27329",null);t.exports=a.exports},927:function(t,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.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,n){var r=n.currentTarget,a=r.parentElement.children;this.removeClass(a),r.classList.add("curr"),this.direction=t},changeBoundary:function(t,n){var r=n.currentTarget,a=r.parentElement.children;this.removeClass(a),r.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,n){var r=n.currentTarget,a=r.parentElement.children;this.removeClass(a),r.classList.add("curr"),r.classList.add("curr"),this.isSide=t},removeClass:function(t){for(var n in t)!0===t.hasOwnProperty(n)&&(t[n].className="button-primary")}}}}});
|