@type-dom/ui 0.0.7 → 0.0.9
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/package.json +1 -2
- package/src/aria.d.ts +0 -17
- package/src/aria.js +0 -18
- package/src/components/basic/td-button/td-button.abstract.d.ts +2 -3
- package/src/components/basic/td-button/td-button.abstract.js +30 -26
- package/src/components/basic/td-button/td-button.interface.d.ts +0 -1
- package/src/components/basic/td-button-group/td-button-group.class.d.ts +2 -3
- package/src/components/basic/td-button-group/td-button-group.class.js +14 -16
- package/src/components/basic/td-container/td-aside/td-aside.class.js +2 -2
- package/src/components/basic/td-container/td-container.class.js +5 -5
- package/src/components/basic/td-container/td-container.js +1 -1
- package/src/components/basic/td-container/td-footer/td-footer.class.js +2 -2
- package/src/components/basic/td-container/td-header/td-header.class.js +3 -4
- package/src/components/basic/td-container/td-main/td-main.class.js +2 -2
- package/src/components/basic/td-icon/td-icon.class.js +9 -9
- package/src/components/basic/td-layout/td-col/td-col.class.d.ts +5 -2
- package/src/components/basic/td-layout/td-col/td-col.class.js +80 -80
- package/src/components/basic/td-layout/td-row/td-row.class.js +13 -13
- package/src/components/basic/td-link/td-link.class.d.ts +0 -1
- package/src/components/basic/td-link/td-link.class.js +17 -19
- package/src/components/basic/td-scrollbar/bar/bar.class.js +3 -3
- package/src/components/basic/td-scrollbar/td-scrollbar.class.js +5 -5
- package/src/components/basic/td-scrollbar/thumb/thumb.class.js +3 -3
- package/src/components/basic/td-space/td-space.class.js +10 -10
- package/src/components/basic/td-text/td-text.class.js +12 -9
- package/src/components/data/td-avatar/td-avatar.class.js +12 -13
- package/src/components/data/td-badge/td-badge.class.d.ts +1 -0
- package/src/components/data/td-badge/td-badge.class.js +15 -11
- package/src/components/data/td-card/td-card.class.js +7 -7
- package/src/components/data/td-check-tag/td-check-tag.class.d.ts +0 -1
- package/src/components/data/td-check-tag/td-check-tag.class.js +9 -11
- package/src/components/data/td-collapse/td-collapse.class.js +2 -3
- 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 +8 -8
- package/src/components/data/td-collapse-transition/td-collapse-transition.util.js +14 -14
- package/src/components/data/td-count-down/td-count-down.class.js +1 -1
- package/src/components/data/td-descriptions/td-descriptions-row.js +2 -2
- package/src/components/data/td-descriptions/td-descriptions.class.js +8 -8
- package/src/components/data/td-descriptions/td-descritions-cell.js +14 -14
- package/src/components/data/td-descriptions-item/td-descriptions-item.class.js +1 -1
- package/src/components/data/td-empty/img-empty.class.js +3 -3
- package/src/components/data/td-empty/td-empty.class.js +4 -4
- package/src/components/data/td-image/td-image.class.js +6 -6
- package/src/components/data/td-image-viewer/td-image-viewer.class.d.ts +2 -1
- package/src/components/data/td-image-viewer/td-image-viewer.class.js +14 -10
- package/src/components/data/td-result/td-result.class.js +3 -3
- package/src/components/data/td-segmented/td-segmented.class.js +26 -30
- package/src/components/data/td-statistic/td-statistic.abstract.js +2 -2
- package/src/components/data/td-tag/td-tag.class.js +10 -10
- package/src/components/feedback/index.d.ts +0 -2
- package/src/components/feedback/index.js +3 -5
- package/src/components/feedback/td-alert/td-alert.class.js +9 -9
- package/src/components/feedback/td-dialog/td-dialog.class.js +4 -4
- package/src/components/feedback/td-dialog-content/td-dialog-content.class.js +4 -4
- package/src/components/feedback/td-drawer/td-drawer.class.js +1 -1
- package/src/components/feedback/td-focus-trap/td-focus-trap.class.d.ts +19 -1
- package/src/components/feedback/td-focus-trap/td-focus-trap.class.js +223 -48
- package/src/components/feedback/td-focus-trap/tokens.d.ts +2 -1
- package/src/components/feedback/td-focus-trap/utils.d.ts +1 -1
- package/src/components/feedback/td-focus-trap/utils.js +9 -11
- package/src/components/feedback/td-loading/td-loading.class.js +1 -1
- package/src/components/feedback/td-message/td-message.class.d.ts +4 -2
- package/src/components/feedback/td-message/td-message.class.js +34 -27
- package/src/components/feedback/td-message/td-message.style.js +2 -1
- package/src/components/feedback/td-message-box/td-message-box.class.d.ts +3 -1
- package/src/components/feedback/td-message-box/td-message-box.class.js +79 -75
- package/src/components/feedback/td-message-box/td-message-box.interface.d.ts +2 -1
- package/src/components/feedback/td-notification/td-notification.class.d.ts +3 -2
- package/src/components/feedback/td-notification/td-notification.class.js +29 -29
- package/src/components/feedback/td-only-child/td-only-child.class.d.ts +7 -0
- package/src/components/feedback/td-only-child/td-only-child.class.js +74 -0
- package/src/components/feedback/td-overlay/td-overlay.class.d.ts +1 -1
- package/src/components/feedback/td-overlay/td-overlay.class.js +5 -5
- package/src/components/feedback/td-popper/arrow/arrow.class.d.ts +6 -0
- package/src/components/feedback/td-popper/arrow/arrow.class.js +22 -3
- package/src/components/feedback/td-popper/composable/use-focus-trap.d.ts +0 -0
- package/src/components/feedback/td-popper/composable/use-focus-trap.js +1 -0
- package/src/components/feedback/td-popper/content/content.class.d.ts +1 -0
- package/src/components/feedback/td-popper/content/content.class.js +25 -4
- package/src/components/feedback/td-popper/content/content.const.d.ts +3 -0
- package/src/components/feedback/td-popper/content/content.const.js +29 -0
- package/src/components/feedback/td-popper/content/content.interface.d.ts +9 -0
- package/src/components/feedback/td-popper/td-popper.class.d.ts +1 -1
- package/src/components/feedback/td-popper/td-popper.class.js +35 -2
- package/src/components/feedback/td-popper/td-popper.const.d.ts +21 -0
- package/src/components/feedback/td-popper/td-popper.const.js +5 -0
- package/src/components/feedback/td-popper/trigger/trigger.class.d.ts +11 -0
- package/src/components/feedback/td-popper/trigger/trigger.class.js +96 -1
- package/src/components/feedback/td-popper/trigger/trigger.const.d.ts +1 -0
- package/src/components/feedback/td-popper/trigger/trigger.const.js +12 -0
- package/src/components/feedback/td-popper/trigger/trigger.interface.d.ts +1 -0
- package/src/components/feedback/td-tooltip/content/content.class.js +1 -1
- package/src/components/feedback/td-tooltip/td-tooltip.class.js +1 -1
- package/src/components/feedback/td-tooltip/trigger/trigger.class.js +1 -1
- package/src/components/form/checkbox-group/checkbox-group.class.js +6 -7
- package/src/components/form/checkbox-group/checkbox-option/checkbox-option.class.d.ts +1 -1
- package/src/components/form/checkbox-group/checkbox-option/checkbox-option.class.js +21 -20
- package/src/components/form/field-item/cascade/field-cascade.abstract.d.ts +1 -1
- package/src/components/form/field-item/cascade/field-cascade.abstract.js +48 -43
- package/src/components/form/field-item/field-item.abstract.js +3 -3
- package/src/components/form/field-item/input/field-input.abstract.d.ts +1 -1
- package/src/components/form/field-item/input/field-input.abstract.js +15 -14
- package/src/components/form/field-item/options/field-options.abstract.d.ts +1 -3
- package/src/components/form/field-item/options/field-options.abstract.js +49 -46
- package/src/components/form/field-item/radio/field-radio.abstract.d.ts +1 -1
- package/src/components/form/field-item/radio/field-radio.abstract.js +32 -36
- package/src/components/form/field-item/select/field-select.abstract.d.ts +1 -1
- package/src/components/form/field-item/select/field-select.abstract.js +19 -19
- package/src/components/form/field-item/span/field-span.abstract.js +5 -5
- package/src/components/form/field-item/textarea/field-textarea.abstract.js +5 -5
- package/src/components/form/field-select/field-select.class.d.ts +1 -1
- package/src/components/form/field-select/field-select.class.js +23 -24
- package/src/components/form/field-select/option/option.class.js +1 -3
- package/src/components/form/radio-group/radio-group.class.js +6 -7
- package/src/components/form/radio-group/radio-option/radio-option.class.d.ts +0 -1
- package/src/components/form/radio-group/radio-option/radio-option.class.js +14 -15
- package/src/components/form/select/select.class.d.ts +1 -1
- package/src/components/form/select/select.class.js +19 -18
- package/src/components/form/td-checkbox/td-checkbox.class.js +3 -3
- package/src/components/form/td-checkbox-button/td-checkbox-button.class.js +3 -3
- package/src/components/form/td-checkbox-group/td-checkbox-group.class.js +3 -3
- package/src/components/form/td-form/td-form.class.js +5 -3
- package/src/components/form/td-form-item/td-form-item.class.js +16 -16
- package/src/components/form/td-input/td-input-field.class.js +8 -8
- package/src/components/form/td-input/td-input.class.d.ts +0 -1
- package/src/components/form/td-input/td-input.class.js +9 -11
- package/src/components/form/td-input/widget/prefix.js +1 -1
- package/src/components/form/td-input/widget/suffix.js +3 -3
- package/src/components/form/td-input/widget/td-input-wrapper.class.js +12 -11
- package/src/components/form/td-input/widget/td-textarea-wrapper.js +3 -3
- package/src/components/form/td-option/td-option.class.js +3 -3
- package/src/components/form/td-option-group/td-option-group.class.js +3 -3
- package/src/components/form/td-radio/td-radio.class.d.ts +0 -1
- package/src/components/form/td-radio/td-radio.class.js +50 -54
- package/src/components/form/td-radio-button/td-radio-button.class.d.ts +0 -1
- package/src/components/form/td-radio-button/td-radio-button.class.js +46 -50
- package/src/components/form/td-radio-group/td-radio-group.class.js +3 -4
- 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.d.ts +1 -1
- package/src/components/form/td-switch/td-switch.class.js +27 -28
- package/src/components/form/td-switch/widget/td-switch-core.js +6 -6
- package/src/components/form/td-switch/widget/td-switch-left.js +3 -3
- package/src/components/form/td-switch/widget/td-switch-right.js +2 -2
- package/src/components/navigation/td-affix/td-affix.class.d.ts +3 -0
- package/src/components/navigation/td-affix/td-affix.class.js +22 -20
- package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.class.js +1 -1
- package/src/components/navigation/td-anchor/td-anchor.class.js +10 -10
- package/src/components/navigation/td-backtop/td-backtop.class.d.ts +5 -3
- package/src/components/navigation/td-backtop/td-backtop.class.js +42 -34
- package/src/components/navigation/td-backtop/td-backtop.interface.d.ts +3 -0
- package/src/components/navigation/td-backtop/use-backtop.d.ts +7 -0
- package/src/components/navigation/td-backtop/use-backtop.js +44 -0
- package/src/components/navigation/td-breadcrumb/td-breadcrumb.class.js +4 -4
- package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.class.js +3 -3
- package/src/components/navigation/td-menu/td-menu.class.js +5 -5
- package/src/components/navigation/td-menu/td-menu.interface.d.ts +2 -1
- package/src/components/navigation/td-tabs/td-tab-bar.class.js +5 -5
- package/src/components/navigation/td-tabs/td-tab-nav.class.js +14 -14
- package/src/components/navigation/td-tabs/td-tab-pane.class.js +3 -3
- package/src/components/navigation/td-tabs/td-tabs.class.js +22 -25
- package/src/components/others/collapsible-box/collapsible-box.js +2 -2
- package/src/components/others/collapsible-box/contents/contents.js +2 -2
- package/src/components/others/collapsible-box/heading/expand-heading.d.ts +1 -1
- package/src/components/others/collapsible-box/heading/expand-heading.js +27 -26
- 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 +9 -0
- package/src/components/others/example/example-source-wrapper.js +30 -0
- package/src/components/others/example/example.d.ts +14 -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 +95 -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 +21 -0
- package/src/components/others/menus/menu.js +125 -0
- package/src/components/others/menus/menus.d.ts +15 -0
- package/src/components/others/menus/menus.js +101 -0
- package/src/components/others/td-divider/td-divider.class.js +8 -8
- package/src/hooks/index.d.ts +3 -0
- package/src/hooks/index.js +6 -0
- package/src/hooks/use-cursor.d.ts +1 -0
- package/src/hooks/use-cursor.js +56 -0
- package/src/hooks/use-escape-keydown.d.ts +4 -0
- package/src/hooks/use-escape-keydown.js +31 -0
- package/src/hooks/use-forward-ref.d.ts +13 -0
- package/src/hooks/use-forward-ref.js +27 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/ui/ui.abstract.d.ts +1 -1
- package/src/ui/ui.abstract.js +3 -3
- package/src/ui/ui.interface.d.ts +3 -3
- package/src/components/feedback/dialog/dialog.class.d.ts +0 -7
- package/src/components/feedback/dialog/dialog.class.js +0 -21
- package/src/components/feedback/dialog/dialog.interface.d.ts +0 -4
- package/src/components/feedback/dialog/dialog.interface.js +0 -2
- package/src/components/feedback/message-box/message-box.d.ts +0 -9
- package/src/components/feedback/message-box/message-box.interface.d.ts +0 -4
- package/src/components/feedback/message-box/message-box.interface.js +0 -2
- package/src/components/feedback/message-box/message-box.js +0 -33
- package/src/components/feedback/overlay/container/body/body.d.ts +0 -7
- package/src/components/feedback/overlay/container/body/body.js +0 -17
- package/src/components/feedback/overlay/container/container.d.ts +0 -15
- package/src/components/feedback/overlay/container/container.js +0 -37
- package/src/components/feedback/overlay/container/footer/cancel-button/cancel-button.d.ts +0 -8
- package/src/components/feedback/overlay/container/footer/cancel-button/cancel-button.js +0 -31
- package/src/components/feedback/overlay/container/footer/confirm-button/confirm-button.d.ts +0 -9
- package/src/components/feedback/overlay/container/footer/confirm-button/confirm-button.js +0 -31
- package/src/components/feedback/overlay/container/footer/footer.d.ts +0 -10
- package/src/components/feedback/overlay/container/footer/footer.js +0 -47
- package/src/components/feedback/overlay/container/header/close-button/close-button.d.ts +0 -11
- package/src/components/feedback/overlay/container/header/close-button/close-button.js +0 -33
- package/src/components/feedback/overlay/container/header/header.d.ts +0 -12
- package/src/components/feedback/overlay/container/header/header.js +0 -25
- package/src/components/feedback/overlay/container/header/title/title.d.ts +0 -9
- package/src/components/feedback/overlay/container/header/title/title.js +0 -19
- package/src/components/feedback/overlay/overlay.abstract.d.ts +0 -13
- package/src/components/feedback/overlay/overlay.abstract.js +0 -59
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdInputWrapper = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
+
const use_cursor_1 = require("../../../../hooks/use-cursor");
|
|
5
6
|
const var_1 = require("../../../../styles/var");
|
|
6
7
|
const td_input_style_1 = require("../td-input.style");
|
|
7
8
|
const suffix_1 = require("./suffix");
|
|
@@ -11,7 +12,7 @@ class TdInputWrapper extends framework_1.TypeDiv {
|
|
|
11
12
|
super();
|
|
12
13
|
this.className = 'TdInputWrapper';
|
|
13
14
|
this.parent = params === null || params === void 0 ? void 0 : params.parent;
|
|
14
|
-
this.
|
|
15
|
+
this.style.addObj({
|
|
15
16
|
display: 'inline-flex',
|
|
16
17
|
flexGrow: 1,
|
|
17
18
|
alignItems: 'center',
|
|
@@ -118,7 +119,7 @@ class TdInputWrapper extends framework_1.TypeDiv {
|
|
|
118
119
|
this.addChild(this.inner);
|
|
119
120
|
this.suffix = new suffix_1.TdInputSuffix(this, params);
|
|
120
121
|
this.addChild(this.suffix);
|
|
121
|
-
this.props = this.
|
|
122
|
+
this.props = this.useParams(params);
|
|
122
123
|
}
|
|
123
124
|
setup() {
|
|
124
125
|
const props = this.props;
|
|
@@ -126,7 +127,7 @@ class TdInputWrapper extends framework_1.TypeDiv {
|
|
|
126
127
|
// todo
|
|
127
128
|
}
|
|
128
129
|
if (props === null || props === void 0 ? void 0 : props.size) {
|
|
129
|
-
this.
|
|
130
|
+
this.style.addObj({
|
|
130
131
|
padding: td_input_style_1.$wrapperPadding[props.size || 'default'],
|
|
131
132
|
fontSize: td_input_style_1.$inputFontSize[props.size || 'default'],
|
|
132
133
|
height: td_input_style_1.$inputHeight[props.size || 'default']
|
|
@@ -175,8 +176,8 @@ class TdInputWrapper extends framework_1.TypeDiv {
|
|
|
175
176
|
}
|
|
176
177
|
setDisabled(disabled) {
|
|
177
178
|
if (disabled) {
|
|
178
|
-
this.inner.
|
|
179
|
-
this.inner.
|
|
179
|
+
this.inner.attr.setObj({ disabled: 'disabled' });
|
|
180
|
+
this.inner.style.setObj({
|
|
180
181
|
// color: var(--el-disabled-text-color),
|
|
181
182
|
color: var_1.$textColor.disabled,
|
|
182
183
|
// -webkit-text-fill-color: var(--el-disabled-text-color),
|
|
@@ -185,8 +186,8 @@ class TdInputWrapper extends framework_1.TypeDiv {
|
|
|
185
186
|
});
|
|
186
187
|
}
|
|
187
188
|
else {
|
|
188
|
-
this.inner.
|
|
189
|
-
this.inner.
|
|
189
|
+
this.inner.attr.remove('disabled');
|
|
190
|
+
this.inner.style.setObj({
|
|
190
191
|
// color: var(--el-text-color),
|
|
191
192
|
color: var_1.$textColor.regular,
|
|
192
193
|
// -webkit-text-fill-color: var(--el-text-color),
|
|
@@ -227,12 +228,12 @@ class TdInputWrapper extends framework_1.TypeDiv {
|
|
|
227
228
|
setShowClear(showClear) {
|
|
228
229
|
var _a;
|
|
229
230
|
console.log('setShowClear . showClear is ', showClear);
|
|
230
|
-
this.suffix.
|
|
231
|
-
(_a = this.suffix.clearIcon) === null || _a === void 0 ? void 0 : _a.
|
|
231
|
+
this.suffix.style.show(this.suffixVisible ? 'inline-flex' : 'none');
|
|
232
|
+
(_a = this.suffix.clearIcon) === null || _a === void 0 ? void 0 : _a.style.show(showClear ? 'inline-flex' : 'none');
|
|
232
233
|
}
|
|
233
234
|
setShowPassword(showPassword) {
|
|
234
235
|
var _a;
|
|
235
|
-
(_a = this.suffix.passwordIcon) === null || _a === void 0 ? void 0 : _a.
|
|
236
|
+
(_a = this.suffix.passwordIcon) === null || _a === void 0 ? void 0 : _a.style.show(showPassword ? 'inline-flex' : 'none');
|
|
236
237
|
}
|
|
237
238
|
setNativeInputValue() {
|
|
238
239
|
console.log('setNativeInputValue . ');
|
|
@@ -246,7 +247,7 @@ class TdInputWrapper extends framework_1.TypeDiv {
|
|
|
246
247
|
}
|
|
247
248
|
handleInput(event, element) {
|
|
248
249
|
console.log('input . this is ', this);
|
|
249
|
-
const [recordCursor, setCursor] = (0,
|
|
250
|
+
const [recordCursor, setCursor] = (0, use_cursor_1.useCursor)(element === null || element === void 0 ? void 0 : element.dom);
|
|
250
251
|
recordCursor();
|
|
251
252
|
let { value } = event === null || event === void 0 ? void 0 : event.target;
|
|
252
253
|
if (this.props.formatter) {
|
|
@@ -8,7 +8,7 @@ class TdTextareaWrapper extends framework_1.TypeDiv {
|
|
|
8
8
|
constructor(params = {}) {
|
|
9
9
|
super();
|
|
10
10
|
this.className = 'TextareaWrapper';
|
|
11
|
-
this.
|
|
11
|
+
this.style.addObj({
|
|
12
12
|
position: 'relative',
|
|
13
13
|
display: 'inline-block',
|
|
14
14
|
width: '100%',
|
|
@@ -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.useParams(params);
|
|
104
104
|
}
|
|
105
105
|
// todo
|
|
106
106
|
handleInput(event, element) {
|
|
@@ -110,7 +110,7 @@ class TdTextareaWrapper extends framework_1.TypeDiv {
|
|
|
110
110
|
if (this.isComposing)
|
|
111
111
|
return;
|
|
112
112
|
if (this.props.autosize) {
|
|
113
|
-
this.inner.
|
|
113
|
+
this.inner.style.setObj({
|
|
114
114
|
// height: 'auto',
|
|
115
115
|
height: this.inner.dom.scrollHeight + 'px'
|
|
116
116
|
});
|
|
@@ -7,11 +7,11 @@ class TdOption extends ui_abstract_1.UI {
|
|
|
7
7
|
constructor(params = {}) {
|
|
8
8
|
super(params, 'li');
|
|
9
9
|
this.className = 'TdOption';
|
|
10
|
-
this.
|
|
10
|
+
this.attr.addObj({
|
|
11
11
|
name: 'td-option',
|
|
12
12
|
role: 'option'
|
|
13
13
|
});
|
|
14
|
-
this.
|
|
14
|
+
this.style.addObj({
|
|
15
15
|
// font-size: map.get($select, 'font-size'),
|
|
16
16
|
fontSize: td_select_style_1.$select.fontSize, // $fontSizes.base,
|
|
17
17
|
// 20 as the padding of option item, 12 as the size of ✓ icon size
|
|
@@ -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.useParams(params);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
exports.TdOption = TdOption;
|
|
@@ -8,10 +8,10 @@ class TdOptionGroup extends ui_abstract_1.UI {
|
|
|
8
8
|
constructor(params = {}) {
|
|
9
9
|
super(params, 'ul');
|
|
10
10
|
this.className = 'TdOptionGroup';
|
|
11
|
-
this.
|
|
11
|
+
this.attr.addObj({
|
|
12
12
|
name: 'option-group-wrap'
|
|
13
13
|
});
|
|
14
|
-
this.
|
|
14
|
+
this.style.addObj({
|
|
15
15
|
margin: '0',
|
|
16
16
|
padding: '0',
|
|
17
17
|
position: 'relative',
|
|
@@ -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.useParams(params);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
exports.TdOptionGroup = TdOptionGroup;
|
|
@@ -9,7 +9,7 @@ class TdRadio extends ui_abstract_1.UI {
|
|
|
9
9
|
constructor(params = {}) {
|
|
10
10
|
super(params, 'label');
|
|
11
11
|
this.className = 'TdRadio';
|
|
12
|
-
this.
|
|
12
|
+
this.style.addObj({
|
|
13
13
|
color: var_1.$textColor.regular,
|
|
14
14
|
fontWeight: var_1.$fontWeightPrimary,
|
|
15
15
|
position: 'relative',
|
|
@@ -87,36 +87,61 @@ 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.useParams(params);
|
|
91
|
+
// 点击事件 todo 会触发两次,先不管。
|
|
92
|
+
this.addEvents({
|
|
93
|
+
click: (evt) => {
|
|
94
|
+
var _a;
|
|
95
|
+
console.log('this.inputOriginal.dom click . ');
|
|
96
|
+
console.log('this.inputOriginal.dom.value is ', this.inputOriginal.dom.value);
|
|
97
|
+
if (this.disabled) {
|
|
98
|
+
evt === null || evt === void 0 ? void 0 : evt.preventDefault();
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
// this.inputOriginal.dom.click();
|
|
102
|
+
if (this.parent instanceof td_radio_group_class_1.TdRadioGroup) {
|
|
103
|
+
this.parent.setModelValue(this.inputOriginal.value); // 触发父级的事件,重置整个组。
|
|
104
|
+
}
|
|
105
|
+
this.setChecked(true);
|
|
106
|
+
(_a = this.parent) === null || _a === void 0 ? void 0 : _a.childNodes.forEach((node) => {
|
|
107
|
+
if (node instanceof TdRadio &&
|
|
108
|
+
node.inputOriginal.attr.get('name') ===
|
|
109
|
+
this.inputOriginal.attr.get('name') &&
|
|
110
|
+
node !== this) {
|
|
111
|
+
node.setChecked(false);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
});
|
|
91
116
|
}
|
|
92
117
|
setup() {
|
|
93
118
|
var _a;
|
|
94
119
|
const props = this.props;
|
|
95
120
|
if (props === null || props === void 0 ? void 0 : props.name) {
|
|
96
121
|
console.log('setConfig props?.name', props === null || props === void 0 ? void 0 : props.name);
|
|
97
|
-
this.inputOriginal.
|
|
122
|
+
this.inputOriginal.attr.addName(props.name);
|
|
98
123
|
}
|
|
99
124
|
if (props === null || props === void 0 ? void 0 : props.value) {
|
|
100
|
-
this.inputOriginal.
|
|
125
|
+
this.inputOriginal.attr.addObj({ value: props.value });
|
|
101
126
|
}
|
|
102
127
|
if (props === null || props === void 0 ? void 0 : props.checked) {
|
|
103
|
-
this.inputOriginal.
|
|
128
|
+
this.inputOriginal.attr.addObj({ checked: props.checked || false });
|
|
104
129
|
}
|
|
105
130
|
if (props === null || props === void 0 ? void 0 : props.label) {
|
|
106
131
|
(_a = this.radioLabel.textNode) === null || _a === void 0 ? void 0 : _a.setText(props.label);
|
|
107
132
|
}
|
|
108
133
|
if (props === null || props === void 0 ? void 0 : props.disabled) {
|
|
109
|
-
this.inputOriginal.
|
|
134
|
+
this.inputOriginal.attr.addObj({ disabled: props.disabled });
|
|
110
135
|
// todo 样式
|
|
111
136
|
}
|
|
112
137
|
if (props === null || props === void 0 ? void 0 : props.size) {
|
|
113
|
-
this.
|
|
138
|
+
this.style.addObj({
|
|
114
139
|
height: var_1.$commonComponentSize[props.size],
|
|
115
140
|
fontSize: var_1.$fontSizes[props.size]
|
|
116
141
|
});
|
|
117
142
|
}
|
|
118
143
|
if (props === null || props === void 0 ? void 0 : props.border) {
|
|
119
|
-
this.
|
|
144
|
+
this.style.addObj({
|
|
120
145
|
borderWidth: var_1.$borderWidth,
|
|
121
146
|
borderStyle: var_1.$borderStyle,
|
|
122
147
|
borderColor: var_1.$borderColor.base,
|
|
@@ -125,26 +150,26 @@ class TdRadio extends ui_abstract_1.UI {
|
|
|
125
150
|
});
|
|
126
151
|
}
|
|
127
152
|
if (props === null || props === void 0 ? void 0 : props.checked) {
|
|
128
|
-
this.setChecked(props
|
|
153
|
+
this.setChecked(props.checked);
|
|
129
154
|
}
|
|
130
155
|
if (props === null || props === void 0 ? void 0 : props.disabled) {
|
|
131
|
-
this.setDisabled(props
|
|
156
|
+
this.setDisabled(props.disabled);
|
|
132
157
|
}
|
|
133
158
|
}
|
|
134
159
|
setDisabled(disabled) {
|
|
135
160
|
this.disabled = disabled;
|
|
136
161
|
if (disabled) {
|
|
137
|
-
this.
|
|
162
|
+
this.style.setObj({
|
|
138
163
|
cursor: 'notAllowed',
|
|
139
164
|
opacity: 0.5
|
|
140
165
|
// 禁用事件
|
|
141
166
|
// pointerEvents: 'none',
|
|
142
167
|
});
|
|
143
|
-
this.radioLabel.
|
|
168
|
+
this.radioLabel.style.setObj({
|
|
144
169
|
color: var_1.$colors.default.base
|
|
145
170
|
});
|
|
146
|
-
this.inputOriginal.
|
|
147
|
-
this.inputInner.
|
|
171
|
+
this.inputOriginal.attr.setObj({ disabled: true });
|
|
172
|
+
this.inputInner.style.setObj({
|
|
148
173
|
cursor: 'notAllowed',
|
|
149
174
|
// color: $colors.default.base,
|
|
150
175
|
// borderWidth: '1px',
|
|
@@ -155,30 +180,30 @@ class TdRadio extends ui_abstract_1.UI {
|
|
|
155
180
|
});
|
|
156
181
|
}
|
|
157
182
|
else {
|
|
158
|
-
this.
|
|
183
|
+
this.style.setObj({
|
|
159
184
|
cursor: 'pointer',
|
|
160
185
|
opacity: 1,
|
|
161
186
|
pointerEvents: 'auto'
|
|
162
187
|
});
|
|
163
|
-
this.inputOriginal.
|
|
164
|
-
this.inputInner.
|
|
188
|
+
this.inputOriginal.attr.remove('disabled');
|
|
189
|
+
this.inputInner.style.setObj({
|
|
165
190
|
cursor: 'auto'
|
|
166
191
|
});
|
|
167
192
|
}
|
|
168
193
|
}
|
|
169
194
|
setChecked(checked) {
|
|
170
195
|
if (checked) {
|
|
171
|
-
this.
|
|
196
|
+
this.style.setObj({
|
|
172
197
|
borderColor: var_1.$colors.primary.base
|
|
173
198
|
});
|
|
174
|
-
this.inputOriginal.
|
|
199
|
+
this.inputOriginal.attr.setObj({
|
|
175
200
|
checked: true
|
|
176
201
|
});
|
|
177
202
|
// 设置选中样式
|
|
178
|
-
this.radioLabel.
|
|
203
|
+
this.radioLabel.style.setObj({
|
|
179
204
|
color: var_1.$colors.primary.base
|
|
180
205
|
});
|
|
181
|
-
this.inputInner.
|
|
206
|
+
this.inputInner.style.setObj({
|
|
182
207
|
color: var_1.$colors.primary.base,
|
|
183
208
|
borderWidth: '5px',
|
|
184
209
|
borderStyle: 'solid',
|
|
@@ -187,14 +212,14 @@ class TdRadio extends ui_abstract_1.UI {
|
|
|
187
212
|
}
|
|
188
213
|
else {
|
|
189
214
|
// 设置非选中样式
|
|
190
|
-
this.
|
|
215
|
+
this.style.setObj({
|
|
191
216
|
borderColor: var_1.$borderColor.base
|
|
192
217
|
});
|
|
193
|
-
this.inputOriginal.
|
|
194
|
-
this.radioLabel.
|
|
218
|
+
this.inputOriginal.attr.remove('checked');
|
|
219
|
+
this.radioLabel.style.setObj({
|
|
195
220
|
color: var_1.$colors.default.base
|
|
196
221
|
});
|
|
197
|
-
this.inputInner.
|
|
222
|
+
this.inputInner.style.setObj({
|
|
198
223
|
borderWidth: '1px',
|
|
199
224
|
borderStyle: 'solid',
|
|
200
225
|
borderColor: var_1.$borderColor.base,
|
|
@@ -202,34 +227,5 @@ class TdRadio extends ui_abstract_1.UI {
|
|
|
202
227
|
});
|
|
203
228
|
}
|
|
204
229
|
}
|
|
205
|
-
initEvents() {
|
|
206
|
-
// 点击事件 todo 会触发两次,先不管。
|
|
207
|
-
this.addEvents({
|
|
208
|
-
click: (evt) => {
|
|
209
|
-
var _a;
|
|
210
|
-
console.log('this.subscriptions is ', this.subscriptions);
|
|
211
|
-
console.log('this.inputOriginal.dom click . ');
|
|
212
|
-
console.log('this.inputOriginal.dom.value is ', this.inputOriginal.dom.value);
|
|
213
|
-
if (this.disabled) {
|
|
214
|
-
evt === null || evt === void 0 ? void 0 : evt.preventDefault();
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
// this.inputOriginal.dom.click();
|
|
218
|
-
if (this.parent instanceof td_radio_group_class_1.TdRadioGroup) {
|
|
219
|
-
this.parent.setModelValue(this.inputOriginal.value); // 触发父级的事件,重置整个组。
|
|
220
|
-
}
|
|
221
|
-
this.setChecked(true);
|
|
222
|
-
(_a = this.parent) === null || _a === void 0 ? void 0 : _a.childNodes.forEach((node) => {
|
|
223
|
-
var _a, _b;
|
|
224
|
-
if (node instanceof TdRadio &&
|
|
225
|
-
((_a = node.inputOriginal.props.attrObj) === null || _a === void 0 ? void 0 : _a.name) ===
|
|
226
|
-
((_b = this.inputOriginal.props.attrObj) === null || _b === void 0 ? void 0 : _b.name) &&
|
|
227
|
-
node !== this) {
|
|
228
|
-
node.setChecked(false);
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
230
|
}
|
|
235
231
|
exports.TdRadio = TdRadio;
|
|
@@ -9,8 +9,8 @@ class TdRadioButton extends ui_abstract_1.UI {
|
|
|
9
9
|
constructor(params = {}) {
|
|
10
10
|
super(params, 'label');
|
|
11
11
|
this.className = 'TdRadioButton';
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
12
|
+
this.attr.addName('radio-button');
|
|
13
|
+
this.style.addObj({
|
|
14
14
|
position: 'relative',
|
|
15
15
|
display: 'inline-block',
|
|
16
16
|
outline: 'none'
|
|
@@ -65,51 +65,51 @@ 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.useParams(params);
|
|
69
69
|
}
|
|
70
70
|
setup() {
|
|
71
71
|
var _a;
|
|
72
72
|
const props = this.props;
|
|
73
73
|
if (props.name) {
|
|
74
74
|
console.log('setConfig props.name', props.name);
|
|
75
|
-
this.inputOriginal.
|
|
75
|
+
this.inputOriginal.attr.addName(props.name);
|
|
76
76
|
}
|
|
77
77
|
if (props.value) {
|
|
78
|
-
this.inputOriginal.
|
|
78
|
+
this.inputOriginal.attr.addObj({ value: props.value });
|
|
79
79
|
}
|
|
80
80
|
if (props.checked) {
|
|
81
|
-
this.inputOriginal.
|
|
81
|
+
this.inputOriginal.attr.addObj({ checked: props.checked || false });
|
|
82
82
|
}
|
|
83
83
|
if (props === null || props === void 0 ? void 0 : props.label) {
|
|
84
84
|
(_a = this.radioLabel.textNode) === null || _a === void 0 ? void 0 : _a.setText(props.label);
|
|
85
85
|
}
|
|
86
86
|
if (props === null || props === void 0 ? void 0 : props.disabled) {
|
|
87
|
-
this.inputOriginal.
|
|
87
|
+
this.inputOriginal.attr.addObj({ disabled: props.disabled });
|
|
88
88
|
// todo 样式
|
|
89
89
|
}
|
|
90
90
|
// size 默认值是 default
|
|
91
91
|
const size = (props === null || props === void 0 ? void 0 : props.size) || 'default';
|
|
92
|
-
this.
|
|
92
|
+
this.style.addObj({
|
|
93
93
|
height: var_1.$commonComponentSize[size]
|
|
94
94
|
});
|
|
95
|
-
this.radioLabel.
|
|
95
|
+
this.radioLabel.style.addObj({
|
|
96
96
|
padding: var_1.$paddingVerticalMap[size] + ' ' + var_1.$paddingHorizontalMap[size],
|
|
97
97
|
fontSize: var_1.$fontSizes[size]
|
|
98
98
|
});
|
|
99
99
|
if (props === null || props === void 0 ? void 0 : props.isFirst) {
|
|
100
100
|
const radius = var_1.$borderRadiusMap[size];
|
|
101
|
-
this.radioLabel.
|
|
101
|
+
this.radioLabel.style.addObj({
|
|
102
102
|
borderRadius: radius + ' 0 0 ' + radius
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
else {
|
|
106
|
-
this.radioLabel.
|
|
106
|
+
this.radioLabel.style.addObj({
|
|
107
107
|
borderLeft: '0'
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
if (props === null || props === void 0 ? void 0 : props.isLast) {
|
|
111
111
|
const radius = var_1.$borderRadiusMap[size];
|
|
112
|
-
this.radioLabel.
|
|
112
|
+
this.radioLabel.style.addObj({
|
|
113
113
|
borderRadius: '0 ' + radius + ' ' + radius + ' 0'
|
|
114
114
|
});
|
|
115
115
|
}
|
|
@@ -119,79 +119,75 @@ class TdRadioButton extends ui_abstract_1.UI {
|
|
|
119
119
|
if (props === null || props === void 0 ? void 0 : props.disabled) {
|
|
120
120
|
this.setDisabled(props === null || props === void 0 ? void 0 : props.disabled);
|
|
121
121
|
}
|
|
122
|
+
this.addEvents({
|
|
123
|
+
// 点击事件 todo 会触发两次,先不管。
|
|
124
|
+
click: (evt) => {
|
|
125
|
+
var _a;
|
|
126
|
+
console.log('radio-button this.inputOriginal.dom click . ');
|
|
127
|
+
console.log('radio-button this.inputOriginal.dom.value is ', this.inputOriginal.dom.value);
|
|
128
|
+
if (this.disabled) {
|
|
129
|
+
evt === null || evt === void 0 ? void 0 : evt.preventDefault();
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
// this.inputOriginal.dom.click();
|
|
133
|
+
if (this.parent instanceof td_radio_group_class_1.TdRadioGroup) {
|
|
134
|
+
this.parent.setModelValue(this.inputOriginal.value); // 触发父级的事件,重置整个组。
|
|
135
|
+
}
|
|
136
|
+
this.setChecked(true);
|
|
137
|
+
(_a = this.parent) === null || _a === void 0 ? void 0 : _a.childNodes.forEach((node) => {
|
|
138
|
+
if (node instanceof TdRadioButton &&
|
|
139
|
+
node.inputOriginal.attr.get('name') ===
|
|
140
|
+
this.inputOriginal.attr.get('name') &&
|
|
141
|
+
node !== this) {
|
|
142
|
+
node.setChecked(false);
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
});
|
|
122
147
|
}
|
|
123
148
|
setDisabled(disabled) {
|
|
124
149
|
this.disabled = disabled;
|
|
125
150
|
if (disabled) {
|
|
126
|
-
this.
|
|
151
|
+
this.style.setObj({
|
|
127
152
|
cursor: 'notAllowed',
|
|
128
153
|
opacity: 0.5
|
|
129
154
|
// 禁用事件
|
|
130
155
|
// pointerEvents: 'none',
|
|
131
156
|
});
|
|
132
|
-
this.radioLabel.
|
|
157
|
+
this.radioLabel.style.setObj({
|
|
133
158
|
color: var_1.$colors.default.base
|
|
134
159
|
});
|
|
135
|
-
this.inputOriginal.
|
|
160
|
+
this.inputOriginal.attr.setObj({ disabled: true });
|
|
136
161
|
}
|
|
137
162
|
else {
|
|
138
|
-
this.
|
|
163
|
+
this.style.setObj({
|
|
139
164
|
cursor: 'pointer',
|
|
140
165
|
opacity: 1,
|
|
141
166
|
pointerEvents: 'auto'
|
|
142
167
|
});
|
|
143
|
-
this.inputOriginal.
|
|
168
|
+
this.inputOriginal.attr.remove('disabled');
|
|
144
169
|
}
|
|
145
170
|
}
|
|
146
171
|
setChecked(checked) {
|
|
147
172
|
if (checked) {
|
|
148
|
-
this.inputOriginal.
|
|
173
|
+
this.inputOriginal.attr.setObj({
|
|
149
174
|
checked: true
|
|
150
175
|
});
|
|
151
176
|
// 设置选中样式
|
|
152
|
-
this.radioLabel.
|
|
177
|
+
this.radioLabel.style.setObj({
|
|
153
178
|
color: var_1.$colorWhite,
|
|
154
179
|
backgroundColor: var_1.$colors.primary.base
|
|
155
180
|
});
|
|
156
181
|
}
|
|
157
182
|
else {
|
|
158
|
-
this.inputOriginal.
|
|
183
|
+
this.inputOriginal.attr.remove('checked');
|
|
159
184
|
// 设置非选中样式
|
|
160
|
-
this.radioLabel.
|
|
185
|
+
this.radioLabel.style.setObj({
|
|
161
186
|
borderColor: var_1.$borderColor.base,
|
|
162
187
|
background: var_1.$fillColor.blank,
|
|
163
188
|
color: var_1.$colors.default.base
|
|
164
189
|
});
|
|
165
190
|
}
|
|
166
191
|
}
|
|
167
|
-
initEvents() {
|
|
168
|
-
this.addEvents({
|
|
169
|
-
// 点击事件 todo 会触发两次,先不管。
|
|
170
|
-
click: (evt) => {
|
|
171
|
-
var _a;
|
|
172
|
-
console.log('radio-button this.subscriptions is ', this.subscriptions);
|
|
173
|
-
console.log('radio-button this.inputOriginal.dom click . ');
|
|
174
|
-
console.log('radio-button this.inputOriginal.dom.value is ', this.inputOriginal.dom.value);
|
|
175
|
-
if (this.disabled) {
|
|
176
|
-
evt === null || evt === void 0 ? void 0 : evt.preventDefault();
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
// this.inputOriginal.dom.click();
|
|
180
|
-
if (this.parent instanceof td_radio_group_class_1.TdRadioGroup) {
|
|
181
|
-
this.parent.setModelValue(this.inputOriginal.value); // 触发父级的事件,重置整个组。
|
|
182
|
-
}
|
|
183
|
-
this.setChecked(true);
|
|
184
|
-
(_a = this.parent) === null || _a === void 0 ? void 0 : _a.childNodes.forEach((node) => {
|
|
185
|
-
var _a, _b;
|
|
186
|
-
if (node instanceof TdRadioButton &&
|
|
187
|
-
((_a = node.inputOriginal.props.attrObj) === null || _a === void 0 ? void 0 : _a.name) ===
|
|
188
|
-
((_b = this.inputOriginal.props.attrObj) === null || _b === void 0 ? void 0 : _b.name) &&
|
|
189
|
-
node !== this) {
|
|
190
|
-
node.setChecked(false);
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
192
|
}
|
|
197
193
|
exports.TdRadioButton = TdRadioButton;
|
|
@@ -9,7 +9,7 @@ class TdRadioGroup extends ui_abstract_1.UI {
|
|
|
9
9
|
constructor(params = {}) {
|
|
10
10
|
super(params);
|
|
11
11
|
this.className = 'TdRadioGroup';
|
|
12
|
-
this.
|
|
12
|
+
this.style.addObj({
|
|
13
13
|
display: 'inline-flex',
|
|
14
14
|
alignItems: 'center',
|
|
15
15
|
flexWrap: 'wrap',
|
|
@@ -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.useParams(params);
|
|
21
21
|
}
|
|
22
22
|
get resultValue() {
|
|
23
23
|
if (this.modelValue instanceof framework_1.XProxy) {
|
|
@@ -92,8 +92,7 @@ class TdRadioGroup extends ui_abstract_1.UI {
|
|
|
92
92
|
}
|
|
93
93
|
// console.error('value is ', value);
|
|
94
94
|
this.childNodes.forEach((opt) => {
|
|
95
|
-
|
|
96
|
-
if (String((_a = opt.inputOriginal.props.attrObj) === null || _a === void 0 ? void 0 : _a.value) === String(value)) {
|
|
95
|
+
if (String(opt.inputOriginal.attr.get('value')) === String(value)) {
|
|
97
96
|
// 设置选中样式
|
|
98
97
|
opt.setChecked(true);
|
|
99
98
|
}
|
|
@@ -9,13 +9,13 @@ class TdSelectDropDown extends ui_abstract_1.UI {
|
|
|
9
9
|
constructor(params = {}) {
|
|
10
10
|
super(params);
|
|
11
11
|
this.className = 'TdSelectDropdown';
|
|
12
|
-
this.
|
|
12
|
+
this.style.addObj({
|
|
13
13
|
// z-index: calc(#{getCssVar('index-top')} + 1);
|
|
14
14
|
// border-radius: getCssVar('border-radius-base');
|
|
15
15
|
borderRadius: var_1.$borderRadius.base,
|
|
16
16
|
boxSizing: 'border-box'
|
|
17
17
|
});
|
|
18
|
-
this.props = this.
|
|
18
|
+
this.props = this.useParams(params);
|
|
19
19
|
}
|
|
20
20
|
setup() {
|
|
21
21
|
const props = this.props;
|
|
@@ -10,7 +10,7 @@ class TdSelect extends ui_abstract_1.UI {
|
|
|
10
10
|
constructor(params = {}) {
|
|
11
11
|
super(params);
|
|
12
12
|
this.className = 'TdSelect';
|
|
13
|
-
this.
|
|
13
|
+
this.style.addObj(td_select_style_1.$select);
|
|
14
14
|
this.addChild(new td_tooltip_class_1.TdTooltip({
|
|
15
15
|
slot: [
|
|
16
16
|
new framework_1.Div({
|
|
@@ -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.useParams(params);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
exports.TdSelect = TdSelect;
|
|
@@ -15,7 +15,7 @@ export declare class TdSwitch extends UI implements ITdSwitch {
|
|
|
15
15
|
get actualValue(): string | number | boolean | undefined;
|
|
16
16
|
get checked(): boolean;
|
|
17
17
|
mounted(): void;
|
|
18
|
-
|
|
18
|
+
setup(): void;
|
|
19
19
|
handleChange(): void;
|
|
20
20
|
setDisabled(disabled: boolean): void;
|
|
21
21
|
setChecked(checked: boolean): void;
|