March 2019

To tell you the truth, I haven't seen API for such a long time. Vue rediscovered my blog these days. Vue.directive It looks great.

Always see here. Vue.use (ElementUi) Where to use Vue.use (Axios) It has always been at the level of application, and I find that the consumption of markdown parsing examples is a little too large. It may be a lot easier to process directives directly.

Describe the process briefly.

The components that render the article will query whether there is a corresponding article in the local record during the lifecycle of the installation. If there is no request, the request will be searched online, otherwise 404.
The article is for the content of markdown, considering that front-end processing can be directly resolved (after all, the front-end performance is over 233), so as to reduce the burden of logical processing on the back end and consistency.
The markdown parser is used. Marked The completion logic is as follows

 //main.js

import Vue from'vue'
import App from'./App'
import markdown from'./markdown';} / / injection of markdown resolver, (()) = (=).

Integrated marked makes plug-in form exposure

 //markdown.js

import marked from'marked'
import ('highlight.js/styles/atom-one-dark.css') 

marked.setOptions ({
renderer: new marked.Renderer ()), 
pedantic: false, 
pedantic:, false, e, R, D, R, D, R, D, R, D, C, C, R, R, R, R, R, R, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, etc.

Use on labels V-markdown instructions

 Interface = function (), {
return new new ({}}) = ({}}) =} {} (}) {}}, {}} {}}, {}}, {}}, {}}, {}}, or finding local articles = {}}, (= {}} (=) > {}; this is an interface for searching for articles; {}); (404); //Test.vue



">}

return res; {}}, 
mounted () {/ / ID to find articles 
let a = this.handlerArticle (123); 

if (a = = = 404) {/ / jump to error page}} / / processing loading
this.isNotFound = false; = =}; / / save content directly to variable

Complete code is read: Https://gist.github.com/flxxyz/93e009d32ecd7e0c6785a52571577cd7