生成器相关

This commit is contained in:
yulixing 2019-11-21 16:55:06 +08:00
parent 2a2677227d
commit dc46c15c50

View File

@ -37,9 +37,9 @@
</div> </div>
<!-- Modal --> <!-- Modal -->
<el-dialog :before-close="closeModal" :visible.sync="modalVisible" title="预览" width="30%"> <el-dialog :before-close="closeModal" :visible.sync="modalVisible" title="预览" width="30%">
<p>{{previewText}}</p> <p :key="index" v-for="(item, index) in previewText">{{item}}</p>
<span class="dialog-footer" slot="footer"> <span class="dialog-footer" slot="footer">
<el-button @click="modalVisible = false" type="primary"> </el-button> <el-button @click="modalVisible = false"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -69,7 +69,7 @@ export default {
] ]
}, },
modalVisible: false, modalVisible: false,
previewText: '' previewText: []
} }
}, },
mounted() { mounted() {
@ -320,7 +320,7 @@ export default {
return Math.floor(Math.random() * Math.pow(10, p1.length)) return Math.floor(Math.random() * Math.pow(10, p1.length))
}) })
} }
this.previewText = text this.previewText = text.split('\n')
}, },
// //
randomNum(n, v) { randomNum(n, v) {