|  | @@ -1,59 +1,43 @@
 | 
	
		
			
				|  |  |  <!--  -->
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  |    <div class="practice practiceSingle">
 | 
	
		
			
				|  |  | -    <div
 | 
	
		
			
				|  |  | -      :key="item.con + index"
 | 
	
		
			
				|  |  | -      class="Book_content"
 | 
	
		
			
				|  |  | -      v-for="(item, index) in cur.stem"
 | 
	
		
			
				|  |  | -    >
 | 
	
		
			
				|  |  |        <img
 | 
	
		
			
				|  |  |          @click="changePraShow()"
 | 
	
		
			
				|  |  |          class="close-icon"
 | 
	
		
			
				|  |  |          src="../../../../assets/NPC/close-icon-red.png"
 | 
	
		
			
				|  |  |        />
 | 
	
		
			
				|  |  | -      <el-tabs type="border-card">
 | 
	
		
			
				|  |  | -        <el-tab-pane label="简体">
 | 
	
		
			
				|  |  | -            <div class="right-content">
 | 
	
		
			
				|  |  | -              <div class="right-strockred">
 | 
	
		
			
				|  |  | -                  <Freewrite
 | 
	
		
			
				|  |  | -                    :cur="cur"
 | 
	
		
			
				|  |  | -                    :lineColor="hanzicolor"
 | 
	
		
			
				|  |  | -                    :lineWidth="hanziweight"
 | 
	
		
			
				|  |  | -                    ref="freewrite"
 | 
	
		
			
				|  |  | -                  />
 | 
	
		
			
				|  |  | -                  <div class="footer">
 | 
	
		
			
				|  |  | -                    <div class="pen-colors">
 | 
	
		
			
				|  |  | -                      <a @click="resetHuahua(index)" class="clean-btn"></a>
 | 
	
		
			
				|  |  | -                    </div>
 | 
	
		
			
				|  |  | -                  </div>
 | 
	
		
			
				|  |  | -              </div>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -              <ul class="nav-list">
 | 
	
		
			
				|  |  | -                <li
 | 
	
		
			
				|  |  | -                  :class="navIndex == 0 ? 'active' : ''"
 | 
	
		
			
				|  |  | -                  @click="changeNav(0)"
 | 
	
		
			
				|  |  | -                >
 | 
	
		
			
				|  |  | -                  
 | 
	
		
			
				|  |  | -                </li>
 | 
	
		
			
				|  |  | -                <li
 | 
	
		
			
				|  |  | -                  :class="navIndex == 1 ? 'active' : ''"
 | 
	
		
			
				|  |  | -                  @click="changeNav(1)"
 | 
	
		
			
				|  |  | -                >
 | 
	
		
			
				|  |  | -                  默写
 | 
	
		
			
				|  |  | -                </li>
 | 
	
		
			
				|  |  | -              </ul>
 | 
	
		
			
				|  |  | +        <div class="right-content">
 | 
	
		
			
				|  |  | +            <div class="right-strockred">
 | 
	
		
			
				|  |  | +                <Freewrite
 | 
	
		
			
				|  |  | +                :cur="cur"
 | 
	
		
			
				|  |  | +                :lineColor="hanzicolor"
 | 
	
		
			
				|  |  | +                :lineWidth="hanziweight"
 | 
	
		
			
				|  |  | +                :handleGetImg="handleGetImg"
 | 
	
		
			
				|  |  | +                :changePraShow="changePraShow"
 | 
	
		
			
				|  |  | +                ref="freewrite"
 | 
	
		
			
				|  |  | +                />
 | 
	
		
			
				|  |  |              </div>
 | 
	
		
			
				|  |  | -        </el-tab-pane>
 | 
	
		
			
				|  |  | -        <el-tab-pane label="繁体"> </el-tab-pane>
 | 
	
		
			
				|  |  | -      </el-tabs>
 | 
	
		
			
				|  |  | -    </div>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            <ul class="nav-list">
 | 
	
		
			
				|  |  | +            <li
 | 
	
		
			
				|  |  | +                @click="resetHuahua()"
 | 
	
		
			
				|  |  | +            >
 | 
	
		
			
				|  |  | +                重写
 | 
	
		
			
				|  |  | +            </li>
 | 
	
		
			
				|  |  | +            <li
 | 
	
		
			
				|  |  | +                @click="handleWriteImg()"
 | 
	
		
			
				|  |  | +            >
 | 
	
		
			
				|  |  | +                确定
 | 
	
		
			
				|  |  | +            </li>
 | 
	
		
			
				|  |  | +            </ul>
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import Strockplayredline from "./Strockplayredline.vue";
 | 
	
		
			
				|  |  |  import Strockred from "./Strockred.vue";
 | 
	
		
			
				|  |  | -import Freewrite from "./Freewrite.vue";
 | 
	
		
			
				|  |  | +import Freewrite from "./FreewriteWord.vue";
 | 
	
		
			
				|  |  |  // import ChinaDict from "./ChinaDict";
 | 
	
		
			
				|  |  |  // import Audio from "./AudioRed.vue";
 | 
	
		
			
				|  |  |  export default {
 | 
	
	
		
			
				|  | @@ -81,6 +65,7 @@ export default {
 | 
	
		
			
				|  |  |        thickpen: require("../../../../assets/common/thick-pen.png"),
 | 
	
		
			
				|  |  |        thickpenActive: require("../../../../assets/common/thick-pen-active.png"),
 | 
	
		
			
				|  |  |        collectFlag: false, // 是否收藏
 | 
	
		
			
				|  |  | +      imgSrc: ''
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    computed: {},
 | 
	
	
		
			
				|  | @@ -104,10 +89,16 @@ export default {
 | 
	
		
			
				|  |  |      changeLearnMode(mode) {
 | 
	
		
			
				|  |  |        this.learn_mode = mode;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    resetHuahua(index) {
 | 
	
		
			
				|  |  | -      console.log(this.$refs.freewrite);
 | 
	
		
			
				|  |  | -      this.$refs.freewrite[index].handelReset();
 | 
	
		
			
				|  |  | +    resetHuahua() {
 | 
	
		
			
				|  |  | +      this.$refs.freewrite.handelReset();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    handleWriteImg () {
 | 
	
		
			
				|  |  | +        this.$refs.freewrite.handleGenerate()
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    // 得到画
 | 
	
		
			
				|  |  | +    handleGetImg(){
 | 
	
		
			
				|  |  | +        this.imgSrc = this.$refs.freewrite.resultImg
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    //生命周期 - 创建完成(可以访问当前this实例)
 | 
	
		
			
				|  |  |    created() {
 | 
	
	
		
			
				|  | @@ -130,13 +121,14 @@ export default {
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  <style lang='scss' scoped>
 | 
	
		
			
				|  |  |  .practice {
 | 
	
		
			
				|  |  | -  width: 504px;
 | 
	
		
			
				|  |  | -  max-height: 434px;
 | 
	
		
			
				|  |  | +  width: 320px;
 | 
	
		
			
				|  |  | +  max-height: 400px;
 | 
	
		
			
				|  |  |    overflow: auto;
 | 
	
		
			
				|  |  |    margin: 0 auto;
 | 
	
		
			
				|  |  |    background: #f3f3f3;
 | 
	
		
			
				|  |  |    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.15);
 | 
	
		
			
				|  |  |    border-radius: 8px;
 | 
	
		
			
				|  |  | +  position: relative;
 | 
	
		
			
				|  |  |    .clean-btn {
 | 
	
		
			
				|  |  |      width: 16px;
 | 
	
		
			
				|  |  |      height: 16px;
 | 
	
	
		
			
				|  | @@ -179,16 +171,16 @@ export default {
 | 
	
		
			
				|  |  |    .right-content {
 | 
	
		
			
				|  |  |      position: relative;
 | 
	
		
			
				|  |  |      width: 288px;
 | 
	
		
			
				|  |  | -    height: 338px;
 | 
	
		
			
				|  |  | +    height: 360px;
 | 
	
		
			
				|  |  |      background: #f3f3f3;
 | 
	
		
			
				|  |  |      border-radius: 16px;
 | 
	
		
			
				|  |  |      box-sizing: border-box;
 | 
	
		
			
				|  |  | -    padding: 16px;
 | 
	
		
			
				|  |  | +    padding: 30px 16px;
 | 
	
		
			
				|  |  |      display: flex;
 | 
	
		
			
				|  |  |      flex-direction: column;
 | 
	
		
			
				|  |  |      justify-content: flex-start;
 | 
	
		
			
				|  |  |      align-items: center;
 | 
	
		
			
				|  |  | -    margin-left: 24px;
 | 
	
		
			
				|  |  | +    margin: 0 auto;
 | 
	
		
			
				|  |  |      .nav-list {
 | 
	
		
			
				|  |  |        width: 100%;
 | 
	
		
			
				|  |  |        height: 34px;
 | 
	
	
		
			
				|  | @@ -210,10 +202,10 @@ export default {
 | 
	
		
			
				|  |  |          cursor: pointer;
 | 
	
		
			
				|  |  |          background: #ffe6e6;
 | 
	
		
			
				|  |  |          border-radius: 8px;
 | 
	
		
			
				|  |  | -        &.active {
 | 
	
		
			
				|  |  | +        // &:hover {
 | 
	
		
			
				|  |  |            background: #ff5757;
 | 
	
		
			
				|  |  |            color: #ffffff;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +        // }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      .right-strockred {
 |