@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,6 +1,6 @@
1
1
  {
2
2
  "name": "@10yun/cv-mobile-ui",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "十云cvjs移动端ui,适用uniapp",
5
5
  "author": "",
6
6
  "license": "Apache-2.0",
@@ -1,32 +1,6 @@
1
1
  <template>
2
2
  <view class="cv-button-wrap">
3
- <button v-if="type == 'pay'" class="cv-button-item cv-button-pay" type="primary" @click="parentClick">{{ label }}</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
- label: {
38
- type: String,
39
- default: 'save'
11
+ size: {
12
+ type: [String],
13
+ default: 'default'
40
14
  },
41
15
  type: {
42
- type: String,
43
- default: 'save'
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-pay {
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>
@@ -94,6 +94,7 @@ export default {
94
94
  padding: 9px;
95
95
  align-items: stretch;
96
96
  align-content: flex-start;
97
+ margin-top: 5px;
97
98
  }
98
99
  .cv-textarea__box {
99
100
  flex: 1;