daily tag

This commit is contained in:
下羊 2020-03-13 09:48:37 +08:00
parent 3c44a68ccb
commit 2c013dbfc5
4 changed files with 15 additions and 12 deletions

View File

@ -1,8 +1,8 @@
const { eslint, deepmerge } = require('@ice/spec'); const { tslint, deepmerge } = require('@ice/spec');
module.exports = deepmerge(eslint, { module.exports = deepmerge(tslint, {
rules: { rules: {
"global-require": 0, "global-require": 0,
"interface-name" : [true, "never-prefix"] "@typescript-eslint/interface-name-prefix": 0
}, },
}); });

View File

@ -12,7 +12,7 @@ module.exports = {
}, },
plugins: [ plugins: [
['ice-plugin-fusion', { ['ice-plugin-fusion', {
themePackage: '@alife/theme-lowcode-light', themePackage: '@alife/theme-lowcode-dark',
}], }],
['ice-plugin-moment-locales', { ['ice-plugin-moment-locales', {
locales: ['zh-cn'], locales: ['zh-cn'],

View File

@ -9,7 +9,7 @@ export interface EditorConfig {
shortCuts?: ShortCutsConfig; shortCuts?: ShortCutsConfig;
utils?: UtilsConfig; utils?: UtilsConfig;
constants?: ConstantsConfig; constants?: ConstantsConfig;
lifeCycles?: lifeCyclesConfig; lifeCycles?: LifeCyclesConfig;
i18n?: I18nConfig; i18n?: I18nConfig;
} }
@ -38,7 +38,7 @@ export interface ThemeConfig {
} }
export interface PluginsConfig { export interface PluginsConfig {
[propName: string]: Array<PluginConfig>; [propName: string]: PluginConfig[];
} }
export interface PluginConfig { export interface PluginConfig {
@ -63,7 +63,7 @@ export interface PluginConfig {
pluginProps?: object; pluginProps?: object;
} }
export type HooksConfig = Array<HookConfig>; export type HooksConfig = HookConfig[];
export interface HookConfig { export interface HookConfig {
message: string; message: string;
@ -71,14 +71,14 @@ export interface HookConfig {
handler: (editor: Editor, ...args) => void; handler: (editor: Editor, ...args) => void;
} }
export type ShortCutsConfig = Array<ShortCutConfig>; export type ShortCutsConfig = ShortCutConfig[];
export interface ShortCutConfig { export interface ShortCutConfig {
keyboard: string; keyboard: string;
handler: (editor: Editor, ev: React.KeyboardEventHandler<HTMLElement>, keymaster: any) => void; handler: (editor: Editor, ev: React.KeyboardEventHandler<HTMLElement>, keymaster: any) => void;
} }
export type UtilsConfig = Array<UtilConfig>; export type UtilsConfig = UtilConfig[];
export interface UtilConfig { export interface UtilConfig {
name: string; name: string;
@ -88,7 +88,7 @@ export interface UtilConfig {
export type ConstantsConfig = object; export type ConstantsConfig = object;
export interface lifeCyclesConfig { export interface LifeCyclesConfig {
init?: (editor: Editor) => any; init?: (editor: Editor) => any;
destroy?: (editor: Editor) => any; destroy?: (editor: Editor) => any;
} }
@ -114,7 +114,7 @@ export interface Utils {
export interface PluginClass extends React.ComponentClass<{ export interface PluginClass extends React.ComponentClass<{
editor: Editor; editor: Editor;
[key: string]: any [key: string]: any;
}> { }> {
init?: (editor: Editor) => void; init?: (editor: Editor) => void;
open?: () => any; open?: () => any;
@ -133,3 +133,4 @@ export interface PluginStatus {
locked?: boolean; locked?: boolean;
}; };
} }

View File

@ -20,6 +20,8 @@ window.__newFunc = funContext => {
return new Function(funContext); return new Function(funContext);
}; };
// 关闭浏览器前提醒,只有产生过交互才会生效 // 关闭浏览器前提醒,只有产生过交互才会生效
window.onbeforeunload = function(e) { window.onbeforeunload = function(e) {
e = e || window.event; e = e || window.event;