|
@@ -35,6 +35,11 @@ export interface ConfigOption {
|
|
|
* 获取拼音首字母的函数
|
|
|
*/
|
|
|
pinyinFunction: (py: string) => string
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Scope onload 时扩展方法
|
|
|
+ */
|
|
|
+ scopeOnLoad: (scope:any)=> void
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -49,6 +54,8 @@ export const ajax: {
|
|
|
*/
|
|
|
let pinyinFunc: Function = (str) => (str)
|
|
|
|
|
|
+export let scopeOnLoad : (scope:any)=>void = null
|
|
|
+
|
|
|
export const baseConfigProcessList: ConfigProcess[] = []
|
|
|
|
|
|
/**
|
|
@@ -104,6 +111,10 @@ export function extend(option: Partial<ConfigOption>) {
|
|
|
pinyinFunc = option.pinyinFunction
|
|
|
}
|
|
|
|
|
|
+ if (option.scopeOnLoad) {
|
|
|
+ scopeOnLoad = option.scopeOnLoad
|
|
|
+ }
|
|
|
+
|
|
|
if (typeof option.designMode !== 'undefined') {
|
|
|
setDesignMode(option.designMode)
|
|
|
}
|