(color)
| 37 | color: { |
| 38 | type: String, |
| 39 | observer(color) { |
| 40 | let style = ''; |
| 41 | if (color) { |
| 42 | style += `color: ${this.data.plain ? color : 'white'};`; |
| 43 | if (!this.data.plain) { |
| 44 | // Use background instead of backgroundColor to make linear-gradient work |
| 45 | style += `background: ${color};`; |
| 46 | } |
| 47 | // hide border when color is linear-gradient |
| 48 | if (color.indexOf('gradient') !== -1) { |
| 49 | style += 'border: 0;'; |
| 50 | } |
| 51 | else { |
| 52 | style += `border-color: ${color};`; |
| 53 | } |
| 54 | } |
| 55 | if (style !== this.data.style) { |
| 56 | this.setData({ style }); |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | }, |
| 61 | methods: { |
nothing calls this directly
no outgoing calls
no test coverage detected