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 ff71d81

Browse files
committed
项目初始化文档、结构调整文档
1 parent 64f1fd3 commit ff71d81

File tree

11 files changed

+74
-60
lines changed

11 files changed

+74
-60
lines changed

‎README.md

Lines changed: 74 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,71 @@
11
# VUE-UI-DOCS
22

3-
## Roadamp
4-
5-
- 基础项目创建
6-
- 目录结构调整
7-
- 1. 入口 site
8-
- 2. 路由调整 Home.vue import HelloWorld from "../components/HelloWorld";
9-
10-
├─site //示例网站目录
11-
│ └─components //示例网站组件
12-
│ └─router //路由配置
13-
│ │ └─index.js //路由配置文件
14-
│ └─views //示例页面
15-
│ │ └─Home.vue //示例网站首页
16-
│ └─App.vue //项目入口
17-
│ └─main.js //启动文件
3+
## 创建项目
184

19-
```javascript
20-
import Vue from "vue";
21-
import VueRouter from "vue-router";
22-
23-
Vue.use(VueRouter);
5+
1. 全局安装 `Vue CLI` 更多内容查看[官方文档](https://cli.vuejs.org/zh/guide/installation.html)
246

25-
const routes = [
26-
{
27-
path: "/",
28-
name: "Home",
29-
component: () => import("../views/Home.vue")
30-
}
31-
];
7+
```bash
8+
npm install -g @vue/cli
9+
```
3210

33-
const router = new VueRouter({
34-
mode: "history",
35-
base: process.env.BASE_URL,
36-
routes
37-
});
11+
2. `vue ui` 可视化操作,也可以通过 `vue crate {project}`
3812

39-
export default router;
13+
```bash
14+
vue ui
4015
```
4116

42-
```vue
43-
<template>
44-
<h1>
45-
Home
46-
</h1>
47-
</template>
17+
![启动CLI](site/images/vue-ui-01.png)
4818

49-
<script>
50-
export default {
51-
name: "Home"
52-
};
53-
</script>
54-
```
19+
3. 创建项目
5520

56-
```vue
57-
<template>
58-
<div id="app">
59-
<router-view />
60-
</div>
61-
</template>
21+
![创建项目](site/images/vue-ui-02.png)
22+
23+
4. 预设配置
24+
25+
![预设配置](site/images/vue-ui-03.png)
26+
27+
5. 手动配置
28+
29+
![手动配置](site/images/vue-ui-04.png)
30+
31+
6. 详细配置
32+
33+
![详细配置](site/images/vue-ui-05.png)
34+
35+
7. 安装依赖
36+
37+
![安装依赖](site/images/vue-ui-06.png)
6238

63-
<style lang="scss">
64-
#app {
65-
font-family: Avenir, Helvetica, Arial, sans-serif;
66-
-webkit-font-smoothing: antialiased;
67-
-moz-osx-font-smoothing: grayscale;
68-
}
69-
</style>
39+
8. 启动项目
40+
41+
![启动项目](site/images/vue-ui-07.png)
42+
43+
9. 访问地址
44+
45+
![访问地址](site/images/vue-ui-08.png)
46+
47+
10. 浏览器访问
48+
49+
![浏览器访问](site/images/vue-ui-09.png)
50+
51+
## 结构调整
52+
53+
1. 文件结构调整
54+
55+
```javascript
56+
├─site //示例网站目录
57+
│ └─components //示例网站组件
58+
│ └─router //路由配置
59+
│ │ └─index.js //路由配置文件
60+
│ └─views //示例页面
61+
│ │ └─Home.vue //示例网站首页
62+
│ └─App.vue //项目入口
63+
│ └─main.js //启动文件
64+
├─src //源码目录
7065
```
7166

67+
2. 根目录创建 `vue.config.js` 配置
68+
7269
```javascript
7370
module.exports = {
7471
pages: {
@@ -79,6 +76,23 @@ module.exports = {
7976
};
8077
```
8178

82-
npm i markdown-it markdown-it-container highlight.js -D
79+
3. 相关的依赖、路由配置进行调整,`Home.vue` 页面调整
80+
81+
```vue
82+
<template>
83+
<h1>Home</h1>
84+
</template>
85+
86+
<script>
87+
export default {
88+
name: "Home"
89+
};
90+
</script>
91+
```
92+
93+
4. 页面访问
94+
95+
![页面访问](site/images/vue-ui-10.png)
96+
97+
## 文档解析
8398

84-
代码解析组件 vue

‎site/images/vue-ui-01.png

80.2 KB
Loading[フレーム]

‎site/images/vue-ui-02.png

121 KB
Loading[フレーム]

‎site/images/vue-ui-03.png

115 KB
Loading[フレーム]

‎site/images/vue-ui-04.png

181 KB
Loading[フレーム]

‎site/images/vue-ui-05.png

140 KB
Loading[フレーム]

‎site/images/vue-ui-06.png

115 KB
Loading[フレーム]

‎site/images/vue-ui-07.png

181 KB
Loading[フレーム]

‎site/images/vue-ui-08.png

269 KB
Loading[フレーム]

‎site/images/vue-ui-09.png

114 KB
Loading[フレーム]

0 commit comments

Comments
(0)

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