-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
durunsong
committed
Sep 27, 2024
1 parent
8369244
commit 9a59294
Showing
7 changed files
with
65 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<div class="flex flex-col items-center"> | ||
<el-card class="w-[400px] mt-5" shadow="always"> | ||
<PlaneSwitch | ||
v-model:checked="switchState" | ||
@update:checked="handleSwitchChange" | ||
></PlaneSwitch> | ||
<p>Switch is {{ switchState ? "ON" : "OFF" }}</p> | ||
</el-card> | ||
<el-card class="w-[400px]" shadow="always"> | ||
<p>标签图标</p> | ||
<div | ||
class="i-whh-mymusic text-blue-400" | ||
role="img" | ||
aria-hidden="true" | ||
></div> | ||
</el-card> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from "vue"; | ||
const switchState = ref(true); | ||
// 处理子组件发出的开关状态变化事件 | ||
const handleSwitchChange = (newState: boolean) => { | ||
switchState.value = newState; | ||
console.log("Switch state changed to", newState); | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
/* No additional styles needed as we're using UnoCSS utilities */ | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters