zhangxiaoxu123
2023-05-05 f51896f6358a60ab83456358446ac48085b48298
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<template>
  <div>
    <Divider class="component-blue" orientation="left">卡片1</Divider>
    <Row :gutter="20" class="n-m-r-0">
      <Col :sm="24" :md="24" :lg="8" :style="{ marginBottom: '10px' }">
        <card
          id="card1"
          icon="ios-stats"
          iconColor="#975ee4"
          :endVal="123456"
          title="Icon演示"
        />
      </Col>
      <Col :sm="24" :md="24" :lg="8" :style="{ marginBottom: '10px' }">
        <card
          id="card2"
          :backgroundImage="
            'url(' + require('@/assets/dashboard/circle.svg') + ')'
          "
          :image="require('@/assets/dashboard/fee.png')"
          width="30"
          height="30"
          :endVal="123456"
          title="图片演示"
        />
      </Col>
      <Col :sm="24" :md="24" :lg="8" :style="{ marginBottom: '10px' }">
        <card
          id="card3"
          :backgroundImage="
            'url(' + require('@/assets/dashboard/balloon.svg') + ')'
          "
          icon="logo-bitcoin"
          :endVal="1234.56"
          prefix="$"
          :duration="5"
          :decimalPlaces="2"
          title="计数配置演示"
      /></Col>
    </Row>
    <Row :gutter="20" class="n-m-r-0">
      <Col :sm="24" :md="24" :lg="8" :style="{ marginBottom: '10px' }">
        <card
          id="card4"
          cardHeight="80px"
          icon="ios-stats"
          iconColor="#ff9900"
          iconSize="20"
          countColor="#2d8cf0"
          countSize="20px"
          :endVal="123456"
          title="大小颜色演示"
          titleSize="16px"
          titleColor="#17233d"
        />
      </Col>
      <Col :sm="24" :md="24" :lg="8" :style="{ marginBottom: '10px' }">
        <card
          id="card5"
          countColor="#fff"
          :endVal="12.34"
          :decimalPlaces="2"
          suffix="%"
          backgroundColor="#5cadff"
          icon="ios-analytics"
          iconColor="#fff"
          titleColor="#fff"
          title="背景色演示"
          :bordered="false"
        />
      </Col>
      <Col :sm="24" :md="24" :lg="8" :style="{ marginBottom: '10px' }">
        <card
          id="card6"
          countColor="#fff"
          :endVal="123456"
          backgroundColor="#c5c8ce"
          icon="ios-analytics"
          iconColor="#fff"
          titleColor="#fff"
          title="背景色演示"
          :bordered="false"
      /></Col>
    </Row>
 
    <h3 class="component-article">props</h3>
    <Table
      :columns="props"
      :data="data1"
      border
      size="small"
      width="1000"
    ></Table>
 
  </div>
</template>
<script>
import { props, events, methods } from "./columns";
import card from "@/views/my-components/widget/card1";
export default {
  components: {
    card,
  },
  data() {
    return {
      props: props,
      events: events,
      methods: methods,
      data1: [
        {
          name: "id",
          desc:
            "卡片中绑定计数器的id,当同时使用两个及以上该组件时,需设定不同的id值加以区分",
          type: "String",
          value: "-",
        },
        {
          name: "cardHeight",
          desc: "卡片高度,需带单位,如100px",
          type: "String",
          value: "102px",
        },
        {
          name: "backgroundColor",
          desc: "卡片背景颜色样式",
          type: "String",
          value: "-",
        },
        {
          name: "backgroundImage",
          desc:
            "卡片背景图片样式(右上角),如'url(' + require('图片链接.png') + ')'",
          type: "String",
          value: "-",
        },
        {
          name: "bordered",
          desc: "是否显示卡片边框",
          type: "Boolan",
          value: "true",
        },
        {
          name: "icon",
          desc: "卡片上方图标(与图片属性image二选一配置)",
          type: "String",
          value: "-",
        },
        {
          name: "iconSize",
          desc: "卡片上方图标大小",
          type: "Number | String",
          value: "26",
        },
        {
          name: "iconColor",
          desc: "卡片上方图标颜色",
          type: "String",
          value: "#478ef9",
        },
        {
          name: "image",
          desc: "卡片上方图标图片(与图标属性icon二选一配置)",
          type: "String",
          value: 'require("@/assets/dashboard/empty.png")',
        },
        {
          name: "width",
          desc: "卡片上方图标图片宽度,需带单位,如26px",
          type: "String",
          value: "26px",
        },
        {
          name: "height",
          desc: "卡片上方图标图片高度,需带单位,如26px",
          type: "String",
          value: "26px",
        },
        {
          name: "prefix",
          desc: "计数数字前缀字符",
          type: "String",
          value: "-",
        },
        {
          name: "endVal",
          desc: "动画计数数字",
          type: "Number",
          value: "-",
        },
        {
          name: "suffix",
          desc: "计数数字后缀字符",
          type: "String",
          value: "-",
        },
        {
          name: "delay",
          desc: "计数延时开始,单位毫秒",
          type: "Number",
          value: "0",
        },
        {
          name: "decimalPlaces",
          desc: "计数数字小数位数",
          type: "Number",
          value: "0",
        },
        {
          name: "duration",
          desc: "计数数字动画持续时间,单位秒,默认2秒",
          type: "Number",
          value: "2",
        },
        {
          name: "options",
          desc: "动画计数数更多参数,详见开源组件countUp.js文档 https://github.com/inorganik/CountUp.js",
          type: "Object",
          value:
            '{ startVal: 0, useEasing: true, useGrouping: true, separator: ",", decimal: "." }',
        },
        {
          name: "countColor",
          desc: "计数数字颜色",
          type: "String",
          value: "#3f4255",
        },
        {
          name: "countSize",
          desc: "计数数字大小,需带单位,如24px",
          type: "String",
          value: "24px",
        },
        {
          name: "countWeight",
          desc: "计数数字字体粗细样式,font-weight值",
          type: "Number",
          value: "600",
        },
        {
          name: "title",
          desc: "卡片下方描述文字",
          type: "String",
          value: "-",
        },
        {
          name: "titleColor",
          desc: "卡片下方描述文字颜色",
          type: "String",
          value: "#b5b5c5",
        },
        {
          name: "titleSize",
          desc: "卡片下方描述文字大小,需带单位,如24px",
          type: "String",
          value: "12px",
        },
        {
          name: "titleWeight",
          desc: "计数数字字体粗细样式,font-weight值",
          type: "Number",
          value: "500",
        },
      ],
    };
  },
  methods: {
  },
  mounted() {},
};
</script>
<style lang="less">
.n-m-r-0 {
  margin-right: 0 !important;
}
</style>