mirror of
https://github.com/directus/directus.git
synced 2026-02-14 01:25:09 -05:00
fixes for numeric and icon readme (#527)
This commit is contained in:
@@ -29,13 +29,13 @@
|
||||
<span v-if="suffix" class="suffix">{{ suffix }}</span>
|
||||
<span v-if="(type === 'number')">
|
||||
<v-icon
|
||||
:class="{ disabled: value === null || value === max }"
|
||||
:class="{ disabled: value >= max }"
|
||||
name="keyboard_arrow_up"
|
||||
class="step-up"
|
||||
@click="stepUp"
|
||||
/>
|
||||
<v-icon
|
||||
:class="{ disabled: value === null || value === min }"
|
||||
:class="{ disabled: value <= min }"
|
||||
name="keyboard_arrow_down"
|
||||
class="step-down"
|
||||
@click="stepDown"
|
||||
@@ -139,18 +139,18 @@ export default defineComponent({
|
||||
function stepUp() {
|
||||
if (!input.value) return;
|
||||
|
||||
if (props.value !== null && props.value < props.max) {
|
||||
if (props.value < props.max) {
|
||||
input.value.stepUp();
|
||||
emit('input', +input.value.value);
|
||||
emit('input', input.value.value ?? props.min ?? 0);
|
||||
}
|
||||
}
|
||||
|
||||
function stepDown() {
|
||||
if (!input.value) return;
|
||||
|
||||
if (props.value !== null && props.value > props.min) {
|
||||
if (props.value > props.min) {
|
||||
input.value.stepDown();
|
||||
emit('input', +input.value.value);
|
||||
emit('input', input.value.value);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6,12 +6,5 @@ export default defineInterface(({ i18n }) => ({
|
||||
name: i18n.t('interfaces.icon.icon'),
|
||||
icon: 'insert_emoticon',
|
||||
component: InterfaceIcon,
|
||||
options: [
|
||||
{
|
||||
field: 'iconColor',
|
||||
name: 'Icon Color',
|
||||
width: 'half',
|
||||
interface: 'color',
|
||||
},
|
||||
],
|
||||
options: [],
|
||||
}));
|
||||
|
||||
@@ -4,4 +4,5 @@
|
||||
|
||||
| Option | Description | Default |
|
||||
| ---------- | ----------- | ------- |
|
||||
| `readonly` | Readonly | `false` |
|
||||
| `disabled` | Disabled | `false` |
|
||||
| `width` | Width | `half` |
|
||||
|
||||
Reference in New Issue
Block a user