{"size": 1245, "ext": "js", "max_stars_repo_path": "lib/tag/index.js", "max_stars_repo_name": "F5F5/vant", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/tag/index.js", "max_issues_repo_name": "F5F5/vant", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/tag/index.js", "max_forks_repo_name": "F5F5/vant", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.1016949153, "max_line_length": 85, "alphanum_fraction": 0.59437751}
"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

exports.__esModule = true;
exports.default = void 0;

var _create = _interopRequireDefault(require("../utils/create"));

var _color = require("../utils/color");

var COLOR_MAP = {
  danger: _color.RED,
  primary: _color.BLUE,
  success: _color.GREEN
};

var _default = (0, _create.default)({
  render: function render() {
    var _vm = this;

    var _h = _vm.$createElement;

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

    return _c('span', {
      class: [_vm.b((_obj = {
        mark: _vm.mark,
        plain: _vm.plain,
        round: _vm.round
      }, _obj[_vm.size] = _vm.size, _obj)), {
        'van-hairline--surround': _vm.plain
      }],
      style: _vm.style
    }, [_vm._t("default")], 2);

    var _obj;
  },
  name: 'tag',
  props: {
    size: String,
    type: String,
    mark: Boolean,
    color: String,
    plain: Boolean,
    round: Boolean
  },
  computed: {
    style: function style() {
      var _ref;

      var color = this.color || COLOR_MAP[this.type] || _color.GRAY_DARK;
      var key = this.plain ? 'color' : 'backgroundColor';
      return _ref = {}, _ref[key] = color, _ref;
    }
  }
});

exports.default = _default;