CN-268 feat: panel重构
This commit is contained in:
36
src/components/common/Loading.vue
Normal file
36
src/components/common/Loading.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<div class="chart__loading" v-show="showLoading">
|
||||
<i class="el-icon-loading"></i>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'loading',
|
||||
props: {
|
||||
loading: Boolean
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
showLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
startLoading () {
|
||||
this.showLoading = true
|
||||
},
|
||||
endLoading () {
|
||||
this.showLoading = false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
loading: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler (n) {
|
||||
this.showLoading = n
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -5,6 +5,8 @@
|
||||
<cn-header></cn-header>
|
||||
<cn-container v-if="containerShow" ref="container"></cn-container>
|
||||
</main>
|
||||
<!-- 临时文本dom,用来计算文本长度 -->
|
||||
<span class="temp-dom"></span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import rightBoxMixin from '@/mixins/rightBox'
|
||||
import rightBoxMixin from '@/mixins/right-box'
|
||||
import { get, post, put } from '@/utils/http'
|
||||
import { panelTypeAndRouteMapping } from '@/utils/constants'
|
||||
import { api } from '@/utils/api'
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import rightBoxMixin from '@/mixins/rightBox'
|
||||
import rightBoxMixin from '@/mixins/right-box'
|
||||
import { api } from '@/utils/api'
|
||||
import { VAceEditor } from 'vue3-ace-editor'
|
||||
import 'ace-builds/src-noconflict/mode-javascript'
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import rightBoxMixin from '@/mixins/rightBox'
|
||||
import rightBoxMixin from '@/mixins/right-box'
|
||||
import { get, post, put } from '@/utils/http'
|
||||
export default {
|
||||
name: 'I18nBox',
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import rightBoxMixin from '@/mixins/rightBox'
|
||||
import rightBoxMixin from '@/mixins/right-box'
|
||||
import { get, post, put } from '@/utils/http'
|
||||
export default {
|
||||
name: 'userBox',
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
<el-switch
|
||||
id="account-input-status"
|
||||
v-model="editObject.status"
|
||||
:active-color="theme.themeColor"
|
||||
:disabled="(editObject.username === loginName) || (editObject.username==='admin' && editObject.id==1)"
|
||||
:active-value="1"
|
||||
:inactive-value="0">
|
||||
@@ -85,7 +84,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import rightBoxMixin from '@/mixins/rightBox'
|
||||
import rightBoxMixin from '@/mixins/right-box'
|
||||
import { get, post, put } from '@/utils/http'
|
||||
export default {
|
||||
name: 'UserBox',
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
<el-switch
|
||||
v-if="scope.row.id"
|
||||
v-model="scope.row.status"
|
||||
:active-color="theme.themeColor"
|
||||
active-value="1"
|
||||
:disabled="(scope.row.username === loginName) || (scope.row.username==='admin' && scope.row.id==1) "
|
||||
inactive-value="0"
|
||||
|
||||
Reference in New Issue
Block a user