Skip to content

二.Tag

前言

组件默认使用 Flex 布局,不需要手动设置 type="flex"。

请注意父容器避免使用 inline 相关样式,会导致组件宽度不能撑满。

Tag 1Tag 2Tag 3Tag 4Tag 5
<template>
    <div class="flex gap-2">
      <web-tag type="primary">Tag 1</web-tag>
      <web-tag type="success">Tag 2</web-tag>
      <web-tag type="info">Tag 3</web-tag>
      <web-tag type="warning">Tag 4</web-tag>
      <web-tag type="danger">Tag 5</web-tag>
    </div>
  </template>