Skip to content

Releases: uiwjs/uiw-admin

v5.2.3

29 Jan 02:14
Compare
Choose a tag to compare

v5.2.2...v5.2.3


修复 models 类型方式 引入 createModel 进行处理

BasicLayout

import React from 'react'
+ import BasicLayout, { useLayouts } from '@uiw-admin/basic-layouts'


+ const layouts = useLayouts()
- const baseRef = useRef()

const basicLayoutProps = {
menus: [
{
  title: '欢迎来到uiw',
  icon: 'smile',
+ onClick: () => layouts.closeMenu(),
- onClick: () => baseRef.closeMenu(),
}]}

+ <BasicLayout layouts={layouts} />
- <BasicLayout ref={baseRef}  />

ProForm

+import { useForm } from '@uiw-admin/components'
-import { useRef } from 'react'

function Demo() {
+ const form = useForm()
- const baseRef = useRef()

return (
<div>
+ <ProForm form={form} />
- <ProForm submitRef={baseRef} />

+<button onClick={()=>form.submitvalidate()}>保存</button>
-<button onClick={()=>baseRef?.current?.click()}>保存</button>
</div>
)}

v5.2.2

28 Jan 03:19
Compare
Choose a tag to compare

v5.2.1...v5.2.2

v5.2.1

27 Jan 02:50
Compare
Choose a tag to compare

v5.2.0...v5.2.1

v5.2.0

27 Jan 01:56
Compare
Choose a tag to compare

v5.1.2-alpha.1...v5.2.0

v5.1.2-alpha.1

26 Jan 00:33
Compare
Choose a tag to compare

v5.1.2-alpha.0...v5.1.2-alpha.1

v5.1.2

26 Jan 09:22
Compare
Choose a tag to compare

v5.1.2-alpha.1...v5.1.2

v5.1.2-alpha.0

25 Jan 22:32
Compare
Choose a tag to compare

v5.1.1...v5.1.2-alpha.0


修复 models 类型方式 引入 createModel 进行处理

+ import { RootModel } from '@uiw-admin/models'
+ import { createModel } from '@rematch/core'

- export interface GlobalState {
-   test: string
-   [s: string]: any
- }

const global = 
+ createModel<RootModel>()(
{
  name: 'global',

-  state: {
-   test: '测试全局State',
-  } as GlobalState,
+ state: {
+   test: '测试全局State',
+  },

-  reducers: {
-    updateState: (state: GlobalState, payload: GlobalState) => ({
-      ...state,
-      ...payload,
-    }),
-  },
+  reducers: {
+    updateState: (state, payload) => ({
+      ...state,
+      ...payload,
+    }),
+  },

  effects: (dispatch) => ({
    async verify() {
      const dph = dispatch
      dph.global.updateState({ test: '测试2' })
    },
  }),
}
+)
export default global

v5.1.1

25 Jan 08:29
Compare
Choose a tag to compare

v5.1.0...v5.1.1

v5.1.0

25 Jan 03:13
Compare
Choose a tag to compare

v5.0.11...v5.1.0


5.1.0

  • @uiw-admin/components
    • 🌟 PromForm:增加customWidgetsList prop配置自定义组件
  • @uiw-admin/plugins
    • 🌟 删除widgets插件

// 删除widgets插件 ,  在 .kktrc.ts 文件修改

import {
  RematchWebpackPlugin, 
- WidgetsWebpackPlugin,
  RoutesWebpackPlugin
} from '@uiw-admin/plugins'

export default defaultConfig({
  define: {
    VERSION: JSON.stringify(pkg.version)
    // BASE_NAME: "/uiw"
  },
  plugins: [
    new RematchWebpackPlugin(),
-   new WidgetsWebpackPlugin(),
    new RoutesWebpackPlugin()
  ],
  // publicPath: process.env.NODE_ENV === "development" ? "/" : "/uiw/",
  loader: [
    rawModules,
    {
      loader: scopePluginOptions,
      options: { allowedFiles: [path.resolve(process.cwd(), 'README.md')] }
    },
    lessModules
  ]
})

v5.0.11

24 Jan 12:49
Compare
Choose a tag to compare

v5.0.10...v5.0.11