@type-dom/ui 0.0.6 → 0.0.8
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/README.md +44 -44
- package/package.json +1 -1
- package/src/components/basic/td-button/td-button.abstract.js +3 -3
- package/src/components/basic/td-button/td-button.class.js +1 -1
- package/src/components/basic/td-button-group/td-button-group.class.js +1 -1
- package/src/components/basic/td-container/td-aside/td-aside.class.js +2 -2
- package/src/components/basic/td-container/td-container.class.js +2 -2
- package/src/components/basic/td-container/td-footer/td-footer.class.js +3 -3
- package/src/components/basic/td-container/td-header/td-header.class.js +6 -6
- package/src/components/basic/td-container/td-main/td-main.class.js +2 -2
- package/src/components/basic/td-icon/td-icon.class.js +13 -13
- package/src/components/basic/td-layout/td-col/td-col.class.js +4 -4
- package/src/components/basic/td-layout/td-row/td-row.class.js +2 -2
- package/src/components/basic/td-link/td-link.class.js +1 -1
- package/src/components/basic/td-scrollbar/bar/bar.class.js +2 -2
- package/src/components/basic/td-scrollbar/bar/bar.interface.d.ts +1 -1
- package/src/components/basic/td-scrollbar/td-scrollbar.class.js +2 -2
- package/src/components/basic/td-scrollbar/thumb/thumb.class.js +2 -2
- package/src/components/basic/td-scrollbar/thumb/thumb.interface.d.ts +1 -1
- package/src/components/basic/td-space/td-space.class.js +2 -2
- package/src/components/basic/td-text/td-text.class.js +2 -2
- package/src/components/data/td-avatar/td-avatar.class.js +3 -3
- package/src/components/data/td-badge/td-badge.class.d.ts +1 -0
- package/src/components/data/td-badge/td-badge.class.js +10 -7
- package/src/components/data/td-card/td-card.class.js +2 -2
- package/src/components/data/td-check-tag/td-check-tag.class.js +2 -2
- package/src/components/data/td-collapse/td-collapse.class.js +2 -5
- package/src/components/data/td-collapse/td-collapse.interface.d.ts +1 -0
- package/src/components/data/td-collapse-item/td-collapse-item.class.js +3 -3
- package/src/components/data/td-collapse-transition/td-collapse-transition.class.js +1 -1
- package/src/components/data/td-count-down/td-count-down.class.js +2 -4
- package/src/components/data/td-descriptions/td-descriptions-row.d.ts +1 -1
- package/src/components/data/td-descriptions/td-descriptions-row.js +3 -3
- package/src/components/data/td-descriptions/td-descriptions.class.js +2 -2
- package/src/components/data/td-descriptions/td-descritions-cell.js +2 -2
- package/src/components/data/td-descriptions-item/td-descriptions-item.class.js +3 -5
- package/src/components/data/td-empty/img-empty.class.js +2 -2
- package/src/components/data/td-empty/td-empty.class.js +2 -2
- package/src/components/data/td-image/td-image.class.js +3 -3
- package/src/components/data/td-image-viewer/td-image-viewer.class.js +3 -2
- package/src/components/data/td-result/td-result.class.js +5 -9
- package/src/components/data/td-segmented/td-segmented.class.js +14 -15
- package/src/components/data/td-statistic/td-statistic.abstract.d.ts +1 -1
- package/src/components/data/td-statistic/td-statistic.abstract.js +2 -2
- package/src/components/data/td-tag/td-tag.class.js +3 -3
- package/src/components/feedback/dialog/dialog.class.js +2 -2
- package/src/components/feedback/message-box/message-box.js +2 -2
- package/src/components/feedback/overlay/container/container.js +5 -4
- package/src/components/feedback/overlay/container/footer/cancel-button/cancel-button.js +6 -5
- package/src/components/feedback/overlay/container/footer/confirm-button/confirm-button.js +6 -5
- package/src/components/feedback/overlay/container/header/close-button/close-button.js +6 -5
- package/src/components/feedback/overlay/overlay.abstract.js +5 -4
- package/src/components/feedback/td-alert/td-alert.class.js +2 -2
- package/src/components/feedback/td-dialog/td-dialog.class.d.ts +3 -0
- package/src/components/feedback/td-dialog/td-dialog.class.js +20 -3
- package/src/components/feedback/td-dialog/td-dialog.interface.d.ts +19 -0
- package/src/components/feedback/td-dialog/td-dialog.interface.js +12 -0
- package/src/components/feedback/td-dialog-content/td-dialog-content.class.js +2 -2
- package/src/components/feedback/td-drawer/td-drawer.class.js +13 -11
- package/src/components/feedback/td-drawer/td-drawer.interface.d.ts +5 -5
- package/src/components/feedback/td-focus-trap/td-focus-trap.class.js +2 -2
- package/src/components/feedback/td-focus-trap/td-focus-trap.interface.d.ts +5 -5
- package/src/components/feedback/td-focus-trap/utils.d.ts +1 -1
- package/src/components/feedback/td-loading/td-loading.class.js +2 -2
- package/src/components/feedback/td-message/td-message.class.d.ts +1 -0
- package/src/components/feedback/td-message/td-message.class.js +19 -12
- package/src/components/feedback/td-message-box/td-message-box.class.js +3 -4
- package/src/components/feedback/td-notification/td-notification.class.js +4 -4
- package/src/components/feedback/td-overlay/td-overlay.class.js +2 -2
- package/src/components/feedback/td-popper/arrow/arrow.class.js +2 -2
- package/src/components/feedback/td-popper/content/content.class.js +2 -2
- package/src/components/feedback/td-popper/td-popper.class.js +2 -2
- package/src/components/feedback/td-popper/trigger/trigger.class.js +2 -2
- package/src/components/feedback/td-tooltip/content/content.class.js +2 -2
- package/src/components/feedback/td-tooltip/td-tooltip.class.js +2 -2
- package/src/components/feedback/td-tooltip/trigger/trigger.class.js +2 -2
- package/src/components/form/checkbox-group/checkbox-option/checkbox-option.class.js +19 -18
- package/src/components/form/field-item/cascade/field-cascade.abstract.js +40 -35
- package/src/components/form/field-item/input/field-input.abstract.js +7 -6
- package/src/components/form/field-item/options/field-options.abstract.js +19 -18
- package/src/components/form/field-item/radio/field-radio.abstract.js +2 -3
- package/src/components/form/field-item/select/field-select.abstract.js +14 -14
- package/src/components/form/field-select/field-select.class.js +16 -16
- package/src/components/form/radio-group/radio-group.class.js +2 -2
- package/src/components/form/radio-group/radio-group.interface.d.ts +2 -2
- package/src/components/form/radio-group/radio-option/radio-option.class.js +10 -9
- package/src/components/form/select/select.class.js +17 -16
- package/src/components/form/td-checkbox/td-checkbox.class.js +2 -2
- package/src/components/form/td-checkbox/td-checkbox.style.js +2 -2
- package/src/components/form/td-checkbox-button/td-checkbox-button.class.js +2 -2
- package/src/components/form/td-checkbox-group/td-checkbox-group.class.js +2 -2
- package/src/components/form/td-form/td-form.class.js +2 -2
- package/src/components/form/td-form-item/td-form-item.class.js +2 -2
- package/src/components/form/td-input/td-input.class.js +2 -2
- package/src/components/form/td-input/widget/td-input-wrapper.class.js +2 -2
- package/src/components/form/td-input/widget/td-textarea-wrapper.js +2 -2
- package/src/components/form/td-input/widget/utils.js +8 -8
- package/src/components/form/td-option/td-option.class.js +2 -2
- package/src/components/form/td-option/td-option.interface.d.ts +1 -1
- package/src/components/form/td-option-group/td-option-group.class.js +2 -2
- package/src/components/form/td-radio/td-radio.class.js +2 -3
- package/src/components/form/td-radio-button/td-radio-button.class.js +2 -3
- package/src/components/form/td-radio-group/td-radio-group.class.js +2 -2
- package/src/components/form/td-select/dropdown/dropdown.class.js +2 -2
- package/src/components/form/td-select/td-select.class.js +2 -2
- package/src/components/form/td-switch/td-switch.class.js +8 -9
- package/src/components/form/td-switch/widget/td-switch-core.js +2 -2
- package/src/components/form/td-switch/widget/td-switch-left.js +2 -2
- package/src/components/form/td-switch/widget/td-switch-right.js +2 -2
- package/src/components/navigation/td-affix/td-affix.class.js +2 -2
- package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.class.js +2 -2
- package/src/components/navigation/td-anchor/td-anchor.class.d.ts +1 -1
- package/src/components/navigation/td-anchor/td-anchor.class.js +2 -2
- package/src/components/navigation/td-backtop/td-backtop.class.js +5 -6
- package/src/components/navigation/td-breadcrumb/td-breadcrumb.class.js +3 -5
- package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.class.js +2 -2
- package/src/components/navigation/td-menu/td-menu.class.js +2 -2
- package/src/components/navigation/td-tabs/td-tab-bar.class.d.ts +1 -1
- package/src/components/navigation/td-tabs/td-tab-bar.class.js +7 -7
- package/src/components/navigation/td-tabs/td-tab-bar.interface.d.ts +2 -2
- package/src/components/navigation/td-tabs/td-tab-nav.class.d.ts +2 -2
- package/src/components/navigation/td-tabs/td-tab-nav.class.js +13 -13
- package/src/components/navigation/td-tabs/td-tab-nav.interface.d.ts +1 -1
- package/src/components/navigation/td-tabs/td-tab-pane.class.js +2 -2
- package/src/components/navigation/td-tabs/td-tabs.class.js +20 -23
- package/src/components/others/collapsible-box/heading/expand-heading.js +24 -23
- package/src/components/others/custom-block/custom-block.d.ts +11 -0
- package/src/components/others/custom-block/custom-block.js +58 -0
- package/src/components/others/example/example-float-control.d.ts +8 -0
- package/src/components/others/example/example-float-control.js +63 -0
- package/src/components/others/example/example-showcase.d.ts +7 -0
- package/src/components/others/example/example-showcase.js +20 -0
- package/src/components/others/example/example-source-wrapper.d.ts +5 -0
- package/src/components/others/example/example-source-wrapper.js +30 -0
- package/src/components/others/example/example.d.ts +15 -0
- package/src/components/others/example/example.js +77 -0
- package/src/components/others/example/index.d.ts +5 -0
- package/src/components/others/example/index.js +13 -0
- package/src/components/others/example/op-btns.d.ts +7 -0
- package/src/components/others/example/op-btns.js +96 -0
- package/src/components/others/index.d.ts +4 -0
- package/src/components/others/index.js +9 -1
- package/src/components/others/menus/menu.d.ts +16 -0
- package/src/components/others/menus/menu.js +123 -0
- package/src/components/others/menus/menus.d.ts +10 -0
- package/src/components/others/menus/menus.js +79 -0
- package/src/components/others/td-divider/td-divider.class.js +2 -2
- package/src/ui/ui.abstract.js +1 -1
- package/src/ui/ui.interface.d.ts +3 -3
|
@@ -222,27 +222,28 @@ class PropertyOptions extends field_item_abstract_1.FieldItem {
|
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
224
|
initEvents() {
|
|
225
|
-
this.
|
|
225
|
+
this.optionsConfigObservable.subscribe(() => {
|
|
226
226
|
console.log('this.btn click . ');
|
|
227
227
|
console.log('this.optionsConfigObservable is ', this.optionsConfigObservable);
|
|
228
|
-
})
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
228
|
+
});
|
|
229
|
+
this.selectObj.addEvents({
|
|
230
|
+
change: () => {
|
|
231
|
+
var _a, _b;
|
|
232
|
+
console.log('this.selectObj.dom change . ');
|
|
233
|
+
console.log('this.selectObj.dom.value is ', this.selectObj.dom.value);
|
|
234
|
+
const selectedOption = ((_a = this.optionSetting) === null || _a === void 0 ? void 0 : _a.options) && ((_b = this.optionSetting) === null || _b === void 0 ? void 0 : _b.options.find((opt) => String(opt.value) === this.selectObj.dom.value));
|
|
235
|
+
if (!this.optionSetting) {
|
|
236
|
+
throw Error('无法获取optionSetting');
|
|
237
|
+
}
|
|
238
|
+
if (selectedOption && selectedOption.options) {
|
|
239
|
+
this.resetOptionSettingResultValue(selectedOption.value);
|
|
240
|
+
console.log('this.optionSetting is ', this.optionSetting);
|
|
241
|
+
console.log('selectOption is ', selectedOption);
|
|
242
|
+
this.resetOptions(selectedOption.options);
|
|
243
|
+
// this.resetControl();
|
|
244
|
+
}
|
|
244
245
|
}
|
|
245
|
-
})
|
|
246
|
+
});
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
249
|
exports.PropertyOptions = PropertyOptions;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FieldRadio = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
4
|
const framework_1 = require("@type-dom/framework");
|
|
6
5
|
const field_item_abstract_1 = require("../field-item.abstract");
|
|
7
6
|
class FieldRadio extends field_item_abstract_1.FieldItem {
|
|
@@ -75,7 +74,7 @@ class FieldRadio extends field_item_abstract_1.FieldItem {
|
|
|
75
74
|
if (btn.dom === undefined) {
|
|
76
75
|
return;
|
|
77
76
|
}
|
|
78
|
-
this.
|
|
77
|
+
this.addEvent('click', btn.dom, () => {
|
|
79
78
|
var _a;
|
|
80
79
|
// if (OfdEditor.mode === 'read') {
|
|
81
80
|
// return;
|
|
@@ -100,7 +99,7 @@ class FieldRadio extends field_item_abstract_1.FieldItem {
|
|
|
100
99
|
else {
|
|
101
100
|
return;
|
|
102
101
|
}
|
|
103
|
-
})
|
|
102
|
+
});
|
|
104
103
|
});
|
|
105
104
|
}
|
|
106
105
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FieldSelect = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
4
|
const select_class_1 = require("../../select/select.class");
|
|
6
5
|
const field_item_abstract_1 = require("../field-item.abstract");
|
|
7
6
|
const field_item_style_1 = require("../field-item.style");
|
|
@@ -24,19 +23,20 @@ class FieldSelect extends field_item_abstract_1.FieldItem {
|
|
|
24
23
|
this.childNodes = [this.label, this.select, this.button];
|
|
25
24
|
}
|
|
26
25
|
initEvents() {
|
|
27
|
-
this.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
26
|
+
this.select.addEvents({
|
|
27
|
+
click: (evt) => {
|
|
28
|
+
console.log('this.select.dom click, event is ', evt);
|
|
29
|
+
console.log('this.select.dom.value is ', this.select.dom.value);
|
|
30
|
+
// console.log(this.reset);
|
|
31
|
+
this.reset(this.select.dom.value);
|
|
32
|
+
},
|
|
33
|
+
change: (evt) => {
|
|
34
|
+
console.log('this.select.dom change, event is ', evt);
|
|
35
|
+
console.log('this.select.dom.value is ', this.select.dom.value);
|
|
36
|
+
// console.log(this.reset);
|
|
37
|
+
this.reset(this.select.dom.value);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
exports.FieldSelect = FieldSelect;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FieldSelect = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
4
|
const framework_1 = require("@type-dom/framework");
|
|
6
5
|
const option_class_1 = require("./option/option.class");
|
|
7
6
|
class FieldSelect extends framework_1.TypeSelect {
|
|
@@ -48,21 +47,22 @@ class FieldSelect extends framework_1.TypeSelect {
|
|
|
48
47
|
// console.error('this.dom.value is ', this.dom.value);
|
|
49
48
|
}
|
|
50
49
|
initEvents() {
|
|
51
|
-
this.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
this.addEvents({
|
|
51
|
+
click: (evt) => {
|
|
52
|
+
console.log('this.select.dom click, event is ', evt);
|
|
53
|
+
console.log('this.select.dom.value is ', this.dom.value);
|
|
54
|
+
// console.log(this.reset);
|
|
55
|
+
// this.setValue(this.dom.value);
|
|
56
|
+
this.value = this.dom.value;
|
|
57
|
+
},
|
|
58
|
+
change: (evt) => {
|
|
59
|
+
console.log('this.select.dom change, event is ', evt);
|
|
60
|
+
console.log('this.select.dom.value is ', this.dom.value);
|
|
61
|
+
// console.log(this.reset);
|
|
62
|
+
// this.setValue(this.dom.value);
|
|
63
|
+
this.value = this.dom.value;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
exports.FieldSelect = FieldSelect;
|
|
@@ -4,13 +4,13 @@ exports.RadioGroup = void 0;
|
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
5
|
const radio_option_class_1 = require("./radio-option/radio-option.class");
|
|
6
6
|
class RadioGroup extends framework_1.TypeDiv {
|
|
7
|
-
constructor(params) {
|
|
7
|
+
constructor(params = {}) {
|
|
8
8
|
super();
|
|
9
9
|
this.className = 'RadioGroup';
|
|
10
10
|
this.ctrl.addAttrName('radio-group');
|
|
11
11
|
this.value = '';
|
|
12
12
|
this.childNodes = [];
|
|
13
|
-
this.props = this.
|
|
13
|
+
this.props = this.setProps(params);
|
|
14
14
|
}
|
|
15
15
|
setup() {
|
|
16
16
|
const props = this.props;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RadioOption = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
4
|
const framework_1 = require("@type-dom/framework");
|
|
6
5
|
class RadioOption extends framework_1.TypeSpan {
|
|
7
|
-
constructor(params) {
|
|
6
|
+
constructor(params = {}) {
|
|
8
7
|
super();
|
|
9
8
|
this.className = 'RadioOption';
|
|
10
9
|
this.ctrl.addStyleObj({
|
|
@@ -20,7 +19,7 @@ class RadioOption extends framework_1.TypeSpan {
|
|
|
20
19
|
});
|
|
21
20
|
this.textNode = new framework_1.TextNode('');
|
|
22
21
|
this.childNodes = [this.input, this.textNode];
|
|
23
|
-
this.props = this.
|
|
22
|
+
this.props = this.setProps(params);
|
|
24
23
|
}
|
|
25
24
|
setup(config) {
|
|
26
25
|
if (config === null || config === void 0 ? void 0 : config.name) {
|
|
@@ -34,12 +33,14 @@ class RadioOption extends framework_1.TypeSpan {
|
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
initEvents() {
|
|
37
|
-
this.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
this.parent
|
|
42
|
-
|
|
36
|
+
this.input.addEvents({
|
|
37
|
+
click: () => {
|
|
38
|
+
console.log('this.input.dom click . ');
|
|
39
|
+
console.log('this.input.dom.value is ', this.input.dom.value);
|
|
40
|
+
if (this.parent)
|
|
41
|
+
this.parent.value = this.input.dom.value;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
exports.RadioOption = RadioOption;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Select = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
4
|
const framework_1 = require("@type-dom/framework");
|
|
6
5
|
class Select extends framework_1.TypeSelect {
|
|
7
6
|
constructor() {
|
|
@@ -28,21 +27,23 @@ class Select extends framework_1.TypeSelect {
|
|
|
28
27
|
});
|
|
29
28
|
}
|
|
30
29
|
initEvents() {
|
|
31
|
-
this.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
opt.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
30
|
+
this.addEvents({
|
|
31
|
+
click: () => {
|
|
32
|
+
console.log('this.dom click . ');
|
|
33
|
+
console.log('this.dom.value is ', this.dom.value);
|
|
34
|
+
this.value = this.dom.value; // 对应的opt.label.
|
|
35
|
+
this.childNodes.forEach((opt) => {
|
|
36
|
+
if (opt.dom.value === this.dom.value) {
|
|
37
|
+
opt.ctrl.setAttrObj({
|
|
38
|
+
selected: true
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
opt.ctrl.removeAttribute('selected');
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
});
|
|
46
47
|
}
|
|
47
48
|
// 1.判断select选项中 是否存在Value="paraValue"的Item
|
|
48
49
|
jsSelectIsExitItem(objSelect, objItemValue) {
|
|
@@ -6,7 +6,7 @@ const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
|
6
6
|
const td_checkbox_style_1 = require("./td-checkbox.style");
|
|
7
7
|
const use_checkbox_1 = require("./composables/use-checkbox");
|
|
8
8
|
class TdCheckbox extends ui_abstract_1.UI {
|
|
9
|
-
constructor(params) {
|
|
9
|
+
constructor(params = {}) {
|
|
10
10
|
const { hasOwnLabel } = (0, use_checkbox_1.useCheckbox)(params);
|
|
11
11
|
const tag = !hasOwnLabel ? 'span' : 'label';
|
|
12
12
|
super(params, tag); // label | span
|
|
@@ -71,7 +71,7 @@ class TdCheckbox extends ui_abstract_1.UI {
|
|
|
71
71
|
}
|
|
72
72
|
this.addChild(labelSpan);
|
|
73
73
|
}
|
|
74
|
-
this.props = this.
|
|
74
|
+
this.props = this.setProps(params);
|
|
75
75
|
}
|
|
76
76
|
handleChange(ev) {
|
|
77
77
|
if (this.isLimitExceeded)
|
|
@@ -106,8 +106,8 @@ exports.$checkboxInnerStyle = {
|
|
|
106
106
|
backgroundColor: var_1.$bgColor.default,
|
|
107
107
|
// z-index: getCssVar('index-normal'),
|
|
108
108
|
zIndex: var_1.$zIndex.normal,
|
|
109
|
-
transition: `border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
|
|
110
|
-
background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
|
|
109
|
+
transition: `border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
|
|
110
|
+
background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
|
|
111
111
|
outline 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46)`
|
|
112
112
|
};
|
|
113
113
|
exports.$checkboxInnerAfterStyle = {
|
|
@@ -7,7 +7,7 @@ const use_checkbox_1 = require("../td-checkbox/composables/use-checkbox");
|
|
|
7
7
|
const td_checkbox_style_1 = require("../td-checkbox/td-checkbox.style");
|
|
8
8
|
const td_checkbox_button_style_1 = require("./td-checkbox-button.style");
|
|
9
9
|
class TdCheckboxButton extends ui_abstract_1.UI {
|
|
10
|
-
constructor(params) {
|
|
10
|
+
constructor(params = {}) {
|
|
11
11
|
super(params, 'label'); // label | span
|
|
12
12
|
this.className = 'TdCheckboxButton';
|
|
13
13
|
this.ctrl.addAttrObj({
|
|
@@ -53,7 +53,7 @@ class TdCheckboxButton extends ui_abstract_1.UI {
|
|
|
53
53
|
}
|
|
54
54
|
this.addChild(labelSpan);
|
|
55
55
|
}
|
|
56
|
-
this.props = this.
|
|
56
|
+
this.props = this.setProps(params);
|
|
57
57
|
}
|
|
58
58
|
handleChange(ev) {
|
|
59
59
|
if (this.isLimitExceeded)
|
|
@@ -4,7 +4,7 @@ exports.TdCheckboxGroup = void 0;
|
|
|
4
4
|
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
5
5
|
const td_checkbox_style_1 = require("../td-checkbox/td-checkbox.style");
|
|
6
6
|
class TdCheckboxGroup extends ui_abstract_1.UI {
|
|
7
|
-
constructor(params) {
|
|
7
|
+
constructor(params = {}) {
|
|
8
8
|
super(params);
|
|
9
9
|
this.className = 'TdCheckboxGroup';
|
|
10
10
|
this.ctrl.addAttrObj({
|
|
@@ -14,7 +14,7 @@ class TdCheckboxGroup extends ui_abstract_1.UI {
|
|
|
14
14
|
});
|
|
15
15
|
this.ctrl.addStyleObj(td_checkbox_style_1.$checkboxGroupStyle);
|
|
16
16
|
this.addChild(this.getSlotNode());
|
|
17
|
-
this.props = this.
|
|
17
|
+
this.props = this.setProps(params);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
exports.TdCheckboxGroup = TdCheckboxGroup;
|
|
@@ -13,7 +13,7 @@ class TdForm extends ui_abstract_1.UI {
|
|
|
13
13
|
* 构造函数,初始化表单配置。
|
|
14
14
|
* @param params
|
|
15
15
|
*/
|
|
16
|
-
constructor(params) {
|
|
16
|
+
constructor(params = {}) {
|
|
17
17
|
super(params, 'form');
|
|
18
18
|
this.className = 'TdForm';
|
|
19
19
|
this.ctrl.addAttrName('td-form');
|
|
@@ -22,7 +22,7 @@ class TdForm extends ui_abstract_1.UI {
|
|
|
22
22
|
if (params === null || params === void 0 ? void 0 : params.model) {
|
|
23
23
|
this.model = params.model;
|
|
24
24
|
}
|
|
25
|
-
this.props = this.
|
|
25
|
+
this.props = this.setProps(params);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
exports.TdForm = TdForm;
|
|
@@ -10,7 +10,7 @@ const var_1 = require("../../../styles/var");
|
|
|
10
10
|
const td_form_item_style_1 = require("./td-form-item.style");
|
|
11
11
|
class TdFormItem extends ui_abstract_1.UI {
|
|
12
12
|
// new TdFormItem 是 发生在 TdForm slotChild 之前的。
|
|
13
|
-
constructor(params) {
|
|
13
|
+
constructor(params = {}) {
|
|
14
14
|
super(params);
|
|
15
15
|
this.className = 'TdFormItem';
|
|
16
16
|
this.ctrl.addAttrName('td-form-item');
|
|
@@ -64,7 +64,7 @@ class TdFormItem extends ui_abstract_1.UI {
|
|
|
64
64
|
// this.content.addChild(this.error);
|
|
65
65
|
this.addChild(this.content);
|
|
66
66
|
this.content.addChild(this.getSlotNode());
|
|
67
|
-
this.props = this.
|
|
67
|
+
this.props = this.setProps(params);
|
|
68
68
|
}
|
|
69
69
|
created() {
|
|
70
70
|
// inject 要在 created 之中,否则无法确定 parent .
|
|
@@ -9,7 +9,7 @@ const td_input_wrapper_class_1 = require("./widget/td-input-wrapper.class");
|
|
|
9
9
|
const td_input_style_1 = require("./td-input.style");
|
|
10
10
|
const td_textarea_wrapper_1 = require("./widget/td-textarea-wrapper");
|
|
11
11
|
class TdInput extends ui_abstract_1.UI {
|
|
12
|
-
constructor(params) {
|
|
12
|
+
constructor(params = {}) {
|
|
13
13
|
super(params);
|
|
14
14
|
console.log('TdInput constructor . ');
|
|
15
15
|
this.className = 'TdInput';
|
|
@@ -33,7 +33,7 @@ class TdInput extends ui_abstract_1.UI {
|
|
|
33
33
|
if (params === null || params === void 0 ? void 0 : params.modelValue) {
|
|
34
34
|
this.modelValue = params.modelValue;
|
|
35
35
|
}
|
|
36
|
-
this.props = this.
|
|
36
|
+
this.props = this.setProps(params);
|
|
37
37
|
}
|
|
38
38
|
get value() {
|
|
39
39
|
return this.panel.inner.value;
|
|
@@ -7,7 +7,7 @@ const td_input_style_1 = require("../td-input.style");
|
|
|
7
7
|
const suffix_1 = require("./suffix");
|
|
8
8
|
const prefix_1 = require("./prefix");
|
|
9
9
|
class TdInputWrapper extends framework_1.TypeDiv {
|
|
10
|
-
constructor(params) {
|
|
10
|
+
constructor(params = {}) {
|
|
11
11
|
super();
|
|
12
12
|
this.className = 'TdInputWrapper';
|
|
13
13
|
this.parent = params === null || params === void 0 ? void 0 : params.parent;
|
|
@@ -118,7 +118,7 @@ class TdInputWrapper extends framework_1.TypeDiv {
|
|
|
118
118
|
this.addChild(this.inner);
|
|
119
119
|
this.suffix = new suffix_1.TdInputSuffix(this, params);
|
|
120
120
|
this.addChild(this.suffix);
|
|
121
|
-
this.props = this.
|
|
121
|
+
this.props = this.setProps(params);
|
|
122
122
|
}
|
|
123
123
|
setup() {
|
|
124
124
|
const props = this.props;
|
|
@@ -5,7 +5,7 @@ const framework_1 = require("@type-dom/framework");
|
|
|
5
5
|
const var_1 = require("../../../../styles/var");
|
|
6
6
|
const td_input_style_1 = require("../td-input.style");
|
|
7
7
|
class TdTextareaWrapper extends framework_1.TypeDiv {
|
|
8
|
-
constructor(params) {
|
|
8
|
+
constructor(params = {}) {
|
|
9
9
|
super();
|
|
10
10
|
this.className = 'TextareaWrapper';
|
|
11
11
|
this.ctrl.addStyleObj({
|
|
@@ -100,7 +100,7 @@ class TdTextareaWrapper extends framework_1.TypeDiv {
|
|
|
100
100
|
});
|
|
101
101
|
this.addChildren(this.inner, this.countSpan);
|
|
102
102
|
// this.childNodes = [this.inner, this.countSpan];
|
|
103
|
-
this.props = this.
|
|
103
|
+
this.props = this.setProps(params);
|
|
104
104
|
}
|
|
105
105
|
// todo
|
|
106
106
|
handleInput(event, element) {
|
|
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.calcTextareaHeight = calcTextareaHeight;
|
|
4
4
|
const utils_1 = require("@type-dom/utils");
|
|
5
5
|
let hiddenTextarea = undefined;
|
|
6
|
-
const HIDDEN_STYLE = `
|
|
7
|
-
height:0 !important;
|
|
8
|
-
visibility:hidden !important;
|
|
9
|
-
${utils_1.isFireFox ? '' : 'overflow:hidden !important;'}
|
|
10
|
-
position:absolute !important;
|
|
11
|
-
z-index:-1000 !important;
|
|
12
|
-
top:0 !important;
|
|
13
|
-
right:0 !important;
|
|
6
|
+
const HIDDEN_STYLE = `
|
|
7
|
+
height:0 !important;
|
|
8
|
+
visibility:hidden !important;
|
|
9
|
+
${utils_1.isFireFox ? '' : 'overflow:hidden !important;'}
|
|
10
|
+
position:absolute !important;
|
|
11
|
+
z-index:-1000 !important;
|
|
12
|
+
top:0 !important;
|
|
13
|
+
right:0 !important;
|
|
14
14
|
`;
|
|
15
15
|
const CONTEXT_STYLE = [
|
|
16
16
|
'letter-spacing',
|
|
@@ -4,7 +4,7 @@ exports.TdOption = void 0;
|
|
|
4
4
|
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
5
5
|
const td_select_style_1 = require("../td-select/td-select.style");
|
|
6
6
|
class TdOption extends ui_abstract_1.UI {
|
|
7
|
-
constructor(params) {
|
|
7
|
+
constructor(params = {}) {
|
|
8
8
|
super(params, 'li');
|
|
9
9
|
this.className = 'TdOption';
|
|
10
10
|
this.ctrl.addAttrObj({
|
|
@@ -29,7 +29,7 @@ class TdOption extends ui_abstract_1.UI {
|
|
|
29
29
|
boxSizing: 'border-box',
|
|
30
30
|
cursor: 'pointer'
|
|
31
31
|
});
|
|
32
|
-
this.props = this.
|
|
32
|
+
this.props = this.setProps(params);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
exports.TdOption = TdOption;
|
|
@@ -7,7 +7,7 @@ export interface ITdOptionConfig extends IUIConfig {
|
|
|
7
7
|
* @description value of option
|
|
8
8
|
* required: true,
|
|
9
9
|
*/
|
|
10
|
-
value
|
|
10
|
+
value?: string | number | boolean | object;
|
|
11
11
|
/**
|
|
12
12
|
* @description label of option, same as `value` if omitted
|
|
13
13
|
*/
|
|
@@ -5,7 +5,7 @@ const framework_1 = require("@type-dom/framework");
|
|
|
5
5
|
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
6
|
const td_select_style_1 = require("../td-select/td-select.style");
|
|
7
7
|
class TdOptionGroup extends ui_abstract_1.UI {
|
|
8
|
-
constructor(params) {
|
|
8
|
+
constructor(params = {}) {
|
|
9
9
|
super(params, 'ul');
|
|
10
10
|
this.className = 'TdOptionGroup';
|
|
11
11
|
this.ctrl.addAttrObj({
|
|
@@ -44,7 +44,7 @@ class TdOptionGroup extends ui_abstract_1.UI {
|
|
|
44
44
|
})
|
|
45
45
|
]
|
|
46
46
|
}));
|
|
47
|
-
this.props = this.
|
|
47
|
+
this.props = this.setProps(params);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
exports.TdOptionGroup = TdOptionGroup;
|
|
@@ -6,7 +6,7 @@ const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
|
6
6
|
const var_1 = require("../../../styles/var");
|
|
7
7
|
const td_radio_group_class_1 = require("../td-radio-group/td-radio-group.class");
|
|
8
8
|
class TdRadio extends ui_abstract_1.UI {
|
|
9
|
-
constructor(params) {
|
|
9
|
+
constructor(params = {}) {
|
|
10
10
|
super(params, 'label');
|
|
11
11
|
this.className = 'TdRadio';
|
|
12
12
|
this.ctrl.addStyleObj({
|
|
@@ -87,7 +87,7 @@ class TdRadio extends ui_abstract_1.UI {
|
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
this.addChildren(this.radioInput, this.radioLabel);
|
|
90
|
-
this.props = this.
|
|
90
|
+
this.props = this.setProps(params);
|
|
91
91
|
}
|
|
92
92
|
setup() {
|
|
93
93
|
var _a;
|
|
@@ -207,7 +207,6 @@ class TdRadio extends ui_abstract_1.UI {
|
|
|
207
207
|
this.addEvents({
|
|
208
208
|
click: (evt) => {
|
|
209
209
|
var _a;
|
|
210
|
-
console.log('this.subscriptions is ', this.subscriptions);
|
|
211
210
|
console.log('this.inputOriginal.dom click . ');
|
|
212
211
|
console.log('this.inputOriginal.dom.value is ', this.inputOriginal.dom.value);
|
|
213
212
|
if (this.disabled) {
|
|
@@ -6,7 +6,7 @@ const var_1 = require("../../../styles/var");
|
|
|
6
6
|
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
7
7
|
const td_radio_group_class_1 = require("../td-radio-group/td-radio-group.class");
|
|
8
8
|
class TdRadioButton extends ui_abstract_1.UI {
|
|
9
|
-
constructor(params) {
|
|
9
|
+
constructor(params = {}) {
|
|
10
10
|
super(params, 'label');
|
|
11
11
|
this.className = 'TdRadioButton';
|
|
12
12
|
this.ctrl.addAttrName('radio-button');
|
|
@@ -65,7 +65,7 @@ class TdRadioButton extends ui_abstract_1.UI {
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
this.addChildren(this.inputOriginal, this.radioLabel);
|
|
68
|
-
this.props = this.
|
|
68
|
+
this.props = this.setProps(params);
|
|
69
69
|
}
|
|
70
70
|
setup() {
|
|
71
71
|
var _a;
|
|
@@ -169,7 +169,6 @@ class TdRadioButton extends ui_abstract_1.UI {
|
|
|
169
169
|
// 点击事件 todo 会触发两次,先不管。
|
|
170
170
|
click: (evt) => {
|
|
171
171
|
var _a;
|
|
172
|
-
console.log('radio-button this.subscriptions is ', this.subscriptions);
|
|
173
172
|
console.log('radio-button this.inputOriginal.dom click . ');
|
|
174
173
|
console.log('radio-button this.inputOriginal.dom.value is ', this.inputOriginal.dom.value);
|
|
175
174
|
if (this.disabled) {
|
|
@@ -6,7 +6,7 @@ const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
|
6
6
|
const td_radio_class_1 = require("../td-radio/td-radio.class");
|
|
7
7
|
const td_radio_button_class_1 = require("../td-radio-button/td-radio-button.class");
|
|
8
8
|
class TdRadioGroup extends ui_abstract_1.UI {
|
|
9
|
-
constructor(params) {
|
|
9
|
+
constructor(params = {}) {
|
|
10
10
|
super(params);
|
|
11
11
|
this.className = 'TdRadioGroup';
|
|
12
12
|
this.ctrl.addStyleObj({
|
|
@@ -17,7 +17,7 @@ class TdRadioGroup extends ui_abstract_1.UI {
|
|
|
17
17
|
marginRight: '12px',
|
|
18
18
|
});
|
|
19
19
|
this.childNodes = [];
|
|
20
|
-
this.props = this.
|
|
20
|
+
this.props = this.setProps(params);
|
|
21
21
|
}
|
|
22
22
|
get resultValue() {
|
|
23
23
|
if (this.modelValue instanceof framework_1.XProxy) {
|
|
@@ -6,7 +6,7 @@ const ui_abstract_1 = require("../../../../ui/ui.abstract");
|
|
|
6
6
|
const framework_1 = require("@type-dom/framework");
|
|
7
7
|
const td_select_style_1 = require("../td-select.style");
|
|
8
8
|
class TdSelectDropDown extends ui_abstract_1.UI {
|
|
9
|
-
constructor(params) {
|
|
9
|
+
constructor(params = {}) {
|
|
10
10
|
super(params);
|
|
11
11
|
this.className = 'TdSelectDropdown';
|
|
12
12
|
this.ctrl.addStyleObj({
|
|
@@ -15,7 +15,7 @@ class TdSelectDropDown extends ui_abstract_1.UI {
|
|
|
15
15
|
borderRadius: var_1.$borderRadius.base,
|
|
16
16
|
boxSizing: 'border-box'
|
|
17
17
|
});
|
|
18
|
-
this.props = this.
|
|
18
|
+
this.props = this.setProps(params);
|
|
19
19
|
}
|
|
20
20
|
setup() {
|
|
21
21
|
const props = this.props;
|
|
@@ -7,7 +7,7 @@ const td_tooltip_class_1 = require("../../feedback/td-tooltip/td-tooltip.class")
|
|
|
7
7
|
const dropdown_class_1 = require("./dropdown/dropdown.class");
|
|
8
8
|
const td_select_style_1 = require("./td-select.style");
|
|
9
9
|
class TdSelect extends ui_abstract_1.UI {
|
|
10
|
-
constructor(params) {
|
|
10
|
+
constructor(params = {}) {
|
|
11
11
|
super(params);
|
|
12
12
|
this.className = 'TdSelect';
|
|
13
13
|
this.ctrl.addStyleObj(td_select_style_1.$select);
|
|
@@ -26,7 +26,7 @@ class TdSelect extends ui_abstract_1.UI {
|
|
|
26
26
|
})
|
|
27
27
|
]
|
|
28
28
|
}));
|
|
29
|
-
this.props = this.
|
|
29
|
+
this.props = this.setProps(params);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
exports.TdSelect = TdSelect;
|