fit2cloud-ui-plus 0.0.1-beta.9 → 1.0.0-beta.1
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 +61 -9
- package/lib/fit2cloud-ui-plus.es.js +1847 -370
- package/lib/fit2cloud-ui-plus.umd.js +1 -1
- package/package.json +8 -5
- package/src/components/filter-bar/FuFilter.vue +40 -31
- package/src/components/filter-bar/FuFilterBar.vue +27 -16
- package/src/components/filter-bar/FuFilterInput.vue +48 -0
- package/src/components/filter-bar/filter-components/FuFilterDate.vue +17 -13
- package/src/components/filter-bar/filter-components/FuFilterDateTime.vue +4 -4
- package/src/components/filter-bar/filter-components/FuFilterSelect.vue +5 -4
- package/src/components/filter-bar/index.ts +4 -4
- package/src/components/icon-button/FuIconButton.vue +54 -0
- package/src/components/icon-button/index.ts +9 -0
- package/src/components/read-write-switch/FuSelectRwSwitch.vue +23 -10
- package/src/components/search-bar/FuComplexSearch.vue +104 -0
- package/src/components/search-bar/FuQuickSearch.vue +64 -0
- package/src/components/search-bar/FuSearchBar.vue +153 -0
- package/src/components/search-bar/FuSearchBarButton.vue +23 -0
- package/src/components/search-bar/FuSearchContions.vue +40 -0
- package/src/components/search-bar/complex-components/FuComplexDate.vue +70 -0
- package/src/components/search-bar/complex-components/FuComplexDateTime.vue +74 -0
- package/src/components/search-bar/complex-components/FuComplexInput.vue +57 -0
- package/src/components/search-bar/complex-components/FuComplexSelect.vue +93 -0
- package/src/components/search-bar/index.ts +20 -0
- package/src/components/search-bar/types.ts +23 -0
- package/src/components/speed-dial/FuSpeedDial.vue +289 -0
- package/src/components/speed-dial/FuSpeedDialActionButton.vue +88 -0
- package/src/components/speed-dial/FuSpeedDialButton.vue +45 -0
- package/src/components/speed-dial/FuSpeedDialItem.vue +82 -0
- package/src/components/speed-dial/index.ts +11 -0
- package/src/components/speed-dial/types.ts +12 -0
- package/src/components/table/FuTable.vue +3 -3
- package/src/components/table/table-column-select/FuTableColumnSelectPopover.vue +22 -24
- package/src/components/tabs/FuTabs.vue +4 -3
- package/src/hooks/index.ts +0 -1
- package/src/hooks/use-global-config/index.ts +26 -8
- package/src/hooks/use-locale/index.ts +1 -1
- package/src/hooks/use-size/index.ts +11 -5
- package/src/index.ts +5 -2
- package/src/styles/common/function.scss +14 -4
- package/src/styles/common/mixins.scss +9 -4
- package/src/styles/common/variables.scss +55 -18
- package/src/styles/components/filter-bar.scss +16 -16
- package/src/styles/components/icon-button.scss +66 -0
- package/src/styles/components/search-bar.scss +240 -0
- package/src/styles/components/speed-dial.scss +1 -51
- package/src/styles/components/table.scss +7 -9
- package/src/styles/index.scss +2 -0
- package/src/styles/themes/default.scss +91 -0
- package/types/examples/App.vue.d.ts +2 -0
- package/types/examples/components/CodeExample.vue.d.ts +29 -0
- package/types/examples/components/DocumentTable.vue.d.ts +14 -0
- package/types/examples/components/Markdown.vue.d.ts +12 -0
- package/types/examples/layout/components/AppHeader.vue.d.ts +2 -0
- package/types/examples/layout/components/Sidebar.vue.d.ts +2 -0
- package/types/examples/layout/index.vue.d.ts +2 -0
- package/types/examples/main.d.ts +2 -0
- package/types/examples/pages/filter-bar/attributes.d.ts +63 -0
- package/types/examples/pages/filter-bar/demo/BaseFilterBar.vue.d.ts +2 -0
- package/types/examples/pages/filter-bar/demo/SetConditionsDemo.vue.d.ts +2 -0
- package/types/examples/pages/filter-bar/demo/SlotDemo.vue.d.ts +2 -0
- package/types/examples/pages/filter-bar/index.vue.d.ts +2 -0
- package/types/examples/pages/icon-button/attributes.d.ts +45 -0
- package/types/examples/pages/icon-button/demo/BaseIconButton.vue.d.ts +2 -0
- package/types/examples/pages/icon-button/demo/SlotDemo.vue.d.ts +2 -0
- package/types/examples/pages/icon-button/index.vue.d.ts +2 -0
- package/types/examples/pages/index.d.ts +3 -0
- package/types/examples/pages/read-write-switch/attributes.d.ts +63 -0
- package/types/examples/pages/read-write-switch/demo/BaseDemo.vue.d.ts +2 -0
- package/types/examples/pages/read-write-switch/demo/CustomContentDemo.vue.d.ts +2 -0
- package/types/examples/pages/read-write-switch/demo/InputRwSwitchDemo.vue.d.ts +2 -0
- package/types/examples/pages/read-write-switch/demo/ReadSwitchDemo.vue.d.ts +2 -0
- package/types/examples/pages/read-write-switch/demo/SelectRwSwitchDemo.vue.d.ts +2 -0
- package/types/examples/pages/read-write-switch/demo/TableInnerEditDemo.vue.d.ts +2 -0
- package/types/examples/pages/read-write-switch/demo/WriteSwitchDemo.vue.d.ts +2 -0
- package/types/examples/pages/read-write-switch/index.vue.d.ts +2 -0
- package/types/examples/pages/search/attributes.d.ts +57 -0
- package/types/examples/pages/search/demo/BaseSearchbar.vue.d.ts +66 -0
- package/types/examples/pages/search/demo/ComplexComponentsDemo.vue.d.ts +60 -0
- package/types/examples/pages/search/demo/ComplexSearchDemo.vue.d.ts +84 -0
- package/types/examples/pages/search/demo/CustomComponentsDemo.vue.d.ts +50 -0
- package/types/examples/pages/search/demo/EchoConditionsDemo.vue.d.ts +52 -0
- package/types/examples/pages/search/demo/QuickSearchDemo.vue.d.ts +18 -0
- package/types/examples/pages/search/demo/SearchBarButtonDemo.vue.d.ts +54 -0
- package/types/examples/pages/search/index.vue.d.ts +150 -0
- package/types/examples/pages/search-bar/attributes.d.ts +63 -0
- package/types/examples/pages/search-bar/demo/BaseSearchbar.vue.d.ts +31 -0
- package/types/examples/pages/search-bar/demo/ComplexSearchDemo.vue.d.ts +40 -0
- package/types/examples/pages/search-bar/demo/EchoConditionsDemo.vue.d.ts +32 -0
- package/types/examples/pages/search-bar/demo/QuickSearchDemo.vue.d.ts +7 -0
- package/types/examples/pages/search-bar/demo/SearchBarButtonDemo.vue.d.ts +32 -0
- package/types/examples/pages/search-bar/index.vue.d.ts +2 -0
- package/types/examples/pages/speed-dial/attributes.d.ts +63 -0
- package/types/examples/pages/speed-dial/demo/BaseSpeedDial.vue.d.ts +2 -0
- package/types/examples/pages/speed-dial/demo/SpeedDialCustom.vue.d.ts +2 -0
- package/types/examples/pages/speed-dial/demo/SpeedDialPosition.vue.d.ts +2 -0
- package/types/examples/pages/speed-dial/demo/SpeedDialTrigger.vue.d.ts +2 -0
- package/types/examples/pages/speed-dial/index.vue.d.ts +2 -0
- package/types/examples/pages/split-pane/attributes.d.ts +63 -0
- package/types/examples/pages/split-pane/demo/BaseSplit.vue.d.ts +2 -0
- package/types/examples/pages/split-pane/demo/CustomResizer.vue.d.ts +2 -0
- package/types/examples/pages/split-pane/demo/NestSplit.vue.d.ts +2 -0
- package/types/examples/pages/split-pane/demo/ResizerType.vue.d.ts +2 -0
- package/types/examples/pages/split-pane/index.vue.d.ts +2 -0
- package/types/examples/pages/table/attributes.d.ts +121 -0
- package/types/examples/pages/table/demo/BaseTable.vue.d.ts +2 -0
- package/types/examples/pages/table/demo/DropdownColumn.vue.d.ts +2 -0
- package/types/examples/pages/table/demo/DropdownColumnSlot.vue.d.ts +2 -0
- package/types/examples/pages/table/demo/SaveSelectColumn.vue.d.ts +2 -0
- package/types/examples/pages/table/demo/SelectColumn.vue.d.ts +2 -0
- package/types/examples/pages/table/demo/TableOperations.vue.d.ts +2 -0
- package/types/examples/pages/table/demo/TablePagination.vue.d.ts +2 -0
- package/types/examples/pages/table/index.vue.d.ts +2 -0
- package/types/examples/pages/tabs/attributes.d.ts +63 -0
- package/types/examples/pages/tabs/demo/AddCloseTab.vue.d.ts +2 -0
- package/types/examples/pages/tabs/index.vue.d.ts +2 -0
- package/types/examples/router/doc-routes.d.ts +12 -0
- package/types/examples/router/index.d.ts +4 -0
- package/types/examples/router/styles-routes.d.ts +12 -0
- package/types/examples/style-guide/button/BaseButton.vue.d.ts +2 -0
- package/types/examples/style-guide/button/IconButton.vue.d.ts +2 -0
- package/types/examples/style-guide/button/PlainButton.vue.d.ts +2 -0
- package/types/examples/style-guide/button/TextButton.vue.d.ts +2 -0
- package/types/examples/style-guide/button/index.vue.d.ts +2 -0
- package/types/examples/style-guide/input/BaseInput.vue.d.ts +2 -0
- package/types/examples/style-guide/input/SearchInput.vue.d.ts +2 -0
- package/types/examples/style-guide/input/Textarea.vue.d.ts +2 -0
- package/types/examples/style-guide/input/index.vue.d.ts +2 -0
- package/types/examples/style-guide/select/BaseSelect.vue.d.ts +2 -0
- package/types/examples/style-guide/select/index.vue.d.ts +2 -0
- package/types/plugins/example-transform.d.ts +5 -0
- package/types/src/components/filter-bar/FuFilter.vue.d.ts +42 -0
- package/types/src/components/filter-bar/FuFilterBar.vue.d.ts +33 -0
- package/types/src/components/filter-bar/FuFilterConditions.vue.d.ts +8 -0
- package/types/src/components/filter-bar/FuFilterInput.vue.d.ts +17 -0
- package/types/src/components/filter-bar/FuSearchInput.vue.d.ts +17 -0
- package/types/src/components/filter-bar/filter-components/FuFilterDate.vue.d.ts +36 -0
- package/types/src/components/filter-bar/filter-components/FuFilterDateTime.vue.d.ts +36 -0
- package/types/src/components/filter-bar/filter-components/FuFilterOption.vue.d.ts +24 -0
- package/types/src/components/filter-bar/filter-components/FuFilterSelect.vue.d.ts +66 -0
- package/types/src/components/filter-bar/index.d.ts +2 -0
- package/types/src/components/filter-bar/types.d.ts +22 -0
- package/types/src/components/icon-button/FuIconButton.vue.d.ts +43 -0
- package/types/src/components/icon-button/index.d.ts +2 -0
- package/types/src/components/read-write-switch/FuInputRwSwitch.vue.d.ts +21 -0
- package/types/src/components/read-write-switch/FuReadWriteSwitch.vue.d.ts +23 -0
- package/types/src/components/read-write-switch/FuSelectRwSwitch.vue.d.ts +43 -0
- package/types/src/components/read-write-switch/index.d.ts +2 -0
- package/types/src/components/read-write-switch/types.d.ts +4 -0
- package/types/src/components/search-bar/FuComplexSearch.vue.d.ts +22 -0
- package/types/src/components/search-bar/FuQuickSearch.vue.d.ts +29 -0
- package/types/src/components/search-bar/FuSearchBar.vue.d.ts +58 -0
- package/types/src/components/search-bar/FuSearchBarButton.vue.d.ts +14 -0
- package/types/src/components/search-bar/FuSearchContions.vue.d.ts +26 -0
- package/types/src/components/search-bar/complex-components/FuComplexDate.vue.d.ts +36 -0
- package/types/src/components/search-bar/complex-components/FuComplexDateTime.vue.d.ts +36 -0
- package/types/src/components/search-bar/complex-components/FuComplexInput.vue.d.ts +26 -0
- package/types/src/components/search-bar/complex-components/FuComplexSelect.vue.d.ts +50 -0
- package/types/src/components/search-bar/complex-components/index.d.ts +0 -0
- package/types/src/components/search-bar/complex-components/mixins.d.ts +6 -0
- package/types/src/components/search-bar/index.d.ts +2 -0
- package/types/src/components/search-bar/types.d.ts +17 -0
- package/types/src/components/speed-dial/FuSpeedDial.vue.d.ts +218 -0
- package/types/src/components/speed-dial/FuSpeedDialActionButton.vue.d.ts +32 -0
- package/types/src/components/speed-dial/FuSpeedDialButton.vue.d.ts +42 -0
- package/types/src/components/speed-dial/FuSpeedDialItem.vue.d.ts +12 -0
- package/types/src/components/speed-dial/index.d.ts +2 -0
- package/types/src/components/speed-dial/types.d.ts +8 -0
- package/types/src/components/split-pane/FuSplitPane.vue.d.ts +59 -0
- package/types/src/components/split-pane/index.d.ts +2 -0
- package/types/src/components/table/FuTable.vue.d.ts +18 -0
- package/types/src/components/table/FuTableBody.d.ts +3 -0
- package/types/src/components/table/FuTableColumnDropdown.vue.d.ts +50 -0
- package/types/src/components/table/FuTablePagination.vue.d.ts +47 -0
- package/types/src/components/table/index.d.ts +2 -0
- package/types/src/components/table/table-column-select/FuTableColumnSelect.vue.d.ts +10 -0
- package/types/src/components/table/table-column-select/FuTableColumnSelectDialog.vue.d.ts +23 -0
- package/types/src/components/table/table-column-select/FuTableColumnSelectPopover.vue.d.ts +34 -0
- package/types/src/components/table/table-column-select/utils.d.ts +8 -0
- package/types/src/components/table/table-operations/FuTableButton.vue.d.ts +13 -0
- package/types/src/components/table/table-operations/FuTableMoreButton.vue.d.ts +37 -0
- package/types/src/components/table/table-operations/FuTableOperations.vue.d.ts +46 -0
- package/types/src/components/table/types.d.ts +2 -0
- package/types/src/components/tabs/FuTabs.vue.d.ts +54 -0
- package/types/src/components/tabs/index.d.ts +2 -0
- package/types/src/hooks/index.d.ts +3 -0
- package/types/src/hooks/use-global-config/index.d.ts +9 -0
- package/types/src/hooks/use-locale/index.d.ts +14 -0
- package/types/src/hooks/use-size/index.d.ts +9 -0
- package/types/src/index.d.ts +8 -0
- package/types/src/locale/index.d.ts +10 -0
- package/types/src/locale/lang/en.d.ts +59 -0
- package/types/src/locale/lang/zh-cn.d.ts +59 -0
- package/types/src/locale/lang/zh-tw.d.ts +59 -0
- package/types/src/tools/size.d.ts +4 -0
- package/types/src/tools/theme.d.ts +1 -0
- package/types/src/tools/time.d.ts +2 -0
- package/types/src/tools/types.d.ts +8 -0
- package/types/src/tools/utils.d.ts +2 -0
- package/types/src/tools/vnode.d.ts +9 -0
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/filter-bar/FuSearchInput.vue +0 -37
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import
|
|
1
|
+
import {computed, getCurrentInstance, ref, unref} from 'vue'
|
|
2
|
+
import {useGlobalConfig} from '@/hooks'
|
|
3
|
+
import type {ComputedRef} from 'vue'
|
|
4
|
+
import type {ComponentSize} from '@/tools/size'
|
|
5
|
+
import {validateSize} from "@/tools/size";
|
|
6
|
+
import {MaybeRef} from "@vueuse/core";
|
|
6
7
|
|
|
7
8
|
export const useProp = <T>(name: string): ComputedRef<T | undefined> => {
|
|
8
9
|
const vm = getCurrentInstance()!
|
|
@@ -27,3 +28,8 @@ export const useSize = (
|
|
|
27
28
|
)
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
export const useSizeProp = {
|
|
32
|
+
type: String,
|
|
33
|
+
validator: validateSize,
|
|
34
|
+
}
|
|
35
|
+
|
package/src/index.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import PackageJSON from "../package.json"
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type {App} from 'vue'
|
|
4
|
+
import {GlobalConfig, provideGlobalConfig} from "@/hooks";
|
|
5
|
+
|
|
4
6
|
const components = import.meta.globEager('@/components/*/index.ts');
|
|
5
7
|
|
|
6
|
-
const install = (app: App): void => {
|
|
8
|
+
const install = (app: App, config: GlobalConfig): void => {
|
|
7
9
|
Object.keys(components).forEach(key => {
|
|
8
10
|
let component = components[key].default;
|
|
9
11
|
app.use(component)
|
|
10
12
|
})
|
|
13
|
+
provideGlobalConfig(config)
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
const plugin = {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
// join var name
|
|
46
|
-
// joinVarName(('button', 'text-color')) => '--
|
|
46
|
+
// joinVarName(('button', 'text-color')) => '--fu-button-text-color'
|
|
47
47
|
@function joinVarName($list) {
|
|
48
48
|
$name: '--' + config.$namespace;
|
|
49
49
|
@each $item in $list {
|
|
@@ -54,17 +54,17 @@
|
|
|
54
54
|
@return $name;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
// getCssVarName('button', 'text-color') => '--
|
|
57
|
+
// getCssVarName('button', 'text-color') => '--fu-button-text-color'
|
|
58
58
|
@function getCssVarName($args...) {
|
|
59
59
|
@return joinVarName($args);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
// getCssVar('button', 'text-color') => var(--
|
|
62
|
+
// getCssVar('button', 'text-color') => var(--fu-button-text-color)
|
|
63
63
|
@function getCssVar($args...) {
|
|
64
64
|
@return var(#{joinVarName($args)});
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
// bem('block', 'element', 'modifier') => '
|
|
67
|
+
// bem('block', 'element', 'modifier') => 'fu-block__element--modifier'
|
|
68
68
|
@function bem($block, $element: '', $modifier: '') {
|
|
69
69
|
$name: config.$namespace + config.$common-separator + $block;
|
|
70
70
|
|
|
@@ -79,3 +79,13 @@
|
|
|
79
79
|
// @debug $name;
|
|
80
80
|
@return $name;
|
|
81
81
|
}
|
|
82
|
+
|
|
83
|
+
@function str-replace($string, $search, $replace: '') {
|
|
84
|
+
$index: str-index($string, $search);
|
|
85
|
+
|
|
86
|
+
@if $index {
|
|
87
|
+
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@return $string;
|
|
91
|
+
}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
@use 'function' as *;
|
|
2
|
-
@use 'variables' as *;
|
|
3
|
-
// forward mixins
|
|
4
|
-
@forward 'config';
|
|
5
|
-
@forward 'function';
|
|
6
2
|
@use 'config' as *;
|
|
7
3
|
|
|
8
4
|
// BEM
|
|
@@ -83,3 +79,12 @@
|
|
|
83
79
|
}
|
|
84
80
|
}
|
|
85
81
|
|
|
82
|
+
@mixin set-css-var($name, $value) {
|
|
83
|
+
#{joinVarName($name)}: #{$value};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@mixin set-component-css-var($name, $variables) {
|
|
87
|
+
@each $attribute, $value in $variables {
|
|
88
|
+
#{getCssVarName($name, $attribute)}: #{$value};
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -1,24 +1,61 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use "./mixins" as *;
|
|
3
|
+
@use 'element-plus/theme-chalk/src/common/var.scss' as *;
|
|
1
4
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
// fit2cloud ui variables
|
|
6
|
+
$condition: () !default;
|
|
7
|
+
$condition: map.deep-merge(
|
|
8
|
+
(
|
|
9
|
+
'color': #646A73,
|
|
10
|
+
'bgColor': #F5F6F7,
|
|
6
11
|
),
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
'border-color' : #dddddd,
|
|
10
|
-
'header-text-color': '#646A73',
|
|
11
|
-
'text-color': '#1F2329',
|
|
12
|
+
$condition
|
|
13
|
+
);
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
$fu-search-bar: () !default;
|
|
16
|
+
$fu-search-bar: map.deep-merge(
|
|
17
|
+
(
|
|
18
|
+
'width': 100%,
|
|
19
|
+
'height': 48px,
|
|
20
|
+
'condition-color': map-get($condition, "color"),
|
|
21
|
+
'condition-bgColor': map-get($condition, "bgColor"),
|
|
22
|
+
),
|
|
23
|
+
$fu-search-bar
|
|
14
24
|
);
|
|
15
25
|
|
|
16
|
-
|
|
17
|
-
$
|
|
26
|
+
$fu-filter-bar: () !default;
|
|
27
|
+
$fu-filter-bar: map.deep-merge(
|
|
28
|
+
(
|
|
29
|
+
'color': map-get($condition, "color"),
|
|
30
|
+
'drawer-color': map-get($condition, "color"),
|
|
31
|
+
'condition-color': map-get($condition, "color"),
|
|
32
|
+
'condition-bgColor': map-get($condition, "bgColor"),
|
|
33
|
+
'option-bgColor': map-get($condition, "bgColor"),
|
|
34
|
+
'option-hover-bgColor': rgba($color-primary, 10%),
|
|
35
|
+
'scroll-bgColor': mix(#000, map-get($condition, "bgColor"), 15%),
|
|
36
|
+
),
|
|
37
|
+
$fu-filter-bar
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
$fu-icon-button: () !default;
|
|
41
|
+
$fu-icon-button: map.deep-merge(
|
|
42
|
+
(
|
|
43
|
+
'color': map-get($text-color, "primary"),
|
|
44
|
+
'bgColor': transparent,
|
|
45
|
+
'hover-color': map-get($fu-icon-button, "color"),
|
|
46
|
+
'hover-bgColor': rgba(map-get($fu-icon-button, "color"), 0.1),
|
|
47
|
+
'active-color': map-get($fu-icon-button, "color"),
|
|
48
|
+
'active-bgColor': rgba(map-get($fu-icon-button, "color"), 0.2),
|
|
49
|
+
'disabled-color': #BBBFC4,
|
|
50
|
+
'disabled-bgColor': transparent,
|
|
51
|
+
'gap': 12px,
|
|
52
|
+
),
|
|
53
|
+
$fu-icon-button
|
|
54
|
+
);
|
|
18
55
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
$
|
|
22
|
-
|
|
23
|
-
$
|
|
24
|
-
|
|
56
|
+
:root {
|
|
57
|
+
// 遍历组件变量,例如: --fu-search-bar-{key}: {value}
|
|
58
|
+
@include set-component-css-var('search-bar', $fu-search-bar);
|
|
59
|
+
@include set-component-css-var('filter-bar', $fu-filter-bar);
|
|
60
|
+
@include set-component-css-var('icon-button', $fu-icon-button);
|
|
61
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
@use "../common/mixins.scss" as *;
|
|
2
|
-
@use "../common/variables.scss" as *;
|
|
3
2
|
|
|
4
3
|
@include b(filter-bar) {
|
|
5
4
|
border-radius: 4px;
|
|
@@ -19,19 +18,18 @@
|
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
@include b(
|
|
21
|
+
@include b(filter-input) {
|
|
23
22
|
width: 240px;
|
|
24
|
-
margin-right: 10px;
|
|
25
23
|
.el-input__prefix, .el-input__suffix {
|
|
26
24
|
.el-input__icon {
|
|
27
|
-
color:
|
|
25
|
+
color: var(--fu-filter-bar-color);
|
|
28
26
|
font-size: 14px
|
|
29
27
|
}
|
|
30
28
|
}
|
|
29
|
+
}
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
// }
|
|
31
|
+
@include b(filter-button) {
|
|
32
|
+
margin-left: 12px;
|
|
35
33
|
}
|
|
36
34
|
|
|
37
35
|
@include b(filter) {
|
|
@@ -48,7 +46,7 @@
|
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
@include e(split) {
|
|
51
|
-
background-color:
|
|
49
|
+
background-color: var(--fu-filter-bar-color);
|
|
52
50
|
height: 16px;
|
|
53
51
|
width: 1px;
|
|
54
52
|
margin: 2px 8px;
|
|
@@ -63,7 +61,7 @@
|
|
|
63
61
|
margin: 0 2px;
|
|
64
62
|
|
|
65
63
|
&:hover {
|
|
66
|
-
background:
|
|
64
|
+
background: var(--fu-filter-bar-scroll-bgColor);
|
|
67
65
|
border-radius: 4px;
|
|
68
66
|
}
|
|
69
67
|
|
|
@@ -80,7 +78,7 @@
|
|
|
80
78
|
height: 22px;
|
|
81
79
|
min-width: 76px;
|
|
82
80
|
max-width: 76px;
|
|
83
|
-
color:
|
|
81
|
+
color: var(--fu-filter-bar-color);
|
|
84
82
|
cursor: pointer;
|
|
85
83
|
margin-left: 6px;
|
|
86
84
|
}
|
|
@@ -111,7 +109,7 @@
|
|
|
111
109
|
bottom: 0;
|
|
112
110
|
width: 100%;
|
|
113
111
|
height: 72px;
|
|
114
|
-
|
|
112
|
+
right: 20px;
|
|
115
113
|
display: flex;
|
|
116
114
|
justify-content: flex-end;
|
|
117
115
|
align-items: center;
|
|
@@ -136,9 +134,9 @@
|
|
|
136
134
|
padding: 1px 6px;
|
|
137
135
|
box-sizing: border-box;
|
|
138
136
|
height: 24px;
|
|
139
|
-
background-color:
|
|
137
|
+
background-color: var(--fu-filter-bar-condition-bgColor);
|
|
140
138
|
border-radius: 2px;
|
|
141
|
-
color:
|
|
139
|
+
color: var(--fu-filter-bar-condition-color);
|
|
142
140
|
|
|
143
141
|
& + & {
|
|
144
142
|
margin-left: 8px;
|
|
@@ -197,14 +195,13 @@
|
|
|
197
195
|
padding: 1px 6px;
|
|
198
196
|
font-size: 14px;
|
|
199
197
|
line-height: 22px;
|
|
200
|
-
background-color:
|
|
198
|
+
background-color: var(--fu-filter-bar-option-bgColor);
|
|
201
199
|
border-radius: 2px;
|
|
202
200
|
cursor: pointer;
|
|
203
201
|
margin: 6px;
|
|
204
202
|
|
|
205
203
|
&.is-selected, &:hover {
|
|
206
|
-
background:
|
|
207
|
-
color: $filter-condition-color;
|
|
204
|
+
background-color: var(--fu-filter-bar-option-hover-bgColor);
|
|
208
205
|
}
|
|
209
206
|
|
|
210
207
|
&:active {
|
|
@@ -221,6 +218,9 @@
|
|
|
221
218
|
|
|
222
219
|
@include b(scale-click) {
|
|
223
220
|
cursor: pointer;
|
|
221
|
+
&:hover, &:focus {
|
|
222
|
+
opacity: 0.8;
|
|
223
|
+
}
|
|
224
224
|
&:active {
|
|
225
225
|
transform: scale(0.9)
|
|
226
226
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@use "../common/mixins.scss" as *;
|
|
2
|
+
@use 'element-plus/theme-chalk/src/common/var.scss' as *;
|
|
3
|
+
|
|
4
|
+
@mixin set-type-css-var($color) {
|
|
5
|
+
@include set-component-css-var('icon-button', (
|
|
6
|
+
'color': $color,
|
|
7
|
+
'bgColor': transparent,
|
|
8
|
+
'hover-color': $color,
|
|
9
|
+
'hover-bgColor': rgba($color, 0.1),
|
|
10
|
+
'active-color': $color,
|
|
11
|
+
'active-bgColor': rgba($color, 0.2),
|
|
12
|
+
));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@include b(icon-button) {
|
|
16
|
+
@include flex-row(center, center);
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
width: 32px;
|
|
19
|
+
height: 32px;
|
|
20
|
+
border-radius: 4px;
|
|
21
|
+
color: var(--fu-icon-button-color);
|
|
22
|
+
background-color: var(--fu-icon-button-bgColor);
|
|
23
|
+
|
|
24
|
+
&:not(.is-disabled) {
|
|
25
|
+
&:hover, &:focus {
|
|
26
|
+
color: var(--fu-icon-button-hover-color);
|
|
27
|
+
background-color: var(--fu-icon-button-hover-bgColor);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:active {
|
|
31
|
+
color: var(--fu-icon-button-active-color);
|
|
32
|
+
background-color: var(--fu-icon-button-active-bgColor);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.is-disabled {
|
|
37
|
+
color: var(--fu-icon-button-disabled-color);
|
|
38
|
+
background-color: var(--fu-icon-button-disabled-bgColor);
|
|
39
|
+
cursor: not-allowed;
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
|
|
42
|
+
.el-icon {
|
|
43
|
+
color: var(--fu-icon-button-disabled-color);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@include m(primary) {
|
|
48
|
+
@include set-type-css-var($color-primary);
|
|
49
|
+
}
|
|
50
|
+
@include m(success) {
|
|
51
|
+
@include set-type-css-var($color-success);
|
|
52
|
+
}
|
|
53
|
+
@include m(warning) {
|
|
54
|
+
@include set-type-css-var($color-warning);
|
|
55
|
+
}
|
|
56
|
+
@include m(danger) {
|
|
57
|
+
@include set-type-css-var($color-danger);
|
|
58
|
+
}
|
|
59
|
+
@include m(info) {
|
|
60
|
+
@include set-type-css-var($color-info);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
& + & {
|
|
64
|
+
margin-left: var(--fu-icon-button-gap);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
@use "../common/mixins.scss" as *;
|
|
2
|
+
|
|
3
|
+
@include b(search-bar) {
|
|
4
|
+
@include flex-row(flex-start, center);
|
|
5
|
+
position: relative;
|
|
6
|
+
width: var(--fu-search-bar-width);
|
|
7
|
+
height: var(--fu-search-bar-height);
|
|
8
|
+
|
|
9
|
+
&:after {
|
|
10
|
+
content: "";
|
|
11
|
+
position: absolute;
|
|
12
|
+
bottom: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
height: 1px;
|
|
15
|
+
width: 100%;
|
|
16
|
+
background-color: #D5D5D5;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@include e(content) {
|
|
20
|
+
@include flex-row(flex-start, center);
|
|
21
|
+
margin-right: 10px;
|
|
22
|
+
height: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@include e(buttons) {
|
|
26
|
+
@include flex-row(flex-end, center);
|
|
27
|
+
flex: auto;
|
|
28
|
+
height: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@include b(quick-search) {
|
|
32
|
+
&:after {
|
|
33
|
+
content: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@include b(search-bar-button) {
|
|
39
|
+
&.el-button {
|
|
40
|
+
@include active-scale(0.9);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@include b(search-conditions) {
|
|
45
|
+
@include flex-row(flex-start, center);
|
|
46
|
+
overflow-x: auto;
|
|
47
|
+
overflow-y: hidden;
|
|
48
|
+
height: calc(100% - 2px);
|
|
49
|
+
|
|
50
|
+
&::-webkit-scrollbar {
|
|
51
|
+
height: 6px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&::-webkit-scrollbar-thumb {
|
|
55
|
+
border-radius: 5px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&::-webkit-scrollbar-track {
|
|
59
|
+
border-radius: 5px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@include m(large) {
|
|
63
|
+
font-size: 16px;
|
|
64
|
+
|
|
65
|
+
@include e(item) {
|
|
66
|
+
height: 32px;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@include m(small) {
|
|
71
|
+
font-size: 13px;
|
|
72
|
+
|
|
73
|
+
@include e(item) {
|
|
74
|
+
height: 26px;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@include e(item) {
|
|
79
|
+
@include flex-row(flex-start, center);
|
|
80
|
+
flex-shrink: 0;
|
|
81
|
+
position: relative;
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
padding: 0 10px;
|
|
84
|
+
border-radius: 50px;
|
|
85
|
+
color: var(--fu-search-bar-condition-color);
|
|
86
|
+
background-color: var(--fu-search-bar-condition-bgColor);
|
|
87
|
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 2px 1px -1px rgba(0, 0, 0, .12);
|
|
88
|
+
margin-left: 10px;
|
|
89
|
+
font-size: inherit;
|
|
90
|
+
|
|
91
|
+
&:last-child {
|
|
92
|
+
margin-right: 10px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
div + div {
|
|
96
|
+
margin-left: 4px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.condition-value {
|
|
100
|
+
font-style: italic;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.condition-remove {
|
|
104
|
+
@include active-scale(0.9);
|
|
105
|
+
margin-left: 6px;
|
|
106
|
+
margin-right: -6px;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
|
|
109
|
+
&:hover {
|
|
110
|
+
color: var(--el-color-primary);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@include b(quick-search) {
|
|
117
|
+
@include flex-row(flex-start, center);
|
|
118
|
+
min-width: 200px;
|
|
119
|
+
position: relative;
|
|
120
|
+
|
|
121
|
+
@include m(large) {
|
|
122
|
+
font-size: 16px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@include m(small) {
|
|
126
|
+
font-size: 12px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&:after {
|
|
130
|
+
content: "";
|
|
131
|
+
position: absolute;
|
|
132
|
+
bottom: 0;
|
|
133
|
+
left: 0;
|
|
134
|
+
height: 1px;
|
|
135
|
+
width: 100%;
|
|
136
|
+
background-color: #D5D5D5;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
input {
|
|
140
|
+
border: none;
|
|
141
|
+
position: relative;
|
|
142
|
+
font-size: inherit;
|
|
143
|
+
padding: 10px;
|
|
144
|
+
width: 200px;
|
|
145
|
+
box-sizing: border-box;
|
|
146
|
+
color: var(--el-input-text-color);
|
|
147
|
+
background-color: var(--el-input-bg-color);
|
|
148
|
+
|
|
149
|
+
&:focus {
|
|
150
|
+
outline: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&::placeholder {
|
|
154
|
+
color: var(--el-text-color-placeholder);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.clean-button {
|
|
159
|
+
@include active-scale;
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
|
|
162
|
+
&:hover {
|
|
163
|
+
color: var(--el-color-primary);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@include b(complex-components-trigger) {
|
|
169
|
+
i {
|
|
170
|
+
transition: transform 0.2s;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@include when(active) {
|
|
174
|
+
i {
|
|
175
|
+
transform: rotate(90deg);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@include b(complex-components) {
|
|
181
|
+
@include e(body) {
|
|
182
|
+
width: 100%;
|
|
183
|
+
margin: 5px;
|
|
184
|
+
min-width: 200px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@include e(footer) {
|
|
188
|
+
width: 100%;
|
|
189
|
+
text-align: center;
|
|
190
|
+
margin: 5px 0;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@include b(complex-component) {
|
|
195
|
+
@include flex-row(space-between, center);
|
|
196
|
+
gap: 20px;
|
|
197
|
+
padding: 5px;
|
|
198
|
+
|
|
199
|
+
@include e(content) {
|
|
200
|
+
flex: 1;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@include e(label) {
|
|
204
|
+
width: 80px;
|
|
205
|
+
padding: 0 5px;
|
|
206
|
+
flex-grow: 0;
|
|
207
|
+
flex-shrink: 0;
|
|
208
|
+
font-size: inherit;
|
|
209
|
+
|
|
210
|
+
@include m(large) {
|
|
211
|
+
font-size: 14px;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@include e(value) {
|
|
216
|
+
padding: 0 5px;
|
|
217
|
+
flex-grow: 1;
|
|
218
|
+
min-width: 240px;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
@include b(complex-select) {
|
|
223
|
+
&.el-select {
|
|
224
|
+
width: 100%;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@include b(complex-date) {
|
|
229
|
+
&.el-date-editor {
|
|
230
|
+
width: 100% !important;
|
|
231
|
+
box-sizing: border-box;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@include b(complex-date-time) {
|
|
236
|
+
&.el-date-editor {
|
|
237
|
+
width: 100% !important;
|
|
238
|
+
box-sizing: border-box;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
@@ -1,38 +1,6 @@
|
|
|
1
1
|
@use "../common/mixins.scss" as *;
|
|
2
2
|
@use "../common/variables.scss" as *;
|
|
3
3
|
|
|
4
|
-
// @mixin speed-dial-button-variant($color, $background-color) {
|
|
5
|
-
// color: $color;
|
|
6
|
-
// background-color: $background-color;
|
|
7
|
-
|
|
8
|
-
// &:hover,
|
|
9
|
-
// &:focus {
|
|
10
|
-
// background: mix($--color-white, $background-color, $--button-hover-tint-percent);
|
|
11
|
-
// color: $color;
|
|
12
|
-
// }
|
|
13
|
-
|
|
14
|
-
// &:active {
|
|
15
|
-
// background: mix($--color-black, $background-color, $--button-active-shade-percent);
|
|
16
|
-
// color: $color;
|
|
17
|
-
// outline: none;
|
|
18
|
-
// }
|
|
19
|
-
|
|
20
|
-
// &.is-active {
|
|
21
|
-
// background: mix($--color-black, $background-color, $--button-active-shade-percent);
|
|
22
|
-
// color: $color;
|
|
23
|
-
// }
|
|
24
|
-
|
|
25
|
-
// &.is-disabled {
|
|
26
|
-
// &,
|
|
27
|
-
// &:hover,
|
|
28
|
-
// &:focus,
|
|
29
|
-
// &:active {
|
|
30
|
-
// color: $--color-white;
|
|
31
|
-
// background-color: mix($background-color, $--color-white);
|
|
32
|
-
// }
|
|
33
|
-
// }
|
|
34
|
-
// }
|
|
35
|
-
|
|
36
4
|
@include b(speed-dial) {
|
|
37
5
|
width: 0;
|
|
38
6
|
|
|
@@ -47,6 +15,7 @@
|
|
|
47
15
|
box-sizing: border-box;
|
|
48
16
|
cursor: pointer;
|
|
49
17
|
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
|
|
18
|
+
padding: 0;
|
|
50
19
|
@include active-scale(0.9);
|
|
51
20
|
|
|
52
21
|
@include m(rotate) {
|
|
@@ -60,25 +29,6 @@
|
|
|
60
29
|
}
|
|
61
30
|
}
|
|
62
31
|
}
|
|
63
|
-
|
|
64
|
-
// @include m(default) {
|
|
65
|
-
// @include speed-dial-button-variant($--button-default-font-color, $--button-default-background-color);
|
|
66
|
-
// }
|
|
67
|
-
// @include m(primary) {
|
|
68
|
-
// @include speed-dial-button-variant($--button-primary-font-color, $--button-primary-background-color);
|
|
69
|
-
// }
|
|
70
|
-
// @include m(success) {
|
|
71
|
-
// @include speed-dial-button-variant($--button-success-font-color, $--button-success-background-color);
|
|
72
|
-
// }
|
|
73
|
-
// @include m(warning) {
|
|
74
|
-
// @include speed-dial-button-variant($--button-warning-font-color, $--button-warning-background-color);
|
|
75
|
-
// }
|
|
76
|
-
// @include m(danger) {
|
|
77
|
-
// @include speed-dial-button-variant($--button-danger-font-color, $--button-danger-background-color);
|
|
78
|
-
// }
|
|
79
|
-
// @include m(info) {
|
|
80
|
-
// @include speed-dial-button-variant($--button-info-font-color, $--button-info-background-color);
|
|
81
|
-
// }
|
|
82
32
|
}
|
|
83
33
|
|
|
84
34
|
@include b(speed-dial-item) {
|