define(['vue', 'helper', 'store'], function (Vue, $h, api) { 'use strict'; Vue.component('quick-menu', { data: function () { return { top: '50%', open: false, menuList: [] }; }, created: function () { this.onReady(); }, methods: { onReady: function() { var that = this; api.baseGet($h.U({ c: 'auth_api', a: 'suspensionButton' }), function(res) { var data = res.data.data; that.menuList = data; }, function(err) { console.error(err.data.msg); }); }, onMove: function(event) { var clientHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight, tithe = clientHeight / 10, min = tithe * 2, max = tithe * 8, top = 0; if (min >= event.touches[0].clientY) { top = clientHeight / 10 * 2; } else if (event.touches[0].clientY >= max) { top = clientHeight / 10 * 8; } else { top = event.touches[0].clientY; } this.top = top + 'px'; } }, template: '
' + '' + '
' + '' + '
' + '
' }); });