vue2.0寫的V2EX社區

v2ex

A vue.js project for V2EXvue

預覽圖

首頁node

首頁

主題webpack

主題

關於git

關於

已實現的功能清單

  1. 首頁不一樣主題tab切換github

  2. 文章列表模塊web

  3. 主題列表和主題搜索npm

  4. 關於V2EX信息和清除本地緩存api

  5. 數據本地化跨域

  6. 上拉加載和下拉刷新緩存

  7. 歡迎頁和Loading模塊

在線預覽

掃一掃


點擊

注意!注意!注意!

本地運行會有跨域問題。按照以下配置可經過node解決跨域問題。可是這個不行,已親測豆瓣API能夠實現跨域,不知道是否是V2EX提供的api是狀況。本地開發解決跨域終極方法(僅僅適用於開發環境)--安裝谷歌插件 Allow-Control-Allow-Origin: * 便可

dev: {
  env: require('./dev.env'),
  port: 8088,
  autoOpenBrowser: false,
  assetsSubDirectory: 'static',
  assetsPublicPath: '/',
  proxyTable: {
      '/api':{
          target:'http://www.v2ex.com/api',
          changeOrigin:true,
          pathRewrite:{
              '^/api':''
          }
      }
  },

github地址github

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

相關文章
相關標籤/搜索