|  | @@ -12,13 +12,10 @@
 | 
	
		
			
				|  |  |        <div v-for="(item, index) in data.option_list" :key="index" :class="['words-item']">
 | 
	
		
			
				|  |  |          <template v-if="item.content && item.content.trim() && item.strokes">
 | 
	
		
			
				|  |  |            <div
 | 
	
		
			
				|  |  | -            v-if="data.property.learn_type !== 'learn'"
 | 
	
		
			
				|  |  | +            v-if="data.property.learn_type !== 'dictation'"
 | 
	
		
			
				|  |  |              class="words-top"
 | 
	
		
			
				|  |  |              :style="{
 | 
	
		
			
				|  |  | -              width:
 | 
	
		
			
				|  |  | -                data.property.learn_type === 'paint'
 | 
	
		
			
				|  |  | -                  ? 64 * (writer_number + 6) + 'px'
 | 
	
		
			
				|  |  | -                  : 64 * (writer_number + 1) + 'px',
 | 
	
		
			
				|  |  | +              width: 64 * (writer_number + 1 > writer_number_yuan ? writer_number_yuan : writer_number + 1) + 'px',
 | 
	
		
			
				|  |  |              }"
 | 
	
		
			
				|  |  |            >
 | 
	
		
			
				|  |  |              <div class="words-left">
 | 
	
	
		
			
				|  | @@ -28,7 +25,7 @@
 | 
	
		
			
				|  |  |              <p class="words-right">{{ item.definition }}</p>
 | 
	
		
			
				|  |  |              <p class="words-right">{{ item.collocation }}</p>
 | 
	
		
			
				|  |  |            </div>
 | 
	
		
			
				|  |  | -          <template v-if="data.property.learn_type === 'paint'">
 | 
	
		
			
				|  |  | +          <div class="card-box" v-if="data.property.learn_type === 'paint'">
 | 
	
		
			
				|  |  |              <!-- 描红 -->
 | 
	
		
			
				|  |  |              <Strockplayredline
 | 
	
		
			
				|  |  |                :play-storkes="true"
 | 
	
	
		
			
				|  | @@ -38,16 +35,19 @@
 | 
	
		
			
				|  |  |                :class="['strock-chinese', 'border-right-none']"
 | 
	
		
			
				|  |  |              />
 | 
	
		
			
				|  |  |              <Strockred
 | 
	
		
			
				|  |  | -              v-for="itemI in 5"
 | 
	
		
			
				|  |  | +              v-for="itemI in writer_number"
 | 
	
		
			
				|  |  |                :key="itemI + data.property.learn_type"
 | 
	
		
			
				|  |  |                :book-text="item.content"
 | 
	
		
			
				|  |  |                :hanzi-color="hanzi_color"
 | 
	
		
			
				|  |  |                :reset="true"
 | 
	
		
			
				|  |  |                :target-div="'write-praT' + item.content + itemI + Math.random().toString(36).substring(2, 10)"
 | 
	
		
			
				|  |  |                :book-strokes="item.strokes"
 | 
	
		
			
				|  |  | -              :class="['strock-chinese', itemI !== 5 ? 'border-right-none' : '']"
 | 
	
		
			
				|  |  | +              :class="[
 | 
	
		
			
				|  |  | +                'strock-chinese',
 | 
	
		
			
				|  |  | +                (itemI + 1) % writer_number_yuan !== 0 && itemI !== writer_number ? 'border-right-none' : '',
 | 
	
		
			
				|  |  | +              ]"
 | 
	
		
			
				|  |  |              />
 | 
	
		
			
				|  |  | -            <div
 | 
	
		
			
				|  |  | +            <!-- <div
 | 
	
		
			
				|  |  |                v-for="(items, indexs) in item.imgArr"
 | 
	
		
			
				|  |  |                :key="indexs"
 | 
	
		
			
				|  |  |                :class="['strockplay-newWord border-left-none']"
 | 
	
	
		
			
				|  | @@ -60,9 +60,9 @@
 | 
	
		
			
				|  |  |                  :src="items.strokes_image_url"
 | 
	
		
			
				|  |  |                  alt=""
 | 
	
		
			
				|  |  |                />
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -          </template>
 | 
	
		
			
				|  |  | -          <template v-else-if="data.property.learn_type === 'write'">
 | 
	
		
			
				|  |  | +            </div> -->
 | 
	
		
			
				|  |  | +          </div>
 | 
	
		
			
				|  |  | +          <div class="card-box" v-else-if="data.property.learn_type === 'write'">
 | 
	
		
			
				|  |  |              <!-- 书写 -->
 | 
	
		
			
				|  |  |              <Strockplayredline
 | 
	
		
			
				|  |  |                :play-storkes="true"
 | 
	
	
		
			
				|  | @@ -72,7 +72,10 @@
 | 
	
		
			
				|  |  |                :class="['strock-chinese']"
 | 
	
		
			
				|  |  |              />
 | 
	
		
			
				|  |  |              <div v-for="(items, indexs) in item.imgArr" :key="indexs" class="con-box">
 | 
	
		
			
				|  |  | -              <div :class="['strockplay-newWord border-left-none']" @click="freeWrite(items, index, indexs)">
 | 
	
		
			
				|  |  | +              <div
 | 
	
		
			
				|  |  | +                :class="['strockplay-newWord', (indexs + 1) % writer_number_yuan !== 0 ? 'border-left-none' : '']"
 | 
	
		
			
				|  |  | +                @click="freeWrite(items, index, indexs)"
 | 
	
		
			
				|  |  | +              >
 | 
	
		
			
				|  |  |                  <SvgIcon icon-class="hanzi-writer-bg" class="character-target-bg" />
 | 
	
		
			
				|  |  |                  <img
 | 
	
		
			
				|  |  |                    v-if="!play_status && items && items.strokes_image_url"
 | 
	
	
		
			
				|  | @@ -82,8 +85,8 @@
 | 
	
		
			
				|  |  |                  />
 | 
	
		
			
				|  |  |                </div>
 | 
	
		
			
				|  |  |              </div>
 | 
	
		
			
				|  |  | -          </template>
 | 
	
		
			
				|  |  | -          <template v-else>
 | 
	
		
			
				|  |  | +          </div>
 | 
	
		
			
				|  |  | +          <div class="card-box" v-else>
 | 
	
		
			
				|  |  |              <div class="words-info">
 | 
	
		
			
				|  |  |                <AudioPlay :file-id="item.audio_file_id" theme-color="gray" />
 | 
	
		
			
				|  |  |                <span class="pinyin">{{ item.pinyin }}</span>
 | 
	
	
		
			
				|  | @@ -95,7 +98,7 @@
 | 
	
		
			
				|  |  |                :book-strokes="item.strokes"
 | 
	
		
			
				|  |  |                class="strock-chinese"
 | 
	
		
			
				|  |  |              />
 | 
	
		
			
				|  |  | -          </template>
 | 
	
		
			
				|  |  | +          </div>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
	
		
			
				|  | @@ -165,19 +168,23 @@ export default {
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      // 初始化数据
 | 
	
		
			
				|  |  |      handleData() {
 | 
	
		
			
				|  |  | -      if (
 | 
	
		
			
				|  |  | -        document.getElementsByClassName('preview-content') &&
 | 
	
		
			
				|  |  | -        document.getElementsByClassName('preview-content')[0] &&
 | 
	
		
			
				|  |  | -        !this.writer_number
 | 
	
		
			
				|  |  | -      ) {
 | 
	
		
			
				|  |  | -        this.writer_number_yuan =
 | 
	
		
			
				|  |  | -          Math.floor((document.getElementsByClassName('preview-content')[0].clientWidth - 128) / 64) - 1;
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (this.data.property.learn_type === 'paint') {
 | 
	
		
			
				|  |  | -        this.writer_number = this.writer_number_yuan - 5;
 | 
	
		
			
				|  |  | -      } else {
 | 
	
		
			
				|  |  | -        this.writer_number = this.writer_number_yuan;
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +      // if (
 | 
	
		
			
				|  |  | +      //   document.getElementsByClassName('preview-content') &&
 | 
	
		
			
				|  |  | +      //   document.getElementsByClassName('preview-content')[0] &&
 | 
	
		
			
				|  |  | +      //   !this.writer_number
 | 
	
		
			
				|  |  | +      // ) {
 | 
	
		
			
				|  |  | +      //   this.writer_number_yuan =
 | 
	
		
			
				|  |  | +      //     Math.floor((document.getElementsByClassName('preview-content')[0].clientWidth - 128) / 64) - 1;
 | 
	
		
			
				|  |  | +      // }
 | 
	
		
			
				|  |  | +      // if (this.data.property.learn_type === 'paint') {
 | 
	
		
			
				|  |  | +      //   this.writer_number = this.writer_number_yuan - 5;
 | 
	
		
			
				|  |  | +      // } else {
 | 
	
		
			
				|  |  | +      //   this.writer_number = this.writer_number_yuan;
 | 
	
		
			
				|  |  | +      // }
 | 
	
		
			
				|  |  | +      this.writer_number_yuan = Math.floor(
 | 
	
		
			
				|  |  | +        (document.getElementsByClassName('preview-content')[0].clientWidth - 128) / 64,
 | 
	
		
			
				|  |  | +      );
 | 
	
		
			
				|  |  | +      this.writer_number = this.data.property.tian_number ? this.data.property.tian_number * 1 : 8;
 | 
	
		
			
				|  |  |        this.data.option_list.forEach((item) => {
 | 
	
		
			
				|  |  |          if (item.content.trim()) {
 | 
	
		
			
				|  |  |            let arr = [];
 | 
	
	
		
			
				|  | @@ -254,7 +261,6 @@ export default {
 | 
	
		
			
				|  |  |        width: 100%;
 | 
	
		
			
				|  |  |        min-height: 30px;
 | 
	
		
			
				|  |  |        border: 1px solid #e81b1b;
 | 
	
		
			
				|  |  | -      border-bottom: none;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        .words-left {
 | 
	
		
			
				|  |  |          box-sizing: border-box;
 | 
	
	
		
			
				|  | @@ -304,6 +310,11 @@ export default {
 | 
	
		
			
				|  |  |        margin-bottom: 9px;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    .card-box {
 | 
	
		
			
				|  |  | +      display: flex;
 | 
	
		
			
				|  |  | +      flex-wrap: wrap;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      .pinyin {
 | 
	
		
			
				|  |  |        font-family: 'League';
 | 
	
		
			
				|  |  |        font-size: 12px;
 | 
	
	
		
			
				|  | @@ -313,6 +324,7 @@ export default {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      .strock-chinese {
 | 
	
		
			
				|  |  |        border: 1px solid #e81b1b;
 | 
	
		
			
				|  |  | +      border-top: none;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      .strockplay-newWord {
 | 
	
	
		
			
				|  | @@ -322,6 +334,7 @@ export default {
 | 
	
		
			
				|  |  |        width: 64px;
 | 
	
		
			
				|  |  |        height: 64px;
 | 
	
		
			
				|  |  |        border: 1px solid #e81b1b;
 | 
	
		
			
				|  |  | +      border-top: none;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        .character-target-bg,
 | 
	
		
			
				|  |  |        .hanzi-writer-img {
 |