@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
|
@@ -7,14 +7,14 @@ class TdBreadcrumb extends ui_abstract_1.UI {
|
|
|
7
7
|
constructor(params = {}) {
|
|
8
8
|
super(params);
|
|
9
9
|
this.className = 'TdBreadcrumb';
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
10
|
+
this.attr.addName('td-breadcrumb');
|
|
11
|
+
this.style.addObj({
|
|
12
12
|
fontSize: '14px',
|
|
13
13
|
lineHeight: 1
|
|
14
14
|
});
|
|
15
15
|
this.childNodes = [];
|
|
16
16
|
this.addChild(this.getSlotNode());
|
|
17
|
-
this.props = this.
|
|
17
|
+
this.props = this.useParams(params);
|
|
18
18
|
}
|
|
19
19
|
created() {
|
|
20
20
|
console.log('TdBreadcrumb created . ');
|
|
@@ -28,7 +28,7 @@ class TdBreadcrumb extends ui_abstract_1.UI {
|
|
|
28
28
|
var _a;
|
|
29
29
|
const items = this.childNodes;
|
|
30
30
|
if (items.length) {
|
|
31
|
-
(_a = items[items.length - 1]) === null || _a === void 0 ? void 0 : _a.
|
|
31
|
+
(_a = items[items.length - 1]) === null || _a === void 0 ? void 0 : _a.attr.set('aria-current', 'page');
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -9,7 +9,7 @@ class TdBreadcrumbItem extends ui_abstract_1.UI {
|
|
|
9
9
|
constructor(params = {}) {
|
|
10
10
|
super(params, 'span');
|
|
11
11
|
this.className = 'TdBreadcrumbItem';
|
|
12
|
-
this.
|
|
12
|
+
this.style.addObj({
|
|
13
13
|
float: 'left',
|
|
14
14
|
display: 'inline-flex',
|
|
15
15
|
alignItems: 'center'
|
|
@@ -39,11 +39,11 @@ class TdBreadcrumbItem extends ui_abstract_1.UI {
|
|
|
39
39
|
if (params === null || params === void 0 ? void 0 : params.slot) {
|
|
40
40
|
this.slotChild(params === null || params === void 0 ? void 0 : params.slot);
|
|
41
41
|
}
|
|
42
|
-
this.
|
|
42
|
+
this.useParams(params);
|
|
43
43
|
}
|
|
44
44
|
addSeparator(breadcrumbConfig) {
|
|
45
45
|
if (breadcrumbConfig === null || breadcrumbConfig === void 0 ? void 0 : breadcrumbConfig.separatorIcon) {
|
|
46
|
-
breadcrumbConfig.separatorIcon.
|
|
46
|
+
breadcrumbConfig.separatorIcon.style.addObj({
|
|
47
47
|
verticalAlign: 'middle'
|
|
48
48
|
});
|
|
49
49
|
this.addChild(new td_icon_class_1.TdIcon({
|
|
@@ -7,11 +7,11 @@ class TdMenu extends ui_abstract_1.UI {
|
|
|
7
7
|
constructor(params = {}) {
|
|
8
8
|
super(params, 'ul');
|
|
9
9
|
this.className = 'TdMenu';
|
|
10
|
-
this.
|
|
10
|
+
this.attr.addObj({
|
|
11
11
|
name: 'td-menu',
|
|
12
12
|
role: 'menubar'
|
|
13
13
|
});
|
|
14
|
-
this.
|
|
14
|
+
this.style.addObj({
|
|
15
15
|
// border-right: solid 1px var(--el-menu-border-color),
|
|
16
16
|
borderRight: 'solid 1px ' + var_1.$borderColor.base,
|
|
17
17
|
listStyle: 'none',
|
|
@@ -22,16 +22,16 @@ class TdMenu extends ui_abstract_1.UI {
|
|
|
22
22
|
backgroundColor: var_1.$borderColor.base,
|
|
23
23
|
boxSizing: 'border-box'
|
|
24
24
|
});
|
|
25
|
-
this.props = this.
|
|
25
|
+
this.props = this.useParams(params);
|
|
26
26
|
}
|
|
27
27
|
setup() {
|
|
28
28
|
const props = this.props;
|
|
29
29
|
const mode = props.mode || 'vertical';
|
|
30
30
|
if (mode === 'vertical') {
|
|
31
|
-
this.
|
|
31
|
+
this.style.addObj({});
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
|
-
this.
|
|
34
|
+
this.style.addObj({
|
|
35
35
|
display: 'flex',
|
|
36
36
|
flexWrap: 'nowrap',
|
|
37
37
|
borderRight: 'none'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
|
+
import { Router } from '@type-dom/framework';
|
|
2
3
|
export interface ITdMenu extends IUI {
|
|
3
4
|
className: 'TdMenu';
|
|
4
5
|
}
|
|
@@ -6,7 +7,7 @@ export interface ITdMenuConfig extends IUIConfig {
|
|
|
6
7
|
mode?: 'horizontal' | 'vertical';
|
|
7
8
|
defaultActive?: string;
|
|
8
9
|
uniqueOpened?: boolean;
|
|
9
|
-
router?:
|
|
10
|
+
router?: Router;
|
|
10
11
|
menuTrigger?: 'hover' | 'click';
|
|
11
12
|
collapse?: boolean;
|
|
12
13
|
backgroundColor?: string;
|
|
@@ -8,10 +8,10 @@ class TdTabBar extends ui_abstract_1.UI {
|
|
|
8
8
|
constructor(params) {
|
|
9
9
|
super(params);
|
|
10
10
|
this.className = 'TdTabBar';
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
11
|
+
this.attr.addName('td-tab-bar');
|
|
12
|
+
this.style.addObj(td_tabs_style_1.$tabsActiveBarStyle);
|
|
13
13
|
this.rootTabs = params === null || params === void 0 ? void 0 : params.rootTabs;
|
|
14
|
-
this.props = this.
|
|
14
|
+
this.props = this.useParams(params);
|
|
15
15
|
}
|
|
16
16
|
getBarStyle() {
|
|
17
17
|
var _a;
|
|
@@ -26,7 +26,7 @@ class TdTabBar extends ui_abstract_1.UI {
|
|
|
26
26
|
this.props.tabs && this.props.tabs.every((tab, index) => {
|
|
27
27
|
var _a, _b, _c, _d, _e;
|
|
28
28
|
// const $el = instance.parent?.refs?.[`tab-${tab.uid}`] as HTMLElement
|
|
29
|
-
const $el = ((_a = this.rootTabs) === null || _a === void 0 ? void 0 : _a.tabNav.tabs) && ((_c = (_b = this.rootTabs) === null || _b === void 0 ? void 0 : _b.tabNav.tabs.find((node) => { var _a
|
|
29
|
+
const $el = ((_a = this.rootTabs) === null || _a === void 0 ? void 0 : _a.tabNav.tabs) && ((_c = (_b = this.rootTabs) === null || _b === void 0 ? void 0 : _b.tabNav.tabs.find((node) => { var _a; return node.attr.get('tabName') === ((_a = tab.name) !== null && _a !== void 0 ? _a : (index + 1)); })) === null || _c === void 0 ? void 0 : _c.dom);
|
|
30
30
|
console.log('$el is ', $el);
|
|
31
31
|
if (!$el)
|
|
32
32
|
return false;
|
|
@@ -56,7 +56,7 @@ class TdTabBar extends ui_abstract_1.UI {
|
|
|
56
56
|
change() {
|
|
57
57
|
console.log('update . ');
|
|
58
58
|
this.barStyle = this.getBarStyle();
|
|
59
|
-
this.
|
|
59
|
+
this.style.setObj(this.barStyle);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
exports.TdTabBar = TdTabBar;
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdTabNav = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const utils_1 = require("@type-dom/utils");
|
|
5
6
|
const framework_1 = require("@type-dom/framework");
|
|
6
7
|
const svgs_1 = require("@type-dom/svgs");
|
|
7
|
-
const utils_1 = require("@type-dom/utils");
|
|
8
8
|
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
9
9
|
const var_1 = require("../../../styles/var");
|
|
10
|
-
const aria_1 = require("../../../aria");
|
|
11
10
|
const td_tabs_style_1 = require("./td-tabs.style");
|
|
12
11
|
const td_tab_bar_class_1 = require("./td-tab-bar.class");
|
|
13
12
|
const td_icon_class_1 = require("../../basic/td-icon/td-icon.class");
|
|
@@ -17,8 +16,8 @@ class TdTabNav extends ui_abstract_1.UI {
|
|
|
17
16
|
super(params);
|
|
18
17
|
this.tabs = [];
|
|
19
18
|
this.className = 'TdTabNav';
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
19
|
+
this.attr.addName('td-tab-nav-wrap');
|
|
20
|
+
this.style.addObj(td_tabs_style_1.$tabsNavWrapStyle);
|
|
22
21
|
this.addChild(new framework_1.U({
|
|
23
22
|
name: 'underline',
|
|
24
23
|
styleObj: td_tabs_style_1.$tabsNavWrapAfterStyle,
|
|
@@ -134,6 +133,8 @@ class TdTabNav extends ui_abstract_1.UI {
|
|
|
134
133
|
this.removeFocus();
|
|
135
134
|
// this.rootTabs.currentName = tabName;
|
|
136
135
|
(_b = (_a = params.emits) === null || _a === void 0 ? void 0 : _a.tabClick) === null || _b === void 0 ? void 0 : _b.call(_a, pane, tabName, evt);
|
|
136
|
+
// tabClick是上级 tabs 的事件监听器,不是tabNav的;
|
|
137
|
+
// this.emit('tabClick', pane, tabName, evt);
|
|
137
138
|
(0, framework_1.nextTick)(() => {
|
|
138
139
|
this.selectTab(ele);
|
|
139
140
|
});
|
|
@@ -141,21 +142,20 @@ class TdTabNav extends ui_abstract_1.UI {
|
|
|
141
142
|
keydown: (ev) => {
|
|
142
143
|
var _a, _b;
|
|
143
144
|
if (closable &&
|
|
144
|
-
(ev.code ===
|
|
145
|
-
|
|
146
|
-
// emit('tabRemove', pane, ev)
|
|
145
|
+
((ev === null || ev === void 0 ? void 0 : ev.code) === utils_1.EVENT_CODE.delete || (ev === null || ev === void 0 ? void 0 : ev.code) === utils_1.EVENT_CODE.backspace)) {
|
|
146
|
+
// emit('tabRemove', pane, ev);
|
|
147
147
|
(_b = (_a = params.emits) === null || _a === void 0 ? void 0 : _a.tabRemove) === null || _b === void 0 ? void 0 : _b.call(_a, pane, ev);
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
150
|
},
|
|
151
151
|
});
|
|
152
152
|
if (tabName === ((_d = this.rootTabs) === null || _d === void 0 ? void 0 : _d.currentName)) {
|
|
153
|
-
item.
|
|
153
|
+
item.style.addObj({
|
|
154
154
|
color: var_1.$colors.primary.base,
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
else {
|
|
158
|
-
item.
|
|
158
|
+
item.style.addObj({
|
|
159
159
|
color: var_1.$textColor.regular,
|
|
160
160
|
});
|
|
161
161
|
}
|
|
@@ -187,8 +187,8 @@ class TdTabNav extends ui_abstract_1.UI {
|
|
|
187
187
|
})) || [];
|
|
188
188
|
console.log('this.tabs is ', this.tabs);
|
|
189
189
|
this.nav.addChildren(...this.tabs);
|
|
190
|
-
this.nav.
|
|
191
|
-
this.props = this.
|
|
190
|
+
this.nav.style.addObj(this.navStyle);
|
|
191
|
+
this.props = this.useParams(params);
|
|
192
192
|
}
|
|
193
193
|
mounted() {
|
|
194
194
|
setTimeout(() => this.scrollToActiveTab(), 0);
|
|
@@ -300,12 +300,12 @@ class TdTabNav extends ui_abstract_1.UI {
|
|
|
300
300
|
(_a = this.tabBar) === null || _a === void 0 ? void 0 : _a.change();
|
|
301
301
|
this.tabs.forEach((tab) => {
|
|
302
302
|
if (item === tab) {
|
|
303
|
-
tab.
|
|
303
|
+
tab.style.setObj({
|
|
304
304
|
color: var_1.$colors.primary.base,
|
|
305
305
|
});
|
|
306
306
|
}
|
|
307
307
|
else {
|
|
308
|
-
tab.
|
|
308
|
+
tab.style.setObj({
|
|
309
309
|
color: var_1.$textColor.regular,
|
|
310
310
|
});
|
|
311
311
|
}
|
|
@@ -313,7 +313,7 @@ class TdTabNav extends ui_abstract_1.UI {
|
|
|
313
313
|
}
|
|
314
314
|
changeTab(e) {
|
|
315
315
|
const code = e.code;
|
|
316
|
-
const { up, down, left, right } =
|
|
316
|
+
const { up, down, left, right } = utils_1.EVENT_CODE;
|
|
317
317
|
if (![up, down, left, right].includes(code))
|
|
318
318
|
return;
|
|
319
319
|
// 左右上下键更换tab
|
|
@@ -26,15 +26,15 @@ class TdTabPane extends ui_abstract_1.UI {
|
|
|
26
26
|
}
|
|
27
27
|
this.addChild(this.panel);
|
|
28
28
|
}
|
|
29
|
-
this.props = this.
|
|
29
|
+
this.props = this.useParams(params);
|
|
30
30
|
}
|
|
31
31
|
setActive(active) {
|
|
32
32
|
var _a, _b;
|
|
33
33
|
if (active) {
|
|
34
|
-
(_a = this.panel) === null || _a === void 0 ? void 0 : _a.
|
|
34
|
+
(_a = this.panel) === null || _a === void 0 ? void 0 : _a.style.show();
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
|
-
(_b = this.panel) === null || _b === void 0 ? void 0 : _b.
|
|
37
|
+
(_b = this.panel) === null || _b === void 0 ? void 0 : _b.style.hide();
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -16,8 +16,8 @@ class TdTabs extends ui_abstract_1.UI {
|
|
|
16
16
|
var _a, _b;
|
|
17
17
|
super(params);
|
|
18
18
|
this.className = 'TdTabs';
|
|
19
|
-
this.
|
|
20
|
-
// this.
|
|
19
|
+
this.attr.addName('td-tabs');
|
|
20
|
+
// this.style.addObj($tabsStyle);
|
|
21
21
|
this.currentName = (params === null || params === void 0 ? void 0 : params.modelValue) || '';
|
|
22
22
|
this.header = new framework_1.Div({
|
|
23
23
|
className: 'header',
|
|
@@ -28,7 +28,7 @@ class TdTabs extends ui_abstract_1.UI {
|
|
|
28
28
|
const tabPosition = (params === null || params === void 0 ? void 0 : params.tabPosition) || 'top';
|
|
29
29
|
const isVertical = ['left', 'right'].includes(tabPosition);
|
|
30
30
|
if (isVertical) {
|
|
31
|
-
this.header.
|
|
31
|
+
this.header.style.addObj(td_tabs_style_1.$tabsHeaderVerticalStyle);
|
|
32
32
|
}
|
|
33
33
|
if ((params === null || params === void 0 ? void 0 : params.editable) || (params === null || params === void 0 ? void 0 : params.addable)) {
|
|
34
34
|
this.newBtn = new framework_1.Span({
|
|
@@ -92,11 +92,11 @@ class TdTabs extends ui_abstract_1.UI {
|
|
|
92
92
|
else {
|
|
93
93
|
this.childNodes = [this.panel, this.header];
|
|
94
94
|
}
|
|
95
|
-
this.props = this.
|
|
95
|
+
this.props = this.useParams(params);
|
|
96
96
|
}
|
|
97
97
|
setCurrentName(value_1) {
|
|
98
98
|
return tslib_1.__awaiter(this, arguments, void 0, function* (value, trigger = false) {
|
|
99
|
-
var _a, _b, _c, _d, _e
|
|
99
|
+
var _a, _b, _c, _d, _e;
|
|
100
100
|
console.log('setCurrentName .');
|
|
101
101
|
// should do nothing.
|
|
102
102
|
if (this.currentName === value || (0, utils_1.isUndefined)(value))
|
|
@@ -106,12 +106,12 @@ class TdTabs extends ui_abstract_1.UI {
|
|
|
106
106
|
if (canLeave !== false) {
|
|
107
107
|
this.currentName = value;
|
|
108
108
|
if (trigger) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
this.emit(event_1.UPDATE_MODEL_EVENT, value);
|
|
110
|
+
// this.props.emits?.[UPDATE_MODEL_EVENT]?.(value);
|
|
111
|
+
this.emit('tabChange', value);
|
|
112
|
+
// this.props.emits?.tabChange?.(value);
|
|
113
113
|
}
|
|
114
|
-
(
|
|
114
|
+
(_c = this.props.slot) === null || _c === void 0 ? void 0 : _c.forEach((pane, index) => {
|
|
115
115
|
var _a;
|
|
116
116
|
const tabName = (_a = pane.props.name) !== null && _a !== void 0 ? _a : (index + 1);
|
|
117
117
|
if (tabName === this.currentName) {
|
|
@@ -121,39 +121,36 @@ class TdTabs extends ui_abstract_1.UI {
|
|
|
121
121
|
pane.setActive(false);
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
|
-
(
|
|
124
|
+
(_e = (_d = this.tabNav) === null || _d === void 0 ? void 0 : _d.removeFocus) === null || _e === void 0 ? void 0 : _e.call(_d);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
catch (
|
|
127
|
+
catch (_f) {
|
|
128
128
|
console.error('tab change error');
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
handleTabClick(tab, tabName, event) {
|
|
133
|
-
var _a, _b;
|
|
134
133
|
console.log('handleTabClick . ');
|
|
135
134
|
if (tab.disabled)
|
|
136
135
|
return;
|
|
137
136
|
this.setCurrentName(tabName, true);
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
this.emit('tabClick', tab, event);
|
|
138
|
+
// this.props.emits?.tabClick?.(tab, event);
|
|
140
139
|
}
|
|
141
140
|
handleTabRemove(pane, ev) {
|
|
142
|
-
var _a, _b, _c, _d;
|
|
143
141
|
if (pane.disabled || (0, utils_1.isUndefined)(pane.name))
|
|
144
142
|
return;
|
|
145
143
|
ev.stopPropagation();
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
144
|
+
this.emit('edit', pane.name, 'remove');
|
|
145
|
+
// this.props.emits?.edit?.(pane.name, 'remove');
|
|
146
|
+
this.emit('tabRemove', pane.name);
|
|
147
|
+
// this.props.emits?.tabRemove?.(pane.name);
|
|
150
148
|
}
|
|
151
149
|
handleTabAdd() {
|
|
152
|
-
|
|
153
|
-
//
|
|
154
|
-
|
|
155
|
-
//
|
|
156
|
-
(_d = (_c = this.props.emits) === null || _c === void 0 ? void 0 : _c.tabAdd) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
150
|
+
this.emit('edit', undefined, 'add');
|
|
151
|
+
// this.props.emits?.edit?.(undefined, 'add');
|
|
152
|
+
this.emit('tabAdd');
|
|
153
|
+
// this.props.emits?.tabAdd?.();
|
|
157
154
|
}
|
|
158
155
|
}
|
|
159
156
|
exports.TdTabs = TdTabs;
|
|
@@ -11,14 +11,14 @@ class CollapsibleBox extends framework_1.TypeDiv {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
13
|
this.className = 'CollapsibleBox';
|
|
14
|
-
this.
|
|
14
|
+
this.style.addObj({
|
|
15
15
|
// borderTop: '1px solid #dddddd',
|
|
16
16
|
// borderBottom: '1px solid #dddddd',
|
|
17
17
|
listStyle: 'none',
|
|
18
18
|
padding: '3px',
|
|
19
19
|
marginBottom: '5px'
|
|
20
20
|
});
|
|
21
|
-
this.
|
|
21
|
+
this.attr.addName('collapsible-box');
|
|
22
22
|
this.heading = new expand_heading_1.ExpandHeading('标题');
|
|
23
23
|
this.heading.parent = this;
|
|
24
24
|
this.contents = new contents_1.CollapsibleBoxContents();
|
|
@@ -7,14 +7,14 @@ class CollapsibleBoxContents extends framework_1.TypeDiv {
|
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
9
9
|
this.className = 'CollapsibleBoxContents';
|
|
10
|
-
this.
|
|
10
|
+
this.style.addObj({
|
|
11
11
|
display: 'flex',
|
|
12
12
|
flexWrap: 'wrap',
|
|
13
13
|
justifyContent: 'flex-start',
|
|
14
14
|
// width: '194px',
|
|
15
15
|
border: '1px solid #a0a0a0'
|
|
16
16
|
});
|
|
17
|
-
this.
|
|
17
|
+
this.attr.addName('collapsible-box-contents');
|
|
18
18
|
this.childNodes = [];
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ExpandHeading = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
4
|
const framework_1 = require("@type-dom/framework");
|
|
6
5
|
const svgs_1 = require("@type-dom/svgs");
|
|
7
6
|
class ExpandHeading extends framework_1.TypeDiv {
|
|
8
7
|
constructor(title) {
|
|
9
8
|
super();
|
|
10
9
|
this.className = 'ExpandHeading';
|
|
11
|
-
this.
|
|
10
|
+
this.style.addObj({
|
|
12
11
|
margin: '0',
|
|
13
12
|
paddingLeft: '10px',
|
|
14
13
|
boxSizing: 'border-box',
|
|
@@ -21,7 +20,7 @@ class ExpandHeading extends framework_1.TypeDiv {
|
|
|
21
20
|
alignItems: 'center',
|
|
22
21
|
height: '36px'
|
|
23
22
|
});
|
|
24
|
-
this.
|
|
23
|
+
this.attr.addName('expand-heading');
|
|
25
24
|
this.svg = new svgs_1.ElCaretBottomSvg({
|
|
26
25
|
attrObj: {
|
|
27
26
|
fill: '#FFF'
|
|
@@ -38,33 +37,35 @@ class ExpandHeading extends framework_1.TypeDiv {
|
|
|
38
37
|
setTitle(title) {
|
|
39
38
|
this.title.setText(title);
|
|
40
39
|
}
|
|
41
|
-
|
|
42
|
-
this.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (((_a = this.svg.props.styleObj) === null || _a === void 0 ? void 0 : _a.transform) === 'rotate(-90deg)') {
|
|
49
|
-
this.svg.ctrl.setStyleObj({
|
|
50
|
-
transform: 'rotate(0deg)',
|
|
51
|
-
transition: 'transform 0.3s'
|
|
52
|
-
});
|
|
40
|
+
setup() {
|
|
41
|
+
this.svg.addEvents({
|
|
42
|
+
click: (e) => {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
console.log('expand-heading svg.dom clicked');
|
|
45
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
46
|
+
// const style = getComputedStyle(this.svg.dom);
|
|
53
47
|
// console.log('style.transform is ', style.transform);
|
|
54
|
-
if (
|
|
55
|
-
this.
|
|
48
|
+
if (this.svg.style.get('transform') === 'rotate(-90deg)') {
|
|
49
|
+
this.svg.style.setObj({
|
|
50
|
+
transform: 'rotate(0deg)',
|
|
51
|
+
transition: 'transform 0.3s'
|
|
52
|
+
});
|
|
53
|
+
// console.log('style.transform is ', style.transform);
|
|
54
|
+
if (((_a = this.parent) === null || _a === void 0 ? void 0 : _a.lastChild) instanceof framework_1.TypeHtml) {
|
|
55
|
+
this.parent.lastChild.style.set('display', 'flex'); // flex
|
|
56
|
+
}
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
else {
|
|
59
|
+
this.svg.style.setObj({
|
|
60
|
+
transform: 'rotate(-90deg)',
|
|
61
|
+
transition: 'transform 0.3s'
|
|
62
|
+
});
|
|
63
|
+
if (((_b = this.parent) === null || _b === void 0 ? void 0 : _b.lastChild) instanceof framework_1.TypeHtml) {
|
|
64
|
+
this.parent.lastChild.style.set('display', 'none');
|
|
65
|
+
}
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
|
-
})
|
|
68
|
+
});
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
exports.ExpandHeading = ExpandHeading;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ITypeConfig, TextNode, TypeDiv, TypeElement } from '@type-dom/framework';
|
|
2
|
+
export interface ICustomBlockConfig extends ITypeConfig {
|
|
3
|
+
type?: 'tip' | 'warning';
|
|
4
|
+
title: string;
|
|
5
|
+
paragraphs: (TypeElement | TextNode)[];
|
|
6
|
+
blockquote?: TypeElement | TextNode;
|
|
7
|
+
}
|
|
8
|
+
export declare class CustomBlock extends TypeDiv {
|
|
9
|
+
className: 'CustomBlock';
|
|
10
|
+
constructor(params: ICustomBlockConfig);
|
|
11
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomBlock = void 0;
|
|
4
|
+
const framework_1 = require("@type-dom/framework");
|
|
5
|
+
const var_1 = require("../../../styles/var");
|
|
6
|
+
class CustomBlock extends framework_1.TypeDiv {
|
|
7
|
+
constructor(params) {
|
|
8
|
+
super();
|
|
9
|
+
this.className = 'CustomBlock';
|
|
10
|
+
this.attr.addName('tip');
|
|
11
|
+
const bgColor = params.type === 'warning' ? var_1.$colorDangerRgb : var_1.$colorPrimaryRgb;
|
|
12
|
+
const borderLeftColor = params.type === 'warning' ? var_1.$colors.danger.base : var_1.$colors.primary.base;
|
|
13
|
+
this.style.addObj({
|
|
14
|
+
padding: '8px 16px',
|
|
15
|
+
// background-color: var(--block-tip-bg-color),
|
|
16
|
+
backgroundColor: 'rgba(' + bgColor + ', 0.1)',
|
|
17
|
+
borderRadius: '4px',
|
|
18
|
+
// border-left: 5px solid var(--el-color-primary),
|
|
19
|
+
borderLeft: '5px solid ' + borderLeftColor,
|
|
20
|
+
margin: '20px 0'
|
|
21
|
+
});
|
|
22
|
+
if (params.title) {
|
|
23
|
+
this.addChild(new framework_1.P({
|
|
24
|
+
text: params.title,
|
|
25
|
+
styleObj: {
|
|
26
|
+
fontSize: '1.1rem',
|
|
27
|
+
fontWeight: 700,
|
|
28
|
+
marginTop: '0'
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
if (params.paragraphs) {
|
|
33
|
+
params.paragraphs.forEach((paragraph) => {
|
|
34
|
+
this.addChild(new framework_1.P({
|
|
35
|
+
styleObj: {
|
|
36
|
+
fontSize: '0.9rem'
|
|
37
|
+
},
|
|
38
|
+
childNodes: [paragraph]
|
|
39
|
+
}));
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (params.blockquote) {
|
|
43
|
+
this.addChild(new framework_1.BlockQuote({
|
|
44
|
+
styleObj: {
|
|
45
|
+
margin: '1rem 0',
|
|
46
|
+
// border-left: .2rem solid var(--el-border-color),
|
|
47
|
+
borderLeft: '.2rem solid ' + var_1.$borderColor.base,
|
|
48
|
+
padding: '.25rem 0 .25rem 1rem',
|
|
49
|
+
fontSize: '1rem',
|
|
50
|
+
// color: var(--text-color-lighter),
|
|
51
|
+
color: var_1.$textColor.secondary
|
|
52
|
+
},
|
|
53
|
+
childNodes: [params.blockquote]
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.CustomBlock = CustomBlock;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ITypeConfig, TypeDiv } from '@type-dom/framework';
|
|
2
|
+
import { Example } from './example';
|
|
3
|
+
export declare class ExampleFloatControl extends TypeDiv {
|
|
4
|
+
className: 'ExampleFloatControl';
|
|
5
|
+
parent: Example;
|
|
6
|
+
constructor(params: ITypeConfig);
|
|
7
|
+
setup(): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExampleFloatControl = void 0;
|
|
4
|
+
const framework_1 = require("@type-dom/framework");
|
|
5
|
+
const svgs_1 = require("@type-dom/svgs");
|
|
6
|
+
const var_1 = require("../../../styles/var");
|
|
7
|
+
const td_icon_class_1 = require("../../basic/td-icon/td-icon.class");
|
|
8
|
+
class ExampleFloatControl extends framework_1.TypeDiv {
|
|
9
|
+
constructor(params) {
|
|
10
|
+
super();
|
|
11
|
+
this.className = 'ExampleFloatControl';
|
|
12
|
+
this.attr.addName('example-float-control');
|
|
13
|
+
this.attr.addObj({
|
|
14
|
+
role: 'button',
|
|
15
|
+
tabIndex: 0
|
|
16
|
+
});
|
|
17
|
+
this.style.addObj({
|
|
18
|
+
display: 'flex',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
justifyContent: 'center',
|
|
21
|
+
// border-top: 1px solid var(--border-color),
|
|
22
|
+
borderTop: '1px solid ' + var_1.$borderColor.base,
|
|
23
|
+
height: '44px',
|
|
24
|
+
boxSizing: 'border-box',
|
|
25
|
+
// background-color: var(--bg-color, #fff),
|
|
26
|
+
backgroundColor: var_1.$bgColor.default,
|
|
27
|
+
borderBottomLeftRadius: '4px',
|
|
28
|
+
borderBottomRightRadius: '4px',
|
|
29
|
+
marginTop: '-1px',
|
|
30
|
+
// color: var(--el-text-color-secondary),
|
|
31
|
+
color: var_1.$textColor.secondary,
|
|
32
|
+
cursor: 'pointer',
|
|
33
|
+
position: 'sticky',
|
|
34
|
+
left: '0',
|
|
35
|
+
right: '0',
|
|
36
|
+
bottom: '0',
|
|
37
|
+
zIndex: 10
|
|
38
|
+
});
|
|
39
|
+
this.addChildren(new td_icon_class_1.TdIcon({
|
|
40
|
+
svgObj: new svgs_1.ElCaretTopSvg(),
|
|
41
|
+
styleObj: {
|
|
42
|
+
fontSize: '16px'
|
|
43
|
+
}
|
|
44
|
+
}), new framework_1.Span({
|
|
45
|
+
text: '隐藏源代码',
|
|
46
|
+
styleObj: {
|
|
47
|
+
fontSize: '14px',
|
|
48
|
+
marginLeft: '10px'
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
this.useParams(params);
|
|
52
|
+
}
|
|
53
|
+
setup() {
|
|
54
|
+
this.addEvents({
|
|
55
|
+
click: () => {
|
|
56
|
+
// 隐藏 代码
|
|
57
|
+
this.style.hide();
|
|
58
|
+
this.parent.sourceWrapper.style.hide();
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.ExampleFloatControl = ExampleFloatControl;
|