bhd-components 0.7.22 → 0.7.24

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.
@@ -120892,7 +120892,7 @@ function requireD () {
120892
120892
  + 'pragma private protected public pure ref return scope shared static struct '
120893
120893
  + 'super switch synchronized template this throw try typedef typeid typeof union '
120894
120894
  + 'unittest version void volatile while with __FILE__ __LINE__ __gshared|10 '
120895
- + '__thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ "0.7.22"',
120895
+ + '__thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ "0.7.24"',
120896
120896
  built_in:
120897
120897
  'bool cdouble cent cfloat char creal dchar delegate double dstring float function '
120898
120898
  + 'idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar '
@@ -1,5 +1,5 @@
1
- import { z as zhCN, C as ConfigProvider, _ as _extends, a as _object_destructuring_empty, j as jsx, b as _object_spread_props, S as StyleProvider, t as transform, c as _object_spread, d as _sliced_to_array, T as Tooltip, e as Table$2, I as Icon, f as jsxs, m as message, E as ExclamationCircleFilled, P as Pagination, g as Select, h as CaretDownOutlined, M as Modal, i as _inherits, k as _create_super, l as _create_class, n as _class_call_check, o as _define_property, p as _assert_this_initialized, q as _async_to_generator, L as LeftOutlined, R as RightOutlined, r as MinusOutlined, s as PlusOutlined, u as __generator, v as Input, w as SearchOutlined, x as CloseOutlined, X, y as I, H, A as Remarkable, D as Drawer, B as HighlightJS, Z as ZoomInOutlined, F as _to_consumable_array } from './fcb57c77.esm.es5.development.js';
2
- export { G as Affix, J as Alert, K as Anchor, aF as App, N as AutoComplete, O as Avatar, U as BackTop, V as Badge, W as Breadcrumb, Y as Button, $ as Calendar, a0 as Card, a1 as Carousel, a2 as Cascader, a3 as Checkbox, a4 as Col, a5 as Collapse, a6 as DatePicker, a7 as Descriptions, a8 as Divider, D as Drawer, a9 as Dropdown, aa as Empty, Q as FloatButton, ab as Form, ac as Grid, ad as Image, v as Input, ae as InputNumber, af as Layout, ag as List, ah as Mentions, ai as Menu, M as Modal, ak as Popconfirm, al as Popover, am as Progress, aM as QRCode, an as Radio, ao as Rate, ap as Result, aq as Row, ar as Segmented, g as Select, as as Skeleton, at as Slider, au as Space, av as Spin, aw as Statistic, ax as Steps, ay as Switch, az as Tabs, aA as Tag, aC as TimePicker, aD as Timeline, T as Tooltip, aE as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, aj as notification, aB as theme, aN as version, z as zh_CN } from './fcb57c77.esm.es5.development.js';
1
+ import { z as zhCN, C as ConfigProvider, _ as _extends, a as _object_destructuring_empty, j as jsx, b as _object_spread_props, S as StyleProvider, t as transform, c as _object_spread, d as _sliced_to_array, T as Tooltip, e as Table$2, I as Icon, f as jsxs, m as message, E as ExclamationCircleFilled, P as Pagination, g as Select, h as CaretDownOutlined, M as Modal, i as _inherits, k as _create_super, l as _create_class, n as _class_call_check, o as _define_property, p as _assert_this_initialized, q as _async_to_generator, L as LeftOutlined, R as RightOutlined, r as MinusOutlined, s as PlusOutlined, u as __generator, v as Input, w as SearchOutlined, x as CloseOutlined, X, y as I, H, A as Remarkable, D as Drawer, B as HighlightJS, Z as ZoomInOutlined, F as _to_consumable_array } from './d4d78cf9.esm.es5.development.js';
2
+ export { G as Affix, J as Alert, K as Anchor, aF as App, N as AutoComplete, O as Avatar, U as BackTop, V as Badge, W as Breadcrumb, Y as Button, $ as Calendar, a0 as Card, a1 as Carousel, a2 as Cascader, a3 as Checkbox, a4 as Col, a5 as Collapse, a6 as DatePicker, a7 as Descriptions, a8 as Divider, D as Drawer, a9 as Dropdown, aa as Empty, Q as FloatButton, ab as Form, ac as Grid, ad as Image, v as Input, ae as InputNumber, af as Layout, ag as List, ah as Mentions, ai as Menu, M as Modal, ak as Popconfirm, al as Popover, am as Progress, aM as QRCode, an as Radio, ao as Rate, ap as Result, aq as Row, ar as Segmented, g as Select, as as Skeleton, at as Slider, au as Space, av as Spin, aw as Statistic, ax as Steps, ay as Switch, az as Tabs, aA as Tag, aC as TimePicker, aD as Timeline, T as Tooltip, aE as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, aj as notification, aB as theme, aN as version, z as zh_CN } from './d4d78cf9.esm.es5.development.js';
3
3
  import * as React from 'react';
4
4
  import { useState, useRef, useEffect, useLayoutEffect, forwardRef, useImperativeHandle } from 'react';
5
5
  import { Fragment } from 'react/jsx-runtime';
@@ -3332,8 +3332,10 @@ var TeacherList = function(props) {
3332
3332
  var type = props.type, userData = props.userData, http = props.http, urllocation = props.urllocation, onClose = props.onClose, enterTeacherChat = props.enterTeacherChat;
3333
3333
  var _useState = _sliced_to_array(useState(""), 2), keyWordProblem = _useState[0], setKeyWordProblem = _useState[1]; //搜索内容
3334
3334
  var _useState1 = _sliced_to_array(useState(1), 2), showLoadingState = _useState1[0], setShowLoadingState = _useState1[1]; //1,初始状态,2、无数据 ,3、不显示图片
3335
- var _useState2 = _sliced_to_array(useState([]), 2), totalData = _useState2[0], setTotalData = _useState2[1]; //总数据
3335
+ // const [totalData, setTotalData] = useState([]); //总数据
3336
+ var _useState2 = _sliced_to_array(useState([]), 2), showTotalData = _useState2[0], setShowTotalData = _useState2[1]; //总数据
3336
3337
  // const [teacher_list, setTeacher_list] = useState([]); //老师列表,有头像
3338
+ var totalData = useRef([]);
3337
3339
  var teacher_list = useRef([]); //老师列表,有头像
3338
3340
  var timer = useRef(null); //文本框输入时
3339
3341
  var page = useRef(1);
@@ -3350,7 +3352,8 @@ var TeacherList = function(props) {
3350
3352
  loading.current = false;
3351
3353
  // console.log('加载下一页');
3352
3354
  page.current = page.current + 1;
3353
- getList(keyWordProblem);
3355
+ getUserName();
3356
+ // getList(keyWordProblem);
3354
3357
  }
3355
3358
  };
3356
3359
  // 添加滚轮事件监听器
@@ -3370,26 +3373,23 @@ var TeacherList = function(props) {
3370
3373
  }, []);
3371
3374
  var getList = function(val) {
3372
3375
  if (page.current == 1) {
3373
- setTotalData([]);
3376
+ // setTotalData([]);
3377
+ totalData.current = [];
3378
+ setShowTotalData([]);
3374
3379
  }
3375
3380
  http.get("".concat(urllocation, "/chat-service/public/v1.0/teachers"), {
3376
3381
  params: {
3377
3382
  name: val,
3378
3383
  page: page.current,
3379
- maxPageSize: 20
3384
+ maxPageSize: 100000
3380
3385
  }
3381
3386
  }).then(function(res) {
3382
3387
  console.log(res);
3383
3388
  if (res.data.total > 0) {
3384
3389
  loading.current = true;
3385
3390
  setShowLoadingState(3);
3386
- var data = new Map();
3387
- setTotalData(function(totalData) {
3388
- return totalData.concat(res.data.teachers).filter(function(a) {
3389
- return !data.has(a.uid) && data.set(a.uid, 1);
3390
- });
3391
- });
3392
- getUserName(res.data.teachers);
3391
+ totalData.current = res.data.teachers;
3392
+ getUserName();
3393
3393
  } else {
3394
3394
  loading.current = false;
3395
3395
  if (page.current == 1) {
@@ -3398,9 +3398,12 @@ var TeacherList = function(props) {
3398
3398
  }
3399
3399
  });
3400
3400
  };
3401
- var getUserName = function(dataList) {
3401
+ var getUserName = function() {
3402
3402
  try {
3403
- var list = dataList;
3403
+ // let list = dataList;
3404
+ // console.log(totalData.current,4444444);
3405
+ var showTotalData = totalData.current.slice((page.current - 1) * 20, page.current * 20);
3406
+ var list = showTotalData;
3404
3407
  var ids = [];
3405
3408
  list = list.map(function(item) {
3406
3409
  if (!item.headImg && teacher_list.current.filter(function(v) {
@@ -3413,8 +3416,8 @@ var TeacherList = function(props) {
3413
3416
  userName(ids.join(",")).then(function(res) {
3414
3417
  if (res.data) {
3415
3418
  var nameList = res.data;
3416
- setTotalData(function(list1) {
3417
- var list = list1;
3419
+ setShowTotalData(function(list1) {
3420
+ var list = showTotalData;
3418
3421
  list = list.map(function(item) {
3419
3422
  var name = nameList.filter(function(v) {
3420
3423
  return v.uid == item.uid;
@@ -3437,14 +3440,19 @@ var TeacherList = function(props) {
3437
3440
  teacher_list.current = teacher_list.current.concat(list).filter(function(a) {
3438
3441
  return !data.has(a.uid) && data.set(a.uid, 1);
3439
3442
  });
3440
- return list;
3443
+ if (showTotalData.length == 0) {
3444
+ loading.current = false;
3445
+ } else {
3446
+ loading.current = true;
3447
+ }
3448
+ return list1.concat(list);
3441
3449
  });
3442
3450
  }
3443
3451
  });
3444
3452
  } else {
3445
3453
  var nameList = teacher_list.current;
3446
- setTotalData(function(list1) {
3447
- var list = list1;
3454
+ setShowTotalData(function(list1) {
3455
+ var list = showTotalData;
3448
3456
  list = list.map(function(item) {
3449
3457
  var name = nameList.filter(function(v) {
3450
3458
  return v.uid == item.uid;
@@ -3455,7 +3463,12 @@ var TeacherList = function(props) {
3455
3463
  return item;
3456
3464
  }
3457
3465
  });
3458
- return list;
3466
+ if (showTotalData.length == 0) {
3467
+ loading.current = false;
3468
+ } else {
3469
+ loading.current = true;
3470
+ }
3471
+ return list1.concat(list);
3459
3472
  });
3460
3473
  }
3461
3474
  } catch (error) {}
@@ -3506,7 +3519,8 @@ var TeacherList = function(props) {
3506
3519
  clearTimeout(timer.current);
3507
3520
  timer.current = setTimeout(function() {
3508
3521
  page.current = 1;
3509
- setTotalData([]);
3522
+ // setTotalData([]);
3523
+ totalData.current = [];
3510
3524
  getList(val);
3511
3525
  }, 1000);
3512
3526
  }
@@ -3516,7 +3530,10 @@ var TeacherList = function(props) {
3516
3530
  onClick: function() {
3517
3531
  setShowLoadingState(1);
3518
3532
  setKeyWordProblem("");
3519
- setTotalData([]);
3533
+ // setTotalData([]);
3534
+ totalData.current = [];
3535
+ page.current = 1;
3536
+ getList("");
3520
3537
  },
3521
3538
  children: /*#__PURE__*/ jsx(CustomClose$1, {})
3522
3539
  })
@@ -3551,7 +3568,7 @@ var TeacherList = function(props) {
3551
3568
  /*#__PURE__*/ jsx("div", {
3552
3569
  className: modules_63b47c51.list_item,
3553
3570
  ref: sliderRef,
3554
- children: totalData.map(function(item) {
3571
+ children: showTotalData.map(function(item) {
3555
3572
  var span = item.name.replaceAll(new RegExp(keyWordProblem, "ig"), function(i) {
3556
3573
  return "<span class=".concat(modules_63b47c51.sign, ">").concat(i, "</span>");
3557
3574
  });