mali-applet-ui 0.1.18 → 0.1.19

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.
@@ -132,9 +132,21 @@ export default {
132
132
  background: $uni-color-error;
133
133
  border-color: $uni-color-error;
134
134
  }
135
- }
136
- &.is-round {
137
- border-radius: 40rpx;
135
+ &.is-round {
136
+ border-radius: 50rpx;
137
+ &.size-medium {
138
+ padding: 0 40rpx;
139
+ border-radius: 60rpx;
140
+ }
141
+ &.size-small {
142
+ padding: 0 30rpx;
143
+ border-radius: 40rpx;
144
+ }
145
+ &.size-mini {
146
+ padding: 0 20rpx;
147
+ border-radius: 30rpx;
148
+ }
149
+ }
138
150
  }
139
151
  }
140
152
  </style>
@@ -12,6 +12,8 @@ export default {
12
12
  },
13
13
  props: {
14
14
  span: [String, Number],
15
+ url: String,
16
+ redirect: Boolean,
15
17
  align: String,
16
18
  width: String,
17
19
  className: String
@@ -35,6 +37,17 @@ export default {
35
37
  this.$emit('click', {})
36
38
  },
37
39
  tapEvent () {
40
+ if (this.url) {
41
+ if (this.redirect) {
42
+ uni.redirectTo({
43
+ url: this.url
44
+ })
45
+ } else {
46
+ uni.navigateTo({
47
+ url: this.url
48
+ })
49
+ }
50
+ }
38
51
  this.$emit('tap', {})
39
52
  }
40
53
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <uni-datetime-picker :class="className" v-model="selectVal" type="datetime" :start="minDate" :end="maxDate" @change="changeEvent" :border="border"/>
2
+ <uni-datetime-picker :class="className" v-model="selectVal" type="datetime" :start="minDate" :end="maxDate" :hide-second="hideSecond" @change="changeEvent" :border="border"/>
3
3
  </template>
4
4
 
5
5
  <script>
@@ -13,6 +13,7 @@ export default {
13
13
  border: Boolean,
14
14
  minDate: [String, Number],
15
15
  maxDate: [String, Number],
16
+ hideSecond: Boolean,
16
17
  className: String
17
18
  },
18
19
  data () {
@@ -36,5 +36,8 @@ export default {
36
36
  padding: 0 20rpx;
37
37
  border-bottom: 1px solid #e5e5e5;
38
38
  }
39
+ .ml-form-group-content {
40
+ padding-bottom: 20rpx;
41
+ }
39
42
  }
40
43
  </style>
@@ -0,0 +1,90 @@
1
+ <template>
2
+ <view class="ml-toast" :class="[className || '', {'is-loading': type === 'loading', 'is-visible': value}]">
3
+ <view class="ml-toast-warpper">
4
+ <view class="ml-toast-chunk">
5
+ <view class="ml-toast-icon">
6
+ <ml-icon v-if="type === 'success'" name="success-filling" />
7
+ <ml-icon v-else-if="type === 'error'" name="delete-filling" />
8
+ <ml-icon v-else-if="type === 'warning'" name="prompt-filling" />
9
+ <ml-icon v-else-if="type === 'info'" name="info-fill" />
10
+ <ml-icon v-else-if="type === 'loading'" name="shuaxin" />
11
+ </view>
12
+ <view class="ml-toast-content">{{ text }}</view>
13
+ </view>
14
+ </view>
15
+ </view>
16
+ </template>
17
+
18
+ <script>
19
+ export default {
20
+ name: 'MlToast',
21
+ props: {
22
+ value: Boolean,
23
+ type: String,
24
+ content: String,
25
+ className: String
26
+ },
27
+ computed: {
28
+ text () {
29
+ if (this.content) {
30
+ return this.content
31
+ }
32
+ return ''
33
+ }
34
+ }
35
+ }
36
+ </script>
37
+
38
+ <style lang="scss">
39
+ .ml-toast {
40
+ display: none;
41
+ position: fixed;
42
+ top: 0;
43
+ left: 0;
44
+ width: 100%;
45
+ height: 100vh;
46
+ z-index: 999;
47
+ background-color: rgba(0, 0, 0, 0.4);
48
+ @keyframes rollCircle {
49
+ 0% {
50
+ transform: rotate(0deg)
51
+ }
52
+ to {
53
+ transform: rotate(1turn)
54
+ }
55
+ }
56
+ &.is-visible {
57
+ display: block;
58
+ }
59
+ &.is-loading {
60
+ .ml-toast-icon {
61
+ animation: rollCircle 1s linear infinite;
62
+ }
63
+ }
64
+ .ml-toast-warpper {
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ position: absolute;
69
+ top: 50%;
70
+ left: 50%;
71
+ width: 200rpx;
72
+ height: 200rpx;
73
+ border-radius: 20rpx;
74
+ transform: translate(-50%, -50%);
75
+ text-align: center;
76
+ background: #4C4C4C;
77
+ color: rgba(255, 255, 255, 0.9);
78
+ .ml-toast-icon {
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ color: rgba(255, 255, 255, 0.9);
83
+ font-size: 50rpx;
84
+ }
85
+ .ml-toast-content {
86
+ padding: 15rpx 20rpx 15rpx 20rpx;
87
+ }
88
+ }
89
+ }
90
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",