component-shipinlv 1.1.3 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -82,15 +82,19 @@ var VideoPublishCreateTaskBase = function VideoPublishCreateTaskBase(_ref) {
82
82
  key: "account-".concat(items.id)
83
83
  });
84
84
  });
85
- var treeData = [{
86
- key: 'all',
87
- value: 'all',
88
- title: /*#__PURE__*/_jsx(Tag, {
89
- color: "blue",
90
- children: "\u5168\u90E8"
91
- }),
92
- children: Object.values(dict)
93
- }];
85
+ var list = Object.values(dict);
86
+ var treeData = [];
87
+ if (list.length > 0) {
88
+ treeData.push({
89
+ key: 'all',
90
+ value: 'all',
91
+ title: /*#__PURE__*/_jsx(Tag, {
92
+ color: "blue",
93
+ children: "\u5168\u90E8"
94
+ }),
95
+ children: list
96
+ });
97
+ }
94
98
  setTreeVideoAccountData(treeData);
95
99
  }
96
100
  }),
@@ -142,7 +146,7 @@ var VideoPublishCreateTaskBase = function VideoPublishCreateTaskBase(_ref) {
142
146
  message: '请选择账户'
143
147
  }],
144
148
  children: /*#__PURE__*/_jsx(TreeSelect, {
145
- disabled: loadingAccountList,
149
+ disabled: loadingAccountList || treeVideoAccountData.length === 0,
146
150
  treeData: treeVideoAccountData
147
151
  // value={ [] }
148
152
  ,
@@ -151,7 +155,7 @@ var VideoPublishCreateTaskBase = function VideoPublishCreateTaskBase(_ref) {
151
155
  },
152
156
  treeCheckable: !loadingAccountList,
153
157
  showCheckedStrategy: TreeSelect.SHOW_PARENT,
154
- placeholder: "\u8BF7\u9009\u62E9 \u8D26\u6237/\u7EC4"
158
+ placeholder: treeVideoAccountData.length === 0 ? '账户列表为空,请先添加账户' : '请选择 账户/组'
155
159
  })
156
160
  }), /*#__PURE__*/_jsx("a", {
157
161
  className: "renew ".concat(loadingAccountList ? 'disabled' : ''),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "1.1.3",
3
+ "version": "1.1.6",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",