yootd 0.0.71 → 0.0.73

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.
@@ -43,6 +43,8 @@ var App = function App(_ref) {
43
43
  return /*#__PURE__*/React.createElement(Tree, _extends({
44
44
  treeData: treeData,
45
45
  showIcon: true
46
- }, props));
46
+ }, props, {
47
+ notRequireSchool: notRequireSchool
48
+ }));
47
49
  };
48
50
  export default App;
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["className", "treeData", "placeholder", "showChildNumbers", "showIcon", "showSearch", "type", "titleRender"];
2
+ var _excluded = ["className", "treeData", "placeholder", "showChildNumbers", "showIcon", "showSearch", "type", "notRequireSchool", "titleRender"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
5
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -74,8 +74,10 @@ export var TreeInternal = /*#__PURE__*/forwardRef(function (_ref, ref) {
74
74
  _ref$showSearch = _ref.showSearch,
75
75
  showSearch = _ref$showSearch === void 0 ? false : _ref$showSearch,
76
76
  type = _ref.type,
77
+ notRequireSchool = _ref.notRequireSchool,
77
78
  titleRender = _ref.titleRender,
78
79
  props = _objectWithoutProperties(_ref, _excluded);
80
+ console.log('props', props);
79
81
  var mb = useBem('tree');
80
82
  var _useState = useState([]),
81
83
  _useState2 = _slicedToArray(_useState, 2),
@@ -94,7 +96,7 @@ export var TreeInternal = /*#__PURE__*/forwardRef(function (_ref, ref) {
94
96
  defaultData = _useState8[0],
95
97
  setDefaultData = _useState8[1];
96
98
  var getSpaceIcon = useCallback(function (currentLevel, selected) {
97
- var icons = [SchoolIcon, CampusIcon, FloorIcon, TierlIcon, RoomIcon, BedIcon];
99
+ var icons = notRequireSchool == true ? [CampusIcon, FloorIcon, TierlIcon, RoomIcon, BedIcon] : [SchoolIcon, CampusIcon, FloorIcon, TierlIcon, RoomIcon, BedIcon];
98
100
  var IconComponent = icons[currentLevel];
99
101
  return IconComponent ? /*#__PURE__*/React.createElement(IconComponent, {
100
102
  className: "".concat(mb.e('icon'), " ").concat(selected ? mb.is('selected') : '')
@@ -17,7 +17,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
17
  import * as faceapi from '@vladmandic/face-api';
18
18
  import * as posedetection from '@tensorflow-models/pose-detection';
19
19
  import * as tf from '@tensorflow/tfjs';
20
- console.log("Hello, World!");
20
+ console.log('Hello, World!');
21
21
  import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
22
22
  import { EndPoint } from 'yootd-webrtc-sdk';
23
23
  import { useBem } from "../hooks/useBem";
@@ -158,6 +158,10 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
158
158
  },
159
159
  // 设置播放时间
160
160
  setVideoCurrentTime: function setVideoCurrentTime(time) {
161
+ // 判断是否为数字
162
+ if (typeof time !== 'number' || isNaN(time)) {
163
+ return;
164
+ }
161
165
  if (videoRef.current) {
162
166
  videoRef.current.currentTime = time;
163
167
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yootd",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",