libf 3 anos atrás
pai
commit
2dc60bb52a

+ 2 - 2
src/config.js

@@ -6,9 +6,11 @@ export default {
     loading:{}, //自定义loading
     column: 60, //空表格默认的列数量
     row: 84, //空表格默认的行数据量
+    allowEdit: true, //是否允许前台编辑
     allowCopy: true, //是否允许拷贝
     showtoolbar: true, //是否第二列显示工具栏
     showinfobar: true, //是否显示顶部名称栏
+    sheetFormulaBar: true, //是否显示公式栏
     showsheetbar: true, //是否显示底部表格名称区域
     showstatisticBar: true, //是否显示底部计数栏
     pointEdit: false, //是否是编辑器插入表格模式
@@ -23,7 +25,6 @@ export default {
     config: {}, //表格行高、列宽、合并单元格、公式等设置
     fullscreenmode: true, //是否全屏模式,非全屏模式下,标记框不会强制选中。
     devicePixelRatio: window.devicePixelRatio, //设备比例,比例越大表格分标率越高
-    allowEdit: true, //是否允许前台编辑
     loadUrl: "", // 配置loadUrl的地址,luckysheet会通过ajax请求表格数据,默认载入status为1的sheet数据中的所有data,其余的sheet载入除data字段外的所有字段
     loadSheetUrl: "", //配置loadSheetUrl的地址,参数为gridKey(表格主键) 和 index(sheet主键合集,格式为[1,2,3]),返回的数据为sheet的data字段数据集合
     gridKey: "", // 表格唯一标识符
@@ -60,7 +61,6 @@ export default {
     defaultFontSize:10,
     limitSheetNameLength:true,    //是否限制工作表名的长度
     defaultSheetNameMaxLength:31,  //默认工作表名称的最大长度
-    sheetFormulaBar:true, //是否显示公式栏
     showtoolbarConfig:{}, //自定义工具栏
     showsheetbarConfig:{}, //自定义底部sheet页
     showstatisticBarConfig:{}, //自定义计数栏

+ 24 - 24
src/index.html

@@ -28,7 +28,7 @@
 	
 	<div id="luckysheet" style="margin:0px;padding:0px;position:absolute;width:100%;height:100%;left: 0px;top: 0px;"></div>
 	<!-- demo feature, non-production use -->
-	<script src="./demoData/demoFeature.js"></script>
+	<!-- <script src="./demoData/demoFeature.js"></script> -->
 	<script src="./demoData/sheetFormula.js"></script>
 	<script src="./demoData/sheetCell.js"></script>
 	<script src="./demoData/sheetConditionFormat.js"></script>
@@ -57,31 +57,31 @@
 		$(function () {
 
 			// According to the browser language
-			var lang = luckysheetDemoUtil.language() === 'zh' ? 'zh' : 'en';
-			var isShare = luckysheetDemoUtil.getRequest().share; // '?share=1' opens the collaborative editing mode
-			var gridKey = luckysheetDemoUtil.getRequest().gridKey; // workbook id for collaborative editing, or directly define here
+			// var lang = luckysheetDemoUtil.language() === 'zh' ? 'zh' : 'en';
+			// var isShare = luckysheetDemoUtil.getRequest().share; // '?share=1' opens the collaborative editing mode
+			// var gridKey = luckysheetDemoUtil.getRequest().gridKey; // workbook id for collaborative editing, or directly define here
             var options = null;
 
-            if(isShare || gridKey){
-				// http://localhost:3000/?gridKey=12eyy789-kk45ofid-23737245
-				if(!gridKey){
-					alert('If gridKey is not provided in the address bar, please add it in the source code')
-				}
-                options = {
-                    container: "luckysheet",
-                    lang: lang,
-                    allowUpdate:true,
-                    updateImageUrl: location.origin + "/luckysheet/api/updateImg",
-                    updateUrl: "ws://"+ location.host +"/luckysheet/websocket/luckysheet",
-                    gridKey: gridKey,
-                    loadUrl: location.origin + "/luckysheet/api/load",
-                    loadSheetUrl: location.origin + "/luckysheet/api/loadsheet"
-                }
-			}else{
+            // if(isShare || gridKey){
+			// 	// http://localhost:3000/?gridKey=12eyy789-kk45ofid-23737245
+			// 	if(!gridKey){
+			// 		alert('If gridKey is not provided in the address bar, please add it in the source code')
+			// 	}
+            //     options = {
+            //         container: "luckysheet",
+            //         lang: lang,
+            //         allowUpdate:true,
+            //         updateImageUrl: location.origin + "/luckysheet/api/updateImg",
+            //         updateUrl: "ws://"+ location.host +"/luckysheet/websocket/luckysheet",
+            //         gridKey: gridKey,
+            //         loadUrl: location.origin + "/luckysheet/api/load",
+            //         loadSheetUrl: location.origin + "/luckysheet/api/loadsheet"
+            //     }
+			// }else{
                 // http://localhost:3000/ 
                 options = {
                     container: 'luckysheet',
-					lang: lang,
+					lang: (document.documentElement.lang||document.head.lang||window.navigator.language||window.navigator.userLanguage||"zh").substr(0,2),
 					// pager: {
 					// 	pageIndex: 1,
 					// 	pageSize: 10,
@@ -142,7 +142,7 @@
 							// console.info(data,sheetFile,ctx)
 						},
 						updated:function(operate){
-							// console.info(operate)
+							// console.info('updated',operate)
 						},
 						cellUpdateBefore:function(r,c,value,isRefresh){
 							// console.info('cellUpdateBefore',r,c,value,isRefresh)
@@ -181,7 +181,7 @@
 							// console.info(json)
 						},
 						rangePasteBefore:function(range,data){
-							// console.info('rangePasteBefore',range,data)
+							console.info('rangePasteBefore',range,data)
 							// return false; //Can intercept paste
 						},
 						
@@ -1875,7 +1875,7 @@
 					"scrollTop": 0
 				}]*/
 				}
-			}
+			// }
 			options.loading={
 				image:()=>{
 					return `<svg viewBox="25 25 50 50" class="circular">

BIN
src/lib/element-ui@2.13.2/theme-chalk/fonts/element-icons.ttf


BIN
src/lib/element-ui@2.13.2/theme-chalk/fonts/element-icons.woff