Просмотр исходного кода

全局挂载字典标签组件

RuoYi лет назад: 4
Родитель
Сommit
dbf42739ca
3 измененных файлов с 5 добавлено и 12 удалено
  1. 5 2
      ruoyi-ui/src/main.js
  2. 0 5
      ruoyi-ui/src/views/system/dict/data.vue
  3. 0 5
      ruoyi-ui/src/views/system/dict/index.vue

+ 5 - 2
ruoyi-ui/src/main.js

@@ -19,9 +19,11 @@ import { getDicts } from "@/api/system/dict/data";
19
 import { getConfigKey } from "@/api/system/config";
19
 import { getConfigKey } from "@/api/system/config";
20
 import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
20
 import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
21
 import Pagination from "@/components/Pagination";
21
 import Pagination from "@/components/Pagination";
22
-// 自定义表格工具扩展
22
+// 自定义表格工具组件
23
 import RightToolbar from "@/components/RightToolbar"
23
 import RightToolbar from "@/components/RightToolbar"
24
-// 头部标签插件
24
+// 字典标签组件
25
+import DictTag from '@/components/DictTag'
26
+// 头部标签组件
25
 import VueMeta from 'vue-meta'
27
 import VueMeta from 'vue-meta'
26
 
28
 
27
 // 全局方法挂载
29
 // 全局方法挂载
@@ -48,6 +50,7 @@ Vue.prototype.msgInfo = function (msg) {
48
 }
50
 }
49
 
51
 
50
 // 全局组件挂载
52
 // 全局组件挂载
53
+Vue.component('DictTag', DictTag)
51
 Vue.component('Pagination', Pagination)
54
 Vue.component('Pagination', Pagination)
52
 Vue.component('RightToolbar', RightToolbar)
55
 Vue.component('RightToolbar', RightToolbar)
53
 
56
 

+ 0 - 5
ruoyi-ui/src/views/system/dict/data.vue

@@ -184,14 +184,9 @@
184
 <script>
184
 <script>
185
 import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
185
 import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
186
 import { listType, getType } from "@/api/system/dict/type";
186
 import { listType, getType } from "@/api/system/dict/type";
187
-// 字典标签组件(使用频繁可在全局挂载)
188
-import DictTag from '@/components/DictTag'
189
 
187
 
190
 export default {
188
 export default {
191
   name: "Data",
189
   name: "Data",
192
-  components: {
193
-    DictTag
194
-  },
195
   data() {
190
   data() {
196
     return {
191
     return {
197
       // 遮罩层
192
       // 遮罩层

+ 0 - 5
ruoyi-ui/src/views/system/dict/index.vue

@@ -193,14 +193,9 @@
193
 
193
 
194
 <script>
194
 <script>
195
 import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
195
 import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
196
-// 字典标签组件(使用频繁可在全局挂载)
197
-import DictTag from '@/components/DictTag'
198
 
196
 
199
 export default {
197
 export default {
200
   name: "Dict",
198
   name: "Dict",
201
-  components: {
202
-    DictTag
203
-  },
204
   data() {
199
   data() {
205
     return {
200
     return {
206
       // 遮罩层
201
       // 遮罩层