mpFrame.js 1.2 KB

12345678910111213141516171819202122232425262728
  1. (function(global){
  2. var factory = {},startCache = null,startCacheFn = function(startFn){ startFn && startFn(startCache);};
  3. factory.start = function(startFn){
  4. typeof startCache == 'function' ? startCacheFn(startFn) : requirejs(['vue','iview','layer'],function(Vue,iView,layer){
  5. Vue.use(iView);
  6. window.iView = iView;
  7. (startCache = Vue) && startCacheFn(startFn);
  8. });
  9. };
  10. global.mpFrame = factory;
  11. /*$(function init(){
  12. if(typeof footable=='function') $(".footable").footable();
  13. $(".no-sort").off('click');
  14. $('.search-item>.btn').on('click',function(){
  15. var that = $(this),value = that.data('value'),p = that.parent(),name = p.data('name'),form = p.parents();
  16. form.find('input[name="'+name+'"]').val(value);
  17. form.submit();
  18. });
  19. $('.search-item-value').each(function(){
  20. var that = $(this),name = that.attr('name'), value = that.val(),dom = $('.search-item[data-name="'+name+'"] .btn[data-value="'+value+'"]');
  21. dom.eq(0).removeClass('btn-outline btn-link').addClass('btn-primary btn-sm')
  22. .siblings().addClass('btn-outline btn-link').removeClass('btn-primary btn-sm')
  23. });
  24. });*/
  25. })(this);