Commit 57b653a3 by 周田

fix:页面显示

parent 81111d0a
<template> <template>
<el-select v-model="value" clearable placeholder="Select"> <el-select mb-5 v-model="value" placeholder="Select">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<br> <br>
<el-tag mt-5 v-for="tag in tags" :key="tag" class="mx-1" closable @close="handleClose(tag)"> <el-tag v-for="tag in tags" :key="tag" class="mx-1" closable @close="handleClose(tag)">
{{ tag }} {{ tag }}
</el-tag> </el-tag>
</template> </template>
...@@ -14,9 +14,10 @@ ...@@ -14,9 +14,10 @@
import axios from 'axios'; import axios from 'axios';
import { onMounted, ref, watch } from 'vue' import { onMounted, ref, watch } from 'vue'
const tags = ref<string[]>([]) const tags = ref<string[]>(['111', '222'])
const handleClose = (tag: string) => { const handleClose = (tag: string) => {
tags.value.splice(tags.value.indexOf(tag), 1) tags.value.splice(tags.value.indexOf(tag), 1)
console.log(tags.value);
} }
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment