Skip to content

Commit

Permalink
fix: 修复 fatTableModal width 未生效的问题
Browse files Browse the repository at this point in the history
Change-Id: I311343e3551091a5d68db03ada769cef176647e0
  • Loading branch information
njikm2010 committed Jun 26, 2024
1 parent b9013f3 commit 68d34ad
Show file tree
Hide file tree
Showing 14 changed files with 96 additions and 11 deletions.
6 changes: 6 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @wakeadmin/components

## 1.9.11

### Patch Changes

- fix: 修复 fatTableModal `width` 未生效的问题

## 1.9.10

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wakeadmin/components",
"version": "1.9.10",
"version": "1.9.11",
"description": "wakeadmin 组件库",
"module": "./dist/index.js",
"main": "./dist/common/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ const FatTableModalInner = declareComponent({
// dialog
title: null,
top: String,
width: null,
modal: { type: Boolean, default: true },
modalAppendToBody: { type: Boolean, default: false },
lockScroll: { type: Boolean, default: true },
Expand Down
2 changes: 1 addition & 1 deletion packages/doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@wakeadmin/components": "workspace:1.9.10",
"@wakeadmin/components": "workspace:1.9.11",
"@wakeadmin/icons": "^0.1.5",
"element-plus": "^2.3.6",
"imagemin-cli": "^7.0.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/playground-vite/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# playground-vite

## 0.0.32

### Patch Changes

- Updated dependencies
- @wakeadmin/components@1.9.11

## 0.0.31

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/playground-vite/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "playground-vite",
"private": true,
"version": "0.0.31",
"version": "0.0.32",
"type": "module",
"scripts": {
"dev": "wk-demi-switch 3 && wakeadmin-adapter-switch 3 && vite",
Expand Down
7 changes: 7 additions & 0 deletions packages/playground-vue2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# playground-vue2

## 0.1.109

### Patch Changes

- Updated dependencies
- @wakeadmin/components@1.9.11

## 0.1.108

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/playground-vue2/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.108",
"version": "0.1.109",
"name": "playground-vue2",
"imageName": "wkfe/playground-vue2",
"workload": "wakeadmin-playground-vue2",
Expand All @@ -22,7 +22,7 @@
"typescript": false
},
"dependencies": {
"@wakeadmin/components": "workspace:1.9.10",
"@wakeadmin/components": "workspace:1.9.11",
"@wakeadmin/framework": "^0.1.6",
"@wakeadmin/h": "^0.3.0",
"@wakeadmin/i18n-legacy": "^0.1.7",
Expand Down
8 changes: 8 additions & 0 deletions packages/playground-vue3/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# playground-vue3

## 0.1.109

### Patch Changes

- feat: 新增 fatTableModal
- Updated dependencies
- @wakeadmin/components@1.9.11

## 0.1.108

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/playground-vue3/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.108",
"version": "0.1.109",
"name": "playground-vue3",
"imageName": "wkfe/playground-vue3",
"workload": "wakeadmin-playground-vue3",
Expand All @@ -18,7 +18,7 @@
"publish:docker": "node ./scripts/docker-publish.js"
},
"dependencies": {
"@wakeadmin/components": "workspace:1.9.10",
"@wakeadmin/components": "workspace:1.9.11",
"@wakeadmin/framework": "^0.1.6",
"@wakeadmin/h": "^0.3.0",
"core-js": "^3.30.2",
Expand Down
5 changes: 5 additions & 0 deletions packages/playground-vue3/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ export const routes: RouteRecordRaw[] = [
name: 'drag',
component: () => import('../views/drag.vue'),
},
{
path: '/fat-table-modal',
name: 'FatTableModalPage',
component: () => import('../views/fatTableModal.tsx'),
},
{
path: '/about',
name: 'about',
Expand Down
51 changes: 51 additions & 0 deletions packages/playground-vue3/src/views/fatTableModal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { defineFatTableModal, useFatTableModalRef } from '@wakeadmin/components';
import { ElButton } from 'element-plus';
import { defineComponent } from 'vue';

const TableModal = defineFatTableModal(({ column, props, modelRef }) => {
return () => {
return {
// FIXME 未生效
width: '1400px',
renderToolbar() {
return <span>Toolbar</span>;
},
async request(params) {
return { list: [], total: 0 };
},
columns: [
column({
label: '任务名称',
prop: 'name',
}),
column({
label: '创建时间',
prop: 'createTime',
valueType: 'date',
valueProps: {
type: 'datetime',
valueFormat: 'YYYY-MM-dd HH:mm:ss',
},
}),
column({
label: '操作人',
prop: 'createBy',
width: 140,
}),
],
};
};
});


export default defineComponent({
name: "FatTableModalPage",
setup(){
const modal = useFatTableModalRef();

return () => <div>
<ElButton onClick={() => modal.value.open()}>open</ElButton>
<TableModal ref={modal}></TableModal>
</div>
}
})
2 changes: 1 addition & 1 deletion packages/playground-vue3/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = defineConfig({
pluginOptions: {
...defineMappChild({
mapp: {
activeRule: '/dsp.html',
activeRule: '/dsp-vue3.html',
},
}),
},
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 68d34ad

Please sign in to comment.