提升scTable和scFilterBar为全局组件
This commit is contained in:
parent
2495db6752
commit
c5b4e23897
12
src/main.js
12
src/main.js
|
|
@ -3,13 +3,15 @@ import locale from 'element-plus/lib/locale/lang/zh-cn'
|
||||||
import 'element-plus/lib/theme-chalk/index.css'
|
import 'element-plus/lib/theme-chalk/index.css'
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import config from "./config";
|
import config from "./config"
|
||||||
import router from './router'
|
import router from './router'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
import tool from './utils/tool'
|
|
||||||
import http from "./utils/request";
|
|
||||||
import api from './api'
|
import api from './api'
|
||||||
|
import tool from './utils/tool'
|
||||||
|
import http from "./utils/request"
|
||||||
import permission from './utils/permission'
|
import permission from './utils/permission'
|
||||||
|
import scTable from './components/scTable'
|
||||||
|
import scFilterBar from './components/scFilterBar'
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
|
|
@ -22,4 +24,8 @@ app.config.globalProperties.$HAS = permission;
|
||||||
app.use(store);
|
app.use(store);
|
||||||
app.use(router);
|
app.use(router);
|
||||||
app.use(ElementPlus, {size: 'small', zIndex: 3000 ,locale: locale});
|
app.use(ElementPlus, {size: 'small', zIndex: 3000 ,locale: locale});
|
||||||
|
|
||||||
|
app.component('scTable', scTable);
|
||||||
|
app.component('scFilterBar', scFilterBar);
|
||||||
|
|
||||||
app.mount('#app');
|
app.mount('#app');
|
||||||
|
|
|
||||||
|
|
@ -74,13 +74,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import scTable from '@/components/scTable';
|
|
||||||
import Show from './show.vue';
|
import Show from './show.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'list',
|
name: 'list',
|
||||||
components: {
|
components: {
|
||||||
scTable,
|
|
||||||
Show
|
Show
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
||||||
|
|
@ -95,15 +95,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import scTable from '@/components/scTable';
|
|
||||||
import scFilterBar from '@/components/scFilterBar';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'normallist',
|
name: 'normallist',
|
||||||
components: {
|
|
||||||
scTable,
|
|
||||||
scFilterBar
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
search : {
|
search : {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue