@deepinnet-components/pc 0.0.15 → 0.0.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.
@@ -40,7 +40,8 @@ var AccountList = function AccountList() {
40
40
  Components = contextValue.Components,
41
41
  pageUrl = contextValue.pageUrl,
42
42
  navigate = contextValue.navigate,
43
- userType = contextValue.userType;
43
+ userType = contextValue.userType,
44
+ hideDeleteAccountBtn = contextValue.hideDeleteAccountBtn;
44
45
  var tableRef = useRef(null);
45
46
  var columns = [{
46
47
  title: '姓名',
@@ -92,10 +93,10 @@ var AccountList = function AccountList() {
92
93
  // );
93
94
  // },
94
95
  render: function render(_) {
95
- var arr = _[0];
96
+ var arr = _ === null || _ === void 0 ? void 0 : _[0];
96
97
  return /*#__PURE__*/React.createElement("div", {
97
98
  className: "flex items-center flex-wrap"
98
- }, arr.map(function (item, index) {
99
+ }, arr === null || arr === void 0 ? void 0 : arr.map(function (item, index) {
99
100
  var isLast = index === arr.length - 1;
100
101
  return /*#__PURE__*/React.createElement("div", {
101
102
  key: item.id,
@@ -178,7 +179,7 @@ var AccountList = function AccountList() {
178
179
  handleClick: function handleClick() {
179
180
  handleDeleteAccount(row);
180
181
  },
181
- show: true
182
+ show: !hideDeleteAccountBtn
182
183
  }];
183
184
  return /*#__PURE__*/React.createElement(Components.OperationButton, {
184
185
  button: operationList.filter(function (item) {
@@ -10,6 +10,7 @@ export interface MainProps {
10
10
  showDataAuth?: boolean;
11
11
  isMultiRole?: boolean;
12
12
  passwordEncryption?: string;
13
+ hideDeleteAccountBtn?: boolean;
13
14
  }
14
15
  declare const Index: React.FC<MainProps>;
15
16
  export default Index;
@@ -59,7 +59,9 @@ var Index = function Index(props) {
59
59
  _props$isMultiRole = props.isMultiRole,
60
60
  isMultiRole = _props$isMultiRole === void 0 ? true : _props$isMultiRole,
61
61
  _props$passwordEncryp = props.passwordEncryption,
62
- passwordEncryption = _props$passwordEncryp === void 0 ? 'md5' : _props$passwordEncryp;
62
+ passwordEncryption = _props$passwordEncryp === void 0 ? 'md5' : _props$passwordEncryp,
63
+ _props$hideDeleteAcco = props.hideDeleteAccountBtn,
64
+ hideDeleteAccountBtn = _props$hideDeleteAcco === void 0 ? false : _props$hideDeleteAcco;
63
65
  var _useState = useState(),
64
66
  _useState2 = _slicedToArray(_useState, 2),
65
67
  value = _useState2[0],
@@ -205,7 +207,8 @@ var Index = function Index(props) {
205
207
  userType: userType,
206
208
  showDataAuth: showDataAuth,
207
209
  isMultiRole: isMultiRole,
208
- passwordEncryption: passwordEncryption
210
+ passwordEncryption: passwordEncryption,
211
+ hideDeleteAccountBtn: hideDeleteAccountBtn
209
212
  });
210
213
  }, []);
211
214
  if (!value) return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepinnet-components/pc",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",