Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 57a128e

Browse files
committed
更新发布配置文档
1 parent d7d499b commit 57a128e

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

‎README.md‎

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ vue ui
108108
module.exports = {
109109
pages: {
110110
index: {
111-
entry: "site/main.js"
112-
}
113-
}
111+
entry: "site/main.js",
112+
},
113+
},
114114
};
115115
```
116116

@@ -123,7 +123,7 @@ module.exports = {
123123
124124
<script>
125125
export default {
126-
name: "Home"
126+
name: "Home",
127127
};
128128
</script>
129129
```
@@ -149,13 +149,13 @@ export default {
149149
export default {
150150
name: "VButton",
151151
props: {
152-
text: String
152+
text: String,
153153
},
154154
methods: {
155155
handleClick(event) {
156156
this.$emit("click", event);
157-
}
158-
}
157+
},
158+
},
159159
};
160160
</script>
161161

@@ -195,7 +195,7 @@ export default {
195195
```javascript
196196
import Button from "./src/button";
197197

198-
Button.install = Vue => {
198+
Button.install = (Vue) => {
199199
Vue.component(Button.name, Button);
200200
};
201201

@@ -209,14 +209,14 @@ import Button from "./button/index.js";
209209

210210
const components = [Button];
211211

212-
const install = Vue => {
213-
components.forEach(component => {
212+
const install = (Vue) => {
213+
components.forEach((component) => {
214214
Vue.use(component);
215215
});
216216
};
217217

218218
export default {
219-
install
219+
install,
220220
};
221221
```
222222

@@ -258,16 +258,16 @@ Vue.use(VueUIDocs);
258258
export default {
259259
data() {
260260
return {
261-
showCode: false
261+
showCode: false,
262262
};
263263
},
264264
computed: {
265265
codeIconSrc() {
266266
return this.showCode
267267
? "https://gw.alipayobjects.com/zos/rmsportal/wSAkBuJFbdxsosKKpqyq.svg"
268268
: "https://gw.alipayobjects.com/zos/rmsportal/wSAkBuJFbdxsosKKpqyq.svg";
269-
}
270-
}
269+
},
270+
},
271271
};
272272
</script>
273273

@@ -378,7 +378,7 @@ module.exports = function(source) {
378378
return `<pre class="hljs"><code>${markdownIt.utils.escapeHtml(
379379
str
380380
)}</code></pre>`;
381-
}
381+
},
382382
});
383383
// 解析【:::tip:::】
384384
markdownIt.use(MarkdownItContainer, "tip");
@@ -408,13 +408,13 @@ module.exports = function(source) {
408408
let { template, script, styles } = parse({
409409
source: content,
410410
compiler: VueTemplateComplier,
411-
needMap: false
411+
needMap: false,
412412
});
413413
styleCodeList = styleCodeList.concat(styles);
414414
// 将template的转为render函数
415415
const { code } = compileTemplate({
416416
source: template.content,
417-
compiler: VueTemplateComplier
417+
compiler: VueTemplateComplier,
418418
});
419419
// 获取script的代码
420420
script = script ? script.content : "";
@@ -445,7 +445,7 @@ module.exports = function(source) {
445445
}
446446
return ` </div>
447447
</vc-snippet> `;
448-
}
448+
},
449449
});
450450
// 将所有转换好的代码字符串拼接成vue单组件template、script、style格式
451451
return `
@@ -464,7 +464,7 @@ module.exports = function(source) {
464464
}
465465
</script>
466466
<style lang='scss'>
467-
${Array.from(styleCodeList, m => m.content).join("\n")}
467+
${Array.from(styleCodeList, (m) => m.content).join("\n")}
468468
</style>`;
469469
};
470470
```
@@ -476,10 +476,10 @@ module.exports = {
476476
pages: {
477477
index: {
478478
// 入口文件
479-
entry: "site/main.js"
480-
}
479+
entry: "site/main.js",
480+
},
481481
},
482-
chainWebpack: config => {
482+
chainWebpack: (config) => {
483483
// 解析Markdown文件转成vue组件
484484
config.module
485485
.rule("md")
@@ -488,14 +488,14 @@ module.exports = {
488488
.loader("vue-loader")
489489
.options({
490490
compilerOptions: {
491-
preserveWhitespace: false
492-
}
491+
preserveWhitespace: false,
492+
},
493493
})
494494
.end()
495495
.use("markdown-loader")
496496
.loader(require("path").resolve(__dirname, "./build/markdown-loader.js"))
497497
.end();
498-
}
498+
},
499499
};
500500
```
501501

@@ -550,8 +550,8 @@ module.exports = {
550550
methods: {
551551
handleButtonClick() {
552552
alert(1);
553-
}
554-
}
553+
},
554+
},
555555
};
556556
</script>
557557
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /