赞
踩
需求:
代码:
- <el-select v-model="ruleForm.ShowState" class="selsectbox">
- <template #prefix>
- <div class="pl-10px">轮播状态:</div>
- </template>
- <el-option
- v-for="item in showStateOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- <template #default>
- <StatusTag
- :type="showStateConfigs[item.value].type"
- :txt="showStateConfigs[item.value].txt"
- />
- </template>
- </el-option>
- </el-select>
- <script setup lang="ts">
- const showStateOptions = [
- { value: 1, label: "启用" },
- { value: 2, label: "禁用" }
- ];
- </script>
- <style scoped lang="scss">
- .selsectbox {
- width: 230px;
- ::v-deep .el-input__inner {
- padding-left: 70px;
- }
- }
- </style>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。