整合大屏编辑页面
This commit is contained in:
15
ruoyi-ui/src/components/index.js
Normal file
15
ruoyi-ui/src/components/index.js
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* 自定义组件参考文档
|
||||
* https://cn.vuejs.org/v2/guide/components-registration.html
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import Test from './test/';
|
||||
import My from './my/';
|
||||
|
||||
const list = [
|
||||
Test,My
|
||||
]
|
||||
//循环注册组件
|
||||
list.forEach(ele => {
|
||||
Vue.component(`avue-echart-${ele.name}`, ele)
|
||||
})
|
31
ruoyi-ui/src/components/my/index.vue
Normal file
31
ruoyi-ui/src/components/my/index.vue
Normal file
@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<div :style="{fontSize:fontSize,color:'#fff',border:'1px solid #fff',borderRadius:'20px'}">
|
||||
|
||||
<h2>自定义组件</h2>
|
||||
<h3>我是参数:{{getContent}}</h3>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { dicOption } from '@/option/config'
|
||||
export default {
|
||||
name: 'my',
|
||||
props: {
|
||||
option: Object,
|
||||
component: Object
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
dicOption: dicOption
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
fontSize () {
|
||||
return (this.option.fontSize || 30) + 'px'
|
||||
},
|
||||
getContent () {
|
||||
return this.option.data;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
20
ruoyi-ui/src/components/my/option.vue
Normal file
20
ruoyi-ui/src/components/my/option.vue
Normal file
@ -0,0 +1,20 @@
|
||||
<!-- 自定义配置 -->
|
||||
<template>
|
||||
<div>
|
||||
<el-form-item label="字体大小">
|
||||
<avue-input-number v-model="main.activeOption.fontSize"></avue-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="文本内容">
|
||||
<avue-input v-model="main.activeObj.data.value"></avue-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
inject: ["main"]
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
BIN
ruoyi-ui/src/components/test/img/greek.png
Normal file
BIN
ruoyi-ui/src/components/test/img/greek.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
8
ruoyi-ui/src/components/test/img/greek.svg
Normal file
8
ruoyi-ui/src/components/test/img/greek.svg
Normal file
@ -0,0 +1,8 @@
|
||||
<svg width="200" xmlns="http://www.w3.org/2000/svg" height="200" viewBox="0 0 16.271 15.656" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 16.271 15.656" style="width: 1em; height: 1em; vertical-align: middle; fill: currentcolor; overflow: hidden; font-size: 200px;">
|
||||
<path d="m2.842,13.67c.176,0 .318-.142 .318-.316v-5.455c0-.174-.143-.316-.318-.316h-1.215c-.177,0-.318,.143-.318,.316v5.455c0,.175 .142,.316 .318,.316h1.215z" fill="#ff1222"></path>
|
||||
<path d="m15.762,14.201h-15.254c-.174,0-.317,.142-.317,.316v.822c0,.176 .144,.317 .317,.317h15.254c.176,0 .316-.142 .316-.317v-.822c0-.175-.14-.316-.316-.316z" fill="#ff1222"></path>
|
||||
<path d="m6.777,13.67c.174,0 .316-.142 .316-.316v-5.455c0-.174-.143-.316-.316-.316h-1.217c-.174,0-.315,.143-.315,.316v5.455c0,.175 .142,.316 .315,.316h1.217z" fill="#ff1222"></path>
|
||||
<path d="m14.646,13.67c.174,0 .317-.142 .317-.316v-5.455c0-.174-.144-.316-.317-.316h-1.218c-.175,0-.316,.143-.316,.316v5.455c0,.175 .142,.316 .316,.316h1.218z" fill="#ff1222"></path>
|
||||
<path d="m15.858,5.798l-6.502-5.381c-.672-.555-1.77-.555-2.441,0l-6.5,5.381c-.674,.558-.509,1.012 .363,1.012h14.717c.87,0 1.034-.454 .363-1.012zm-7.723-.298c-.682,0-1.234-.554-1.234-1.235 0-.681 .553-1.233 1.234-1.233 .684,0 1.234,.552 1.234,1.233 0,.681-.55,1.235-1.234,1.235z" fill="#ff1222"></path>
|
||||
<path d="m10.71,13.67c.176,0 .317-.142 .317-.316v-5.455c0-.174-.142-.316-.317-.316h-1.216c-.176,0-.317,.143-.317,.316v5.455c0,.175 .142,.316 .317,.316h1.216z" fill="#ff1222"></path>
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
44
ruoyi-ui/src/components/test/img/node.svg
Normal file
44
ruoyi-ui/src/components/test/img/node.svg
Normal file
@ -0,0 +1,44 @@
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200" height="200" viewBox="0 0 40 40" style="width: 1em; height: 1em; vertical-align: middle; fill: currentcolor; overflow: hidden; font-size: 200px;" xml:space="preserve">
|
||||
<g id="_x34_27._Network">
|
||||
<g>
|
||||
<path d="M34,26c3.313,0,6-2.687,6-6c0-3.314-2.687-6.001-6-6.001c-2.612,0-4.827,1.672-5.651,4.001H17.463l12.74-7.355
|
||||
C31.237,11.491,32.559,12,34,12c3.313,0,6-2.687,6-6c0-3.314-2.687-6-6-6c-3.314,0-6,2.686-6,6c0,0.42,0.044,0.829,0.126,1.225
|
||||
l-16.944,9.783C10.146,15.214,8.22,14,6,14c-3.313,0-6,2.686-6,6c0,3.313,2.687,6,6,6c2.221,0,4.146-1.215,5.182-3.009
|
||||
l16.944,9.783C28.044,33.17,28,33.58,28,34c0,3.312,2.686,6,6,6c3.313,0,6-2.688,6-6c0-3.314-2.687-6-6-6
|
||||
c-1.441,0-2.763,0.509-3.797,1.354L17.465,22h10.884C29.173,24.329,31.388,26,34,26z M34,18c1.104,0,2,0.895,2,2
|
||||
c0,1.104-0.896,2-2,2s-2-0.896-2-2C32,18.895,32.896,18,34,18z M34,4c1.104,0,2,0.895,2,2c0,1.104-0.896,2-2,2s-2-0.896-2-2
|
||||
C32,4.895,32.896,4,34,4z M6,22c-1.104,0-2-0.896-2-2c0-1.105,0.896-2,2-2s2,0.895,2,2C8,21.104,7.104,22,6,22z M34,32
|
||||
c1.104,0,2,0.895,2,2c0,1.104-0.896,2-2,2s-2-0.896-2-2C32,32.895,32.896,32,34,32z" fill="#4ec45a"></path>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
1065
ruoyi-ui/src/components/test/index.vue
Normal file
1065
ruoyi-ui/src/components/test/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
21
ruoyi-ui/src/components/test/option.vue
Normal file
21
ruoyi-ui/src/components/test/option.vue
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- 自定义配置 -->
|
||||
<template>
|
||||
<div>
|
||||
<el-form-item label="字体大小">
|
||||
<avue-input-number v-model="main.activeOption.fontSize"></avue-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="文本内容">
|
||||
<avue-input v-model="main.activeOption.value"></avue-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
inject: ["main"]
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
Reference in New Issue
Block a user