pleroma-fe/src/components/select/select.vue

63 行
1.2 KiB
Vue
Raw 通常表示 履歴

<template>
<label
class="Select input"
2021-03-11 23:31:15 +09:00
:class="{ disabled, unstyled }"
>
<select
:disabled="disabled"
2022-03-22 05:00:25 +09:00
:value="modelValue"
2023-01-22 06:28:33 +09:00
v-bind="attrs"
2022-03-22 05:00:25 +09:00
@change="$emit('update:modelValue', $event.target.value)"
>
<slot />
</select>
2022-03-23 23:15:05 +09:00
{{ ' ' }}
<FAIcon
class="select-down-icon"
icon="chevron-down"
/>
</label>
</template>
2021-03-11 23:19:11 +09:00
<script src="./select.js"> </script>
<style lang="scss">
2023-01-10 03:02:16 +09:00
@import "../../variables";
2022-03-17 16:06:05 +09:00
/* TODO fix order of styles */
label.Select {
padding: 0;
select {
appearance: none;
background: transparent;
border: none;
color: $fallback--text;
color: var(--inputText, --text, $fallback--text);
margin: 0;
2023-01-10 03:02:16 +09:00
padding: 0 2em 0 0.2em;
font-family: sans-serif;
font-family: var(--inputFont, sans-serif);
2022-04-21 05:22:51 +09:00
font-size: 1em;
width: 100%;
z-index: 1;
2022-04-21 05:22:51 +09:00
height: 2em;
line-height: 16px;
}
2021-03-11 23:31:15 +09:00
.select-down-icon {
position: absolute;
top: 0;
bottom: 0;
right: 5px;
height: 100%;
2022-03-16 04:00:52 +09:00
width: 0.875em;
2021-03-11 23:31:15 +09:00
color: $fallback--text;
color: var(--inputText, $fallback--text);
2022-04-21 05:22:51 +09:00
line-height: 2;
2021-03-11 23:31:15 +09:00
z-index: 0;
pointer-events: none;
}
}
</style>