- Visual
- Configuring simply
- Support both Mac and Windows
- It is quite beautiful
Copyright (c) 2016-present, TalkingData
Create an iView project in visual way
Home Page: https://iviewui.com/cli
License: MIT License
Copyright (c) 2016-present, TalkingData
通过npm run build:win64
后运行生成的iView.exe
[Window Title]
Error[Main Instruction]
A JavaScript error occured in the main process[Content]
Uncaught Exception:
D:\Vue\iview-cli\iView-win32-x64\resources\app\main.js:1
(function (exports, require, module, __filename, __dirname) { const { app, BrowserWindow, Menu } = require('electron');
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:411:25)
at Object.Module._extensions..js (module.js:446:10)
at Module.load (module.js:353:32)
at Function.Module._load (module.js:308:12)
at Object. (D:\Vue\iview-cli\iView-win32-x64\resources\atom.asar\browser\lib\init.js:106:10)
at Object. (D:\Vue\iview-cli\iView-win32-x64\resources\atom.asar\browser\lib\init.js:108:4)
at Module._compile (module.js:428:26)
at Object.Module._extensions..js (module.js:446:10)
at Module.load (module.js:353:32)[确定]
@jingsam @m430 @icarusion @SergioCrisostomo @rijn
使用iview-cli 2.0 创建的初始化模板项目,npm run build 之后 访问index_prod.html #发现页面无内容标签,请问需要如何处理?
<html lang="zh-CN"><head>
<title>iView project</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link rel="stylesheet" href="/dist/main.38c8f38168a718c10032.css">
</head>
<body>
<div><!----></div>
<script type="text/javascript" src="/dist/vendors.38c8f38168a718c10032.js"></script>
<script type="text/javascript" src="/dist/main.38c8f38168a718c10032.js"></script><div class="ivu-loading-bar" style="height: 2px; display: none;"><div class="ivu-loading-bar-inner ivu-loading-bar-inner-color-primary" style="width: 0%; height: 2px;"></div></div>
</body></html>
如果使用sass旧语法(sass语法),文件后缀名应为
.sass
如果使用sass新语法(scss语法),文件后缀名应为.scss
语法。
参考
https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss
http://www.sasschina.com/guide/
sass: ExtractTextPlugin.extract({
use: ['css-loader?minimize', 'autoprefixer-loader', 'sass-loader'],
fallback: 'vue-style-loader'
}),
{
test: /\.sass/,
use: ExtractTextPlugin.extract({
use: ['autoprefixer-loader', 'sass-loader'],
fallback: 'style-loader'
})
},
打包之后访问说js、css没有找到,路径不对
npm run dev
@1.0.0 dev /Users/atom/Workspace/iview
webpack-dev-server --content-base ./ --open --inline --hot --compress --history-api-fallback --config webpack.dev.config.js
fs.js:157
throw new ERR_INVALID_CALLBACK();
^
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at maybeCallback (fs.js:157:9)
at Object.fs.write (fs.js:674:14)
at /Users/atom/Workspace/iview/webpack.dev.config.js:10:8
at FSReqWrap.oncomplete (fs.js:169:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @1.0.0 dev: webpack-dev-server --content-base ./ --open --inline --hot --compress --history-api-fallback --config webpack.dev.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/atom/.npm/_logs/2018-05-29T01_29_12_570Z-debug.log
试了好多次,在首屏的加载速度上,iview-cli和iview-admin有一个明显的反应时间,其他两个则不会,为什么啊
怎么使用,在aixos时候地址部分怎么用,例如:
axios.get(请求地址).then(res=>{
console.log(res)
})
怎么用uril.js里 ajaxUrl 这个常量
如题。
assetsPublicPath不知道在哪里配置。
webpack.base.config.js中与iview*.js对应的babel-loader规则也许应该加上: exclude: /node_modules/
{
test: /iview\/.*?js$/,
loader: 'babel-loader'
exclude: /node_modules/ <------少了这一行,this line should be added
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
不加的话,执行webpack时,windows下没问题,在linux上会报[BABEL] Note: The code generator has deoptimised the styling of "..." as it exceeds the max of "500KB".
最终编译出来的静态文件会报错
具体请参见:
I've been trying to create a project using the cli tool in a Windows 10 environment and have been running into a range of issues. I'll list the ones I've noticed. Please tell me if I am doing something wrong.
npm run init
before running npm run dev
npm install
you get the error Module not found: Error: Can't resolve 'iview-loader'
when trying to run npm run init
so I'm guess theres missing packages in the package.json file.Module not found: Error: Can't resolve 'less-loader'
it seems like the cli tool doesnt properly generate the webpack config files for sass.小白一枚,请问怎么运行?我用npm install 完成后 npm run init 报错 npm run dev 也报错, npm run build 也报错,
真不知道怎么跑起来。╋
iview-cli目前还不支持2.0版本
请问我用npm run build打包以后生成了dist文件,我怎么发布啊,放到web服务器目录点击那个index_Prod.html无法运行,请问下怎么发布?
使用iview-cli搭建的iview环境build后怎么没有入口文件呢(index.html)?
而且生成的文件也没有放到static里
apprDatas:[ { "id": "dDb7668D--29Ff-d1aA-bA2BA4dE0dC2", "type": 1, "status":0, "doctorId": 1256, "nickName": "雷子", "hospitalName": "北京医院", "professtionTitle": "主任", "departmentName": "皮科", _disabled: true, _checked: true }, { "id": "BB3Fe9bC-68b3-397A-cfBDd82e1496", "type": 2, "status":2, "doctorId": 1256, "nickName": "雷子", "hospitalName": "北京病医院", "professtionTitle": "主师", "departmentName": "皮科", } ]
如上, 对应的checkbox仍然可以选择
能否支持表格的合并功能
我们知道如果使用典型webpack生成项目,那么会有三个文件在config文件夹下:
.
├── dev.env.js
├── index.js
└── prod.env.js
我们可以在不同的环境去配置不同的文件:
dev.env.js
:
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
BASE_API: '"http://localhost:8000/"'
})
prod.env.js
:
'use strict'
const MODEL = require('../static/config.js')
const pro= {
NODE_ENV: '"production"',
BASE_API: 'http://103.200.32.76/'
}
module.exports =Object.assign({}, pro, MODEL)
但是如果iview-cli
生成的文件是这样的:
.
├── config.js
└── env.js
env.js
:
export default "development";
config.js
:
import Env from './env';
let config = {
env: Env
};
export default config;
请问怎么配置呢?
最近需要把项目打包发布到线上,发现vue项目在IE下直接白屏报语法错误,怀疑和打包报错有关,
环境:
win7 64位
"babel-polyfill": "^6.23.0", "es6-promise": "^4.1.1", "iview": "^2.0.0-rc.19", "vue": "^2.3.3", "vue-router": "^2.3.1"
报错信息:
ERROR in static/js/vendor.ce19c0c58d805cdecfbe.js from UglifyJs Unexpected token name «i», expected punc «;» [./~/iview/src/utils/assist.js:5,0][ static/js/vendor.ce19c0c58d805cdecfbe.js:10340,13]
如题
使用iview-cli工具新建项目,新建完成后执行npm install和npm run dev命令,浏览器调试页面正常显示,接下来使用npm run build命令打包,将生成的index_prod.html和dist文件夹一起放入tomcat和nodejs中都无法正常显示页面
我在webpack.dev.config.js中配置了devServer的 proxy 但是,用 axiso时,无法实现跨域。请问 关于开发环境跨域的配置该在哪里配置?如何配置?
这一步就卡住了
proxy在哪里配置啊
如题
凉了??
百度云限速,下15分钟,能否考虑放在其他不限速的位置
是我自己这边的原因吗?
huanxiongxiaojiudeMacBook-Pro:doc owen-carter$ wget https://github.com/iview/iview-cli/releases/download/v1.0.0/iView-cli-mac.dmg
--2017-03-17 11:14:39-- https://github.com/iview/iview-cli/releases/download/v1.0.0/iView-cli-mac.dmg
Resolving github.com... 192.30.253.112, 192.30.253.113
Connecting to github.com|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/81436841/5514d4a8-f784-11e6-9911-c94fb2ef8b6d.dmg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20170317%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170317T031441Z&X-Amz-Expires=300&X-Amz-Signature=97b874b71db847123f238da896752453f1007c3f4d2ef73ac4e53fc30058befe&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DiView-cli-mac.dmg&response-content-type=application%2Foctet-stream [following]
--2017-03-17 11:14:40-- https://github-cloud.s3.amazonaws.com/releases/81436841/5514d4a8-f784-11e6-9911-c94fb2ef8b6d.dmg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20170317%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170317T031441Z&X-Amz-Expires=300&X-Amz-Signature=97b874b71db847123f238da896752453f1007c3f4d2ef73ac4e53fc30058befe&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DiView-cli-mac.dmg&response-content-type=application%2Foctet-stream
Resolving github-cloud.s3.amazonaws.com... 52.216.225.144
Connecting to github-cloud.s3.amazonaws.com|52.216.225.144|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 47574141 (45M) [application/octet-stream]
Saving to: 'iView-cli-mac.dmg'
iView-cli-mac.dmg 0%[ ] 8.00K 8.31KB/s iView-cli-mac.dmg 0%[ ] 42.36K 143 B/s in 5m 3s
2017-03-17 11:34:47 (143 B/s) - Read error at byte 43379/47574141 (Success). Retrying.
--2017-03-17 11:34:48-- (try: 2) https://github-cloud.s3.amazonaws.com/releases/81436841/5514d4a8-f784-11e6-9911-c94fb2ef8b6d.dmg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20170317%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170317T031441Z&X-Amz-Expires=300&X-Amz-Signature=97b874b71db847123f238da896752453f1007c3f4d2ef73ac4e53fc30058befe&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DiView-cli-mac.dmg&response-content-type=application%2Foctet-stream
Connecting to github-cloud.s3.amazonaws.com|52.216.225.144|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2017-03-17 11:34:53 ERROR 403: Forbidden.
devServer:{
historyApiFallback: true,
hot: true,
inline: true,
proxy:{
'/api': {
target: 'http://example.com:8080',
secure: false,
changeOrigin: true,
pathRewrite:{
'^/api':'/api'
}
}
}
}
如此配置之后依然无法转发和跨域,参考了goole到的几篇文章,似乎都是这样配的。
参考地址1:https://segmentfault.com/q/1010000011222653
参考地址2:https://hk.saowen.com/a/1bfaaf0ee2020d8736982c9214aeffb83e1fac39b84eacac46388775de49cb38
发现issue里有同样的问题,地址,希望可以更新到iview-cli中
怎么修改样式文件不能热更新
table表格没有行合并功能?
通过传递json的data生成table,没有行合并功能
Is it possible to switch to English (or other languages)? I can see different locales, but when I start iView (linux 64 version), it is in Chinese with no obvious option to switch to English.
Uncaught ReferenceError: DEV is not defined
at Function.RootClass.extend (clazz.js:66)
at Object.env (Component.js:23)
at webpack_require (bootstrap 3a59e3b4d5938b2661e1:693)
at fn (bootstrap 3a59e3b4d5938b2661e1:114)
at Object. (vendors.js:127656)
at webpack_require (bootstrap 3a59e3b4d5938b2661e1:693)
at fn (bootstrap 3a59e3b4d5938b2661e1:114)
at Object. (util.js:614)
at Object.defineProperty.value (echarts.js:2003)
at webpack_require (bootstrap 3a59e3b4d5938b2661e1:693)
As much as I would love to learn Chinese! I just think it will take longer than I need, is there an english CLI?
盡可能多地喜歡學中文!我只是認為需要更長的時間,是否有英文CLI?
部分源码:
function apiAxios(method, url, params, config) {
iView.Spin.show()
axios({
method: method,
url: url,
data: params,
withCredentials: false
}).then((res) => {
iView.Spin.hide()
}).catch((err) => {
iView.Spin.hide()
errorHandler(err, config.errorFn)
})
}
报错:
Uncaught TypeError: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'
Install fail! Error: post install error, please remove node_modules before retry!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.