@king-design/vue 2.0.4 → 2.0.5
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/components/table/cell.js +5 -0
- package/components/table/index.spec.js +76 -52
- package/components/table/useChecked.js +1 -1
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +2 -2
package/components/table/cell.js
CHANGED
|
@@ -988,56 +988,80 @@ describe('Table', function () {
|
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
990
|
}, _callee21);
|
|
991
|
-
})));
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
991
|
+
})));
|
|
992
|
+
it('should update children in TableCell', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22() {
|
|
993
|
+
var update, Test, Demo, _mount24, instance, element;
|
|
994
|
+
|
|
995
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context25) {
|
|
996
|
+
while (1) {
|
|
997
|
+
switch (_context25.prev = _context25.next) {
|
|
998
|
+
case 0:
|
|
999
|
+
update = sinon.spy();
|
|
1000
|
+
|
|
1001
|
+
Test = /*#__PURE__*/function (_Component3) {
|
|
1002
|
+
_inheritsLoose(Test, _Component3);
|
|
1003
|
+
|
|
1004
|
+
function Test() {
|
|
1005
|
+
return _Component3.apply(this, arguments) || this;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
var _proto = Test.prototype;
|
|
1009
|
+
|
|
1010
|
+
_proto.beforeUpdate = function beforeUpdate() {
|
|
1011
|
+
update();
|
|
1012
|
+
};
|
|
1013
|
+
|
|
1014
|
+
return Test;
|
|
1015
|
+
}(Component);
|
|
1016
|
+
|
|
1017
|
+
Test.template = "<div>test</div>";
|
|
1018
|
+
|
|
1019
|
+
Demo = /*#__PURE__*/function (_Component4) {
|
|
1020
|
+
_inheritsLoose(Demo, _Component4);
|
|
1021
|
+
|
|
1022
|
+
function Demo() {
|
|
1023
|
+
var _context24;
|
|
1024
|
+
|
|
1025
|
+
var _this3;
|
|
1026
|
+
|
|
1027
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
1028
|
+
args[_key3] = arguments[_key3];
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
_this3 = _Component4.call.apply(_Component4, _concatInstanceProperty(_context24 = [this]).call(_context24, args)) || this;
|
|
1032
|
+
_this3.Table = Table;
|
|
1033
|
+
_this3.TableColumn = TableColumn;
|
|
1034
|
+
_this3.Test = Test;
|
|
1035
|
+
return _this3;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
Demo.defaults = function defaults() {
|
|
1039
|
+
return {
|
|
1040
|
+
data: [{
|
|
1041
|
+
a: 1
|
|
1042
|
+
}, {
|
|
1043
|
+
a: 2
|
|
1044
|
+
}]
|
|
1045
|
+
};
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
return Demo;
|
|
1049
|
+
}(Component);
|
|
1050
|
+
|
|
1051
|
+
Demo.template = "\n const {Table, TableColumn, Test} = this;\n <Table data={this.get('data')} ref=\"table\">\n <TableColumn key=\"a\">\n <b:template>\n <Test />\n </b:template>\n </TableColumn>\n </Table>\n ";
|
|
1052
|
+
_mount24 = mount(Demo), instance = _mount24[0], element = _mount24[1];
|
|
1053
|
+
element.querySelector('tbody tr').click();
|
|
1054
|
+
_context25.next = 9;
|
|
1055
|
+
return wait();
|
|
1056
|
+
|
|
1057
|
+
case 9:
|
|
1058
|
+
expect(update.callCount).to.eql(1);
|
|
1059
|
+
|
|
1060
|
+
case 10:
|
|
1061
|
+
case "end":
|
|
1062
|
+
return _context25.stop();
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
}, _callee22);
|
|
1066
|
+
})));
|
|
1043
1067
|
});
|
|
@@ -211,7 +211,7 @@ export function useChecked(getEnableKeys, getAllKeys, isDisabledKey, getGrid, lo
|
|
|
211
211
|
|
|
212
212
|
instance.on('$change:data', updateAllCheckedStatus);
|
|
213
213
|
instance.on('clickRow', function (data, index, key) {
|
|
214
|
-
if (instance.get('rowCheckable')) {
|
|
214
|
+
if (instance.get('rowCheckable') && instance.get('checkType') !== 'none') {
|
|
215
215
|
toggleChecked(key, index);
|
|
216
216
|
}
|
|
217
217
|
});
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.5
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -57,7 +57,7 @@ export * from './components/tree';
|
|
|
57
57
|
export * from './components/treeSelect';
|
|
58
58
|
export * from './components/upload';
|
|
59
59
|
export * from './components/wave';
|
|
60
|
-
export declare const version = "2.0.
|
|
60
|
+
export declare const version = "2.0.5";
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
export {normalize} from 'intact-vue-next';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.5
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -59,7 +59,7 @@ export * from './components/tree';
|
|
|
59
59
|
export * from './components/treeSelect';
|
|
60
60
|
export * from './components/upload';
|
|
61
61
|
export * from './components/wave';
|
|
62
|
-
export var version = '2.0.
|
|
62
|
+
export var version = '2.0.5';
|
|
63
63
|
/* generate end */
|
|
64
64
|
|
|
65
65
|
export {normalize} from 'intact-vue-next';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@king-design/vue",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "King-Design UI components for Vue3.0.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"component",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dayjs": "^1.10.7",
|
|
39
39
|
"downloadjs": "^1.4.7",
|
|
40
40
|
"enquire.js": "^2.1.6",
|
|
41
|
-
"intact-vue-next": "^3.0.
|
|
41
|
+
"intact-vue-next": "^3.0.6",
|
|
42
42
|
"monaco-editor": "^0.26.1",
|
|
43
43
|
"mxgraphx": "^4.0.7",
|
|
44
44
|
"resize-observer-polyfill": "^1.5.1",
|