Tag: vue.js

使用Webpack启动Framework7 – Vue应用程序时出错'Dom7未定义'

我只是按照官方网站的说明:克隆回购,安装节点依赖关系并运行。 但是,一旦我运行npm run dev命令,当我在浏览器中打开应用程序时,出现以下错误: > Uncaught ReferenceError: Dom7 is not defined > at framework7.js:14213 > at framework7.js:14317 > at Object.<anonymous> (framework7.js:18375) > at Object.<anonymous> (vendor.9d7fa26….js:18538) > at n (bootstrap 4a945b6…:54) > at Object.<anonymous> (app.8e4833b….js:107) > at n (bootstrap 4a945b6…:54) > at window.webpackJsonp (bootstrap 4a945b6…:25) > at app.8e4833b….js:1 有人能帮忙吗? 最奇怪的是前几天所有的东西都起作用了。

Shopifyembedded式应用程序authenticationstream程帮助SPA

我的Vue JS SPA + Express服务器出现以下问题: 问题#1- 我可以在开发商店安装应用程序,计费工作完美,一旦我进入应用程序,API函数工作得很好,但我认为它实际上是打开应用程序的问题 – 很可能是我的embedded式应用程序SDK的东西有问题,缺lessredirect。 我目前的stream程如下 – > server.ngrok.io是一个Node / Express JS应用程序 client.ngrok.io是一个独立的客户端只有应用程序使用VueJS(没有服务器端渲染) 用户在server.ngrok.io/install上input应用程序 /安装构buildauth url并将用户redirect到它 Shopifyredirect回server.ngrok.io/finish_auth / finish_auth交换一个永久的临时令牌,将perm存储在我的数据库中,然后redirect到/ create_charge / create_charge和/ activate_charge完美工作,redirect到client.ngrok.io/ client.ngrok.io会在新窗口中打开,而不是在iFrame中。 我相信在这里的某个地方,我需要像这里的文档中所述的那样逃避一个iFrame – Since the application is loaded inside an iframe it is critical that the initial OAuth request redirect escapes the iframe to make the requests. Shopify […]

如何使用Azure ADvalidationVueJS应用程序?

我正在使用VueJS 2.x框架设置应用程序,并需要通过Azure Active Directory服务对用户进行身份validation。 我已经有了“login信息”(Auth和Token URLs)这个服务。 到目前为止,我只遇到一篇文章 ,显示VueJS中的设置,但它依赖于第三方服务(Auth0) – 在此过程中增加了不必要的卷积。 当没有任何VueJS npm模块可以轻松进行身份validation时,如何继续? 还是必须依赖Adal JS之类的Vue之外的图书馆? 任何的意见都将会有帮助。

如何将.vue文件中的所有css代码放入一个.css文件?

我开始VueJS,我从原始Vue加载程序示例开始我的代码,我testing运行npm run dev或npm run build但出现了一个问题:有没有办法将所有的组件从一个地方(如样式.min.css)。 我在我的package.json中添加了bootstrap作为依赖关系,但是当我执行npm run build我只能finddist的build.js文件,就这些了。 感谢您的帮助。

npm run dev命令不适用于vuejs的hackernews示例

我试图从vuejs的github 版本库运行vue-hackernews-2.0例子 在安装部分,它解释了如何安装该项目: # install dependencies npm install # or yarn # serve in dev mode, with hot reload at localhost:8080 npm run dev # build for production npm run build # serve in production mode npm start 我做了npm安装。 在server.js中将端口更改为8888后,我在命令行上键入“npm run dev”。 > vue-hackernews-2.0@ dev D:\Users\212399486\WebstormProjects\vue-hackernews-2.0-master > node server server started at localhost:8888 DONE Compiled […]

用Vue.js调用一个Node.js服务器

我有一个简单的Node.js服务器启动并运行。 这是代码: var http = require('http'); var server = http.createServer(); server.on('request', function(req, res) { res.writeHead(200, { 'content-type': 'text/plain' }); res.write('Hello World!'); res.end(); }) server.listen(8090); server.once('listening', function() { console.log('Hello World server listening on port %d', 8090); }); 我可以从命令行使用curl来调用这个服务器: $curl localhost:8090 但是,当我尝试从Vue应用程序调用它时,出现错误。 我有一个运行在localhost:8080上的Vue应用程序,我想调用我的localhost:8090服务器。 我的main.js Vue文件是这样的: import Vue from 'vue' import resources from 'vue-resource' Vue.use(resources) import App from […]

Vue 2.0设置路线 – 不要使用“新”的副作用

我正在configuration一个vue项目。 我使用了webpack模板。 (npm install init webpack)。 我在terminal出现错误 – ERROR in ./src/main.js ✘ http://eslint.org/docs/rules/no-new Do not use 'new' for side effects /Users/uz067252/Documents/Development/Vue/workex/vue-project/src/main.js:21:1 new Vue({ ^ ✘ 1 problem (1 error, 0 warnings) Errors: 1 http://eslint.org/docs/rules/no-new 这是main.js import Vue from 'vue' import App from './App.vue' import Hello from './components/Hello.vue' import VueRouter from 'vue-router' import VueResource from 'vue-resource' […]

JavaScript的ES6导入没有名称

我正在运行Webpack,Babel和Vue.js,我想分割我的入口文件。 目前我有一个app.js文件,这是我的应用程序的起点。 我有一些代码我想要放入一个bootstrap.js文件,我想包括在我的主要app.js文件我可以有一个干净的文件开始与Vue和添加组件,因为我去。 一些我想放在我的bootstrap.js文件中的例子: import messagesNL from './translations/nl'; Vue.use(VeeValidate, { locale: 'nl', dictionary: { nl: { messages: messagesNL } } }); window.Vue = Vue; 所以非常多的插件,全局configuration等设置。我觉得这不是你的典型模块,我发现很难创build一个像这个文件的结构模块,所以我基本上在我的app.js文件中使用这个: import bootstrap from './bootstrap'; 不知道这是否会起作用,似乎只是将所有东西都整齐地导入,而不需要像module exports {}那样进行module exports {} 。 现在我分配给这个文件的bootstrapvariables在app.js是未使用的,因为它只是用来请求文件,我的IDE是'greys`类的,让我知道它是未使用的。 有没有另一种语法,这样我就不必为它指定一个名字了? 这种方法可以分割我的文件,还是应该做别的? 我还没有把它放到一个适当的模块中,因为那样它就有了它自己的局部范围,我不能确定如何用所有的插件来设置Vue等等。如果有人有更好的build议,我可以打开它。 干杯。

webpack-dev-server热重新加载不起作用

我的文件结构是: dist css style.css index.html js bundle.js src css style.css index.html js main.js node_modules webpack.config.js package.json 我的webpack.config.js看起来像: module.exports = { entry: './src/js/main.js', output: { path: __dirname, filename: './dist/js/bundle.js' }, module: { loaders: [ { test: /\.js$/, exclude: /(node_modules)/, loader: 'babel', query: { presets: ['es2015'] } }, { test: /\.vue$/, loader: 'vue' } ] } }; […]

event.path未定义Firefox和vue.js

首先,我正在使用vue-js。 和NodeJs 我有一个与Firefox的问题: 我使用event.path [n] .id和firefox我得到一个错误“event.path undefined” 但它在其他浏览器罚款。 你有什么想法,为什么? 谢谢!