mali-applet-ui 0.0.27 → 0.0.28

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.
@@ -24,16 +24,34 @@ export default {
24
24
 
25
25
  }
26
26
  },
27
+ computed: {
28
+ selectItem () {
29
+ return this.options.find(item => item.value === this.value)
30
+ }
31
+ },
32
+ watch: {
33
+ value () {
34
+ this.updateTitle(this.selectItem)
35
+ }
36
+ },
37
+ created () {
38
+ this.$nextTick(() => {
39
+ this.updateTitle(this.selectItem)
40
+ })
41
+ },
27
42
  methods: {
43
+ updateTitle (option) {
44
+ if (option.name) {
45
+ uni.setNavigationBarTitle({
46
+ title: item.name
47
+ })
48
+ }
49
+ },
28
50
  clickEvent (option) {
29
51
  const value = option.value
52
+ this.updateTitle(option)
30
53
  this.$emit('input', value)
31
54
  this.$emit('change', { value, option })
32
- if (option.url) {
33
- uni.redirectTo({
34
- url: option.url
35
- })
36
- }
37
55
  }
38
56
  }
39
57
  }
@@ -48,6 +66,7 @@ export default {
48
66
  z-index: 88;
49
67
  color: $uni-text-color;
50
68
  background: #FFFFFF;
69
+ border-top: 1px solid #e5e5e5;
51
70
  .ml-tabbar-list {
52
71
  width: 100%;
53
72
  height: 120rpx;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",