From 07956687ab6edf6a1bee61bf95ee1fa88740fede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=89=E8=82=89?= <9323294@qq.com> Date: Thu, 28 Nov 2019 12:18:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BA=8F=E5=8F=B7=E8=A1=A8?= =?UTF-8?q?=E5=A4=B4=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/scrollBoard/src/main.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/scrollBoard/src/main.vue b/src/components/scrollBoard/src/main.vue index fa6be38..f259014 100644 --- a/src/components/scrollBoard/src/main.vue +++ b/src/components/scrollBoard/src/main.vue @@ -134,6 +134,12 @@ export default { * @default index = false */ index: false, + /** + * @description index Header + * @type {String} + * @default indexHeader = '#' + */ + indexHeader: '#', /** * @description Carousel type * @type {String} @@ -215,7 +221,7 @@ export default { this.mergedConfig = deepMerge(deepClone(defaultConfig, true), config || {}) }, calcHeaderData () { - let { header, index } = this.mergedConfig + let { header, index, indexHeader} = this.mergedConfig if (!header.length) { this.header = [] @@ -225,7 +231,7 @@ export default { header = [...header] - if (index) header.unshift('#') + if (index) header.unshift(indexHeader) this.header = header }, @@ -236,7 +242,7 @@ export default { data = data.map((row, i) => { row = [...row] - const indexTag = `${i + 1}` + const indexTag = `${i + 1}` row.unshift(indexTag)