From 1788c96aea9247cc36ef8b82734997f1a6a92fb4 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 23 八月 2024 11:07:42 +0800 Subject: [PATCH] 新增新版本。静安区特供版 --- src/components/map/MapToolbox.vue | 73 +++++++++++++++++++----------------- 1 files changed, 39 insertions(+), 34 deletions(-) diff --git a/src/components/map/MapToolbox.vue b/src/components/map/MapToolbox.vue index 9a2e67a..39f98c7 100644 --- a/src/components/map/MapToolbox.vue +++ b/src/components/map/MapToolbox.vue @@ -1,17 +1,28 @@ <template> <el-dropdown - class="fy-container dropdown-wrap" + class="p-events-auto" trigger="click" size="small" @command="handleCommand" > <el-button type="primary" class="el-button-custom"> - 鍦板浘宸ュ叿绠�<el-icon class="el-icon--right"><arrow-down /></el-icon> + <el-icon class="el-icon--left"><TakeawayBox /></el-icon> + 鍦板浘宸ュ叿绠� + <el-icon class="el-icon--right"><arrow-down /></el-icon> </el-button> <template #dropdown> <el-dropdown-menu> - <el-dropdown-item v-for="(item, index) in toolItem" :key="index" :command="index"> - <el-button :type="item.value ? 'primary' : 'info'" plain size="default"> + <el-dropdown-item + v-for="(item, index) in toolItem" + :key="item.label" + :command="index" + > + <el-button + :type="item.value ? 'primary' : 'info'" + plain + size="default" + > + <font-awesome-icon :icon="item.icon" class="m-r-4" /> {{ item.label + ': ' + (item.value ? '寮�' : '鍏�') }} </el-button> </el-dropdown-item> @@ -21,12 +32,13 @@ </template> <script> -import toolbox from '../../utils/map/toolbox'; +import toolbox from '@/utils/map/toolbox'; export default { data() { return { toolItem: [ { + icon: 'fa fa-map-signs', label: '鍦扮墿鏍囨敞', value: false, click: function () { @@ -35,6 +47,7 @@ } }, { + icon: 'fa fa-globe', label: '鍗槦鍦板浘', value: true, click: function () { @@ -43,6 +56,7 @@ } }, { + icon: 'fa fa-compass', label: '鎺у埗缃楃洏', value: true, click: function () { @@ -51,26 +65,32 @@ } }, { + icon: 'fa fa-compass', label: '鍧愭爣鎷惧彇', value: false, click: function () { this.value = !this.value; - } - }, - { - label: '鏁版嵁鏍囪', - value: true, - click: function () { - this.value = !this.value; - } - }, - { - label: '鏁版嵁寮规', - value: true, - click: function () { - this.value = !this.value; + toolbox.toggleCoorPicking(this.value); } } + // { + // icon: 'fa fa-compass', + // label: '鏁版嵁鏍囪', + // value: true, + // click: function () { + // this.value = !this.value; + // // todo 鏁版嵁鏍囪 + // } + // }, + // { + // icon: 'fa fa-compass', + // label: '鏁版嵁寮规', + // value: true, + // click: function () { + // this.value = !this.value; + // // todo 鏁版嵁寮规 + // } + // } ] }; }, @@ -83,21 +103,6 @@ </script> <style scoped> -.dropdown-wrap { -} - -.el-button-custom { - --el-button-bg-color: var(--bg-color); - --el-button-hover-text-color: var(--select_color); - --el-button-hover-bg-color: var(--bg-color); - --el-button-border-color: var(--font-color); - --el-button-active-border-color: transparent; -} - -.el-button-custom:focus-visible { - outline: 0px solid var(--el-button-outline-color); -} - .el-button { margin: initial !important; } -- Gitblit v1.9.3