mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user