@@ -36,13 +36,13 @@ export let FileReaderUtil = {
3636 rAT : typeof FileReader !== 'undefined' && FileReader . prototype && FileReader . prototype . readAsText ,
3737 /**
3838 * @function FileReaderUtil.prototype.readFile
39- * @description 读取文件
40- * @param {string } fileType - 当前读取的文件类型
39+ * @description 读取文件。
40+ * @param {string } fileType - 当前读取的文件类型。
4141 *
42- * @param {Object } file - 读取回来的文件内容对象
43- * @param {function } success - 读取文件成功回调函数
44- * @param {function } failed - 读取文件失败回调函数
45- * @param {Object } context - 回调重定向对象
42+ * @param {Object } file - 读取回来的文件内容对象。
43+ * @param {function } success - 读取文件成功回调函数。
44+ * @param {function } failed - 读取文件失败回调函数。
45+ * @param {Object } context - 回调重定向对象。
4646 */
4747 readFile ( fileType , file , success , failed , context ) {
4848 if ( FileTypes . JSON === fileType || FileTypes . GEOJSON === fileType ) {
@@ -53,11 +53,11 @@ export let FileReaderUtil = {
5353 } ,
5454
5555 /**
56- * @description 读取文本文件
57- * @param {Object } file 文件内容对象
58- * @param {function } success 读取文件成功回调函数
59- * @param {function } failed 读取文件失败回调函数
60- * @param {Object } context - 回调重定向对象
56+ * @description 读取文本文件。
57+ * @param {Object } file 文件内容对象。
58+ * @param {function } success 读取文件成功回调函数。
59+ * @param {function } failed 读取文件失败回调函数。
60+ * @param {Object } context - 回调重定向对象。
6161 */
6262 readTextFile ( file , success , failed , context ) {
6363 let reader = new FileReader ( ) ;
@@ -71,11 +71,11 @@ export let FileReaderUtil = {
7171 } ,
7272
7373 /**
74- * @description 读取excel或csv文件
75- * @param {Object } file 文件内容对象
76- * @param {function } success 读取文件成功回调函数
77- * @param {function } failed 读取文件失败回调函数
78- * @param {Object } context - 回调重定向对象
74+ * @description 读取excel或csv文件。
75+ * @param {Object } file 文件内容对象。
76+ * @param {function } success 读取文件成功回调函数。
77+ * @param {function } failed 读取文件失败回调函数。
78+ * @param {Object } context - 回调重定向对象。
7979 */
8080 readXLSXFile ( file , success , failed , context ) {
8181 let reader = new FileReader ( ) ;
@@ -101,13 +101,13 @@ export let FileReaderUtil = {
101101
102102 /**
103103 * @function FileReaderUtil.prototype.processDataToGeoJson
104- * @description 将读取回来得数据统一处理为 GeoJSON 格式
105- * @param {string } type - 文件类型
106- * @param {Object } data - 读取返回的数据对象
107- * @param {function } success - 数据处理成功的回调
108- * @param {function } failed - 数据处理失败的回调
109- * @param {Object } context - 回调重定向对象
110- * @returns {GeoJSONObject } 返回标准 GeoJSON 规范格式数据
104+ * @description 将读取回来得数据统一处理为 GeoJSON 格式。
105+ * @param {string } type - 文件类型。
106+ * @param {Object } data - 读取返回的数据对象。
107+ * @param {function } success - 数据处理成功的回调。
108+ * @param {function } failed - 数据处理失败的回调。
109+ * @param {Object } context - 回调重定向对象。
110+ * @returns {GeoJSONObject } 返回标准 GeoJSON 规范格式数据。
111111 * @private
112112 */
113113 processDataToGeoJson ( type , data , success , failed , context ) {
@@ -137,9 +137,9 @@ export let FileReaderUtil = {
137137 } ,
138138 /**
139139 * @function FileReaderUtil.prototype.processExcelDataToGeoJson
140- * @description 表格文件数据处理
141- * @param {Object } data - 读取的表格文件数据
142- * @returns {GeoJSONObject } 返回标准 GeoJSON 规范格式数据
140+ * @description 表格文件数据处理。
141+ * @param {Object } data - 读取的表格文件数据。
142+ * @returns {GeoJSONObject } 返回标准 GeoJSON 规范格式数据。
143143 * @private
144144 */
145145 processExcelDataToGeoJson ( data ) {
@@ -187,8 +187,8 @@ export let FileReaderUtil = {
187187 return features ;
188188 } ,
189189 /**
190- * @description 判断是否地理X坐标
191- * @param {string } data 字段名
190+ * @description 判断是否地理X坐标。
191+ * @param {string } data 字段名。
192192 */
193193 isXField ( data ) {
194194 var lowerdata = data . toLowerCase ( ) ;
@@ -198,8 +198,8 @@ export let FileReaderUtil = {
198198 } ,
199199
200200 /**
201- * @description 判断是否地理Y坐标
202- * @param {string } data 字段名
201+ * @description 判断是否地理Y坐标。
202+ * @param {string } data 字段名。
203203 */
204204 isYField ( data ) {
205205 var lowerdata = data . toLowerCase ( ) ;
@@ -208,9 +208,9 @@ export let FileReaderUtil = {
208208 lowerdata === "latitude" || lowerdata === "lat" || lowerdata === "y坐标" ) ;
209209 } ,
210210 /**
211- * @description 字符串转为dataEditor 支持的csv格式数据
212- * @param {string } string 待转化的字符串
213- * @param {boolean } withoutTitle 是否需要列标题
211+ * @description 字符串转为dataEditor 支持的csv格式数据。
212+ * @param {string } string 待转化的字符串。
213+ * @param {boolean } withoutTitle 是否需要列标题。
214214 */
215215 string2Csv ( string , withoutTitle ) {
216216 // let rows = string.split('\r\n');
0 commit comments