@vyr/design 0.0.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/package.json +16 -0
- package/src/components/Button.vue +64 -0
- package/src/components/Card.vue +203 -0
- package/src/components/Cascader.vue +171 -0
- package/src/components/Checked.vue +124 -0
- package/src/components/CheckedGroup.vue +51 -0
- package/src/components/Col.vue +52 -0
- package/src/components/ColorPicker.vue +331 -0
- package/src/components/Confirm.vue +86 -0
- package/src/components/Dialog.vue +220 -0
- package/src/components/Divider.vue +40 -0
- package/src/components/Draggable.vue +50 -0
- package/src/components/Dropdown.vue +175 -0
- package/src/components/DynamicDialog.vue +113 -0
- package/src/components/DynamicLayouter.vue +235 -0
- package/src/components/Form.vue +88 -0
- package/src/components/Input.vue +254 -0
- package/src/components/InputNumber.vue +96 -0
- package/src/components/Label.vue +116 -0
- package/src/components/Loading.vue +196 -0
- package/src/components/Mask.vue +47 -0
- package/src/components/Notify.vue +130 -0
- package/src/components/Option.vue +159 -0
- package/src/components/Options.vue +202 -0
- package/src/components/Popover.vue +271 -0
- package/src/components/Provider.vue +12 -0
- package/src/components/RightMenu.vue +127 -0
- package/src/components/Row.vue +50 -0
- package/src/components/Scroll.vue +99 -0
- package/src/components/Select.vue +223 -0
- package/src/components/Slot.vue +23 -0
- package/src/components/SubTree.vue +262 -0
- package/src/components/Tree.vue +129 -0
- package/src/components/common/DraggableController.ts +113 -0
- package/src/components/common/ResizeListener.ts +49 -0
- package/src/components/composables/useDefaultProps.ts +179 -0
- package/src/components/composables/useDraggable.ts +65 -0
- package/src/components/composables/useGetter.ts +15 -0
- package/src/components/composables/useMarginStyle.ts +45 -0
- package/src/components/composables/usePopover.ts +33 -0
- package/src/components/composables/useProvider.ts +186 -0
- package/src/components/composables/useScroll.ts +46 -0
- package/src/components/composables/useSearch.ts +97 -0
- package/src/components/composables/useTimer.ts +5 -0
- package/src/components/index.ts +1 -0
- package/src/components/singleton/confirm.ts +25 -0
- package/src/components/singleton/dialog.ts +25 -0
- package/src/components/singleton/index.ts +5 -0
- package/src/components/singleton/loading.ts +36 -0
- package/src/components/singleton/notify.ts +36 -0
- package/src/components/types/index.ts +82 -0
- package/src/components/utils/Cascader.ts +52 -0
- package/src/components/utils/Confirm.ts +41 -0
- package/src/components/utils/Dialog.ts +38 -0
- package/src/components/utils/DynamicDialog.ts +41 -0
- package/src/components/utils/DynamicLayouter.ts +5 -0
- package/src/components/utils/FloatLayer.ts +40 -0
- package/src/components/utils/InputNumber.ts +3 -0
- package/src/components/utils/Notify.ts +25 -0
- package/src/components/utils/Popover.ts +58 -0
- package/src/components/utils/RightMenu.ts +21 -0
- package/src/components/utils/Scroll.ts +4 -0
- package/src/components/utils/Slot.ts +73 -0
- package/src/components/utils/index.ts +12 -0
- package/src/font/demo.css +539 -0
- package/src/font/demo_index.html +1292 -0
- package/src/font/iconfont.css +207 -0
- package/src/font/iconfont.js +1 -0
- package/src/font/iconfont.json +345 -0
- package/src/font/iconfont.ttf +0 -0
- package/src/font/iconfont.woff +0 -0
- package/src/font/iconfont.woff2 +0 -0
- package/src/index.ts +68 -0
- package/src/locale/Language.ts +10 -0
- package/src/locale/LanguageProvider.ts +38 -0
- package/src/locale/index.ts +2 -0
- package/src/theme/global.less +91 -0
- package/src/theme/index.ts +155 -0
- package/src/tool/ArrayUtils.ts +38 -0
- package/src/tool/Color.ts +7 -0
- package/src/tool/Draggable.ts +36 -0
- package/src/tool/Listener.ts +59 -0
- package/src/tool/index.ts +4 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<teleport to="body">
|
|
3
|
+
<transition name="vyr-notify-transform" @after-leave="setting.close">
|
|
4
|
+
<div class="vyr-notify" :class="`${setting.type}`" :style="`top:${20 + NotifySetting.offset + index * 50}px;`"
|
|
5
|
+
v-if="setting.visible">
|
|
6
|
+
<div class="notify-icon"><i class="vyrfont" :class="`vyr-${setting.icon}`"></i></div>
|
|
7
|
+
<div class="notify-body">{{ setting.message }}</div>
|
|
8
|
+
</div>
|
|
9
|
+
</transition>
|
|
10
|
+
</teleport>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script lang="ts" setup>
|
|
14
|
+
import { computed, ref } from 'vue'
|
|
15
|
+
import { NotifyVue } from './types'
|
|
16
|
+
import { NotifySetting } from './utils'
|
|
17
|
+
import { ArrayUtils } from '../tool'
|
|
18
|
+
import { Theme } from '../theme'
|
|
19
|
+
|
|
20
|
+
const setting = ref(new NotifySetting(''))
|
|
21
|
+
|
|
22
|
+
const index = computed(() => {
|
|
23
|
+
const i = NotifySetting.collection.value.indexOf(setting.value)
|
|
24
|
+
return i === -1 ? 0 : i
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const remove = () => {
|
|
28
|
+
ArrayUtils.remove(NotifySetting.collection.value, setting.value)
|
|
29
|
+
}
|
|
30
|
+
const close = () => {
|
|
31
|
+
setTimeout(remove, Theme.config.animationTime.value)
|
|
32
|
+
setting.value.visible = false
|
|
33
|
+
}
|
|
34
|
+
const show = (set: NotifySetting) => {
|
|
35
|
+
NotifySetting.collection.value.push(set)
|
|
36
|
+
|
|
37
|
+
setting.value = set
|
|
38
|
+
setting.value.visible = true
|
|
39
|
+
|
|
40
|
+
if (set.duration === Infinity) return
|
|
41
|
+
setTimeout(close, set.duration)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
defineExpose<NotifyVue>({ show })
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<style lang="less" scoped>
|
|
48
|
+
@import '../theme/global.less';
|
|
49
|
+
|
|
50
|
+
.vyr-notify {
|
|
51
|
+
.vyr-font-family;
|
|
52
|
+
color: var(--vyr-font-color);
|
|
53
|
+
font-size: var(--vyr-font-size);
|
|
54
|
+
position: absolute;
|
|
55
|
+
top: 20px;
|
|
56
|
+
left: 20px;
|
|
57
|
+
margin: 4px 0;
|
|
58
|
+
padding: 8px 16px;
|
|
59
|
+
border-radius: 2px;
|
|
60
|
+
z-index: var(--vyr-notify-z-index);
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-wrap: nowrap;
|
|
63
|
+
flex-direction: row;
|
|
64
|
+
justify-content: flex-start;
|
|
65
|
+
align-items: center;
|
|
66
|
+
align-content: center;
|
|
67
|
+
min-width: 240px;
|
|
68
|
+
max-width: 360px;
|
|
69
|
+
line-height: 1.5em;
|
|
70
|
+
background-color: var(--vyr-topic-color);
|
|
71
|
+
box-shadow: 0 0 2px var(--vyr-white-color);
|
|
72
|
+
transition: all var(--vyr-animation-time);
|
|
73
|
+
|
|
74
|
+
.notify-icon {
|
|
75
|
+
height: 100%;
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-wrap: nowrap;
|
|
78
|
+
flex-direction: row;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
align-items: center;
|
|
81
|
+
align-content: center;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.notify-body {
|
|
85
|
+
margin: 0 0 0 8px;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.vyr-notify.warning {
|
|
90
|
+
box-shadow: 0 0 2px var(--vyr-warning-color);
|
|
91
|
+
|
|
92
|
+
.notify-icon {
|
|
93
|
+
color: var(--vyr-warning-color);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.vyr-notify.success {
|
|
98
|
+
box-shadow: 0 0 2px var(--vyr-success-color);
|
|
99
|
+
|
|
100
|
+
.notify-icon {
|
|
101
|
+
color: var(--vyr-success-color);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.vyr-notify.danger {
|
|
106
|
+
box-shadow: 0 0 2px var(--vyr-danger-color);
|
|
107
|
+
|
|
108
|
+
.notify-icon {
|
|
109
|
+
color: var(--vyr-danger-color);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.vyr-notify-transform-enter-active {
|
|
114
|
+
animation: vyr-notify-transform var(--vyr-animation-time);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.vyr-notify-transform-leave-active {
|
|
118
|
+
animation: vyr-notify-transform var(--vyr-animation-time) reverse;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@keyframes vyr-notify-transform {
|
|
122
|
+
0% {
|
|
123
|
+
left: -100%;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
100% {
|
|
127
|
+
left: 20px;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
</style>
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vyr-option"
|
|
3
|
+
:class="{ 'active': checked, 'expand': expand, 'justify': left === false, 'warning': warning, 'disabled': disabled }"
|
|
4
|
+
@click="e => trigger('click', e)" @mousedown="e => trigger('mousedown', e)" @mouseup="e => trigger('mouseup', e)"
|
|
5
|
+
@mouseenter="e => trigger('mouseenter', e)" @mouseleave="e => trigger('mouseleave', e)"
|
|
6
|
+
@contextmenu="e => trigger('rightClick', e)">
|
|
7
|
+
<slot v-if="left">
|
|
8
|
+
<div class="option-label">
|
|
9
|
+
<slot name="label">{{ label }}</slot>
|
|
10
|
+
</div>
|
|
11
|
+
</slot>
|
|
12
|
+
<div class="option-arrow">
|
|
13
|
+
<slot name="icon">
|
|
14
|
+
<i v-if="arrow" class="vyrfont vyr-right-arrow"></i>
|
|
15
|
+
</slot>
|
|
16
|
+
</div>
|
|
17
|
+
<slot v-if="left === false">
|
|
18
|
+
<div class="option-label">
|
|
19
|
+
<slot name="label">{{ label }}</slot>
|
|
20
|
+
</div>
|
|
21
|
+
</slot>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts" setup>
|
|
26
|
+
import { Option } from './types';
|
|
27
|
+
|
|
28
|
+
const props = defineProps({
|
|
29
|
+
label: {
|
|
30
|
+
default: '' as Option['label']
|
|
31
|
+
},
|
|
32
|
+
value: {
|
|
33
|
+
default: '' as Option['value']
|
|
34
|
+
},
|
|
35
|
+
left: {
|
|
36
|
+
default: true
|
|
37
|
+
},
|
|
38
|
+
arrow: {
|
|
39
|
+
default: false
|
|
40
|
+
},
|
|
41
|
+
checked: {
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
44
|
+
expand: {
|
|
45
|
+
default: false
|
|
46
|
+
},
|
|
47
|
+
disabled: {
|
|
48
|
+
default: false
|
|
49
|
+
},
|
|
50
|
+
warning: {
|
|
51
|
+
default: false
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
const emit = defineEmits(['click', 'mousedown', 'mouseup', 'rightClick', 'mouseenter', 'mouseleave'])
|
|
56
|
+
|
|
57
|
+
const trigger = (type: Parameters<typeof emit>[0], e: MouseEvent) => {
|
|
58
|
+
if (props.disabled === false) return emit(type, e)
|
|
59
|
+
e.stopPropagation()
|
|
60
|
+
e.preventDefault()
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style lang="less" scoped>
|
|
65
|
+
@import '../theme/global.less';
|
|
66
|
+
|
|
67
|
+
.vyr-option {
|
|
68
|
+
.vyr-font-family;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
color: var(--vyr-font-color);
|
|
71
|
+
background-color: var(--vyr-option-background-color);
|
|
72
|
+
font-size: var(--vyr-font-size);
|
|
73
|
+
width: 100%;
|
|
74
|
+
height: var(--vyr-input-height);
|
|
75
|
+
padding: 0 4px 0 var(--vyr-input-l-r-padding);
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
overflow-x: hidden;
|
|
78
|
+
overflow-y: hidden;
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-wrap: nowrap;
|
|
81
|
+
flex-direction: row;
|
|
82
|
+
justify-content: space-between;
|
|
83
|
+
align-items: center;
|
|
84
|
+
align-content: center;
|
|
85
|
+
transition: background-color var(--vyr-animation-time);
|
|
86
|
+
|
|
87
|
+
&:hover {
|
|
88
|
+
background-color: var(--vyr-active-topic-color);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.option-label {
|
|
92
|
+
.t_hide;
|
|
93
|
+
width: 100%;
|
|
94
|
+
padding: 0 0 0 5px;
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.option-arrow {
|
|
99
|
+
width: auto;
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-wrap: nowrap;
|
|
102
|
+
flex-direction: row;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
align-items: center;
|
|
105
|
+
align-content: center;
|
|
106
|
+
|
|
107
|
+
.vyrfont {
|
|
108
|
+
font-size: var(--vyr-font-size);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.vyr-option.justify {
|
|
114
|
+
text-align: right;
|
|
115
|
+
justify-content: end;
|
|
116
|
+
|
|
117
|
+
.vyr-right-arrow {
|
|
118
|
+
rotate: 180deg;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.vyr-option:hover {
|
|
123
|
+
background-color: var(--vyr-option-hover-background-color);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.vyr-option.expand {
|
|
127
|
+
background-color: var(--vyr-option-background-color-expand);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.vyr-option.active,
|
|
131
|
+
.vyr-option.active:hover {
|
|
132
|
+
background-color: var(--vyr-active-topic-color);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.vyr-option.warning,
|
|
136
|
+
.vyr-option.warning:hover {
|
|
137
|
+
background-color: rgba(var(--vyr-warning-color), 0.8);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.vyr-option.disabled,
|
|
141
|
+
.vyr-option.disabled:hover {
|
|
142
|
+
background-color: inherit;
|
|
143
|
+
color: var(--vyr-option-disabled-background-color);
|
|
144
|
+
cursor: default;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.vyr-option.active.disabled,
|
|
148
|
+
.vyr-option.active.disabled:hover {
|
|
149
|
+
color: var(--vyr-font-color);
|
|
150
|
+
background-color: var(--vyr-active-topic-color);
|
|
151
|
+
opacity: 0.5;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.vyr-drag-mouse {
|
|
155
|
+
.vyr-option {
|
|
156
|
+
cursor: move;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
</style>
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vyr-options" :style="style">
|
|
3
|
+
<vyr-scroll :margin="Theme.config.optionsScrollMargin.value">
|
|
4
|
+
<template v-if="(options.length === 0 || forcedPrompt) && addable === false">
|
|
5
|
+
<vyr-option :label="`${language.get(forcedPrompt ? 'options.tips.notFound' : 'options.tips.notData')}`" value=""
|
|
6
|
+
:disabled="true"></vyr-option>
|
|
7
|
+
</template>
|
|
8
|
+
<template v-else>
|
|
9
|
+
<template v-for="(item, oi) in options" :key="oi">
|
|
10
|
+
<slot name="default" :option="item" :index="oi" :left="left" :emit="emit">
|
|
11
|
+
<vyr-option v-if="oi === state.currentEditIndex" class="custom-option">
|
|
12
|
+
<vyr-input v-model="state.currentEditValue" :autofocus="true"></vyr-input>
|
|
13
|
+
<template #icon>
|
|
14
|
+
<div class="custom-wrapper" @click.stop>
|
|
15
|
+
<i class="vyrfont vyr-queren" @click="finishEdit"></i>
|
|
16
|
+
<i class="vyrfont vyr-quxiao" @click="stopEdit"></i>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
</vyr-option>
|
|
20
|
+
<vyr-option v-else :label="getter.label(item)" :value="getter.value(item)" :left="left" :arrow="arrow(item)"
|
|
21
|
+
:checked="checked.includes(getter.value(item))" :expand="expand.includes(getter.value(item))"
|
|
22
|
+
:disabled="getter.disabled(item)" @click="e => emit('click', item, e)"
|
|
23
|
+
@mouseenter="emit('mouseenter', item)" @mouseleave="emit('mouseleave', item)">
|
|
24
|
+
<template v-if="editable || removable" #icon>
|
|
25
|
+
<div class="custom-wrapper" @click.stop>
|
|
26
|
+
<i v-if="editable" class="vyrfont vyr-bianji" @click="startEdit(oi, item)"></i>
|
|
27
|
+
<i v-if="removable" class="vyrfont vyr-remove" @click="emit('remove', oi)"></i>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
</vyr-option>
|
|
31
|
+
</slot>
|
|
32
|
+
</template>
|
|
33
|
+
<vyr-option v-if="addable" :value="-1" :left="left">
|
|
34
|
+
<div class="custom-add" @click.stop="emit('add')">
|
|
35
|
+
<i class="vyrfont vyr-add"></i>
|
|
36
|
+
</div>
|
|
37
|
+
</vyr-option>
|
|
38
|
+
</template>
|
|
39
|
+
</vyr-scroll>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script lang="tsx" setup>
|
|
44
|
+
import { computed, ref } from 'vue'
|
|
45
|
+
import { Option, Options } from './types'
|
|
46
|
+
import { Theme } from '../theme';
|
|
47
|
+
import { language } from '../locale'
|
|
48
|
+
import { defaultGetter } from './composables/useGetter'
|
|
49
|
+
import VyrScroll from './Scroll.vue'
|
|
50
|
+
import VyrOption from './Option.vue'
|
|
51
|
+
import VyrInput from './Input.vue'
|
|
52
|
+
|
|
53
|
+
const props = defineProps({
|
|
54
|
+
width: { default: '' },
|
|
55
|
+
left: { default: true },
|
|
56
|
+
arrow: { default: true },
|
|
57
|
+
maxCount: { default: 5 },
|
|
58
|
+
minCount: { default: 0 },
|
|
59
|
+
data: { default(): Options { return [] } },
|
|
60
|
+
getter: { default() { return defaultGetter } },
|
|
61
|
+
checked: { default() { return [] as any[] } },
|
|
62
|
+
expand: { default() { return [] as any[] } },
|
|
63
|
+
visible: { default() { return (item: Option) => { return true as boolean } } },
|
|
64
|
+
forcedPrompt: { default: false },
|
|
65
|
+
addable: { default: false },
|
|
66
|
+
removable: { default: false },
|
|
67
|
+
editable: { default: false },
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
const emit = defineEmits(['click', 'mouseenter', 'mouseleave', 'add', 'remove', 'edit'])
|
|
71
|
+
|
|
72
|
+
const state = ref({
|
|
73
|
+
currentEditIndex: -1,
|
|
74
|
+
currentEditValue: '',
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
const options = computed(() => {
|
|
78
|
+
const options: Options = []
|
|
79
|
+
|
|
80
|
+
for (const item of props.data) {
|
|
81
|
+
if (props.visible(item) === true) options.push(item)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return options
|
|
85
|
+
})
|
|
86
|
+
const style = computed(() => {
|
|
87
|
+
let style = props.width ? `width:${props.width};` : ''
|
|
88
|
+
|
|
89
|
+
const padding = Theme.config.optionsScrollMargin.value * 2 + Theme.config.borderSize.value * 2 - Theme.config.optionMargin.value;
|
|
90
|
+
|
|
91
|
+
const heightUnit = Theme.config.optionMargin.value + Theme.config.inputHeight.value
|
|
92
|
+
|
|
93
|
+
style += `min-height:${props.minCount * heightUnit + padding}px;`;
|
|
94
|
+
|
|
95
|
+
if (props.data.length > props.maxCount) style += `height:${props.maxCount * heightUnit + padding}px;`
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
return style
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
const arrow = (item: Option) => {
|
|
102
|
+
if (props.arrow === false) return false
|
|
103
|
+
|
|
104
|
+
const children = props.getter.children(item)
|
|
105
|
+
return children.length > 0
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const startEdit = (index: number, item: Option) => {
|
|
109
|
+
state.value.currentEditIndex = index
|
|
110
|
+
state.value.currentEditValue = props.getter.label(item)
|
|
111
|
+
}
|
|
112
|
+
const stopEdit = () => {
|
|
113
|
+
state.value.currentEditIndex = -1
|
|
114
|
+
state.value.currentEditValue = ''
|
|
115
|
+
}
|
|
116
|
+
const finishEdit = () => {
|
|
117
|
+
emit('edit', state.value.currentEditIndex, state.value.currentEditValue)
|
|
118
|
+
stopEdit()
|
|
119
|
+
}
|
|
120
|
+
</script>
|
|
121
|
+
|
|
122
|
+
<style lang="less" scoped>
|
|
123
|
+
@import '../theme/global.less';
|
|
124
|
+
|
|
125
|
+
.vyr-options {
|
|
126
|
+
.vyr-font-family;
|
|
127
|
+
width: 100%;
|
|
128
|
+
height: auto;
|
|
129
|
+
color: var(--vyr-font-color);
|
|
130
|
+
font-size: var(--vyr-font-size);
|
|
131
|
+
background-color: var(--vyr-options-background-color);
|
|
132
|
+
overflow-x: hidden;
|
|
133
|
+
overflow-y: hidden;
|
|
134
|
+
border: var(--vyr-border-size) solid var(--vyr-options-border-color);
|
|
135
|
+
border-radius: var(--vyr-radius-size);
|
|
136
|
+
box-sizing: border-box;
|
|
137
|
+
|
|
138
|
+
:deep(.vyr-option) {
|
|
139
|
+
margin-bottom: var(--vyr-option-margin);
|
|
140
|
+
|
|
141
|
+
&:last-child {
|
|
142
|
+
margin-bottom: 0;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.custom-option {
|
|
147
|
+
padding-left: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.custom-option:hover {
|
|
151
|
+
background-color: rgba(0, 0, 0, 0);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
.custom-add {
|
|
156
|
+
width: 100%;
|
|
157
|
+
text-align: center;
|
|
158
|
+
|
|
159
|
+
.vyr-add {
|
|
160
|
+
font-size: 14px;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.custom-wrapper {
|
|
165
|
+
width: 45px;
|
|
166
|
+
padding: 0 0 0 8px;
|
|
167
|
+
box-sizing: border-box;
|
|
168
|
+
display: flex;
|
|
169
|
+
flex-wrap: nowrap;
|
|
170
|
+
flex-direction: row;
|
|
171
|
+
justify-content: space-between;
|
|
172
|
+
align-items: center;
|
|
173
|
+
align-content: center;
|
|
174
|
+
|
|
175
|
+
&:has(> :only-child) {
|
|
176
|
+
justify-content: flex-end;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.vyr-bianji {
|
|
181
|
+
font-size: 18px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.vyr-remove,
|
|
185
|
+
.vyr-bianji,
|
|
186
|
+
.custom-wrapper .vyr-queren,
|
|
187
|
+
.custom-wrapper .vyr-quxiao {
|
|
188
|
+
cursor: pointer;
|
|
189
|
+
color: var(--vyr-helper-color);
|
|
190
|
+
transition: all var(--vyr-animation-time);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.vyr-remove:hover,
|
|
194
|
+
.vyr-bianji:hover,
|
|
195
|
+
.vyr-option.active .vyr-remove,
|
|
196
|
+
.vyr-option.active .vyr-bianji,
|
|
197
|
+
.custom-wrapper .vyr-queren:hover,
|
|
198
|
+
.custom-wrapper .vyr-quxiao:hover {
|
|
199
|
+
color: var(--vyr-white-color);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
</style>
|