|
1
|
<template>
|
nebv
authored
|
2
|
<div @click="openDrawer" class="setting-button">
|
vben
authored
|
3
|
<SettingOutlined />
|
|
4
5
6
7
8
9
10
11
12
|
<SettingDrawer @register="register" />
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { SettingOutlined } from '@ant-design/icons-vue';
import SettingDrawer from './SettingDrawer';
import { useDrawer } from '/@/components/Drawer';
|
vben
authored
|
13
|
|
|
14
15
16
17
18
19
20
21
22
23
24
25
|
export default defineComponent({
name: 'SettingBtn',
components: { SettingOutlined, SettingDrawer },
setup() {
const [register, { openDrawer }] = useDrawer();
return {
register,
openDrawer,
};
},
});
</script>
|
vben
authored
|
26
|
<style lang="less">
|
nebv
authored
|
27
|
@import (reference) '../../../design/index.less';
|
vben
authored
|
28
|
@import './index.less';
|
nebv
authored
|
29
30
31
|
.setting-button {
position: absolute;
|
vben
authored
|
32
33
|
top: 45%;
right: 0;
|
nebv
authored
|
34
35
|
z-index: 10;
display: flex;
|
vben
authored
|
36
|
padding: 10px;
|
nebv
authored
|
37
38
39
|
color: @white;
cursor: pointer;
background: @primary-color;
|
vben
authored
|
40
|
border-radius: 6px 0 0 6px;
|
nebv
authored
|
41
42
|
justify-content: center;
align-items: center;
|
vben
authored
|
43
44
45
46
47
|
svg {
width: 1em;
height: 1em;
}
|
nebv
authored
|
48
49
|
}
</style>
|