Skip to content

Commit

Permalink
Merge branch 'refs/heads/next'
Browse files Browse the repository at this point in the history
  • Loading branch information
think-gem committed Aug 13, 2024
2 parents 78f0b6a + 743ff2e commit 2ab8f95
Show file tree
Hide file tree
Showing 28 changed files with 376 additions and 181 deletions.
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ VITE_PROXY = [["/js","https://vue.jeesite.com/js",true]]
# 是否删除 console 调试信息
VITE_DROP_CONSOLE = false

# 访问接口的根路径(例如:https://vue.jeesite.com)
# 访问接口的根路径(例如:https://vue.jeesite.com)建议为空
VITE_GLOB_API_URL =

# 访问接口的前缀,在根路径之后
Expand Down
2 changes: 1 addition & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ VITE_BUILD_COMPRESS = 'none'
# 是否删除源文件时使用压缩,默认为 false
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false

# 访问接口的根路径(例如:https://vue.jeesite.com)
# 访问接口的根路径(例如:https://vue.jeesite.com)建议为空
VITE_GLOB_API_URL =

# 访问接口的前缀,在根路径之后
Expand Down
4 changes: 2 additions & 2 deletions .env.tomcat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
VITE_PUBLIC_PATH = /vue

# 打包编译发布路径
VITE_OUTPUT_DIR = ../maven/vue-dist-5.8.0/src/main/resources/vue
VITE_OUTPUT_DIR = ../maven/vue-dist-5.8.1/src/main/resources/vue

# 路由模式(true: history、false: hash)
VITE_ROUTE_WEB_HISTORY = true
Expand All @@ -17,7 +17,7 @@ VITE_BUILD_COMPRESS = 'none'
# 是否删除源文件时使用压缩,默认为 false
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false

# 访问接口的根路径(例如:https://vue.jeesite.com)
# 访问接口的根路径(例如:https://vue.jeesite.com)建议为空
VITE_GLOB_API_URL =

# 访问接口的前缀,在根路径之后
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<h3 align="center" style="margin:30px 0 30px;font-weight:bold;font-size:30px;">JeeSite Vue3 前端框架</h3>
<p align="center">
<a href="https://v3.cn.vuejs.org/" target="__blank"><img alt="TypeScript-Vue3" src="https://img.shields.io/badge/TypeScript-Vue3-green.svg"></a>
<a href="https://www.antdv.com/" target="__blank"><img alt="Ant Design Vue-4.1" src="https://img.shields.io/badge/Ant Design Vue-4.1-blue.svg"></a>
<a href="https://www.antdv.com/" target="__blank"><img alt="Ant Design Vue-4.2" src="https://img.shields.io/badge/Ant Design Vue-4.2-blue.svg"></a>
<a href="https://jeesite.com" target="__blank"><img alt="JeeSite-Vue" src="https://img.shields.io/badge/JeeSite-5.8-blue.svg"></a>
<a href="https://gitee.com/thinkgem/jeesite-vue/stargazers" target="__blank"><img alt="star" src="https://gitee.com/thinkgem/jeesite-vue/badge/star.svg?theme=dark"></a>
<a href="https://gitee.com/thinkgem/jeesite-vue/members" target="__blank"><img alt="fork" src="https://gitee.com/thinkgem/jeesite-vue/badge/fork.svg?theme=dark"></a>
Expand Down Expand Up @@ -35,8 +35,10 @@

* 前端源码仓库地址1:<https://gitee.com/thinkgem/jeesite-vue>
* 前端源码仓库地址2:<https://github.com/thinkgem/jeesite-vue>
* 前端源码仓库地址3:<https://gitcode.com/thinkgem/jeesite-vue>
* 后端源码仓库地址1:<https://gitee.com/thinkgem/jeesite5>
* 后端源码仓库地址2:<https://github.com/thinkgem/jeesite5>
* 后端源码仓库地址2:<https://gitcode.com/thinkgem/jeesite5>

## 框架介绍

Expand Down Expand Up @@ -681,6 +683,7 @@ VITE_GLOB_API_URL_PREFIX = /js
4. 高级折叠表单和个性化本地存储
5. 表格个性化设置参数本地存储
6. 租户管理功能、租户切换
7. 消息推送、消息提醒
8. 语言国际化、本地化
9. 更多功能详见文档
7. 动态设置页面字体大小
8. 消息推送、消息提醒
9. 语言国际化、本地化
10. 更多功能详见文档
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jeesite",
"version": "5.8.0",
"version": "5.8.1",
"type": "module",
"scripts": {
"bootstrap": "yarn install",
Expand All @@ -9,7 +9,7 @@
"build": "vite build --mode production",
"build:tomcat": "vite build --mode tomcat --emptyOutDir",
"build:preview": "npm run build && npm run preview:dist",
"build:no-cache": "yarn clean:cache && npm run build",
"build:no-cache": "npm run clean:cache && npm run build",
"preview": "npm run build && npm run preview:dist",
"preview:dist": "vite preview --mode development --port 3100",
"clean:cache": "rimraf node_modules/.cache/; rimraf node_modules/.vite",
Expand All @@ -18,9 +18,9 @@
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
"lint:prettier": "prettier --write \"src/**/*.{json,tsx,less,scss,vue,html,md}\"",
"lint:stylelint": "stylelint \"**/*.{vue,css,less,scss}\" --fix --cache --cache-location node_modules/.cache/stylelint/",
"lint:all": "yarn type:check && yarn lint:eslint && yarn lint:prettier && yarn lint:stylelint",
"reinstall": "rimraf yarn.lock pnpm-lock.yaml package-lock.json node_modules; yarn bootstrap",
"update": "yarn global add npm-check-updates; ncu -u -x codemirror",
"lint:all": "npm run type:check && npm run lint:eslint && npm run lint:prettier && npm run lint:stylelint",
"reinstall": "rimraf yarn.lock pnpm-lock.yaml package-lock.json node_modules; npm run bootstrap",
"update": "npm i npm-check-updates -g --force; ncu -u -x codemirror",
"gen:icon": "esno ./build/generate/icon/index.ts"
},
"dependencies": {
Expand Down
3 changes: 3 additions & 0 deletions src/api/sys/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export const moduleList = (params?: Module | any) =>
export const moduleListData = (params?: Module | any) =>
defHttp.post<Page<Module>>({ url: adminPath + '/sys/module/listData', params });

export const moduleSelectData = (params?: Module | any) =>
defHttp.post<Recordable[]>({ url: adminPath + '/sys/module/selectData', params });

export const moduleForm = (params?: Module | any) =>
defHttp.get<Module>({ url: adminPath + '/sys/module/form', params });

Expand Down
12 changes: 10 additions & 2 deletions src/components/Basic/src/BasicArrow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
* 是否是叶子节点
*/
leaf: { type: Boolean },
/**
* 是否双箭头图标
*/
double: { type: Boolean },
/**
* 是否加载状态
*/
Expand All @@ -45,8 +49,12 @@
const { prefixCls } = useDesign('basic-arrow');

const getIcon = computed(() => {
const { leaf } = props;
return leaf ? 'i-radix-icons:dot' : 'i-ion:chevron-forward';
const { leaf, double } = props;
return leaf
? 'i-radix-icons:dot'
: double
? 'i-ant-design:double-right-outlined'
: 'i-ion:chevron-forward';
});

// get component class
Expand Down
12 changes: 6 additions & 6 deletions src/components/Form/src/BasicForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,12 @@
white-space: nowrap;

.ant-btn {
margin-top: 1px;
padding: 1px 10px;
// line-height: 1.5;
font-size: 13px;
height: 30px;
border-radius: 4px;
padding-left: 12px;
padding-right: 12px;
//margin-top: 1px;
//font-size: 13px;
//height: 30px;
//border-radius: 4px;

&.ant-btn-link {
z-index: 1;
Expand Down
14 changes: 7 additions & 7 deletions src/components/Form/src/components/FormAction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
@click="toggleAdvanced"
v-if="showAdvancedButton && !hideAdvanceBtn"
>
{{ isAdvanced ? t('component.form.putAway') : t('component.form.unfold') }}
<BasicArrow class="ml-1" :expand="!isAdvanced" up />
<!--{{ isAdvanced ? t('component.form.putAway') : t('component.form.unfold') }}-->
<BasicArrow :expand="!isAdvanced" up double />
</Button>
<slot name="advanceAfter"></slot>
</FormItem>
Expand Down Expand Up @@ -75,9 +75,8 @@
actionSpan: propTypes.number.def(6),
isAdvanced: propTypes.bool,
hideAdvanceBtn: propTypes.bool,
baseColProps: {
type: Object as PropType<Partial<ColEx>>,
},
baseColProps: Object as PropType<Partial<ColEx>>,
size: propTypes.string,
};
export default defineComponent({
Expand All @@ -103,8 +102,7 @@
// : {};
const actionColOpt: Partial<ColEx> = {
style: {
paddingLeft: '20px',
paddingRight: '22px',
paddingLeft: '10px',
// showAdvancedButton && !hideAdvanceBtn ? 'right' : 'left',
marginLeft: showAdvancedButton && !hideAdvanceBtn ? 'auto' : 'inherit',
},
Expand All @@ -120,6 +118,7 @@
return Object.assign(
{
text: t('common.resetText'),
size: props.size,
},
props.resetButtonOptions,
);
Expand All @@ -129,6 +128,7 @@
return Object.assign(
{
text: t('common.queryText'),
size: props.size,
},
props.submitButtonOptions,
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Form/src/components/JeeSiteTreeSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

const getAttrs = computed(() => {
let propsData = {
height: 400, // 虚拟滚动
virtual: false,
showSearch: true,
treeNodeFilterProp: 'name',
fieldNames: {
Expand Down
38 changes: 19 additions & 19 deletions src/components/Form/src/hooks/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ export function useForm(props?: Props): UseFormReturnType {
}

const methods: FormActionType = {
scrollToField: async (name: NamePath, options?: ScrollOptions | undefined) => {
const form = await getForm();
form.scrollToField(name, options);
},
setProps: async (formProps: Partial<FormProps>) => {
const form = await getForm();
form.setProps(formProps);
Expand All @@ -68,21 +64,6 @@ export function useForm(props?: Props): UseFormReturnType {
form.resetSchema(data);
},

clearValidate: async (name?: string | string[]) => {
const form = await getForm();
form.clearValidate(name);
},

resetFields: async () => {
const form = await getForm();
await form.resetFields();
},

removeSchemaByFiled: async (field: string | string[]) => {
unref(formRef)?.removeSchemaByFiled(field);
},

// TODO promisify
getFieldsValue: <T>() => {
return unref(formRef)?.getFieldsValue() as T;
},
Expand All @@ -101,6 +82,15 @@ export function useForm(props?: Props): UseFormReturnType {
form.appendSchemaByField(schema, prefixField, first);
},

removeSchemaByFiled: async (field: string | string[]) => {
unref(formRef)?.removeSchemaByFiled(field);
},

resetFields: async () => {
const form = await getForm();
await form.resetFields();
},

submit: async (): Promise<any> => {
const form = await getForm();
return form.submit();
Expand All @@ -115,6 +105,16 @@ export function useForm(props?: Props): UseFormReturnType {
const form = await getForm();
return form.validateFields(nameList);
},

clearValidate: async (name?: string | string[]) => {
const form = await getForm();
form.clearValidate(name);
},

scrollToField: async (name: NamePath, options?: ScrollOptions | undefined) => {
const form = await getForm();
form.scrollToField(name, options);
},
};

return [register, methods];
Expand Down
16 changes: 8 additions & 8 deletions src/components/Form/src/types/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ export interface ButtonProps extends AntdButtonProps {
}

export interface FormActionType {
submit: () => Promise<void>;
setFieldsValue: (values: Recordable) => Promise<void>;
resetFields: () => Promise<void>;
getFieldsValue: () => Recordable;
clearValidate: (name?: string | string[]) => Promise<void>;
setProps: (formProps: Partial<FormProps>) => Promise<void>;
updateSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => Promise<void>;
resetSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => Promise<void>;
setProps: (formProps: Partial<FormProps>) => Promise<void>;
removeSchemaByFiled: (field: string | string[]) => Promise<void>;
getFieldsValue: () => Recordable;
setFieldsValue: (values: Recordable) => Promise<void>;
appendSchemaByField: (
schema: FormSchema,
prefixField: string | undefined,
first?: boolean | undefined,
) => Promise<void>;
validateFields: (nameList?: NamePath[]) => Promise<any>;
removeSchemaByFiled: (field: string | string[]) => Promise<void>;
resetFields: () => Promise<void>;
submit: () => Promise<void>;
validate: (nameList?: NamePath[]) => Promise<any>;
validateFields: (nameList?: NamePath[]) => Promise<any>;
clearValidate: (name?: string | string[]) => Promise<void>;
scrollToField: (name: NamePath, options?: ScrollOptions) => Promise<void>;
}

Expand Down
8 changes: 5 additions & 3 deletions src/components/ListSelect/src/ListSelectModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
<template>
<BasicModal
v-bind="$attrs"
:title="props.config.modalProps?.title || t('数据选择')"
wrapClassName="jeesite-listselect"
:title="props.config.modalProps?.title || t('数据选择')"
:canFullscreen="false"
@register="registerModal"
@ok="handleSubmit"
width="80%"
Expand Down Expand Up @@ -119,8 +120,9 @@
});
function calcTreeHeight() {
let height = document.documentElement.clientHeight;
treeHeight.value = height - 280;
tableHeight.value = height - 380;
let padding = 280;
treeHeight.value = height - padding;
tableHeight.value = height - padding - 100;
}
useWindowSizeFn(calcTreeHeight, 280);
onMountedOrActivated(calcTreeHeight);
Expand Down
15 changes: 8 additions & 7 deletions src/components/Modal/src/BasicModal.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<template>
<Modal v-bind="getBindValue" @cancel="handleCancel" :closable="false">
<template #closeIcon v-if="!$slots.closeIcon"> </template>

<template #title v-if="!$slots.title">
<Modal v-bind="getBindValue" @cancel="handleCancel">
<template #closeIcon v-if="!$slots.closeIcon">
<ModalClose
:canFullscreen="getProps.canFullscreen"
:fullScreen="fullScreenRef"
@cancel="handleCancel"
@fullscreen="handleFullScreen"
/>
</template>

<template #title v-if="!$slots.title">
<ModalHeader
:helpMessage="getProps.helpMessage"
:title="getMergeProps.title"
Expand Down Expand Up @@ -341,8 +342,8 @@
&-close-x {
display: inline-block;
width: 96px;
height: 56px;
line-height: 56px;
height: 55px;
line-height: 55px;
}
&-confirm-body {
Expand Down Expand Up @@ -409,7 +410,7 @@
.ant-modal {
inset: 0 !important;
width: 100% !important;
// height: 100%;
max-width: calc(100vw - 15px) !important;
&-content {
height: 100%;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/src/components/ModalClose.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
.@{prefix-cls} {
float: right;
text-align: right;
margin-right: -8px;
margin-right: 10px;
.jeesite-icon {
margin: 3px 9px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
return false;
}
if (isFunction(editRule)) {
editRule(currentValue, record as Recordable)
return await editRule(currentValue, record as Recordable)
.then(() => {
ruleMessage.value = '';
return true;
Expand Down
Loading

0 comments on commit 2ab8f95

Please sign in to comment.