Git Product home page Git Product logo

eteplus / vue-sui-demo Goto Github PK

View Code? Open in Web Editor NEW
1.7K 124.0 529.0 2.76 MB

用vue 和 SUI-Mobile 写了一个移动端demo,用来反馈学习vue的成果(禁用了SUI自带的路由,使用vue-router, vue-resource, webpack)[a web app written by vue & sui-mobile]

Home Page: http://eteplus.github.io/vue-sui-demo

License: MIT License

JavaScript 62.01% HTML 0.74% Vue 37.26%
sui-mobile vue-router vue vue-resource vue-sui-demo

vue-sui-demo's Introduction

Hi there 👋

eteplus

I'm ElevenZhang, frontend developer from China, Coding for fun and with ❤️ .

I learned a lot from the open-source community and i love how collaboration and knowledge sharing happened through open-source.

  • 🌱 I’m currently learning Rust, Swift

  • 📝 I write articles on https://eteplus.com

  • 📫 How to reach me [email protected]

  • 🛠 Most Used Languages

    eteplus

  • 📈 Github stats

    eteplus

  • 👨🏻‍💻 Streak Stats

    eteplus

vue-sui-demo's People

Contributors

349989153 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-sui-demo's Issues

执行npm run dev 报错

wxid_37hu311um27m21_1476349402257_51
报错日志~!求解~
0 info it worked if it ends with ok
1 verbose cli [ 'D:\Program Files\nodejs\node.exe',
1 verbose cli 'D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle [email protected]predev: [email protected]
6 silly lifecycle [email protected]
predev: no script for predev, continuing
7 info lifecycle [email protected]dev: [email protected]
8 verbose lifecycle [email protected]
dev: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]dev: PATH: D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;F:\myfuture\vuedemo\node_modules.bin;Z:\bin;D:\Program Files\Git\mingw64\bin;D:\Program Files\Git\usr\local\bin;D:\Program Files\Git\usr\bin;D:\Program Files\Git\usr\bin;D:\Program Files\Git\mingw64\bin;D:\Program Files\Git\usr\bin;Z:\bin;C:\Program Files (x86)\Common Files\NetSarang;C:\Windows\System32\Wbem;C:\Windows;C:\Windows\system32;E:\Java\jdk1.7.0_65\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;D:\Program Files\TortoiseSVN\bin;D:\Program Files\nodejs;D:\Program Files\nodejs\node_global;C:\windows\system32;D:\nvwm;D:\Program Files\Git\cmd;D:\Program Files\nodejs;C:\Ruby23-x64\bin;D:\Ruby23-x64\bin;D:\Ruby22\bin;C:\Users\ydbj0129\AppData\Roaming\npm;D:\Program Files\Git\usr\bin\vendor_perl;D:\Program Files\Git\usr\bin\core_perl
10 verbose lifecycle [email protected]
dev: CWD: F:\myfuture\vuedemo
11 silly lifecycle [email protected]dev: Args: [ '/d /s /c', 'node build/dev-server.js' ]
12 silly lifecycle [email protected]
dev: Returned: code: 1 signal: null
13 info lifecycle [email protected]~dev: Failed to exec dev script
14 verbose stack Error: [email protected] dev: node build/dev-server.js
14 verbose stack Exit st

升级到node5.9.1,npm3.7.3 运行项目失败

错误日志如下:
0 info it worked if it ends with ok
1 verbose cli [ 'D:\program\nodejs\node.exe',
1 verbose cli 'D:\program\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle [email protected]predev: [email protected]
6 silly lifecycle [email protected]
predev: no script for predev, continuing
7 info lifecycle [email protected]dev: [email protected]
8 verbose lifecycle [email protected]
dev: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]dev: PATH: D:\program\nodejs\node_modules\npm\bin\node-gyp-bin;E:\webworkspace\vue-sui-demo\node_modules.bin;D:\program\nodejs;d:\program\graphicsmagick-1.3.21-q16;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\NetSarang;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;D:\program\TortoiseSVN\bin;D:\program\apache\apache-maven-3.2.5\bin;D:\program\java\jdk1.8.0_45/bin;D:\program\nodejs;D:\program\Ruby21\bin;D:\program\Git\bin;C:\Program Files (x86)\Google\Chrome\Application;C:\Program Files\MySQL\MySQL Server 5.6\bin;D:\program\apache\Apache24\bin;D:\program\php\php5.6.19;D:\program\php\php5.6.19\ext;C:\Users\DELL\AppData\Roaming\npm
10 verbose lifecycle [email protected]
dev: CWD: E:\webworkspace\vue-sui-demo
11 silly lifecycle [email protected]dev: Args: [ '/d /s /c', 'node build/dev-server.js' ]
12 silly lifecycle [email protected]
dev: Returned: code: 3221225501 signal: null
13 info lifecycle [email protected]~dev: Failed to exec dev script
14 verbose stack Error: [email protected] dev: node build/dev-server.js
14 verbose stack Exit status 3221225501
14 verbose stack at EventEmitter. (D:\program\nodejs\node_modules\npm\lib\utils\lifecycle.js:239:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess. (D:\program\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:850:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid [email protected]
16 verbose cwd E:\webworkspace\vue-sui-demo
17 error Windows_NT 6.1.7600
18 error argv "D:\program\nodejs\node.exe" "D:\program\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
19 error node v5.9.1
20 error npm v3.7.3
21 error code ELIFECYCLE
22 error [email protected] dev: node build/dev-server.js
22 error Exit status 3221225501
23 error Failed at the [email protected] dev script 'node build/dev-server.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the vue-sui-demo package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node build/dev-server.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs vue-sui-demo
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls vue-sui-demo
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

页面刷新404

作者的页面url是没有vue的/#!/的,打开是没有问题,但是一刷新就404了。

指令中的问题。

image
我在框架中并没有看到有zepto 依赖,只是在界面上引入的cdn资源,为什么这边可以直接 import $ from "zepto" 呢?有何用意吗?

路由问题

image

当前页面路由 [/study/college],我点击学校时跳转到详情页路由[/study/info?id=16]。发现点击不同学校时使用的是同一个路由对象,如何保证点击不同学校时跳转到详情路由时都是新建一个路由对象?
备注:因为发现ready()只执行了一次,所以认为是点击不同学校时使用了同一个路由对象,不知道这样理解对不对?

首页加载组件样式问题

为什么首页加载的时候会请求那么多样式,这些样式都是写在组件里面的。
是什么原因呢?我该如何向您一样优化?在线实例地址:www.niygui.com/vue-sui/index.html

如果前端静态文件是部署到tomcat工程下,微信公众号如何通过菜单链接到单页面的不同模块去?

webpack构建项目成功后,如果是通过webpack监听的话,微信公众号不同菜单可以通过路由连接到这个单页面的不同模块去。
如果我想把前端静态文件部署到tomcat的项目下,而不使用webpack。因为知道这样只能通过index.html访问该单页面,要是想实现不同菜单进入不同模块,该怎么实现,请教下。thx

thanks

This demo is a great help to me.谢谢。

部署到服务器路由不能刷新

部署到服务器,当开启 history 选项(html5模式)时,#号去掉了,直接访问链接时会遇到404,关闭history 选项(html5模式),可以访问,但是产生了#号,我看了作者的demo两者都做得很完美,还望指点一下

banner.json和task.json报404错误

你好,我下载你的demo后npm run dev开发模式跑起来后,无法获取到banner.js和task.js,报404错误,从搜索引擎查询结果查到这个:放在目录里并不意味能通过http访问。要么另起web服务serve这个目录,要么放在static目录里,因为dev-server对该目录文件实现了http访问。不知该咋解决 ?

轮播图问题

轮播图那里为什么不使用sui的扩展组件而是用iSlider呢,我用sui的扩展组件实现不了,能否解答一下呢?

我想问下index.html上的{% %} 的那两段是什么意思

{% for (var css in o.htmlWebpackPlugin.files.css) { %}
    <link href="{%=o.htmlWebpackPlugin.files.css[css] %}" rel="stylesheet">
 {% } %}

和这个

{% for (var chunk in o.htmlWebpackPlugin.files.chunks) { %}
    <script src="{%=o.htmlWebpackPlugin.files.chunks[chunk].entry %}"></script>
 {% } %}

[求助]微信分享的时候,直接回到首页

暂时没有使用微信的分享配置,直接通过右上角的分享按钮分享出去的时候,所有的路径都丢失了,直接回到了启动界面。目前源码也有这个问题。

另外貌似直接在微信里面分享到qq又是好的。但是有些vue-rooter的demo也又可以正常在微信里面分享。故不知道是微信屏蔽的问题,还是配置不对的问题。

由于对vue-rooter的配置不是很熟悉。希望能够得到帮助。

route或者bar-tab失效?

不太清楚你是不是sui的作者,也许这是sui的问题,不过我先写在这儿吧。

现象是:在home页面的时候,向下拉动页面,但是拉动的长度小于pull-to-refresh的长度,然后放手。
这之后点击bar-tab的任意item,比如“任务”或者“我自己”,对应的view都是一片空白。

点击菜单切换路由到/user,浏览器发出的实际地址是[服务器地址/index.html/#!/user ],因为在做微信开发,所以能否在浏览器发出requet前,让url变成这样https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf34da76143f5050d&redirect_uri=http%3A%2F%2F622cf930.ngrok.io%2Foec%2F%23!%2Fuser&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect。谢谢

点击菜单切换路由到/user,浏览器发出的实际地址是[服务器地址/index.html/#!/user ],因为在做微信开发,所以能否在浏览器发出requet前,让url变成这样https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf34da76143f5050d&redirect_uri=http%3A%2F%2F622cf930.ngrok.io%2Foec%2F%23!%2Fuser&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect。谢谢

编译报错

看看
ERROR in dlopen(/Users/wxzhou/testProjects/vue-test1/vue-sui-demo/node_modules/node-sass/vendor/darwin-x64-47/binding.node, 1): no suitable image found. Did find:
/Users/wxzhou/testProjects/vue-test1/vue-sui-demo/node_modules/node-sass/vendor/darwin-x64-47/binding.node: truncated mach-o error: segment __TEXT extends to 1167360 which is past end of file 16944
@ .//extract-text-webpack-plugin/loader.js?{"omit":1,"extract":true,"remove":true}!.//vue-style-loader!.//css-loader!.//vue-loader/lib/style-rewriter.js?id=_v-1e712558&scoped=true!.//sass-loader!.//vue-loader/lib/selector.js?type=style&index=0!./src/views/more.vue 4:14-268

ERROR in dlopen(/Users/wxzhou/testProjects/vue-test1/vue-sui-demo/node_modules/node-sass/vendor/darwin-x64-47/binding.node, 1): no suitable image found. Did find:
/Users/wxzhou/testProjects/vue-test1/vue-sui-demo/node_modules/node-sass/vendor/darwin-x64-47/binding.node: truncated mach-o error: segment __TEXT extends to 1167360 which is past end of file 16944
@ .//extract-text-webpack-plugin/loader.js?{"omit":1,"extract":true,"remove":true}!.//vue-style-loader!.//css-loader!.//vue-loader/lib/style-rewriter.js!.//sass-loader!.//vue-loader/lib/selector.js?type=style&index=0!./src/components/Slider.vue 4:14-243
这是什么问题呢?

第三方js引用怎么切换回本地

目前使用的第三方如 淘宝的 sm.js 怎么切换回在本地目录中加载呢?

  • 在app.js 中import ,打包的时候会合并到app.js中。
  • 写在webpack的entry 中,当有多个 js 时,默认webpack 会重新排序,不能按自己指定的顺序加载。

是否还有别的方式 写法 能不合并文件加载。

编辑器

请问群主用的什么编辑器开发?

模块化中的数据来源问题

你好,我想请教下,在模块化里面的数据通过http请求返回得到的数据如何作用到当前模块的视图中呢?还是说有更好的数据传递方式,新手望赐教
如图:
image

Cannot find module './lib/source-map-generator'

[root@iZ28se92r47Z vue-sui-demo]# npm run dev

[email protected] dev /root/vue-sui/vue-sui-demo
node build/dev-server.js

Listening at http://localhost:8080

webpack built c7fecbbc8f83a1bcf66e in 731ms
Hash: c7fecbbc8f83a1bcf66e
Version: webpack 1.13.1
Time: 731ms
Asset Size Chunks Chunk Names
app.js 22.3 kB 0 app

ERROR in Cannot find module './lib/source-map-generator'
@ multi app

ERROR in Cannot find module './lib/source-map-generator'
@ multi app
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 24.1 kB 0
webpack: bundle is now VALID.

运行之后报 Cannot find module './lib/source-map-generator'
同时访问 8080 报Cannot GET /

轮播sm-extend.min.js是否有问题?

正在做vue-sui的项目,发现你的轮播没用sm-extend.min.js的拓展组件,而是做的另外的组件?为甚么,是因为引用有问题吗?因为我确实不知道如何使用这个拓展组件在vue项目中

只能从首页进入 从其他的二级页面进入均不行

进入首页 URL会变为/home 这时如果刷新页面 便会404
进入别的页面 刷新浏览器 同样404
有没有好的解决方案?
官网的vue-router示例跑起来没有这个问题。
今天刚看,正在研究怎样集成的。
期待回复,
谢谢。

安装后npm run dev总是报缺少各种模块

Error: Cannot find module 'mime-db'
安装完后又报
Error: Cannot find module 'minimatch'
安装完又报
Error: Cannot find module 'debug'
....

npm ERR! node v4.4.2
npm ERR! npm v2.15.0
npm ERR! code EPEERINVALID

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.