@10yun/cv-mobile-ui 0.4.5 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="cv-button-wrap">
|
|
3
|
-
<button
|
|
4
|
-
<button v-else-if="type == 'save'" class="cv-button-item cv-button-save" type="error" @click="parentClick">
|
|
5
|
-
{{ label }}
|
|
6
|
-
</button>
|
|
7
|
-
<button
|
|
8
|
-
v-else-if="type == 'submit'"
|
|
9
|
-
class="cv-button-item cv-button-save"
|
|
10
|
-
type="primary"
|
|
11
|
-
form-type="submit"
|
|
12
|
-
@click="parentClick"
|
|
13
|
-
>
|
|
14
|
-
{{ label }}
|
|
15
|
-
</button>
|
|
16
|
-
<button
|
|
17
|
-
v-else-if="type == 'reset'"
|
|
18
|
-
class="cv-button-item cv-button-cancel"
|
|
19
|
-
type="primary"
|
|
20
|
-
form-type="reset"
|
|
21
|
-
@click="parentClick"
|
|
22
|
-
>
|
|
23
|
-
{{ label }}
|
|
24
|
-
</button>
|
|
25
|
-
<button v-else-if="type == 'cancel'" class="cv-button-item cv-button-cancel" type="primary" @click="parentClick">
|
|
26
|
-
{{ label }}
|
|
27
|
-
</button>
|
|
28
|
-
<button v-else class="cv-button-item" type="primary" @click="parentClick">{{ label }}</button>
|
|
29
|
-
<!-- :style="{ background: themesData.color }" -->
|
|
3
|
+
<button class="cv-button-item" :type="type" :form-type="formType" @click="parentClick"><slot /></button>
|
|
30
4
|
</view>
|
|
31
5
|
</template>
|
|
32
6
|
|
|
@@ -34,28 +8,26 @@
|
|
|
34
8
|
export default {
|
|
35
9
|
name: 'cvButton',
|
|
36
10
|
props: {
|
|
37
|
-
|
|
38
|
-
type: String,
|
|
39
|
-
default: '
|
|
11
|
+
size: {
|
|
12
|
+
type: [String],
|
|
13
|
+
default: 'default'
|
|
40
14
|
},
|
|
41
15
|
type: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: '
|
|
16
|
+
type: [String],
|
|
17
|
+
default: 'default'
|
|
18
|
+
},
|
|
19
|
+
formType: {
|
|
20
|
+
type: [String],
|
|
21
|
+
default: ''
|
|
44
22
|
},
|
|
45
23
|
click: {
|
|
46
|
-
type: Function
|
|
24
|
+
type: [Function]
|
|
47
25
|
}
|
|
48
26
|
},
|
|
49
27
|
data() {
|
|
50
|
-
return {
|
|
51
|
-
themesData: {} // 获取用户主题配置
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
created() {
|
|
55
|
-
if (this.$store) {
|
|
56
|
-
// this.themesData = this.$store.state.storeSystem.themesData || '';
|
|
57
|
-
}
|
|
28
|
+
return {};
|
|
58
29
|
},
|
|
30
|
+
created() {},
|
|
59
31
|
methods: {
|
|
60
32
|
diyClick() {
|
|
61
33
|
if (typeof this.click == 'function') {
|
|
@@ -84,23 +56,12 @@ export default {
|
|
|
84
56
|
border-radius: 40px;
|
|
85
57
|
}
|
|
86
58
|
|
|
87
|
-
.cv-button-
|
|
59
|
+
.cv-button-item2 {
|
|
88
60
|
display: flex;
|
|
89
61
|
justify-content: center;
|
|
90
62
|
align-items: center;
|
|
91
63
|
width: 275px;
|
|
92
64
|
height: 40px;
|
|
93
|
-
background-color: #62a9df;
|
|
94
|
-
box-shadow: 0rpx 5rpx 10rpx rgba(0, 0, 0, 0.2);
|
|
95
65
|
margin: 10px auto;
|
|
96
66
|
}
|
|
97
|
-
.cv-button-save {
|
|
98
|
-
background: #e4393c;
|
|
99
|
-
background: linear-gradient(to right, #ffa300, #ff8a00, #e95f00);
|
|
100
|
-
}
|
|
101
|
-
.cv-button-cancel {
|
|
102
|
-
background-color: #fff;
|
|
103
|
-
border: 1px solid #d4d4d4;
|
|
104
|
-
color: #202020;
|
|
105
|
-
}
|
|
106
67
|
</style>
|