|
@@ -1,7 +1,18 @@
|
|
|
<!-- -->
|
|
|
<template>
|
|
|
<div class="strockplayRedInner">
|
|
|
- <div @click="playHanzi" class="strock-play-box" v-if="playStorkes"></div>
|
|
|
+ <div
|
|
|
+ @click="playHanzi"
|
|
|
+ :class="[
|
|
|
+ 'strock-play-box',
|
|
|
+ themeColor == 'green'
|
|
|
+ ? 'green-border'
|
|
|
+ : themeColor == 'red'
|
|
|
+ ? 'red-border'
|
|
|
+ : 'brown-border',
|
|
|
+ ]"
|
|
|
+ v-if="playStorkes"
|
|
|
+ ></div>
|
|
|
|
|
|
<div :id="targetDiv" class="character-target-div"></div>
|
|
|
</div>
|
|
@@ -11,7 +22,14 @@
|
|
|
const HanziWriter = require("hanzi-writer");
|
|
|
export default {
|
|
|
components: {},
|
|
|
- props: ["targetDiv", "Book_text", "playStorkes", "strokeColor", "wordNum"],
|
|
|
+ props: [
|
|
|
+ "targetDiv",
|
|
|
+ "Book_text",
|
|
|
+ "playStorkes",
|
|
|
+ "strokeColor",
|
|
|
+ "wordNum",
|
|
|
+ "themeColor",
|
|
|
+ ],
|
|
|
data() {
|
|
|
return {
|
|
|
writer: null,
|
|
@@ -84,7 +102,8 @@ export default {
|
|
|
.character-target-div {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
- background: #fff url("../../../../assets/NPC/chinaTianRed.png") center no-repeat;
|
|
|
+ background: #fff url("../../../../assets/NPC/chinaTianRed.png") center
|
|
|
+ no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
@@ -99,13 +118,26 @@ export default {
|
|
|
z-index: 999;
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
- background: url("../../../../assets/NPC/strock-play-red-click.png");
|
|
|
- background-size: 100%;
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
+.red-border {
|
|
|
+ background: url("../../../../assets/NPC/strock-play-red-click.png");
|
|
|
+ background-size: 100%;
|
|
|
+
|
|
|
+}
|
|
|
+.green-border {
|
|
|
+ background: url("../../../../assets/NPC/strock-play-green-click.png");
|
|
|
+ background-size: 100%;
|
|
|
+
|
|
|
+}
|
|
|
+.brown-border {
|
|
|
+ background: url("../../../../assets/NPC/strock-play-yellow-click.png");
|
|
|
+ background-size: 100%;
|
|
|
+
|
|
|
+}
|
|
|
// .strock-play-box:active {
|
|
|
// background: url("../../../../assets/NPC/strock-play-red-click.png");
|
|
|
// background-size: 100%;
|
|
@@ -115,24 +147,26 @@ export default {
|
|
|
height: 160px;
|
|
|
font-size: 28px;
|
|
|
}
|
|
|
-.NNPE-Big-Book-preview-green{
|
|
|
- .character-target-div {
|
|
|
- background: #fff url('../../../../assets/NPC/chinaTianGreen.png') center no-repeat;
|
|
|
- background-size: cover;
|
|
|
- }
|
|
|
- .strock-play-box{
|
|
|
- background: url("../../../../assets/NPC/strock-play-green-click.png");
|
|
|
- background-size: 100%;
|
|
|
- }
|
|
|
+.NNPE-Big-Book-preview-green {
|
|
|
+ .character-target-div {
|
|
|
+ background: #fff url("../../../../assets/NPC/chinaTianGreen.png") center
|
|
|
+ no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ }
|
|
|
+ .strock-play-box {
|
|
|
+ background: url("../../../../assets/NPC/strock-play-green-click.png");
|
|
|
+ background-size: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
-.NNPE-Big-Book-preview-brown{
|
|
|
- .character-target-div {
|
|
|
- background: #fff url('../../../../assets/NPC/chinaTianYellow.png') center no-repeat;
|
|
|
- background-size: cover;
|
|
|
- }
|
|
|
- .strock-play-box{
|
|
|
- background: url("../../../../assets/NPC/strock-play-yellow-click.png");
|
|
|
- background-size: 100%;
|
|
|
- }
|
|
|
+.NNPE-Big-Book-preview-brown {
|
|
|
+ .character-target-div {
|
|
|
+ background: #fff url("../../../../assets/NPC/chinaTianYellow.png") center
|
|
|
+ no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ }
|
|
|
+ .strock-play-box {
|
|
|
+ background: url("../../../../assets/NPC/strock-play-yellow-click.png");
|
|
|
+ background-size: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|