aiCopilot样式提交
This commit is contained in:
2
.env.ai
Normal file
2
.env.ai
Normal file
@@ -0,0 +1,2 @@
|
||||
VUE_APP_SCOPE=ai
|
||||
VUE_APP_API=http://192.168.1.87:9000
|
||||
@@ -22,6 +22,11 @@ export default {
|
||||
project: require.context('../../project/fengdu', true, /\.(\/.+)\/App[A-Z][^\/]+\.vue$/, 'lazy')
|
||||
}
|
||||
break
|
||||
case 'ai':
|
||||
this.esm = {
|
||||
project: require.context('../../project/ai', true, /\.(\/.+)\/App[A-Z][^\/]+\.vue$/, 'lazy')
|
||||
}
|
||||
break
|
||||
default:
|
||||
this.esm = {
|
||||
packages: require.context('../../packages/', true, /\.(\/.+)\/App[A-Z][^\/]+\.vue$/, 'lazy'),
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve examples/main.js",
|
||||
"build": "vue-cli-service build",
|
||||
"dev:ai": "vue-cli-service serve examples/main.js --mode ai",
|
||||
"dev:dv": "vue-cli-service serve examples/main.js --mode dv",
|
||||
"dev:fengdu": "vue-cli-service serve examples/main.js --mode fengdu",
|
||||
"lib": "npm publish||(npm unpublish -f&&npm publish)",
|
||||
|
||||
16
project/ai/AppCopilot/AppCopilot.vue
Normal file
16
project/ai/AppCopilot/AppCopilot.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "AppCopilot",
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="AppCopilot">
|
||||
<ai-copilot/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
107
ui/packages/ai/AiCopilot.vue
Normal file
107
ui/packages/ai/AiCopilot.vue
Normal file
@@ -0,0 +1,107 @@
|
||||
<script>
|
||||
export default {
|
||||
name: "AiCopilot",
|
||||
props: {
|
||||
title: {default: "Copilot小助理"}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
expand: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
expandBtn: v => v.expand ? "收起" : "展开"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="AiCopilot">
|
||||
<div class="copilot" v-if="show">
|
||||
<div class="flex header">
|
||||
<b class="fill" v-text="title"/>
|
||||
<div class="expandBtn" v-text="expandBtn" @click="expand=!expand"/>
|
||||
<div class="minimal" v-text="'最小化'" @click="show=false"/>
|
||||
</div>
|
||||
<div class="flex content">
|
||||
<div class="left" :class="{expand}"></div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
</div>
|
||||
<img class="icon" src="https://cdn.sinoecare.com/i/2024/06/04/665ec6f5ef213.png" @click="show=true"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.AiCopilot {
|
||||
position: fixed;
|
||||
right: 20px;
|
||||
bottom: 48px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 18px;
|
||||
|
||||
.copilot {
|
||||
border-radius: 0 0 8px 8px;
|
||||
height: 600px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 20px 1px #0a255c1a;
|
||||
|
||||
.header {
|
||||
height: 48px;
|
||||
background-image: linear-gradient(90deg, #3577FD 0%, #216AFD 100%);
|
||||
box-shadow: 0 2px 6px 0 #0a255c14;
|
||||
border-radius: 8px 8px 0 0;
|
||||
padding: 0 8px 0 14px;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
gap: 14px;
|
||||
|
||||
& > b {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.expandBtn, .minimal {
|
||||
padding-left: 18px;
|
||||
font-weight: normal;
|
||||
background-position: left center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 14px 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.minimal {
|
||||
background-image: url("https://cdn.sinoecare.com/i/2024/06/04/665ed2bd0a79e.png");
|
||||
}
|
||||
|
||||
.expandBtn {
|
||||
background-image: url("https://cdn.sinoecare.com/i/2024/06/04/665ed2bd8b021.png");
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
height: max-content;
|
||||
|
||||
.left {
|
||||
width: 0;
|
||||
transition: width 1s;
|
||||
|
||||
&.expand {
|
||||
width: 332px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
width: 348px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 68px;
|
||||
height: 58px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user