sbd-npm 1.2.16 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/util.js +17 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.2.16",
3
+ "version": "1.2.17",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -1241,6 +1241,23 @@ const Util = {
1241
1241
  }
1242
1242
  },
1243
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
+
1244
1261
  /**
1245
1262
  * 当前时间戳
1246
1263
  * @returns {number}