fix(components): empty icon component judgment (#4178)

* fix(components): empty icon component judgment

* revert: globals components

* fix(components): el-icon missing import

* fix: use shallowRef for icon components

* refactor: remove shallowRef

* fix: remove unused code

* fix: social-link icon size

* fix: time picker icon

* fix: v-if judge
This commit is contained in:
Aex
2021-11-05 17:44:02 +08:00
committed by GitHub
parent c72ea9c1a1
commit f78407a409
28 changed files with 85 additions and 155 deletions

View File

@@ -1,27 +1,20 @@
<template>
<el-switch v-model="value1" :active-icon="active" :inactive-icon="inactive">
<el-switch v-model="value1" :active-icon="Check" :inactive-icon="Close">
</el-switch>
<br />
<el-switch
v-model="value2"
style="margin-left: 24px"
inline-prompt
:active-icon="active"
:inactive-icon="inactive"
:active-icon="Check"
:inactive-icon="Close"
>
</el-switch>
</template>
<script lang="ts">
<script setup lang="ts">
import { ref } from 'vue'
import { Check, Close } from '@element-plus/icons'
export default {
data() {
return {
value1: true,
value2: true,
active: Check,
inactive: Close,
}
},
}
const value1 = ref(true)
const value2 = ref(true)
</script>