module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// identity function for calling harmony imports with the correct context
/******/ 	__webpack_require__.i = function(value) { return value; };
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 178);
/******/ })
/************************************************************************/
/******/ ({

/***/ 157:
/***/ (function(module, exports, __webpack_require__) {

var Component = __webpack_require__(9)(
  /* script */
  __webpack_require__(167),
  /* template */
  __webpack_require__(438),
  /* styles */
  null,
  /* scopeId */
  null,
  /* moduleIdentifier (server only) */
  null
)

module.exports = Component.exports


/***/ }),

/***/ 167:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

exports.default = {
  name: 'XpCount',

  data: function data() {
    return {
      str: [],
      options: {}
    };
  },


  props: {
    number: {
      type: [Number, String],
      default: 0
    },
    settings: {
      type: Object,
      default: function _default() {}
    }
  },

  methods: {
    setBoolean: function setBoolean(bool, ret) {
      if (bool === undefined) {
        bool = ret;
      }
      return bool;
    },
    toThousands: function toThousands() {
      var num = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
      // 千分位函数
      num = num.toString();
      var float = '';
      var isFloat = num.indexOf('.') > -1;
      if (isFloat) {
        var arr = num.split('.');
        num = arr[0];
        float = '.' + arr[1];
      }
      return num.replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') + float;
    },
    setOptions: function setOptions() {
      var settings = this.settings || {};
      this.options = {
        number: settings.number || 0,
        isFloat: settings.isFloat || false, // 是否是浮点数
        fixed: settings.fixed || 2,
        split: this.setBoolean(settings.split, true), // 是否有千分位
        prefix: settings.prefix || '', // 前缀，一般为¥
        suffix: settings.suffix || '', // 后缀，一般为元
        wrapStyle: settings.wrapStyle || {}, // wrap样式
        intStyle: settings.intStyle || {}, // 整数样式
        splitStyle: settings.splitStyle || settings.intStyle || {}, // 千分位样式
        dotStyle: settings.dotStyle || settings.splitStyle || {}, // 小数点样式
        decimalStyle: settings.decimalStyle || {}, // 小数样式
        prefixStyle: settings.prefixStyle || {}, // 前缀样式
        suffixStyle: settings.suffixStyle || {} };
    },
    updateData: function updateData() {
      this.setOptions(this.settings);
      var options = this.options;
      var num = this.number || options.number;
      if (options.isFloat) {
        num = num.toFixed(options.fixed);
      }
      if (options.split) {
        num = this.toThousands(num);
      }
      num = num.toString();
      this.str = num.split('');
    }
  },

  watch: {
    number: function number(newVal) {
      this.updateData();
    },
    settings: function settings(newVal) {
      this.updateData();
    }
  },

  mounted: function mounted() {
    this.updateData();
  }
};

/***/ }),

/***/ 178:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _count = __webpack_require__(157);

var _count2 = _interopRequireDefault(_count);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/* istanbul ignore next */
_count2.default.install = function (Vue) {
  Vue.component(_count2.default.name, _count2.default);
};

exports.default = _count2.default;

/***/ }),

/***/ 438:
/***/ (function(module, exports) {

module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  return _c('div', {
    staticClass: "xp-count u-fontNumber",
    style: (_vm.options.wrapStyle)
  }, [(_vm.options.prefix) ? _c('span', {
    staticClass: "xp-count__prefix",
    style: (_vm.options.prefixStyle)
  }, [_vm._v(_vm._s(_vm.options.prefix))]) : _vm._e(), _vm._v(" "), _vm._l((_vm.str), function(s) {
    return [(s !== ',' && s !== '.') ? _c('span', {
      staticClass: "xp-count__num",
      style: (_vm.options.intStyle)
    }, [_vm._v(_vm._s(s))]) : _vm._e(), _vm._v(" "), (s === ',') ? _c('span', {
      staticClass: "xp-count__split",
      style: (_vm.options.splitStyle)
    }, [_vm._v(_vm._s(s))]) : _vm._e(), _vm._v(" "), (s === '.') ? _c('span', {
      staticClass: "xp-count__dot",
      style: (_vm.options.dotStyle)
    }, [_vm._v(_vm._s(s))]) : _vm._e()]
  }), _vm._v(" "), (_vm.options.suffix) ? _c('span', {
    staticClass: "xp-count__suffix",
    style: (_vm.options.suffixStyle)
  }, [_vm._v(_vm._s(_vm.options.suffix))]) : _vm._e()], 2)
},staticRenderFns: []}

/***/ }),

/***/ 9:
/***/ (function(module, exports) {

/* globals __VUE_SSR_CONTEXT__ */

// this module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle

module.exports = function normalizeComponent (
  rawScriptExports,
  compiledTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier /* server only */
) {
  var esModule
  var scriptExports = rawScriptExports = rawScriptExports || {}

  // ES6 modules interop
  var type = typeof rawScriptExports.default
  if (type === 'object' || type === 'function') {
    esModule = rawScriptExports
    scriptExports = rawScriptExports.default
  }

  // Vue.extend constructor export interop
  var options = typeof scriptExports === 'function'
    ? scriptExports.options
    : scriptExports

  // render functions
  if (compiledTemplate) {
    options.render = compiledTemplate.render
    options.staticRenderFns = compiledTemplate.staticRenderFns
  }

  // scopedId
  if (scopeId) {
    options._scopeId = scopeId
  }

  var hook
  if (moduleIdentifier) { // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = injectStyles
  }

  if (hook) {
    var functional = options.functional
    var existing = functional
      ? options.render
      : options.beforeCreate
    if (!functional) {
      // inject component registration as beforeCreate hook
      options.beforeCreate = existing
        ? [].concat(existing, hook)
        : [hook]
    } else {
      // register for functioal component in vue file
      options.render = function renderWithStyleInjection (h, context) {
        hook.call(context)
        return existing(h, context)
      }
    }
  }

  return {
    esModule: esModule,
    exports: scriptExports,
    options: options
  }
}


/***/ })

/******/ });