@@ -40,17 +40,14 @@ export default {
type: Array,
required: true,
},
-
estimatedItemSize: {
type: Number,
default: 30,
},
-
itemSizeGetter: {
type: Function,
},
},
-
data() {
return {
viewWidth: 0,
@@ -83,7 +80,7 @@ export default {
},
computed: {
contentWidth() {
- const { data, lastMeasuredIndex, estimatedItemSize } = this;
+ const {data, lastMeasuredIndex, estimatedItemSize} = this;
let itemCount = data.length;
if (lastMeasuredIndex >= 0) {
const lastMeasuredSizeAndOffset = this.getLastMeasuredSizeAndOffset();
@@ -96,11 +93,11 @@ export default {
watch: {
data: {
handler() {
- let { v, h } = this.cacheVH;
+ let {v, h} = this.cacheVH;
this.handleScroll(v, h);
},
deep: true,
- },
+ },
},
mounted() {
this.updateVisibleData();
@@ -108,7 +105,7 @@ export default {
},
methods: {
getItemSizeAndOffset(index) {
- const { lastMeasuredIndex, sizeAndOffsetCahce, data, itemSizeGetter } = this;
+ const {lastMeasuredIndex, sizeAndOffsetCahce, data, itemSizeGetter} = this;
if (lastMeasuredIndex >= index) {
return sizeAndOffsetCahce[index];
}
@@ -139,25 +136,21 @@ export default {
}
return sizeAndOffsetCahce[index];
},
-
getLastMeasuredSizeAndOffset() {
- return this.lastMeasuredIndex >= 0 ? this.sizeAndOffsetCahce[this.lastMeasuredIndex] : { offset: 0, size: 0 };
+ return this.lastMeasuredIndex >= 0 ? this.sizeAndOffsetCahce[this.lastMeasuredIndex] : {offset: 0, size: 0};
},
-
findNearestItemIndex(scrollLeft) {
- const { data } = this;
+ const {data} = this;
let total = 0;
for (let i = 0, j = data.length; i < j; i++) {
const size = this.getItemSizeAndOffset(i).size;
total += size;
- if (total >= scrollLeft || i === j - 1) {
+ if (total >= scrollLeft || i === j -1) {
return i;
}
}
-
return 0;
},
-
updateVisibleData(scrollLeft) {
let canScrollWidth = this.contentWidth - this.viewWidth;
scrollLeft = scrollLeft || 0;
@@ -168,13 +161,12 @@ export default {
const end = this.findNearestItemIndex(scrollLeft + (this.$el.clientWidth || 1400));
this.visibleData = this.data.slice(start, Math.min(end + 3, this.data.length));
this.startIndex = start;
- this.$refs.content.style.webkitTransform = `translate3d(${this.getItemSizeAndOffset(start).offset}px, 0, 0)`;
+ this.$refs.content.style.webkitTransform = `translate3d(${ this.getItemSizeAndOffset(start).offset }px, 0, 0)`;
},
-
handleScroll(v, h) {
- const { scrollLeft } = h;
- this.cacheVH = { v, h };
- this.$emit('on-scroll', { v, h });
+ const {scrollLeft} = h;
+ this.cacheVH = {v, h};
+ this.$emit('on-scroll', {v, h});
this.updateVisibleData(scrollLeft);
},
},
@@ -189,7 +181,6 @@ right: 0;
z-index: -1;
height: 100%;
}
-
.list-view-content {
display: flex;
left: 0;
@@ -198,7 +189,6 @@ top: 0;
position: absolute;
height: 100%;
}
-
.list-view-item {
height: 100%;
color: #666;
@@ -206,4 +196,4 @@ box-sizing: border-box;
flex-shrink: 0;
text-align: center;
}
-
+
\ No newline at end of file
diff --git a/src/js/component/table/expand.js b/src/js/component/table/expand.js
new file mode 100644
index 0000000..945a279
--- /dev/null
+++ b/src/js/component/table/expand.js
@@ -0,0 +1,21 @@
+export default {
+ name: 'TableExpand',
+ functional: true,
+ props: {
+ row: Object,
+ render: Function,
+ index: Number,
+ column: {
+ type: Object,
+ default: null,
+ },
+ },
+ render: (h, ctx) => {
+ const params = {
+ row: ctx.props.row,
+ index: ctx.props.index,
+ };
+ if (ctx.props.column) params.column = ctx.props.column;
+ return ctx.props.render(h, params);
+ },
+};
diff --git a/src/js/component/table/historyTable.vue b/src/js/component/table/historyTable.vue
index f5ae138..b3d941d 100644
--- a/src/js/component/table/historyTable.vue
+++ b/src/js/component/table/historyTable.vue
@@ -298,4 +298,4 @@ export default {
},
};
-
+
diff --git a/src/js/component/table/index.js b/src/js/component/table/index.js
index 3807510..05cfcb2 100644
--- a/src/js/component/table/index.js
+++ b/src/js/component/table/index.js
@@ -1,3 +1,7 @@
-import WeTable from './table.vue'
+import WeTable from './table.vue';
+import historyTable from './historyTable.vue';
-export default WeTable
+export default {
+ WeTable,
+ historyTable,
+};
diff --git a/src/js/component/table/index.scss b/src/js/component/table/index.scss
index 9d70c37..d34159d 100644
--- a/src/js/component/table/index.scss
+++ b/src/js/component/table/index.scss
@@ -92,12 +92,10 @@ $border-color : #e0e0e0;
border-bottom: 1px solid $border-color;
}
.we-column-item{
- height: 42px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
+ height: 67px;
border-bottom: 1px solid $border-color;
- padding: 12px 0 12px 10px;
+ padding: 6px;
+ word-break: break-all;
&.odd{
background: rgb(250, 250, 250)
}
@@ -108,4 +106,100 @@ $border-color : #e0e0e0;
color: red;
font-style: italic;
}
-}
\ No newline at end of file
+ .we-column-item-content {
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ overflow-y: auto;
+ }
+}
+.hidden-div {
+ .hidden-div-item {
+ padding: 12px 10px 12px 10px;
+ word-break: break-all;
+ }
+}
+.we-table-wrap {
+ overflow: auto;
+ display: block;
+ .we-table {
+ border: 1px solid #dcdee2;
+ table-layout: fixed;
+ .we-table-thead {
+ background-color: #2d8cf0;
+ color: #fff;
+ .we-table-thead-cell {
+ border-right: 1px solid #dcdee2;
+ border-bottom: 1px solid #dcdee2;
+ min-width: 0;
+ height: 48px;
+ box-sizing: border-box;
+ text-align: left;
+ text-overflow: ellipsis;
+ vertical-align: middle;
+ }
+ }
+ .we-table-row {
+ height: 40px;
+ &:nth-child(2n) {
+ background-color: #f8f8f9;
+ }
+ &:hover {
+ background-color: #ebf7ff;
+ }
+ .we-table-row-cell {
+ border-right: 1px solid #dcdee2;
+ border-bottom: 1px solid #dcdee2;
+ min-width: 0;
+ height: 48px;
+ box-sizing: border-box;
+ text-align: left;
+ text-overflow: ellipsis;
+ vertical-align: middle;
+ .we-table-row-label {
+ line-height: 20px;
+ padding-left: 18px;
+ padding-right: 18px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: normal;
+ word-break: break-all;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ &.ellipsis {
+ text-align: left;
+ word-break: keep-all;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ .render-btn {
+ color: #515a6e;
+ background-color: transparent;
+ border-color: transparent;
+ padding: 1px 7px 2px;
+ font-size: 12px;
+ border-radius: 3px;
+ display: inline-block;
+ margin-bottom: 0;
+ font-weight: 400;
+ text-align: center;
+ cursor: pointer;
+ background-image: none;
+ border: 1px solid transparent;
+ white-space: nowrap;
+ border-radius: 4px;
+ transition: color .2s linear,background-color .2s linear,border .2s linear,box-shadow .2s linear;
+ &:hover {
+ color: #57a3f3;
+ background-color: #fff;
+ border-color: transparent;
+ text-decoration: none;
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/js/component/table/list.vue b/src/js/component/table/list.vue
index eb0b7dc..e3ed791 100644
--- a/src/js/component/table/list.vue
+++ b/src/js/component/table/list.vue
@@ -2,7 +2,7 @@
-
- {{ content }}
+ {{ content }}
-
+
+
\ No newline at end of file
diff --git a/src/js/component/table/table.vue b/src/js/component/table/table.vue
index 4091743..e285143 100644
--- a/src/js/component/table/table.vue
+++ b/src/js/component/table/table.vue
@@ -34,16 +34,14 @@
-
+
+
\ No newline at end of file
diff --git a/src/js/module/FAQ/index.js b/src/js/module/FAQ/index.js
new file mode 100755
index 0000000..bfece56
--- /dev/null
+++ b/src/js/module/FAQ/index.js
@@ -0,0 +1,7 @@
+export default {
+ name: 'FAQ',
+ data: {
+ ENVIR: process.env.NODE_ENV,
+ },
+ component: () => import('./index.vue'),
+};
diff --git a/src/js/module/FAQ/index.vue b/src/js/module/FAQ/index.vue
new file mode 100755
index 0000000..3731924
--- /dev/null
+++ b/src/js/module/FAQ/index.vue
@@ -0,0 +1,58 @@
+