💄(input): 修正 input 组件格式
This commit is contained in:
parent
02c01b5944
commit
eb2ed1001f
@ -31,7 +31,7 @@ const props = withDefaults(defineProps<LayInputProps>(), {
|
||||
readonly: false,
|
||||
allowClear: false,
|
||||
autofocus: false,
|
||||
autocomplete: false
|
||||
autocomplete: false,
|
||||
});
|
||||
|
||||
const emit = defineEmits([
|
||||
@ -78,13 +78,13 @@ const onBlur = () => {
|
||||
:placeholder="placeholder"
|
||||
:autofocus="autofocus"
|
||||
:autocomplete="autocomplete"
|
||||
:readonly="readonly"
|
||||
:class="{ 'layui-disabled': disabled }"
|
||||
class="layui-input"
|
||||
@input="onInput"
|
||||
@focus="onFocus"
|
||||
@blur="onBlur"
|
||||
@change="onChange"
|
||||
:readonly="props.readonly"
|
||||
/>
|
||||
<span class="layui-input-suffix" v-if="slots.suffix">
|
||||
<slot name="suffix"></slot>
|
||||
|
@ -5,10 +5,10 @@ export default {
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import layButton from "../button/index.vue";
|
||||
import "./index.less";
|
||||
import layInput from "../input/index.vue";
|
||||
import { LayIcon } from "@layui/icons-vue";
|
||||
import "./index.less";
|
||||
import layButton from "../button/index.vue";
|
||||
import { ref, watch, withDefaults, computed } from "vue";
|
||||
|
||||
export interface LayInputNumberProps {
|
||||
@ -65,6 +65,7 @@ let timer: any = 0;
|
||||
const minControl = computed(
|
||||
() => props.min !== -Infinity && Number(props.min) >= num.value
|
||||
);
|
||||
|
||||
const maxControl = computed(
|
||||
() => props.max !== Infinity && Number(props.max) <= num.value
|
||||
);
|
||||
@ -141,4 +142,4 @@ const isNumber = function (num: any) {
|
||||
/>
|
||||
</lay-button>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
Loading…
Reference in New Issue
Block a user