@oinone/kunlun-vue-ui-antd 6.2.0
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 +1 -0
- package/dist/oinone-kunlun-vue-ui-antd.css +1 -0
- package/dist/oinone-kunlun-vue-ui-antd.esm.js +16 -0
- package/dist/oinone-kunlun-vue-ui-antd.scss +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/src/component/index.d.ts +31 -0
- package/dist/types/src/component/oio-block/index.d.ts +3 -0
- package/dist/types/src/component/oio-block/oio-block.vue.d.ts +39 -0
- package/dist/types/src/component/oio-block/oio-col.vue.d.ts +86 -0
- package/dist/types/src/component/oio-block/oio-row.vue.d.ts +34 -0
- package/dist/types/src/component/oio-breadcrumb/index.d.ts +2 -0
- package/dist/types/src/component/oio-breadcrumb/oio-breadcrumb-item.vue.d.ts +14 -0
- package/dist/types/src/component/oio-breadcrumb/oio-breadcrumb.vue.d.ts +14 -0
- package/dist/types/src/component/oio-button/index.d.ts +1 -0
- package/dist/types/src/component/oio-button/oio-button.vue.d.ts +136 -0
- package/dist/types/src/component/oio-cascader/index.d.ts +1 -0
- package/dist/types/src/component/oio-cascader/oio-cascader.vue.d.ts +236 -0
- package/dist/types/src/component/oio-checkbox/index.d.ts +1 -0
- package/dist/types/src/component/oio-checkbox/oio-checkbox.vue.d.ts +56 -0
- package/dist/types/src/component/oio-collapse/index.d.ts +2 -0
- package/dist/types/src/component/oio-collapse/oio-collapse-panel.vue.d.ts +86 -0
- package/dist/types/src/component/oio-collapse/oio-collapse.vue.d.ts +103 -0
- package/dist/types/src/component/oio-date-time-picker/index.d.ts +5 -0
- package/dist/types/src/component/oio-date-time-picker/oio-date-picker.vue.d.ts +182 -0
- package/dist/types/src/component/oio-date-time-picker/oio-date-time-picker.vue.d.ts +240 -0
- package/dist/types/src/component/oio-date-time-picker/oio-time-picker.vue.d.ts +176 -0
- package/dist/types/src/component/oio-date-time-picker/oio-year-picker.vue.d.ts +139 -0
- package/dist/types/src/component/oio-date-time-picker/use-date-time-picker-props.d.ts +15 -0
- package/dist/types/src/component/oio-date-time-range-picker/index.d.ts +5 -0
- package/dist/types/src/component/oio-date-time-range-picker/oio-date-range-picker.vue.d.ts +139 -0
- package/dist/types/src/component/oio-date-time-range-picker/oio-date-time-range-picker.vue.d.ts +195 -0
- package/dist/types/src/component/oio-date-time-range-picker/oio-time-range-picker.vue.d.ts +139 -0
- package/dist/types/src/component/oio-date-time-range-picker/oio-year-range-picker.vue.d.ts +124 -0
- package/dist/types/src/component/oio-date-time-range-picker/use-date-time-range-picker-props.d.ts +12 -0
- package/dist/types/src/component/oio-divider/index.d.ts +2 -0
- package/dist/types/src/component/oio-divider/oio-divider.vue.d.ts +38 -0
- package/dist/types/src/component/oio-drawer/index.d.ts +1 -0
- package/dist/types/src/component/oio-drawer/oio-drawer.vue.d.ts +227 -0
- package/dist/types/src/component/oio-dropdown/index.d.ts +1 -0
- package/dist/types/src/component/oio-dropdown/oio-dropdown.vue.d.ts +78 -0
- package/dist/types/src/component/oio-empty/index.d.ts +1 -0
- package/dist/types/src/component/oio-empty/oio-empty-data.vue.d.ts +42 -0
- package/dist/types/src/component/oio-form/index.d.ts +2 -0
- package/dist/types/src/component/oio-form/oio-form-item.vue.d.ts +126 -0
- package/dist/types/src/component/oio-form/oio-form.vue.d.ts +100 -0
- package/dist/types/src/component/oio-gallery/index.d.ts +1 -0
- package/dist/types/src/component/oio-gallery/oio-gallery.vue.d.ts +98 -0
- package/dist/types/src/component/oio-group/index.d.ts +2 -0
- package/dist/types/src/component/oio-group/oio-group-help.vue.d.ts +65 -0
- package/dist/types/src/component/oio-group/oio-group.vue.d.ts +113 -0
- package/dist/types/src/component/oio-inner-popup/index.d.ts +1 -0
- package/dist/types/src/component/oio-inner-popup/oio-inner-popup.vue.d.ts +195 -0
- package/dist/types/src/component/oio-input/index.d.ts +5 -0
- package/dist/types/src/component/oio-input/oio-input-group.vue.d.ts +16 -0
- package/dist/types/src/component/oio-input/oio-input-number.vue.d.ts +167 -0
- package/dist/types/src/component/oio-input/oio-input-password.vue.d.ts +111 -0
- package/dist/types/src/component/oio-input/oio-input-search.vue.d.ts +106 -0
- package/dist/types/src/component/oio-input/oio-input.vue.d.ts +107 -0
- package/dist/types/src/component/oio-modal/index.d.ts +1 -0
- package/dist/types/src/component/oio-modal/oio-modal.vue.d.ts +230 -0
- package/dist/types/src/component/oio-notification/index.d.ts +116 -0
- package/dist/types/src/component/oio-pagination/index.d.ts +1 -0
- package/dist/types/src/component/oio-pagination/oio-pagination.vue.d.ts +107 -0
- package/dist/types/src/component/oio-popconfirm/index.d.ts +1 -0
- package/dist/types/src/component/oio-popconfirm/oio-popconfirm.vue.d.ts +119 -0
- package/dist/types/src/component/oio-select/index.d.ts +1 -0
- package/dist/types/src/component/oio-select/oio-select.vue.d.ts +153 -0
- package/dist/types/src/component/oio-slider/index.d.ts +1 -0
- package/dist/types/src/component/oio-slider/oio-slider.vue.d.ts +155 -0
- package/dist/types/src/component/oio-spin/index.d.ts +1 -0
- package/dist/types/src/component/oio-spin/oio-spin.vue.d.ts +54 -0
- package/dist/types/src/component/oio-switch/index.d.ts +1 -0
- package/dist/types/src/component/oio-switch/oio-switch.vue.d.ts +92 -0
- package/dist/types/src/component/oio-tabs/index.d.ts +3 -0
- package/dist/types/src/component/oio-tabs/oio-tab.vue.d.ts +67 -0
- package/dist/types/src/component/oio-tabs/oio-tabs.vue.d.ts +93 -0
- package/dist/types/src/component/oio-tabs/use-tab-bar.d.ts +5 -0
- package/dist/types/src/component/oio-textarea/index.d.ts +1 -0
- package/dist/types/src/component/oio-textarea/oio-textarea.vue.d.ts +100 -0
- package/dist/types/src/component/oio-tooltip/index.d.ts +2 -0
- package/dist/types/src/component/oio-tooltip/oio-tooltip-help.vue.d.ts +12 -0
- package/dist/types/src/component/oio-tooltip/oio-tooltip.vue.d.ts +76 -0
- package/dist/types/src/component/oio-tree/index.d.ts +1 -0
- package/dist/types/src/component/oio-tree/oio-tree.vue.d.ts +171 -0
- package/dist/types/src/component/oio-tree-select/index.d.ts +1 -0
- package/dist/types/src/component/oio-tree-select/oio-tree-select.vue.d.ts +226 -0
- package/dist/types/src/component/oio-upload/index.d.ts +1 -0
- package/dist/types/src/component/oio-upload/oio-upload.vue.d.ts +187 -0
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/theme/index.d.ts +1 -0
- package/dist/types/src/vc-component/index.d.ts +1 -0
- package/dist/types/src/vc-component/use-max-tag-placeholder.d.ts +7 -0
- package/index.ts +3 -0
- package/package.json +36 -0
- package/rollup.config.js +15 -0
- package/src/component/index.ts +32 -0
- package/src/component/oio-block/index.ts +3 -0
- package/src/component/oio-block/oio-block.vue +77 -0
- package/src/component/oio-block/oio-col.vue +32 -0
- package/src/component/oio-block/oio-row.vue +42 -0
- package/src/component/oio-block/style/a-col.scss +18 -0
- package/src/component/oio-block/style/index.scss +42 -0
- package/src/component/oio-block/style/parameters.scss +13 -0
- package/src/component/oio-breadcrumb/index.ts +2 -0
- package/src/component/oio-breadcrumb/oio-breadcrumb-item.vue +30 -0
- package/src/component/oio-breadcrumb/oio-breadcrumb.vue +30 -0
- package/src/component/oio-button/index.ts +1 -0
- package/src/component/oio-button/oio-button.vue +154 -0
- package/src/component/oio-button/style/a-button.scss +210 -0
- package/src/component/oio-button/style/index.scss +21 -0
- package/src/component/oio-button/style/parameters.scss +5 -0
- package/src/component/oio-cascader/index.ts +1 -0
- package/src/component/oio-cascader/oio-cascader.vue +171 -0
- package/src/component/oio-cascader/style/index.scss +59 -0
- package/src/component/oio-cascader/style/parameters.scss +5 -0
- package/src/component/oio-checkbox/index.ts +1 -0
- package/src/component/oio-checkbox/oio-checkbox.vue +69 -0
- package/src/component/oio-checkbox/style/index.scss +8 -0
- package/src/component/oio-checkbox/style/parameters.scss +5 -0
- package/src/component/oio-collapse/index.ts +2 -0
- package/src/component/oio-collapse/oio-collapse-panel.vue +92 -0
- package/src/component/oio-collapse/oio-collapse.vue +138 -0
- package/src/component/oio-collapse/style/index.scss +59 -0
- package/src/component/oio-collapse/style/parameters.scss +5 -0
- package/src/component/oio-date-time-picker/index.ts +5 -0
- package/src/component/oio-date-time-picker/oio-date-picker.vue +34 -0
- package/src/component/oio-date-time-picker/oio-date-time-picker.vue +91 -0
- package/src/component/oio-date-time-picker/oio-time-picker.vue +34 -0
- package/src/component/oio-date-time-picker/oio-year-picker.vue +34 -0
- package/src/component/oio-date-time-picker/style/index.scss +348 -0
- package/src/component/oio-date-time-picker/style/mixin.scss +16 -0
- package/src/component/oio-date-time-picker/style/parameters.scss +5 -0
- package/src/component/oio-date-time-picker/use-date-time-picker-props.ts +151 -0
- package/src/component/oio-date-time-range-picker/index.ts +5 -0
- package/src/component/oio-date-time-range-picker/oio-date-range-picker.vue +29 -0
- package/src/component/oio-date-time-range-picker/oio-date-time-range-picker.vue +82 -0
- package/src/component/oio-date-time-range-picker/oio-time-range-picker.vue +29 -0
- package/src/component/oio-date-time-range-picker/oio-year-range-picker.vue +29 -0
- package/src/component/oio-date-time-range-picker/style/index.scss +227 -0
- package/src/component/oio-date-time-range-picker/style/parameters.scss +5 -0
- package/src/component/oio-date-time-range-picker/use-date-time-range-picker-props.ts +138 -0
- package/src/component/oio-divider/index.ts +3 -0
- package/src/component/oio-divider/oio-divider.vue +31 -0
- package/src/component/oio-divider/style/index.scss +7 -0
- package/src/component/oio-divider/style/parameters.scss +5 -0
- package/src/component/oio-drawer/index.ts +1 -0
- package/src/component/oio-drawer/oio-drawer.vue +120 -0
- package/src/component/oio-drawer/style/index.scss +93 -0
- package/src/component/oio-drawer/style/parameters.scss +5 -0
- package/src/component/oio-dropdown/index.ts +1 -0
- package/src/component/oio-dropdown/oio-dropdown.vue +81 -0
- package/src/component/oio-dropdown/style/index.scss +30 -0
- package/src/component/oio-dropdown/style/parameters.scss +5 -0
- package/src/component/oio-empty/index.ts +1 -0
- package/src/component/oio-empty/oio-empty-data.vue +47 -0
- package/src/component/oio-empty/style/index.scss +6 -0
- package/src/component/oio-form/index.ts +2 -0
- package/src/component/oio-form/oio-form-item.vue +81 -0
- package/src/component/oio-form/oio-form.vue +102 -0
- package/src/component/oio-form/style/animation.scss +17 -0
- package/src/component/oio-form/style/index.scss +135 -0
- package/src/component/oio-form/style/parameters.scss +9 -0
- package/src/component/oio-gallery/index.ts +1 -0
- package/src/component/oio-gallery/oio-gallery.vue +158 -0
- package/src/component/oio-group/index.ts +2 -0
- package/src/component/oio-group/oio-group-help.vue +28 -0
- package/src/component/oio-group/oio-group.vue +140 -0
- package/src/component/oio-group/style/index.scss +98 -0
- package/src/component/oio-group/style/parameters.scss +5 -0
- package/src/component/oio-inner-popup/index.ts +1 -0
- package/src/component/oio-inner-popup/oio-inner-popup.vue +230 -0
- package/src/component/oio-inner-popup/style/index.scss +147 -0
- package/src/component/oio-inner-popup/style/parameters.scss +5 -0
- package/src/component/oio-input/index.ts +5 -0
- package/src/component/oio-input/oio-input-group.vue +40 -0
- package/src/component/oio-input/oio-input-number.vue +374 -0
- package/src/component/oio-input/oio-input-password.vue +67 -0
- package/src/component/oio-input/oio-input-search.vue +107 -0
- package/src/component/oio-input/oio-input.vue +124 -0
- package/src/component/oio-input/style/a-input.scss +103 -0
- package/src/component/oio-input/style/index.scss +198 -0
- package/src/component/oio-input/style/mixin.scss +50 -0
- package/src/component/oio-input/style/oio-input-group.scss +31 -0
- package/src/component/oio-input/style/oio-input-number.scss +13 -0
- package/src/component/oio-input/style/oio-input-search.scss +94 -0
- package/src/component/oio-input/style/parameters.scss +21 -0
- package/src/component/oio-modal/index.ts +1 -0
- package/src/component/oio-modal/index.zh-CN.md +167 -0
- package/src/component/oio-modal/oio-modal.vue +184 -0
- package/src/component/oio-modal/style/index.scss +167 -0
- package/src/component/oio-modal/style/parameters.scss +5 -0
- package/src/component/oio-notification/index.ts +197 -0
- package/src/component/oio-notification/style/index.scss +67 -0
- package/src/component/oio-notification/style/parameters.scss +5 -0
- package/src/component/oio-pagination/index.ts +1 -0
- package/src/component/oio-pagination/oio-pagination.vue +105 -0
- package/src/component/oio-pagination/style/index.scss +181 -0
- package/src/component/oio-pagination/style/parameters.scss +5 -0
- package/src/component/oio-popconfirm/index.ts +1 -0
- package/src/component/oio-popconfirm/oio-popconfirm.vue +192 -0
- package/src/component/oio-popconfirm/style/index.scss +54 -0
- package/src/component/oio-popconfirm/style/parameters.scss +5 -0
- package/src/component/oio-popover/style/index.scss +16 -0
- package/src/component/oio-popover/style/parameters.scss +5 -0
- package/src/component/oio-radio/style/index.scss +24 -0
- package/src/component/oio-radio/style/parameters.scss +5 -0
- package/src/component/oio-select/index.ts +1 -0
- package/src/component/oio-select/oio-select.vue +104 -0
- package/src/component/oio-select/style/a-select.scss +102 -0
- package/src/component/oio-select/style/index.scss +129 -0
- package/src/component/oio-select/style/mixin.scss +18 -0
- package/src/component/oio-select/style/parameters.scss +5 -0
- package/src/component/oio-slider/index.ts +1 -0
- package/src/component/oio-slider/oio-slider.vue +81 -0
- package/src/component/oio-slider/style/index.scss +100 -0
- package/src/component/oio-slider/style/parameters.scss +5 -0
- package/src/component/oio-spin/index.ts +1 -0
- package/src/component/oio-spin/oio-spin.vue +87 -0
- package/src/component/oio-spin/style/index.scss +48 -0
- package/src/component/oio-spin/style/parameters.scss +5 -0
- package/src/component/oio-switch/index.ts +1 -0
- package/src/component/oio-switch/oio-switch.vue +42 -0
- package/src/component/oio-switch/style/index.scss +36 -0
- package/src/component/oio-switch/style/parameters.scss +5 -0
- package/src/component/oio-tabs/index.ts +3 -0
- package/src/component/oio-tabs/oio-tab.vue +99 -0
- package/src/component/oio-tabs/oio-tabs.vue +188 -0
- package/src/component/oio-tabs/style/index.scss +274 -0
- package/src/component/oio-tabs/style/parameters.scss +9 -0
- package/src/component/oio-tabs/use-tab-bar.ts +69 -0
- package/src/component/oio-textarea/index.ts +1 -0
- package/src/component/oio-textarea/oio-textarea.vue +76 -0
- package/src/component/oio-textarea/style/index.scss +108 -0
- package/src/component/oio-textarea/style/parameters.scss +5 -0
- package/src/component/oio-tooltip/index.ts +2 -0
- package/src/component/oio-tooltip/oio-tooltip-help.vue +40 -0
- package/src/component/oio-tooltip/oio-tooltip.vue +59 -0
- package/src/component/oio-tooltip/style/index.scss +8 -0
- package/src/component/oio-tooltip/style/parameters.scss +9 -0
- package/src/component/oio-tree/index.ts +1 -0
- package/src/component/oio-tree/oio-tree.vue +181 -0
- package/src/component/oio-tree/style/index.scss +51 -0
- package/src/component/oio-tree/style/parameters.scss +5 -0
- package/src/component/oio-tree-select/index.ts +1 -0
- package/src/component/oio-tree-select/oio-tree-select.vue +180 -0
- package/src/component/oio-tree-select/style/index.scss +92 -0
- package/src/component/oio-tree-select/style/parameters.scss +5 -0
- package/src/component/oio-upload/index.ts +1 -0
- package/src/component/oio-upload/oio-upload.vue +232 -0
- package/src/component/oio-upload/style/index.scss +66 -0
- package/src/component/oio-upload/style/parameters.scss +5 -0
- package/src/index.ts +3 -0
- package/src/shim-translate.d.ts +7 -0
- package/src/shim-vue.d.ts +6 -0
- package/src/style/global-parameters.scss +9 -0
- package/src/style/index.scss +31 -0
- package/src/style/mixin.scss +135 -0
- package/src/theme/index.ts +1 -0
- package/src/vc-component/index.ts +1 -0
- package/src/vc-component/use-max-tag-placeholder.ts +38 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { CastHelper, StringHelper } from '@oinone/kunlun-shared';
|
|
3
|
+
import {
|
|
4
|
+
defaultSelectProperties,
|
|
5
|
+
fillSelectItemProperties,
|
|
6
|
+
OioSelectProps,
|
|
7
|
+
PropRecordHelper,
|
|
8
|
+
SelectProperties,
|
|
9
|
+
SelectItem
|
|
10
|
+
} from '@oinone/kunlun-vue-ui-common';
|
|
11
|
+
import { Select as ASelect } from 'ant-design-vue';
|
|
12
|
+
import { isString } from 'lodash-es';
|
|
13
|
+
import { computed, createVNode, defineComponent } from 'vue';
|
|
14
|
+
import { DEFAULT_PREFIX } from '../../theme';
|
|
15
|
+
|
|
16
|
+
export default defineComponent({
|
|
17
|
+
name: 'OioSelect',
|
|
18
|
+
components: {
|
|
19
|
+
ASelect
|
|
20
|
+
},
|
|
21
|
+
inheritAttrs: false,
|
|
22
|
+
props: {
|
|
23
|
+
...OioSelectProps
|
|
24
|
+
},
|
|
25
|
+
slots: ['dropdownRender', 'removeIcon', 'clearIcon', 'suffixIcon', 'menuItemSelectedIcon'],
|
|
26
|
+
emits: ['update:value'],
|
|
27
|
+
setup(props) {
|
|
28
|
+
const internalProperties = computed<SelectProperties>(() => {
|
|
29
|
+
return {
|
|
30
|
+
...defaultSelectProperties,
|
|
31
|
+
...(props.properties || {})
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const internalOptions = computed<SelectItem[]>(() => {
|
|
36
|
+
if (props.mappingOptions) {
|
|
37
|
+
const options: SelectItem[] = [];
|
|
38
|
+
props.options?.forEach((value, index) => {
|
|
39
|
+
const option = fillSelectItemProperties(value, index, internalProperties.value, props.customFillProperties);
|
|
40
|
+
if (option) {
|
|
41
|
+
options.push(option);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
return options;
|
|
45
|
+
}
|
|
46
|
+
return CastHelper.cast(props.options || []);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const internalValue = computed<SelectItem | undefined>(() => {
|
|
50
|
+
const { value } = props;
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
if (isString(value)) {
|
|
55
|
+
return internalOptions.value.find((v) => v.key === value);
|
|
56
|
+
}
|
|
57
|
+
return value;
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
internalProperties,
|
|
62
|
+
internalOptions,
|
|
63
|
+
internalValue
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
render() {
|
|
67
|
+
return createVNode(
|
|
68
|
+
ASelect,
|
|
69
|
+
{
|
|
70
|
+
value: this.internalValue,
|
|
71
|
+
options: this.internalOptions,
|
|
72
|
+
filterOption: this.filterOption,
|
|
73
|
+
autofocus: this.autofocus,
|
|
74
|
+
placeholder: this.placeholder,
|
|
75
|
+
allowClear: this.allowClear,
|
|
76
|
+
readonly: this.readonly,
|
|
77
|
+
disabled: this.disabled,
|
|
78
|
+
bordered: true,
|
|
79
|
+
labelInValue: true,
|
|
80
|
+
showSearch: this.showSearch,
|
|
81
|
+
mode: this.mode,
|
|
82
|
+
...this.$attrs,
|
|
83
|
+
optionFilterProp: defaultSelectProperties.filterProp,
|
|
84
|
+
optionLabelProp: defaultSelectProperties.labelProp,
|
|
85
|
+
'onUpdate:value': (val) => this.$emit('update:value', val),
|
|
86
|
+
class: StringHelper.append([`${DEFAULT_PREFIX}-select`], CastHelper.cast(this.$attrs.class)),
|
|
87
|
+
dropdownClassName: StringHelper.append(
|
|
88
|
+
[`${DEFAULT_PREFIX}-select-dropdown`],
|
|
89
|
+
CastHelper.cast(this.dropdownClassName)
|
|
90
|
+
).join(' '),
|
|
91
|
+
getPopupContainer: this.getTriggerContainer
|
|
92
|
+
},
|
|
93
|
+
PropRecordHelper.collectionSlots(this.$slots, [
|
|
94
|
+
'default',
|
|
95
|
+
'dropdownRender',
|
|
96
|
+
'removeIcon',
|
|
97
|
+
'clearIcon',
|
|
98
|
+
'suffixIcon',
|
|
99
|
+
'menuItemSelectedIcon'
|
|
100
|
+
])
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
</script>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
@import '../../../style/mixin.scss';
|
|
2
|
+
@import './parameters.scss';
|
|
3
|
+
@import './mixin.scss';
|
|
4
|
+
|
|
5
|
+
&.ant-select {
|
|
6
|
+
width: 100%;
|
|
7
|
+
|
|
8
|
+
.ant-select-selector,
|
|
9
|
+
&:not(.ant-select-customize-input) .ant-select-selector {
|
|
10
|
+
width: 100%;
|
|
11
|
+
@include select-style();
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
padding: 0;
|
|
14
|
+
|
|
15
|
+
.ant-select-selection-search {
|
|
16
|
+
left: 0;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
|
|
19
|
+
input {
|
|
20
|
+
height: var($selectParameterPrefix + -line-height);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ant-select-arrow {
|
|
26
|
+
color: var($selectParameterPrefix + -counter-color);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.ant-select-single {
|
|
30
|
+
.ant-select-selector {
|
|
31
|
+
.ant-select-selection-search,
|
|
32
|
+
.ant-select-selection-item,
|
|
33
|
+
.ant-select-selection-placeholder {
|
|
34
|
+
height: var($parameterPrefix + -height);
|
|
35
|
+
line-height: var($selectParameterPrefix + -line-height);
|
|
36
|
+
padding: var($parameterPrefix + -padding-xs) 20px var($parameterPrefix + -padding-xs) 11px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:not(.ant-select-multiple) {
|
|
42
|
+
.ant-select-selector {
|
|
43
|
+
.ant-select-selection-search,
|
|
44
|
+
.ant-select-selection-item,
|
|
45
|
+
.ant-select-selection-placeholder {
|
|
46
|
+
height: var($parameterPrefix + -height);
|
|
47
|
+
line-height: var($selectParameterPrefix + -line-height);
|
|
48
|
+
padding: var($parameterPrefix + -padding-xs) 20px var($parameterPrefix + -padding-xs) 11px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:not(.ant-select-disabled):hover .ant-select-selector {
|
|
54
|
+
border-color: var($selectParameterPrefix + -border-color-hover);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.ant-select-focused:not(.ant-select-disabled) {
|
|
58
|
+
.ant-select-selector {
|
|
59
|
+
@include oio-focus($selectParameterPrefix);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.ant-select-auto-complete .ant-select-selector .ant-select-selection-search .ant-select-selection-search-input {
|
|
64
|
+
padding: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.ant-select-multiple .ant-select-selector {
|
|
68
|
+
padding: 1px 4px;
|
|
69
|
+
min-height: var(--oio-height);
|
|
70
|
+
&:after {
|
|
71
|
+
line-height: var(--oio-select-line-height);
|
|
72
|
+
}
|
|
73
|
+
.ant-select-selection-overflow-item {
|
|
74
|
+
height: calc(var(--oio-height) - 4px);
|
|
75
|
+
&-suffix {
|
|
76
|
+
height: var(--oio-select-line-height);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
.ant-select-selection-item {
|
|
80
|
+
height: calc(var(--oio-height) - 8px);
|
|
81
|
+
line-height: calc(var(--oio-height) - 8px);
|
|
82
|
+
background: var(--oio-input-tag-background);
|
|
83
|
+
border: none;
|
|
84
|
+
border-radius: var(--oio-border-radius);
|
|
85
|
+
color: var(--oio-primary-color);
|
|
86
|
+
font-size: var(--oio-font-size-sm);
|
|
87
|
+
&-content,
|
|
88
|
+
&-remove {
|
|
89
|
+
line-height: calc(var(--oio-height) - 10px);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
.ant-select-selection-search {
|
|
93
|
+
height: var(--oio-select-line-height);
|
|
94
|
+
line-height: var(--oio-select-line-height);
|
|
95
|
+
&-mirror,
|
|
96
|
+
input {
|
|
97
|
+
height: var(--oio-select-line-height);
|
|
98
|
+
line-height: var(--oio-select-line-height);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
@import './parameters.scss';
|
|
2
|
+
|
|
3
|
+
$tagHeight: 28px;
|
|
4
|
+
$tagLineHeight: $tagHeight - 3px;
|
|
5
|
+
$tagRemoveLineHeight: $tagHeight - 4px;
|
|
6
|
+
|
|
7
|
+
.#{$selectClassPrefix} {
|
|
8
|
+
@import './a-select.scss';
|
|
9
|
+
|
|
10
|
+
&.ant-select.#{$selectClassPrefix}-disabled,
|
|
11
|
+
&.ant-select.ant-select-disabled {
|
|
12
|
+
&:not(.ant-select-customize-input) .ant-select-selector {
|
|
13
|
+
color: var($parameterPrefix + -disabled-color);
|
|
14
|
+
background-color: var($parameterPrefix + -disabled-bg);
|
|
15
|
+
border-color: var($parameterPrefix + -disabled-border-color);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&.ant-select.#{$selectClassPrefix}-readonly,
|
|
20
|
+
&.ant-select.ant-select-readonly {
|
|
21
|
+
&:not(.ant-select-customize-input) .ant-select-selector {
|
|
22
|
+
color: var($parameterPrefix + -readonly-color);
|
|
23
|
+
background-color: var($parameterPrefix + -readonly-bg);
|
|
24
|
+
border-color: var($parameterPrefix + -readonly-border-color);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ant-select-arrow {
|
|
29
|
+
right: 12px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ant-select-selection-placeholder {
|
|
33
|
+
color: var(--oio-placeholder-color);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-multiple {
|
|
37
|
+
.ant-select-selection-item {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
// height: $tagHeight;
|
|
41
|
+
font-size: var($parameterPrefix + -font-size-sm);
|
|
42
|
+
color: var($parameterPrefix + -primary-color);
|
|
43
|
+
background-color: rgba(var($parameterPrefix + -primary-color-rgb), 0.1);
|
|
44
|
+
border-color: rgba(var($parameterPrefix + -primary-color-rgb), 0.2);
|
|
45
|
+
border-radius: var($parameterPrefix + -border-radius);
|
|
46
|
+
|
|
47
|
+
.ant-select-selection-item-content {
|
|
48
|
+
// line-height: $tagLineHeight;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ant-select-selection-item-remove {
|
|
52
|
+
line-height: 1;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.#{$selectClassPrefix}-dropdown {
|
|
59
|
+
background: var(--oio-select-dropdown-background);
|
|
60
|
+
box-shadow: var(--oio-select-dropdown-box-shadow);
|
|
61
|
+
|
|
62
|
+
.ant-select-item {
|
|
63
|
+
color: var(--oio-select-dropdown-color) !important;
|
|
64
|
+
|
|
65
|
+
&:hover {
|
|
66
|
+
background: var(--oio-select-dropdown-selected) !important;
|
|
67
|
+
color: var(--oio-select-dropdown-selected-color) !important;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
|
|
71
|
+
background: var(--oio-select-dropdown-selected) !important;
|
|
72
|
+
|
|
73
|
+
.ant-select-item-option-content {
|
|
74
|
+
color: var(--oio-select-dropdown-selected-color) !important;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.ant-select-item-option-disabled,
|
|
79
|
+
&.ant-select-item.ant-select-item-option-selected.ant-select-item-option-disabled {
|
|
80
|
+
color: var(--oio-disabled-color) !important;
|
|
81
|
+
background: transparent !important;
|
|
82
|
+
text-decoration-line: line-through;
|
|
83
|
+
&:hover {
|
|
84
|
+
background: transparent !important;
|
|
85
|
+
color: var(--oio-disabled-color) !important;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
|
|
91
|
+
color: var($parameterPrefix + -primary-color);
|
|
92
|
+
background-color: rgba(var($parameterPrefix + -primary-color-rgb), 0.1);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ant-select-item-option-active:not(.ant-select-item-option-disabled) {
|
|
96
|
+
background-color: rgba(var($parameterPrefix + -primary-color-rgb), 0.1);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ant-select-item-option-state {
|
|
100
|
+
display: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector {
|
|
104
|
+
background: transparent;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.ant-empty-description {
|
|
108
|
+
color: var(--oio-text-color);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.#{$selectClassPrefix}-selection-rest-item {
|
|
113
|
+
height: 24px;
|
|
114
|
+
line-height: 22px;
|
|
115
|
+
margin-bottom: 2px;
|
|
116
|
+
margin-top: 2px;
|
|
117
|
+
margin-inline-end: 4px;
|
|
118
|
+
padding-inline-end: 4px;
|
|
119
|
+
padding-inline-start: 8px;
|
|
120
|
+
font-size: var($parameterPrefix + -font-size-sm);
|
|
121
|
+
color: var($parameterPrefix + -primary-color);
|
|
122
|
+
background-color: rgba(var($parameterPrefix + -primary-color-rgb), 0.1);
|
|
123
|
+
border: 1px solid rgba(var($parameterPrefix + -primary-color-rgb), 0.2);
|
|
124
|
+
border-radius: var($parameterPrefix + -border-radius);
|
|
125
|
+
display: inline-flex;
|
|
126
|
+
justify-content: center;
|
|
127
|
+
align-items: center;
|
|
128
|
+
flex-wrap: nowrap;
|
|
129
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@import '../../../style/mixin.scss';
|
|
2
|
+
@import './parameters.scss';
|
|
3
|
+
|
|
4
|
+
@mixin select-style() {
|
|
5
|
+
@include oio-appearance($selectParameterPrefix);
|
|
6
|
+
|
|
7
|
+
height: var($parameterPrefix + -height);
|
|
8
|
+
line-height: var($selectParameterPrefix + -line-height);
|
|
9
|
+
font-size: var(--oio-font-size);
|
|
10
|
+
|
|
11
|
+
&:hover {
|
|
12
|
+
@include oio-hover($selectParameterPrefix);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:focus {
|
|
16
|
+
@include oio-focus($selectParameterPrefix);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OioSlider } from './oio-slider.vue';
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { CastHelper, StringHelper } from '@oinone/kunlun-shared';
|
|
3
|
+
import { convertAntdTooltipPlacement, OioSliderProps, SliderDirection } from '@oinone/kunlun-vue-ui-common';
|
|
4
|
+
import { Slider as ASlider } from 'ant-design-vue';
|
|
5
|
+
import { computed, createVNode, defineComponent, onBeforeMount, ref } from 'vue';
|
|
6
|
+
import { DEFAULT_PREFIX } from '../../theme';
|
|
7
|
+
|
|
8
|
+
export default defineComponent({
|
|
9
|
+
name: 'OioSlider',
|
|
10
|
+
components: {
|
|
11
|
+
ASlider
|
|
12
|
+
},
|
|
13
|
+
inheritAttrs: false,
|
|
14
|
+
props: {
|
|
15
|
+
...OioSliderProps
|
|
16
|
+
},
|
|
17
|
+
emits: ['update:value'],
|
|
18
|
+
setup(props, context) {
|
|
19
|
+
const value = ref<number | undefined>();
|
|
20
|
+
const realValue = computed<number | undefined>({
|
|
21
|
+
get() {
|
|
22
|
+
if (props.value == null) {
|
|
23
|
+
return value.value;
|
|
24
|
+
}
|
|
25
|
+
return props.value;
|
|
26
|
+
},
|
|
27
|
+
set(val) {
|
|
28
|
+
value.value = val;
|
|
29
|
+
context.emit('update:value', val);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
onBeforeMount(() => {
|
|
34
|
+
value.value = props.defaultValue;
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const vertical = computed(() => {
|
|
38
|
+
if (!props.direction) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
return props.direction === SliderDirection.vertical;
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const tooltipPlacement = computed<string | undefined>(() => {
|
|
45
|
+
return convertAntdTooltipPlacement(props.tooltipPlacement);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const onUpdateValue = (val: number) => {
|
|
49
|
+
realValue.value = val;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
realValue,
|
|
54
|
+
vertical,
|
|
55
|
+
tooltipPlacement,
|
|
56
|
+
|
|
57
|
+
onUpdateValue
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
render() {
|
|
61
|
+
return createVNode(ASlider, {
|
|
62
|
+
value: this.realValue,
|
|
63
|
+
min: this.min,
|
|
64
|
+
max: this.max,
|
|
65
|
+
step: this.step,
|
|
66
|
+
vertical: this.vertical,
|
|
67
|
+
marks: this.marks,
|
|
68
|
+
dots: this.dots,
|
|
69
|
+
reverse: this.reverse,
|
|
70
|
+
range: this.range,
|
|
71
|
+
tooltipVisible: this.tooltipVisible,
|
|
72
|
+
tooltipPlacement: this.tooltipPlacement,
|
|
73
|
+
tipFormatter: this.tooltipFormatter,
|
|
74
|
+
getTooltipPopupContainer: this.getTooltipTriggerContainer,
|
|
75
|
+
...this.$attrs,
|
|
76
|
+
class: StringHelper.append([`${DEFAULT_PREFIX}-slider`], CastHelper.cast(this.$attrs.class)),
|
|
77
|
+
'onUpdate:value': this.onUpdateValue
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
</script>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
@import './parameters.scss';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 滑动轨道高度
|
|
5
|
+
* 滑块拖拽柄的大小和高度无法自动计算到中间位置,不使用主题进行设置
|
|
6
|
+
*/
|
|
7
|
+
$sliderHeight: 8px;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 滑动轨道高度
|
|
11
|
+
* 滑块拖拽柄的大小和高度无法自动计算到中间位置,不使用主题进行设置
|
|
12
|
+
*/
|
|
13
|
+
$sliderWidth: 8px;
|
|
14
|
+
|
|
15
|
+
.#{$sliderClassPrefix} {
|
|
16
|
+
height: var($parameterPrefix + -height);
|
|
17
|
+
padding: calc((var(#{$parameterPrefix + -height}) - #{$sliderHeight}) / 2) 0;
|
|
18
|
+
margin: 0;
|
|
19
|
+
|
|
20
|
+
.ant-slider-rail {
|
|
21
|
+
height: $sliderHeight;
|
|
22
|
+
background-color: #f4f4f4;
|
|
23
|
+
border-radius: calc(#{$sliderHeight} / 2);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ant-slider-track {
|
|
27
|
+
height: $sliderHeight;
|
|
28
|
+
background-color: var($parameterPrefix + -primary-color);
|
|
29
|
+
border-radius: calc(#{$sliderHeight} / 2);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ant-slider-step {
|
|
33
|
+
height: $sliderHeight;
|
|
34
|
+
border-radius: calc(#{$sliderHeight} / 2);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ant-slider-handle {
|
|
38
|
+
margin-top: -3px;
|
|
39
|
+
border: 1px solid #c3c3c3;
|
|
40
|
+
|
|
41
|
+
&.ant-tooltip-open {
|
|
42
|
+
border-color: var($parameterPrefix + -primary-color-hover);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&-click-focused {
|
|
46
|
+
border-color: var($parameterPrefix + -primary-color-focus);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:hover {
|
|
51
|
+
.ant-slider-rail {
|
|
52
|
+
background-color: #e3e3e3;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ant-slider-track {
|
|
56
|
+
background-color: var($parameterPrefix + -primary-color-hover);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ant-slider-handle:not(.ant-tooltip-open) {
|
|
60
|
+
border-color: var($parameterPrefix + -primary-color-hover);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:focus {
|
|
65
|
+
border-color: var($parameterPrefix + -primary-color-focus);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.ant-slider-vertical {
|
|
69
|
+
height: 100%;
|
|
70
|
+
width: 12px;
|
|
71
|
+
padding: 0 calc((var(#{$parameterPrefix + -height}) - #{$sliderWidth}) / 2);
|
|
72
|
+
|
|
73
|
+
.ant-slider-rail {
|
|
74
|
+
height: 100%;
|
|
75
|
+
width: $sliderWidth;
|
|
76
|
+
border-radius: calc(#{$sliderWidth} / 2);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.ant-slider-track {
|
|
80
|
+
height: 100%;
|
|
81
|
+
width: $sliderWidth;
|
|
82
|
+
border-radius: calc(#{$sliderWidth} / 2);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ant-slider-step {
|
|
86
|
+
height: 100%;
|
|
87
|
+
width: $sliderWidth;
|
|
88
|
+
border-radius: calc(#{$sliderWidth} / 2);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.ant-slider-handle {
|
|
92
|
+
margin-top: -6px;
|
|
93
|
+
margin-left: -3px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.ant-slider-mark {
|
|
97
|
+
left: 21px;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OioSpin } from './oio-spin.vue';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { NumberHelper, StringHelper } from '@oinone/kunlun-shared';
|
|
3
|
+
import { OioSpinProps, PropRecordHelper, SpinSize, StableSlotProp, StyleHelper } from '@oinone/kunlun-vue-ui-common';
|
|
4
|
+
import { Spin as ASpin } from 'ant-design-vue';
|
|
5
|
+
import { isNil, isString } from 'lodash-es';
|
|
6
|
+
import { computed, createVNode, defineComponent, PropType, Slot } from 'vue';
|
|
7
|
+
import { DEFAULT_PREFIX } from '../../theme';
|
|
8
|
+
|
|
9
|
+
export default defineComponent({
|
|
10
|
+
name: 'OioSpin',
|
|
11
|
+
components: {
|
|
12
|
+
ASpin
|
|
13
|
+
},
|
|
14
|
+
inheritAttrs: false,
|
|
15
|
+
props: {
|
|
16
|
+
...OioSpinProps,
|
|
17
|
+
size: {
|
|
18
|
+
type: [String, Number] as PropType<SpinSize | keyof typeof SpinSize | number>
|
|
19
|
+
},
|
|
20
|
+
delay: {
|
|
21
|
+
type: Number
|
|
22
|
+
},
|
|
23
|
+
tip: {
|
|
24
|
+
type: String as PropType<string> | Slot
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
slots: ['default', 'tip'],
|
|
28
|
+
setup(props) {
|
|
29
|
+
const loading = computed<boolean>(() => {
|
|
30
|
+
if (isNil(props.loading)) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
return props.loading;
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const size = computed<string>(() => {
|
|
37
|
+
const size = props.size;
|
|
38
|
+
const numberSize = NumberHelper.toNumber(size);
|
|
39
|
+
if (!isNil(numberSize)) {
|
|
40
|
+
return StyleHelper.px(numberSize) || SpinSize.default;
|
|
41
|
+
}
|
|
42
|
+
if (isString(size)) {
|
|
43
|
+
return size;
|
|
44
|
+
}
|
|
45
|
+
return SpinSize.default;
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const isInternalSize = computed<boolean>(() => {
|
|
49
|
+
return [SpinSize.small, SpinSize.large].includes(size.value as SpinSize);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
loading,
|
|
54
|
+
size,
|
|
55
|
+
isInternalSize
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
render() {
|
|
59
|
+
const classNames = [`${DEFAULT_PREFIX}-spin`];
|
|
60
|
+
|
|
61
|
+
if (this.isInternalSize) {
|
|
62
|
+
classNames.push(`${DEFAULT_PREFIX}-spin-${this.size}`);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
let { loadingIndicator } = this;
|
|
66
|
+
if (!loadingIndicator) {
|
|
67
|
+
loadingIndicator = createVNode('span', { class: `${DEFAULT_PREFIX}-spin-loading` });
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return createVNode(
|
|
71
|
+
ASpin,
|
|
72
|
+
{
|
|
73
|
+
spinning: this.loading,
|
|
74
|
+
indicator: loadingIndicator,
|
|
75
|
+
wrapperClassName: StringHelper.append([`${DEFAULT_PREFIX}-spin-wrapper`], this.wrapperClassName).join(' '),
|
|
76
|
+
delay: this.delay,
|
|
77
|
+
tip: this.tip,
|
|
78
|
+
...PropRecordHelper.collectionBasicProps(this.$attrs, classNames)
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
...PropRecordHelper.collectionSlots(this.$slots, ['default', 'tip']),
|
|
82
|
+
...StableSlotProp
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
</script>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@import './parameters.scss';
|
|
2
|
+
|
|
3
|
+
$size: 1.2em;
|
|
4
|
+
$smallSize: 1em;
|
|
5
|
+
$largeSize: 1.6em;
|
|
6
|
+
|
|
7
|
+
.#{$spinClassPrefix} {
|
|
8
|
+
background: var(--oio-spin-background);
|
|
9
|
+
&-small {
|
|
10
|
+
.#{$spinClassPrefix}-loading {
|
|
11
|
+
width: $smallSize;
|
|
12
|
+
height: $smallSize;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-large {
|
|
17
|
+
.#{$spinClassPrefix}-loading {
|
|
18
|
+
width: $largeSize;
|
|
19
|
+
height: $largeSize;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.#{$spinClassPrefix}-loading {
|
|
25
|
+
width: $size;
|
|
26
|
+
height: $size;
|
|
27
|
+
border: 3px solid rgba(var(--oio-primary-color-rgb), 0.65);
|
|
28
|
+
border-bottom-color: transparent;
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
display: inline-block;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
animation: rotation 0.8s linear infinite;
|
|
33
|
+
|
|
34
|
+
@keyframes rotation {
|
|
35
|
+
0% {
|
|
36
|
+
transform: rotate(0deg);
|
|
37
|
+
}
|
|
38
|
+
100% {
|
|
39
|
+
transform: rotate(360deg);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ant-spin-nested-loading > div > .ant-spin {
|
|
45
|
+
&.#{$spinClassPrefix} {
|
|
46
|
+
max-height: inherit;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OioSwitch } from './oio-switch.vue';
|