var app = new Vue({ el: '#code-effect', data: { url: '' }, mounted() { this.init() }, methods: { init() { let post = this.$refs.post.innerHTML let name = post.split('
@')[1].split('
')[0] this.url = `https://blog.wy310.cn/wp-content/themes/hestia/my-pages/${name}` // this.url = `http://localhost:8888/wyblog/wp-content/themes/hestia/my-pages/${name}` } } })