fix markdown.
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/commit/319d390d Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/tree/319d390d Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/diff/319d390d Branch: refs/heads/master Commit: 319d390d1940a3bb1852070d340b8794d847b34d Parents: 910fbcb Author: MrRaindrop <[email protected]> Authored: Thu Jan 18 15:50:11 2018 +0800 Committer: MrRaindrop <[email protected]> Committed: Thu Jan 18 15:50:11 2018 +0800 ---------------------------------------------------------------------- source/guide/extend-web-render.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/319d390d/source/guide/extend-web-render.md ---------------------------------------------------------------------- diff --git a/source/guide/extend-web-render.md b/source/guide/extend-web-render.md index 8eb5871..8a0d627 100644 --- a/source/guide/extend-web-render.md +++ b/source/guide/extend-web-render.md @@ -8,7 +8,7 @@ version: 2.1 # Extend Web components -Vue.js is an independent front-end framework. In the browser, you can not use the Weex container for page rendering. So, the two things are the same: (1) for the Weex platform to expand Vue.js Web components. (2) directly using Vue.js to develop a Web component. The development of components can refer to its documentation: [component](https://vuejs.org/v2/guide/components.html). It is also recommended to use the ```.vue``` file to write components. How to use it: [Single file component](https://vuejs.org/v2/guide/single-file-components.html). +Vue.js is an independent front-end framework. In the browser, you can not use the Weex container for page rendering. So, the two things are the same: (1) for the Weex platform to expand Vue.js Web components. (2) directly using Vue.js to develop a Web component. The development of components can refer to its documentation: [component](https://vuejs.org/v2/guide/components.html). It is also recommended to use the `.vue` file to write components. How to use it: [Single file component](https://vuejs.org/v2/guide/single-file-components.html). # Extend Web renderer's built-in components @@ -20,7 +20,7 @@ We current use [weex-vue-render](https://github.com/weexteam/weex-vue-render) fo ## Example of extension for weex built-in components. -To extend ```<sidebar>``` as an example, you should first write the logic of the component itself: +To extend `<sidebar>` as an example, you should first write the logic of the component itself: ```html <!-- sidebar.vue --> @@ -44,14 +44,14 @@ To extend ```<sidebar>``` as an example, you should first write the logic of the </script> ``` -And then register the ```<sidebar>``` component globally before using it: +And then register the `<sidebar>` component globally before using it: ```javascript import Vue from 'vue' import weex from 'weex-vue-render' import Sidebar from './path/to/sidebar.vue' weex.init(Vue) -// register the ```<sidebar>``` component globally +// register the `<sidebar>` component globally weex.registerComponent('sidebar', Sidebar) // or: // Vue.component('sidebar', Sidebar) @@ -67,14 +67,14 @@ In addition to the common components, Weex also provides a common module, you ca ## Register the module -If we import the ```weex-vue-render``` library, we can get the weex variable globally. You can register the module using the ```registerModule```method. +If we import the `weex-vue-render` library, we can get the weex variable globally. You can register the module using the `registerModule`method. ## API format + `registerModule` - 1. ```name```: {String} Required, module name. - 2. ```define```: {Object} Required, module definition. + 1. `name`: {String} Required, module name. + 2. `define`: {Object} Required, module definition. 3. `meta`: {Object} Optional, module meta info. Basically you won't need this except you want to pass a non iterable attribute or method from your module implementation object. In this case you should pass a `{ registerType: 'assignment' }` object to it. Otherwise only the iterables will be registered in the module. ## The example of register module
