sbd-npm 1.2.15 → 1.2.18

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.15",
3
+ "version": "1.2.18",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -1241,6 +1241,41 @@ 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="', element_id, '"></label>');
1252
+ html.push('<select id="', element_id, '" 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
+
1261
+ /**
1262
+ * 数量限制组件
1263
+ * @param component_id
1264
+ */
1265
+ init_limit_num_component: function (component_id) {
1266
+ let element_id = component_id.replace("_div", "");
1267
+ let html = [];
1268
+ html.push('<label for="', element_id, '"></label>');
1269
+ html.push('<select id="', element_id, '" class="form-control">');
1270
+ html.push('<option value="50">50</option>');
1271
+ html.push('<option value="100" selected>100</option>');
1272
+ html.push('<option value="200">200</option>');
1273
+ html.push('<option value="500">500</option>');
1274
+ html.push('<option value="1000">1000</option>');
1275
+ html.push('</select>');
1276
+ $("#" + component_id).html(html.join(""));
1277
+ },
1278
+
1244
1279
  /**
1245
1280
  * 当前时间戳
1246
1281
  * @returns {number}
package/.npmignore DELETED
@@ -1 +0,0 @@
1
- sbd-npm.md