mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09:00
Update MkInput.vue
This commit is contained in:
parent
f5e9886c70
commit
4495969d7f
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div :class="$style.label" @click="focus"><slot name="label"></slot></div>
|
<div :class="$style.label" @click="focus"><slot name="label"></slot></div>
|
||||||
<div :class="[$style.input, { inline, disabled, focused }]">
|
<div :class="[$style.input, { inline, disabled, focused }]">
|
||||||
<div ref="prefixEl" :class="$style.prefix"><div :class="$style.prefixOrSuffixText"><slot name="prefix"></slot></div></div>
|
<div ref="prefixEl" :class="$style.prefix"><slot name="prefix"></slot></div>
|
||||||
<input
|
<input
|
||||||
ref="inputEl"
|
ref="inputEl"
|
||||||
v-model="v"
|
v-model="v"
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<datalist v-if="datalist" :id="id">
|
<datalist v-if="datalist" :id="id">
|
||||||
<option v-for="data in datalist" :key="data" :value="data"/>
|
<option v-for="data in datalist" :key="data" :value="data"/>
|
||||||
</datalist>
|
</datalist>
|
||||||
<div ref="suffixEl" :class="$style.suffix"><div :class="$style.prefixOrSuffixText"><slot name="suffix"></slot></div></div>
|
<div ref="suffixEl" :class="$style.suffix"><slot name="suffix"></slot></div>
|
||||||
</div>
|
</div>
|
||||||
<div :class="$style.caption"><slot name="caption"></slot></div>
|
<div :class="$style.caption"><slot name="caption"></slot></div>
|
||||||
|
|
||||||
@ -233,6 +233,12 @@ onMounted(() => {
|
|||||||
padding: 0 12px;
|
padding: 0 12px;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
height: v-bind("height + 'px'");
|
height: v-bind("height + 'px'");
|
||||||
|
min-width: 16px;
|
||||||
|
max-width: 150px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
box-sizing: border-box;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
||||||
&:empty {
|
&:empty {
|
||||||
@ -249,16 +255,6 @@ onMounted(() => {
|
|||||||
right: 0;
|
right: 0;
|
||||||
padding-left: 6px;
|
padding-left: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.prefixOrSuffixText {
|
|
||||||
display: inline-block;
|
|
||||||
min-width: 16px;
|
|
||||||
max-width: 150px;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.save {
|
.save {
|
||||||
margin: 8px 0 0 0;
|
margin: 8px 0 0 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user