Skip to content

Instantly share code, notes, and snippets.

@ziyoung
Created April 28, 2019 09:30
Show Gist options
  • Save ziyoung/c607caf816321ff5530c3cc1395e3e2e to your computer and use it in GitHub Desktop.
Save ziyoung/c607caf816321ff5530c3cc1395e3e2e to your computer and use it in GitHub Desktop.
测试 element 中的 Markdown loader
const genInlineComponentText = require('./build/md-loader/util').genInlineComponentText;
const template = '<el-input v-model="input" placeholder="请输入内容"></el-input>';
const script = `
export default {
data() {
return {
input: ''
}
}
}`;
const text = genInlineComponentText(template, script);
console.log('text => ', text);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment