sbd-npm 1.2.6 → 1.2.7
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.
- package/package.json +1 -1
- package/util.js +25 -0
package/package.json
CHANGED
package/util.js
CHANGED
@@ -1207,6 +1207,31 @@ const Util = {
|
|
1207
1207
|
});
|
1208
1208
|
},
|
1209
1209
|
|
1210
|
+
/**
|
1211
|
+
* 沪深港股通成交股统计
|
1212
|
+
* @param obj
|
1213
|
+
* @param profile
|
1214
|
+
*/
|
1215
|
+
init_profile_component: function(obj, profile) {
|
1216
|
+
if (profile && profile.length > 0) {
|
1217
|
+
Util.init_modal_skeleton("profile_modal");
|
1218
|
+
$("#profile_modal_title").html("简介");
|
1219
|
+
let sub_profile = Util.sub_str(profile, 250);
|
1220
|
+
sub_profile += " <a class='unfold text-info' data-toggle='modal' data-target='.profile_modal' href='#'>展开</a>";
|
1221
|
+
obj.html(sub_profile);
|
1222
|
+
$('#profile_modal').on('shown.bs.modal', function () {
|
1223
|
+
let p_arr = profile.split("。");
|
1224
|
+
let _html = [];
|
1225
|
+
p_arr.forEach(function (p) {
|
1226
|
+
if (p.length > 0) {
|
1227
|
+
_html.push("<p>", p.replace(/,/g, ","), "。</p>");
|
1228
|
+
}
|
1229
|
+
});
|
1230
|
+
Util.render_table_html("profile_modal_body", _html);
|
1231
|
+
});
|
1232
|
+
}
|
1233
|
+
},
|
1234
|
+
|
1210
1235
|
/**
|
1211
1236
|
* 当前时间戳
|
1212
1237
|
* @returns {number}
|