feat: 添加 Divider 和 Input 组件,更新主题变量

This commit is contained in:
2025-12-12 00:11:27 +07:00
parent 98b8b1aab6
commit 088ebf1f76
3 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<script lang='ts' setup>
import type { ComponentInstance } from "vue";
import { IonInput } from "@ionic/vue";
import { h } from "vue";
const vm = getCurrentInstance()!;
function changeRef(exposed: any) {
vm.exposed = exposed;
}
defineExpose({} as ComponentInstance<typeof IonInput>);
</script>
<template>
<component :is="h(IonInput, { ...$attrs, ref: changeRef })" class="ui-input" />
</template>
<style scoped>
.ui-input {
--padding-start: 12px;
--padding-end: 12px;
--background: var(--ui-input-background, #fff);
--color: var(--ui-input-color, #000);
--border-radius: 8px;
}
</style>

View File

@@ -1,2 +1,14 @@
/* For information on how to create your own theme, please refer to: /* For information on how to create your own theme, please refer to:
http://ionicframework.com/docs/theming/ */ http://ionicframework.com/docs/theming/ */
:root {
--ui-input-background: #ffffff;
--ui-input-color: #222222;
}
@media (prefers-color-scheme: dark) {
:root {
--ui-input-background: #1e1e1e;
--ui-input-color: #ffffff;
}
}