|
@@ -1,4 +1,4 @@
|
|
-import {VJsonProcess} from "../types";
|
|
|
|
|
|
+import {ConfigProcess} from "../types";
|
|
import {ApiFunction} from "./ajax";
|
|
import {ApiFunction} from "./ajax";
|
|
import _ from 'lodash'
|
|
import _ from 'lodash'
|
|
|
|
|
|
@@ -49,14 +49,15 @@ export const ajax: {
|
|
*/
|
|
*/
|
|
let pinyinFunc: Function
|
|
let pinyinFunc: Function
|
|
|
|
|
|
-export const vjsonProcessChain: VJsonProcess[] = []
|
|
|
|
|
|
+export const baseConfigProcessList: ConfigProcess[] = []
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 添加一个 VJson 的处理过程
|
|
|
|
- * @param func VJson 处理函数
|
|
|
|
|
|
+ * 在基类添加 Config 的处理方法
|
|
*/
|
|
*/
|
|
-export function pushVJsonProcess(func: VJsonProcess) {
|
|
|
|
- vjsonProcessChain.push(func)
|
|
|
|
|
|
+export function baseConfigProcess(option?: any) {
|
|
|
|
+ return (target, propertyKey) => {
|
|
|
|
+ baseConfigProcessList.push(target[propertyKey])
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
let designMode: boolean = false
|
|
let designMode: boolean = false
|
|
@@ -107,14 +108,3 @@ export function extend(option: Partial<ConfigOption>) {
|
|
setDesignMode(option.designMode)
|
|
setDesignMode(option.designMode)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-/**
|
|
|
|
- * 任意组件 Ext.Component 构造时调用的方法, 可以用来在渲染之前加工处理 VJSON
|
|
|
|
- * @param me
|
|
|
|
- * @param config
|
|
|
|
- */
|
|
|
|
-export function componentConfigProcess(me, config) {
|
|
|
|
- _.each(vjsonProcessChain, process => {
|
|
|
|
- process(me, config)
|
|
|
|
- })
|
|
|
|
-}
|
|
|