update
This commit is contained in:
28
src/components/FormTitle/index.vue
Normal file
28
src/components/FormTitle/index.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<script setup>
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div id="title">
|
||||
<slot name="title"></slot>
|
||||
</div>
|
||||
|
||||
<slot></slot>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
#title {
|
||||
@apply flex gap-[8px];
|
||||
color: rgb(29, 33, 41);
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
line-height: 28px;
|
||||
letter-spacing: 0;
|
||||
text-align: left;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
background-color: rgb(var(--arcoblue-6));
|
||||
@apply w-[5px] h-full block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
14
src/components/MinutesHoursRadio/index.vue
Normal file
14
src/components/MinutesHoursRadio/index.vue
Normal file
@@ -0,0 +1,14 @@
|
||||
<script setup>
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-radio-group v-bind="$attrs" type="button" class="flex-shrink-0">
|
||||
<a-radio>分钟</a-radio>
|
||||
<a-radio>小时</a-radio>
|
||||
</a-radio-group>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
31
src/components/XSelect/index.vue
Normal file
31
src/components/XSelect/index.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<script setup>
|
||||
import {onMounted, reactive} from "vue";
|
||||
|
||||
const {api, fieldName} = defineProps({
|
||||
api: {
|
||||
type: Function,
|
||||
default: async () => {},
|
||||
required: true,
|
||||
},
|
||||
fieldName: {
|
||||
type: Object,
|
||||
default: {value: 'id', label: 'name'},
|
||||
}
|
||||
});
|
||||
const list = reactive([]);
|
||||
|
||||
onMounted(() => {
|
||||
api && api().then(({data}) => {
|
||||
list.length = 0;
|
||||
list.push(...data);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-select v-bind="$attrs" :options="list" :field-names="fieldName" placeholder="请选择"></a-select>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user