Skip to content

Commit

Permalink
使用vue-resource请求数据,修复列表组件样式问题
Browse files Browse the repository at this point in the history
  • Loading branch information
eteplus committed Feb 1, 2016
1 parent dcf9cc3 commit 02cb947
Show file tree
Hide file tree
Showing 8 changed files with 4,779 additions and 35 deletions.
34 changes: 29 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
# vue-sui-demo
[VUE](http://cn.vuejs.org/)[SUI-Mobile](http://m.sui.taobao.org/) 结合的demo,禁用了SUI自带的路由,使用vue-router

> 持续更新,如果对您有帮助,您可以点右上角 "Star" 支持一下 谢谢! ^_^
> 后面有空再写学习历程和遇到的问题
---
Vue很轻量,易定制,比较适合移动端,很喜欢Vue写组件的方式,
所有用[VUE](http://cn.vuejs.org/)[SUI-Mobile](http://m.sui.taobao.org/) 写了一个移动端demo,用来反馈vue的学习成果(禁用了SUI自带的路由,使用[Vue-router](https://github.com/vuejs/vue-router)

##### 技术栈

> [vue](https://github.com/vuejs/vue)
> [vue-router](https://github.com/vuejs/vue-router)
> [vue-resource](https://github.com/vuejs/vue-resource)
> [webpack](http://webpack.github.io/docs/)
> [sui-mobile](http://m.sui.taobao.org/)
> [es6-babel](https://babeljs.io/docs/learn-es2015/)
---

### 安装
项目地址:(`git clone`
项目地址:(使用`git clone`

```shell
git clone https://github.com/eteplus/vue-sui-demo.git
Expand All @@ -29,9 +52,9 @@ npm run main

```

###开发
### 开发

###目录结构
### 目录结构
<pre>
.
├── README.md
Expand All @@ -45,6 +68,7 @@ npm run main
├── package.json // 项目配置文件
├── src // 生产目录
│ ├── assets // css js 和图片资源
│ ├── data // 数据文件
│ ├── components // 各种组件
│ ├── views // 各种页面
│ ├── directives // 各种指令
Expand All @@ -54,4 +78,4 @@ npm run main
│ └── app.js // Webpack 预编译入口
│ └── index.html // 项目入口文件
.
</pre>
</pre>
2 changes: 2 additions & 0 deletions build/dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ var favicon = require('express-favicon')

var app = express()
var compiler = webpack(config)
//设置资源目录
app.use('/static', express.static(path.join(__dirname, '../src')))

app.use(favicon(path.join(__dirname, '../favicon.ico')))
// handle fallback for HTML5 history API
Expand Down
2 changes: 1 addition & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ routerConfig(router)
// Resource
Vue.use(VueResource)

Vue.http.options.root = '/api'
Vue.http.options.root = '/static/data'
Vue.http.options.emulateJSON = true

// Directive
Expand Down
Binary file added src/assets/adv.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 02cb947

Please sign in to comment.