import "./index.css";
/* script */
//
//
//
//
//
//
//
//
import { componentMixin, createComponentName } from '../_utils/component';
const __vue_script__ = {
  name: createComponentName('badge'),
  mixins: [componentMixin],
  props: {
    // 隐藏 badge
    hidden: {
      type: Boolean,
      default: false
    },
    // 是否是小圆点
    isDot: {
      type: Boolean,
      default: false
    },
    // 最大值，超过最大值会显示 `{max}+`，要求 value 是 Number 类型
    max: {
      type: Number,
      default: 99
    },
    // 显示值
    value: {
      type: [Number, String],
      default: ''
    },
    // 红点样式
    dotStyle: {
      type: Object,
      default: () => {}
    }
  },
  computed: {
    number() {
      if (this.max) return this.max < this.value ? this.max + '+' : this.value;
      return this.value;
    }

  }
};
/* template */

var __vue_render__ = function () {
  var _vm = this;

  var _h = _vm.$createElement;

  var _c = _vm._self._c || _h;

  return _c("div", {
    class: _vm.bem()
  }, [_vm._t("default"), _vm._v(" "), _vm.number || _vm.hidden ? _c("sup", {
    class: _vm.bem("content", {
      dot: _vm.isDot
    }),
    style: _vm.dotStyle
  }, [_vm._v(_vm._s(_vm.isDot ? "" : _vm.number))]) : _vm._e()], 2);
};

var __vue_staticRenderFns__ = [];
__vue_render__._withStripped = true;
/* style */

const __vue_inject_styles__ = undefined;
/* scoped */

const __vue_scope_id__ = undefined;
/* module identifier */

const __vue_module_identifier__ = undefined;
/* functional template */

const __vue_is_functional_template__ = false;
/* component normalizer */

import __vue_normalize__ from '../_utils/vue-normalize-component.js';
/* style inject */

/* style inject SSR */

export default __vue_normalize__({
  render: __vue_render__,
  staticRenderFns: __vue_staticRenderFns__
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, undefined, undefined);