Welcome to mirror list, hosted at ThFree Co, Russian Federation.

aSettingListItem.html « component « html « web - github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 27a7abac6631ec46ab2625b08b3ae86dcd86190f (plain)
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
{{define "component/settingListItem"}}
<a-list-item :style="{ padding: padding }">
    <a-row :gutter="[8,16]">
        <a-col :lg="24" :xl="12">
            <a-list-item-meta>
                <template #title>
                    <slot name="title"></slot>
                </template>
                <template #description>
                    <slot name="description"></slot>
                </template>
            </a-list-item-meta>
        </a-col>
        <a-col :lg="24" :xl="12">
            <slot name="control"></slot>
        </a-col>
    </a-row>
</a-list-item>
{{end}}

{{define "component/aSettingListItem"}}
<script>
    Vue.component('a-setting-list-item', {
        props: {
            'paddings': {
                type: String,
                required: false,
                defaultValue: "default",
                validator: function (value) {
                    return ['small', 'default'].includes(value)
                }
            }
        },
        template: `{{ template "component/settingListItem" }}`,
        computed: {
            padding() {
                switch (this.paddings) {
                    case "small":
                        return "10px 20px !important"
                        break;
                    case "default":
                        return "20px !important"
                        break;
                }
            }
        }
    })
</script>
{{end}}