| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <template>
- <el-dialog
- title="更新日志"
- :visible.sync="visible"
- width="800px"
- @close="visible=false">
- <div
- ref="content"
- id="release">
- </div>
- <span slot="footer">
- <el-button @click="visible = false">取消</el-button>
- <el-button
- type="primary"
- @click="visible = false">确定</el-button>
- </span>
- </el-dialog>
- </template>
- <script>
- export default {
- data () {
- return {
- visible: false,
- htmlData: ''
- }
- },
- mounted () {
- },
- methods: {
- render () {
- this.visible = true
- const logPath = require('path').join(__static, 'CHANGELOG.md')
- const content = require('fs').readFileSync(logPath, 'utf-8')
- this.$nextTick(() => {
- this.$refs.content.innerHTML = require('marked')(content).replace(/<\/?a.*?>/g, '')
- })
- }
- }
- }
- </script>
- <style lang="scss">
- @import './release.scss';
- </style>
|