|
@@ -65,13 +65,18 @@
|
|
|
|
|
|
<lv-button @click="small">变小</lv-button>
|
|
|
<lv-button @click="big">变大</lv-button>
|
|
|
+<lv-button @click="setRed">变红</lv-button>
|
|
|
+<lv-button @click="setYellow">变黄</lv-button>
|
|
|
+<lv-button @click="setBlue">变蓝</lv-button>
|
|
|
+<lv-button @click="setGreen">变绿</lv-button>
|
|
|
+<lv-button @click="setOrigin">还原</lv-button>
|
|
|
|
|
|
----
|
|
|
|
|
|
-<lv-icon type="add" :fontSize="fontSize"></lv-icon>
|
|
|
-<lv-icon type="wechat" :fontSize="fontSize"></lv-icon>
|
|
|
-<lv-icon type="friend" :fontSize="fontSize"></lv-icon>
|
|
|
-<lv-icon type="addRound" :fontSize="fontSize"></lv-icon>
|
|
|
+<lv-icon type="add" :fontSize="fontSize" :color="fontColor"></lv-icon>
|
|
|
+<lv-icon type="wechat" :fontSize="fontSize" :color="fontColor"></lv-icon>
|
|
|
+<lv-icon type="friend" :fontSize="fontSize" :color="fontColor"></lv-icon>
|
|
|
+<lv-icon type="addRound" :fontSize="fontSize" :color="fontColor"></lv-icon>
|
|
|
|
|
|
```vue
|
|
|
<lv-icon type="add" fontSize="60"></lv-icon>
|
|
@@ -114,6 +119,7 @@
|
|
|
data () {
|
|
|
return {
|
|
|
fontSize: 60,
|
|
|
+ fontColor: '#333',
|
|
|
showDefaultDialog: false,
|
|
|
}
|
|
|
},
|
|
@@ -123,6 +129,22 @@
|
|
|
},
|
|
|
big () {
|
|
|
this.fontSize = this.fontSize + 10;
|
|
|
+ },
|
|
|
+ setRed () {
|
|
|
+ this.fontColor = 'red';
|
|
|
+ },
|
|
|
+ setYellow () {
|
|
|
+ this.fontColor = 'yellow';
|
|
|
+ },
|
|
|
+ setBlue () {
|
|
|
+ this.fontColor = 'blue';
|
|
|
+ },
|
|
|
+ setGreen () {
|
|
|
+ this.fontColor = 'green';
|
|
|
+ },
|
|
|
+ setOrigin () {
|
|
|
+ this.fontSize = 60;
|
|
|
+ this.fontColor = '#000';
|
|
|
}
|
|
|
}
|
|
|
}
|