wangzhibo
4 天以前 10595d8632f959d0954d1939243196f4eed02372
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<template>
    <cl-page :padding="20">
        <view class="page-demo-button">
            <cl-card label="基础用法">
                <cl-row :gutter="20">
                    <cl-col :span="8">
                        <cl-button fill @tap="onTap">默认</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="primary" fill>主要</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="success" fill>成功</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="error" fill>失败</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="warning" fill>警告</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="info" fill>信息</cl-button>
                    </cl-col>
                </cl-row>
            </cl-card>
 
            <cl-card label="朴素">
                <cl-row :gutter="20">
                    <cl-col :span="8">
                        <cl-button type="primary" plain fill>主要</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="success" plain fill>成功</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="error" plain fill>失败</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="warning" plain fill>警告</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="info" plain fill>信息</cl-button>
                    </cl-col>
                </cl-row>
            </cl-card>
 
            <cl-card label="不同尺寸">
                <cl-button size="small">小</cl-button>
                <cl-button size="default">默认</cl-button>
                <cl-button size="large">大</cl-button>
                <cl-button :height="90" :width="200" :font-size="34">90*200</cl-button>
            </cl-card>
 
            <cl-card label="图标">
                <cl-button icon="cl-icon-search">搜索</cl-button>
                <cl-button icon="cl-icon-chart-bar">统计</cl-button>
            </cl-card>
 
            <cl-card label="圆角">
                <cl-button type="primary" round>默认</cl-button>
                <cl-button round>默认</cl-button>
            </cl-card>
 
            <cl-card label="加载中">
                <cl-row :gutter="20">
                    <cl-col :span="8">
                        <cl-button loading fill @tap="onTap">默认</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="primary" fill loading>主要</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="success" fill loading>成功</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="error" fill loading>失败</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="warning" fill loading>警告</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="info" fill loading>信息</cl-button>
                    </cl-col>
                </cl-row>
            </cl-card>
 
            <cl-card label="禁用">
                <cl-row :gutter="20">
                    <cl-col :span="8">
                        <cl-button disabled fill @tap="onTap">默认</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="primary" fill disabled>主要</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="success" fill disabled>成功</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="error" fill disabled>失败</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="warning" fill disabled>警告</cl-button>
                    </cl-col>
                    <cl-col :span="8">
                        <cl-button type="info" fill disabled>信息</cl-button>
                    </cl-col>
                </cl-row>
            </cl-card>
 
            <cl-card label="没有边框">
                <cl-button :border="false">默认</cl-button>
            </cl-card>
 
            <cl-card label="自定义颜色">
                <cl-button :border="false" color="#ffffff" background-color="#008000"
                    >默认</cl-button
                >
                <cl-button color="#008000" plain>朴素</cl-button>
            </cl-card>
        </view>
    </cl-page>
</template>
 
<script lang="ts" setup>
import { useUi } from "/$/cool-ui";
 
const ui = useUi();
 
function onTap() {
    ui.showToast("点我干嘛");
}
</script>
 
<style lang="scss">
.page-demo-button {
    .cl-col {
        padding-bottom: 20rpx;
    }
}
</style>