sbd-npm 1.2.14 → 1.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -228,3 +228,19 @@ const MenuList = [
228
228
  ]
229
229
  },
230
230
  ];
231
+
232
+ const ClassifyList = [
233
+ '上证50',
234
+ '沪深300',
235
+ '中证800',
236
+ '中证1000',
237
+ '中证500',
238
+ '中证100',
239
+ '科创50',
240
+ '科创',
241
+ '中小板',
242
+ '创业板',
243
+ '创业板50',
244
+ '创业板指',
245
+ '新股',
246
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.2.14",
3
+ "version": "1.2.17",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -613,11 +613,11 @@ let Stock = {
613
613
  "element_id": "profit_table",
614
614
  "head_cols": [
615
615
  {"name": "年份季度"},
616
- {"name": "净资产收益率(ROE)", "tooltip": "Return On Equity"},
616
+ {"name": "ROE", "tooltip": "净资产收益率(Return On Equity)"},
617
617
  {"name": "净利率(%)"},
618
618
  {"name": "毛利率"},
619
619
  {"name": "净利润"},
620
- {"name": "每股收益(EPS)", "tooltip": "Earnings Per Share"},
620
+ {"name": "EPS", "tooltip": "每股收益(Earnings Per Share)"},
621
621
  {"name": "营业收入"},
622
622
  {"name": "每股主营业务收入"},
623
623
  ]
package/util.js CHANGED
@@ -577,6 +577,13 @@ const Util = {
577
577
  return /(iPhone|iPad|iPod|iOS|Android|Mobile)/i.test(navigator.userAgent);
578
578
  },
579
579
 
580
+ /**
581
+ * 是否苹果系的设备
582
+ */
583
+ is_macintosh: function () {
584
+ return /(Mac|iPhone|iPod|iPad)/i.test(navigator.userAgent);
585
+ },
586
+
580
587
  /**
581
588
  * 分页函数
582
589
  * @param data_id
@@ -1234,6 +1241,23 @@ const Util = {
1234
1241
  }
1235
1242
  },
1236
1243
 
1244
+ /**
1245
+ * 初始板块组件
1246
+ * @param component_id
1247
+ */
1248
+ init_classify_component: function (component_id) {
1249
+ let element_id = component_id.replace("_div", "");
1250
+ let html = [];
1251
+ html.push('<label for="classify"></label>');
1252
+ html.push('<select id="classify" class="form-control">');
1253
+ html.push('<option value="">板块</option>');
1254
+ ClassifyList.forEach(function (classify) {
1255
+ html.push('<option value="', classify, '">', classify, '</option>');
1256
+ });
1257
+ html.push('</select>');
1258
+ $("#" + component_id).html(html.join(""));
1259
+ },
1260
+
1237
1261
  /**
1238
1262
  * 当前时间戳
1239
1263
  * @returns {number}
package/.npmignore DELETED
@@ -1 +0,0 @@
1
- sbd-npm.md