cuiqian2004
2025-05-23 df481aebfb7a19eea5d6c02f93c6f5776b0fdc19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<template>
    <view class="oi-form-select">
        <!-- 下拉选择框 -->
        <uni-data-picker v-if="model" class="data-picker" :class="data.disabled?'input-disabled':''"
            v-model="model[data.fieldId]" :localdata="data.useDict ? data.dict : data.selections" @change="onChange"
            :readonly="data.disabled" :clear-icon="false" :popup-title="data.label"></uni-data-picker>
        <uni-data-picker v-else class="data-picker" :class="data.disabled?'input-disabled':''" v-model="data.value"
            :localdata="data.useDict ? data.dict : data.selections" @change="onChange" :readonly="data.disabled"
            :clear-icon="false" :popup-title="data.label"></uni-data-picker>
    </view>
</template>
 
<script>
    export default {
        name: "OIFormSelect",
        props: {
            data: {
                type: Object,
                required: true,
            },
            model: Object,
        },
        methods: {
            onChange(e) {
                this.$emit("on-change", e)
            },
 
        }
    };
</script>
 
<style lang="less">
    .oi-form-select {
        width: 100%;
 
        .data-picker {
            width: 100%;
            background: #FFF;
            border-radius: 0 !important;
            color: #2d8cf0;
            /* padding: 10rpx 8rpx 12rpx; */
            font-size: 34rpx;
            font-family: inherit;
            box-shadow: none !important;
            transition-duration: 0.1s;
            margin-top: 0rpx;
            /* vertical-align: 10px; */
            vertical-align: middle;
 
            .uni-select {
                border: 1px solid #ccc;
                border-radius: 0 !important;
                color: #2d8cf0;
            }
 
            .uni-select__input-text {
                color: #2d8cf0;
            }
        }
 
 
 
        .input-disabled {
            background-color: #f3f3f3 !important;
        }
    }
 
 
</style>