diff --git a/app/views/WidgetOnly.vue b/app/views/WidgetOnly.vue
index f6b40a9..dce0be9 100644
--- a/app/views/WidgetOnly.vue
+++ b/app/views/WidgetOnly.vue
@@ -10,7 +10,11 @@
-
+
{{placeholder}}
@@ -31,6 +35,8 @@
fullscreen
collapse
refresh
+ is-actived
+ actived-color="#f4a"
:loading="loading"
@on-refresh="handleRefresh"
@on-fullscreen="handleFullscreen">
diff --git a/app/views/WidgetWithGrid.vue b/app/views/WidgetWithGrid.vue
index e53cfcc..cbc29da 100644
--- a/app/views/WidgetWithGrid.vue
+++ b/app/views/WidgetWithGrid.vue
@@ -1,5 +1,12 @@
-
+
Simple Widget Without Header
@@ -38,7 +45,27 @@
Widget with Footer
-
+ isStatic = val"
+ @on-refresh="handleRefresh">
+
+
+
+
+
+
+
+
+
+
@@ -58,15 +85,13 @@
-
+
Index
-
+
-
-
-
-
-
-
@@ -101,34 +116,21 @@ export default {
data () {
return {
loading: false,
+ isStatic: false,
layout: [
- { x: 0, y: 0, w: 2, h: 3, i: '0' },
- { x: 2, y: 0, w: 2, h: 3, i: '1' },
- { x: 4, y: 0, w: 2, h: 3, i: '2' },
- { x: 6, y: 0, w: 2, h: 3, i: '3' },
- { x: 8, y: 0, w: 2, h: 3, i: '4' },
- { x: 10, y: 0, w: 2, h: 3, i: '5' },
- { x: 0, y: 9, w: 6, h: 5, i: '6' },
- { x: 6, y: 9, w: 6, h: 5, i: '7' },
- { x: 0, y: 3, w: 8, h: 6, i: '8' },
- { x: 8, y: 3, w: 4, h: 6, i: '9' }
+ { x: 0, y: 0, w: 4, h: 3, i: '0' },
+ { x: 4, y: 0, w: 4, h: 3, i: '1' },
+ { x: 8, y: 0, w: 4, h: 3, i: '2' },
+ { x: 0, y: 3, w: 4, h: 3, i: '3' },
+ { x: 4, y: 3, w: 4, h: 3, i: '4' },
+ { x: 8, y: 3, w: 4, h: 3, i: '5' },
+ { x: 0, y: 6, w: 8, h: 6, i: '6' },
+ { x: 8, y: 6, w: 4, h: 6, i: '7' },
+ { x: 0, y: 12, w: 6, h: 5, i: '8' },
+ { x: 6, y: 12, w: 6, h: 5, i: '9' }
]
}
},
- methods: {
- handleRefresh () {
- this.loading = true
- setTimeout(() => {
- this.loading = false
- }, 2000)
- },
- handleLayoutUpdated (newLayout) {
- console.log(JSON.stringify(newLayout))
- },
- handleMove (params) {
- console.log(params)
- }
- },
created () {
this.barData = {
dimensions: {
@@ -159,38 +161,60 @@ export default {
data: [40000, 27800, 22000, 20200, 13600]
}]
}
- this.tableData = [{
- date: '2016-05-03',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄'
- }, {
- date: '2016-05-02',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄'
- }, {
- date: '2016-05-04',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄'
- }, {
- date: '2016-05-01',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄'
- }, {
- date: '2016-05-08',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄'
- }, {
- date: '2016-05-06',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄'
- }, {
- date: '2016-05-07',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄'
- }]
+ this.tableData = [
+ {
+ date: '2016-05-03',
+ name: '王小虎',
+ address: '上海市普陀区金沙江路 1518 弄'
+ }, {
+ date: '2016-05-02',
+ name: '王小虎',
+ address: '上海市普陀区金沙江路 1518 弄'
+ }, {
+ date: '2016-05-04',
+ name: '王小虎',
+ address: '上海市普陀区金沙江路 1518 弄'
+ }, {
+ date: '2016-05-01',
+ name: '王小虎',
+ address: '上海市普陀区金沙江路 1518 弄'
+ }, {
+ date: '2016-05-08',
+ name: '王小虎',
+ address: '上海市普陀区金沙江路 1518 弄'
+ }, {
+ date: '2016-05-06',
+ name: '王小虎',
+ address: '上海市普陀区金沙江路 1518 弄'
+ }, {
+ date: '2016-05-07',
+ name: '王小虎',
+ address: '上海市普陀区金沙江路 1518 弄'
+ }
+ ]
this.donutSetting = {
offsetY: '60%'
}
+ },
+ methods: {
+ handleRefresh () {
+ this.loading = true
+ setTimeout(() => {
+ this.loading = false
+ }, 2000)
+ },
+ onLayoutUpdated (newLayout) {
+ console.log(JSON.stringify(newLayout))
+ },
+ onMove (params) {
+ console.log(params)
+ },
+ onResize (params) {
+ console.log(params)
+ },
+ onContainerResized (params) {
+ console.log(params)
+ }
}
}
@@ -202,6 +226,9 @@ export default {
border-top: 1px solid #ebeef1;
}
.layout-center {
- text-align: center;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100%;
}
diff --git a/app/views/index.vue b/app/views/index.vue
index e8f348d..9b435b2 100644
--- a/app/views/index.vue
+++ b/app/views/index.vue
@@ -24,8 +24,8 @@