From 07506d995a2ecff9decc0b3545caf1052308a228 Mon Sep 17 00:00:00 2001
From: 李林 <z1292839451@163.com>
Date: 星期一, 18 三月 2024 15:21:53 +0800
Subject: [PATCH] 功能调整
---
src/components/tool/excel.vue | 90 ++++++++++++++++++++++++--------------------
1 files changed, 49 insertions(+), 41 deletions(-)
diff --git a/src/components/tool/excel.vue b/src/components/tool/excel.vue
index 3353db2..ece94a6 100644
--- a/src/components/tool/excel.vue
+++ b/src/components/tool/excel.vue
@@ -19,11 +19,11 @@
border-color: transparent;
cursor: pointer;
}
-
+
#luckysheet .save:hover{
opacity: .8;
}
-
+
#luckysheet .save:active{
opacity: .7;
}
@@ -33,10 +33,11 @@
</template>
<script>
+// import { data } from 'jquery';
export default {
+ props: ['data','title'],
data() {
return {
- data: {}
}
},
mounted() {
@@ -46,44 +47,51 @@
},
methods: {
templateWrite() {
- $(function() {
- //閰嶇疆椤�
- var options = {
- container: 'luckysheet',
- title: "妯℃澘缂栧埗",
- lang: "zh",
- showsheetbar: false,
- showstatisticBarConfig: {
- view: false
- },
- data: [{
- name: '妯℃澘',
- order: '0'
- }],
- enableAddRow: false,
- row: 100,
- enableAddBackTop: false,
- showtoolbarConfig: {
- chart: false, // '鍥捐〃'
- pivotTable: false, //'鏁版嵁閫忚琛�'
- protection:false, // '宸ヤ綔琛ㄤ繚鎶�'
- },
- cellRightClickConfig: {
- copyAs: false, // 澶嶅埗涓�
- hideRow: false, // 闅愯棌閫変腑琛屽拰鏄剧ず閫変腑琛�
- hideColumn: false, // 闅愯棌閫変腑鍒楀拰鏄剧ず閫変腑鍒�
- sort: false, // 鎺掑簭閫夊尯
- filter: false, // 绛涢�夐�夊尯
- chart: false, // 鍥捐〃鐢熸垚
- image: false, // 鎻掑叆鍥剧墖
- matrix: false, // 鐭╅樀鎿嶄綔閫夊尯
- },
- myFolderUrl: 'http://127.0.0.1/',
- functionButton: '<button onClick="excelClosed()" class="save">淇濆瓨</button>'
- }
- luckysheet.create(options)
- })
+ if(this.data!=null&&this.data!=''){
+ let option = JSON.parse(this.data)
+ option.title = this.title
+ luckysheet.create(option)
+ }else{
+ $(function() {
+ //閰嶇疆椤�
+ var options = {
+ container: 'luckysheet',
+ title: this.title,
+ lang: "zh",
+ showsheetbar: false,
+ showstatisticBarConfig: {
+ view: false
+ },
+ data: [{
+ name: '妯℃澘',
+ order: '0'
+ }],
+ enableAddRow: false,
+ row: 60,
+ column: 26,
+ enableAddBackTop: false,
+ showtoolbarConfig: {
+ chart: false, // '鍥捐〃'
+ pivotTable: false, //'鏁版嵁閫忚琛�'
+ protection:false, // '宸ヤ綔琛ㄤ繚鎶�'
+ },
+ cellRightClickConfig: {
+ copyAs: false, // 澶嶅埗涓�
+ hideRow: false, // 闅愯棌閫変腑琛屽拰鏄剧ず閫変腑琛�
+ hideColumn: false, // 闅愯棌閫変腑鍒楀拰鏄剧ず閫変腑鍒�
+ sort: false, // 鎺掑簭閫夊尯
+ filter: false, // 绛涢�夐�夊尯
+ chart: false, // 鍥捐〃鐢熸垚
+ image: false, // 鎻掑叆鍥剧墖
+ matrix: false, // 鐭╅樀鎿嶄綔閫夊尯
+ },
+ myFolderUrl: 'http://127.0.0.1/',
+ functionButton: '<button onClick="excelClosed()" class="save">淇濆瓨</button>'
+ }
+ luckysheet.create(options)
+ })
+ }
}
}
}
-</script>
\ No newline at end of file
+</script>
--
Gitblit v1.9.3