Compare commits

...

20 Commits

Author SHA1 Message Date
c281e56d6d update dist and lib 2019-09-05 17:33:05 +08:00
ba35f1b252 update version to 2.4.4 2019-09-05 17:32:58 +08:00
6819fdead9 update changelog 2019-09-05 17:32:51 +08:00
6169d2ac90 Bug Fixes for v 2.4.4 2019-09-05 17:32:44 +08:00
786761f1ca update todo 2019-09-05 11:55:25 +08:00
529b0154db update dist 2019-09-04 11:24:03 +08:00
26a5c3cedd add unit configuration item 2019-09-04 11:23:59 +08:00
10824d0c88 update version to 2.4.3 2019-09-04 11:23:41 +08:00
c34c493eb4 update changelog 2019-09-04 11:23:29 +08:00
1708d58215 update readme 2019-09-04 09:04:33 +08:00
948d6e0672 update readme 2019-09-04 08:56:40 +08:00
0a82102ec6 update readme 2019-09-04 08:54:48 +08:00
1aa5979968 add note 2019-09-03 16:02:07 +08:00
ff964f6b72 remove useless folder 2019-09-03 11:12:47 +08:00
b2b83d9474 Add import suffix 2019-09-03 11:08:17 +08:00
a1d7d4626d update build process 2019-09-03 11:07:45 +08:00
170facb3fc update dependencies 2019-09-03 11:07:26 +08:00
5224e80321 add feedback group img 2019-09-02 18:49:58 +08:00
1c4fa02e45 update readme 2019-09-02 18:49:37 +08:00
70164efe70 add TODO 2019-09-02 14:17:07 +08:00
18 changed files with 23845 additions and 21 deletions

View File

@ -1,3 +1,15 @@
# 2.4.4-alpha (2019-09-05)
### Bug Fixes
- **scrollBoard:** Header column width is abnormal when row data is empty.
# 2.4.3-alpha (2019-09-04)
### Perfect
- **scrollRankingBoard:** Add a unit configuration item.
# 2.4.2-alpha (2019-08-30) # 2.4.2-alpha (2019-08-30)
### Perfect ### Perfect

BIN
QQGroup.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -38,6 +38,19 @@ Vue.use(borderBox1)
详细文档及示例请移步[HomePage](http://datav.jiaminghi.com). 详细文档及示例请移步[HomePage](http://datav.jiaminghi.com).
### TODO
* **飞线图**添加多中心点及反向飞线功能
* **边框**及**装饰**添加颜色及其他必要配置项,增强可配置性及灵活性.
### 致谢
组件库的开发基于个人学习和兴趣由于技术水平及经验的限制组件尚有许多不完善之处如有BUG可及时提交[issue](https://github.com/jiaming743/DataV/issues/new?template=bug_report.md)或添加反馈群进行反馈,也欢迎提供指正和建议,感谢各位的支持。
### 反馈
![Feedback](./QQGroup.png)
### Demo ### Demo
Demo页面使用了全屏组件请F11全屏后查看。 Demo页面使用了全屏组件请F11全屏后查看。

View File

@ -39,6 +39,19 @@ Vue.use(borderBox1)
Detailed documents and examples can be viewed on the [HomePage](http://datav.jiaminghi.com). Detailed documents and examples can be viewed on the [HomePage](http://datav.jiaminghi.com).
### TODO
* **flylineChart**Add multi-center point and reverse fly line function.
* Add color and other necessary configuration to the **borderBox** and **decoration** to enhance configurability and flexibility.
### Acknowledgement
The development of the component library is based on personal learning and interest. Due to technical level and experience limitations, there are still many imperfections in the components. If there are errors, you can submit [issue](https://github.com/jiaming743/DataV/issues/new?template=bug_report.md) in time or add feedback groups for feedback. Welcome to provide corrections and suggestions. Thank you for your support.
### Feedback
![Feedback](./QQGroup.png)
### Demo ### Demo
The Demo page uses the full-screen component, please view it after F11 full screen. The Demo page uses the full-screen component, please view it after F11 full screen.

4
build/entry.js Normal file
View File

@ -0,0 +1,4 @@
import Vue from 'vue'
import datav from '../src/index'
Vue.use(datav)

View File

@ -1,14 +1,17 @@
const { copyDir, fileForEach, readFile, writeFile, unlinkDirFileByExtname, dirForEach } = require('@jiaminghi/fs') const { copyDir, fileForEach, readFile, writeFile, unlinkDirFileByExtname, dirForEach } = require('@jiaminghi/fs')
const print = require('./plugin/print') const print = require('./plugin/print')
const path = require('path') const path = require('path')
const doExec = require('./plugin/exec') const exec = require('./plugin/exec')
const PACKAGE_SRC = './src' const PACKAGE_SRC = './src'
const COMPILE_SRC = './lib' const COMPILE_SRC = './lib'
const COMPONENTS_DIR = '/components' const COMPONENTS_DIR = '/components'
const ENTRANCE = '/index.js' const ENTRANCE = '/index.js'
const libName = 'datav'
async function start () { async function start () {
// Compile for NPM
const copyPackage = await copyDir(PACKAGE_SRC, COMPILE_SRC) const copyPackage = await copyDir(PACKAGE_SRC, COMPILE_SRC)
if (!copyPackage) { if (!copyPackage) {
@ -63,6 +66,27 @@ async function start () {
print.success('Finish adding components export statement!') print.success('Finish adding components export statement!')
// Compile for UMD version
const rollupCompile = await exec(`rollup -c build/rollup.config.js`)
if (!rollupCompile) {
print.error('Exception in rollupCompile')
return
}
print.tip('After rollupCompile')
// const uglifyjs = await exec(`uglifyjs dist/${libName}.map.js -o dist/${libName}.min.js`)
// if (!uglifyjs) {
// print.error('Exception in uglifyjs')
// return
// }
// print.tip('After uglifyjs')
print.yellow('-------------------------------------') print.yellow('-------------------------------------')
print.success(' DataV Lib Compile Success! ') print.success(' DataV Lib Compile Success! ')
print.yellow('-------------------------------------') print.yellow('-------------------------------------')
@ -122,7 +146,7 @@ async function compileLessToCss () {
maxBuffer: 1024 ** 5 maxBuffer: 1024 ** 5
}) })
const compile = await doExec(execString) const compile = await exec(execString)
if (!compile) { if (!compile) {
print.error(execString + ' Error!') print.error(execString + ' Error!')
@ -180,6 +204,8 @@ async function addComponentsExport () {
return write return write
} }
module.exports = start async function compileUMDVersion () {
}
start()

23
build/rollup.config.js Normal file
View File

@ -0,0 +1,23 @@
import resolve from 'rollup-plugin-node-resolve'
import vue from 'rollup-plugin-vue'
import commonjs from 'rollup-plugin-commonjs'
import babel from 'rollup-plugin-babel'
export default {
input: 'build/entry.js',
// input: 'src/index.js',
output: {
format: 'umd',
file: 'dist/datav.map.js',
name: 'datav'
},
plugins: [
resolve(),
babel({
exclude: 'node_modules/**'
}),
commonjs(),
vue(),
],
external: ['Vue']
}

23701
dist/datav.map.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@
<script> <script>
import Charts from '@jiaminghi/charts' import Charts from '@jiaminghi/charts'
import dvDigitalFlop from '../../digitalFlop/src/main' import dvDigitalFlop from '../../digitalFlop/src/main.vue'
import { deepMerge } from '@jiaminghi/charts/lib/util/index' import { deepMerge } from '@jiaminghi/charts/lib/util/index'

View File

@ -260,11 +260,16 @@ export default {
calcWidths () { calcWidths () {
const { width, mergedConfig, rowsData } = this const { width, mergedConfig, rowsData } = this
const { columnWidth } = mergedConfig const { columnWidth, header } = mergedConfig
const usedWidth = columnWidth.reduce((all, w) => all + w, 0) const usedWidth = columnWidth.reduce((all, w) => all + w, 0)
const columnNum = rowsData[0] ? rowsData[0].ceils.length : 0 let columnNum = 0
if (rowsData[0]) {
columnNum = rowsData[0].ceils.length
} else if (header.length) {
columnNum = header.length
}
const avgWidth = (width - usedWidth) / (columnNum - columnWidth.length) const avgWidth = (width - usedWidth) / (columnNum - columnWidth.length)

View File

@ -9,7 +9,7 @@
<div class="ranking-info"> <div class="ranking-info">
<div class="rank">No.{{ item.ranking }}</div> <div class="rank">No.{{ item.ranking }}</div>
<div class="info-name">{{ item.name }}</div> <div class="info-name">{{ item.name }}</div>
<div class="ranking-value">{{ item.value }}</div> <div class="ranking-value">{{ item.value + mergedConfig.unit }}</div>
</div> </div>
<div class="ranking-column"> <div class="ranking-column">
@ -69,7 +69,14 @@ export default {
* @default carousel = 'single' * @default carousel = 'single'
* @example carousel = 'single' | 'page' * @example carousel = 'single' | 'page'
*/ */
carousel: 'single' carousel: 'single',
/**
* @description Value unit
* @type {String}
* @default unit = ''
* @example unit = 'ton'
*/
unit: ''
}, },
mergedConfig: null, mergedConfig: null,

View File

@ -1,6 +1,6 @@
{ {
"name": "@jiaminghi/data-view", "name": "@jiaminghi/data-view",
"version": "2.4.2", "version": "2.4.4",
"author": "JiaMing <743192023@qq.com>", "author": "JiaMing <743192023@qq.com>",
"description": "Vue Large screen data display component library", "description": "Vue Large screen data display component library",
"main": "lib/index.js", "main": "lib/index.js",
@ -9,8 +9,8 @@
"url": "https://github.com/jiaming743/DataV.git" "url": "https://github.com/jiaming743/DataV.git"
}, },
"scripts": { "scripts": {
"compile": "node publish.js", "build": "node build/index.js",
"prepublish": "npm run compile", "prepublish": "npm run build",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"license": "MIT", "license": "MIT",
@ -24,10 +24,21 @@
"datavisual" "datavisual"
], ],
"dependencies": { "dependencies": {
"@jiaminghi/charts": "*" "@jiaminghi/charts": "*",
"@babel/runtime": "^7.5.5"
}, },
"homepage": "https://github.com/jiaming743/DataV#readme", "homepage": "https://github.com/jiaming743/DataV#readme",
"devDependencies": { "devDependencies": {
"@jiaminghi/fs": "0.0.1" "@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/plugin-transform-runtime": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@jiaminghi/fs": "0.0.1",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-uglify": "^6.0.3",
"rollup-plugin-vue": "^5.0.1",
"vue-template-compiler": "^2.6.10"
} }
} }

View File

@ -1,3 +0,0 @@
const start = require('./publish/index')
start()

View File

@ -11,7 +11,7 @@
<script> <script>
import Charts from '@jiaminghi/charts' import Charts from '@jiaminghi/charts'
import dvDigitalFlop from '../../digitalFlop/src/main' import dvDigitalFlop from '../../digitalFlop/src/main.vue'
import { deepMerge } from '@jiaminghi/charts/lib/util/index' import { deepMerge } from '@jiaminghi/charts/lib/util/index'

View File

@ -260,11 +260,16 @@ export default {
calcWidths () { calcWidths () {
const { width, mergedConfig, rowsData } = this const { width, mergedConfig, rowsData } = this
const { columnWidth } = mergedConfig const { columnWidth, header } = mergedConfig
const usedWidth = columnWidth.reduce((all, w) => all + w, 0) const usedWidth = columnWidth.reduce((all, w) => all + w, 0)
const columnNum = rowsData[0] ? rowsData[0].ceils.length : 0 let columnNum = 0
if (rowsData[0]) {
columnNum = rowsData[0].ceils.length
} else if (header.length) {
columnNum = header.length
}
const avgWidth = (width - usedWidth) / (columnNum - columnWidth.length) const avgWidth = (width - usedWidth) / (columnNum - columnWidth.length)

View File

@ -9,7 +9,7 @@
<div class="ranking-info"> <div class="ranking-info">
<div class="rank">No.{{ item.ranking }}</div> <div class="rank">No.{{ item.ranking }}</div>
<div class="info-name">{{ item.name }}</div> <div class="info-name">{{ item.name }}</div>
<div class="ranking-value">{{ item.value }}</div> <div class="ranking-value">{{ item.value + mergedConfig.unit }}</div>
</div> </div>
<div class="ranking-column"> <div class="ranking-column">
@ -69,7 +69,14 @@ export default {
* @default carousel = 'single' * @default carousel = 'single'
* @example carousel = 'single' | 'page' * @example carousel = 'single' | 'page'
*/ */
carousel: 'single' carousel: 'single',
/**
* @description Value unit
* @type {String}
* @default unit = ''
* @example unit = 'ton'
*/
unit: ''
}, },
mergedConfig: null, mergedConfig: null,