[新增] progress 进度条

This commit is contained in:
就眠仪式
2021-09-28 09:42:28 +08:00
parent eec76e2cb1
commit 2b8fc4758d
8 changed files with 53 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ import LayHeader from "./module/header/index"
import LayFooter from "./module/footer/index"
import LayLogo from "./module/logo/index"
import LayPanel from "./module/panel/index"
import LayProgress from "./module/panel/index"
import LayProgress from "./module/progress/index"
import LayCol from "./module/col/index"
import LayRow from "./module/row/index"
import LayInput from "./module/input/index"

View File

@@ -1,12 +1,21 @@
<template>
<input type="text" class="layui-input" />
<input :type="type" :value="modelValue" :name="name" class="layui-input" @input="updateValue"/>
</template>
<script setup name="LayInput" lang="ts">
import { defineProps } from '@vue/runtime-core'
import { defineProps, defineEmits } from '@vue/runtime-core'
const props =
defineProps<{
name?: string
type?: string
modelValue?: string
}>()
const emit = defineEmits(['update:modelValue'])
const updateValue = function(event: unknown,value: unknown) {
emit('update:modelValue', value)
}
</script>

View File

@@ -6,12 +6,12 @@
:style="[
this.color ? 'background-color: ' + this.color : '',
{
width: this.percentage + '%',
width: this.percent + '%',
},
]"
>
<span v-if="showText" class="layui-progress-text">
{{ text ? text : this.percentage + '%' }}
{{ text ? text : this.percent + '%' }}
</span>
</div>
</div>
@@ -21,7 +21,7 @@ import { defineProps } from '@vue/runtime-core'
const props =
defineProps<{
percentage: Number
percent: Number
theme: String
color: String
size: String