提交 99960cab 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

fix code review issues

上级 8e394964
...@@ -217,8 +217,8 @@ export class ZtfApp { ...@@ -217,8 +217,8 @@ export class ZtfApp {
return; return;
} }
const version = Config.pkg.buildTime ? 'build at ' + new Date(Config.pkg.buildTime).toLocaleString() : '' + let version = Config.pkg.buildTime ? 'build at ' + new Date(Config.pkg.buildTime).toLocaleString() : ''
DEBUG ? '[debug]' : '' version += DEBUG ? '[debug]' : ''
app.setAboutPanelOptions({ app.setAboutPanelOptions({
applicationName: Lang.string(Config.pkg.name) || Config.pkg.displayName, applicationName: Lang.string(Config.pkg.name) || Config.pkg.displayName,
applicationVersion: Config.pkg.version, applicationVersion: Config.pkg.version,
......
...@@ -5,3 +5,6 @@ sonar.exclusions=bin/**,demo/**,log/**,xdoc/**,client/node_modules/**,client/ui/ ...@@ -5,3 +5,6 @@ sonar.exclusions=bin/**,demo/**,log/**,xdoc/**,client/node_modules/**,client/ui/
sonar.host.url=http://localhost:59001 sonar.host.url=http://localhost:59001
sonar.login=sqp_94f2484e50b1cfea719eb791f4e5d544be887f87 sonar.login=sqp_94f2484e50b1cfea719eb791f4e5d544be887f87
sonar.issue.ignore.multicriteria=e1,e2,e3,e4
sonar.issue.ignore.multicriteria.e1.ruleKey=javascript:S3358
...@@ -42,10 +42,10 @@ const buttonPropsList = computed(() => { ...@@ -42,10 +42,10 @@ const buttonPropsList = computed(() => {
let item: (ButtonProps | Record<string, any>) & {key: string | number | symbol}; let item: (ButtonProps | Record<string, any>) & {key: string | number | symbol};
if (props.replaceFields && Button.props) { if (props.replaceFields && Button.props) {
item = Object.keys(Button.props).reduce((item, propName) => { item = Object.keys(Button.props).reduce((item2, propName) => {
const replacePropName = props.replaceFields ? props.replaceFields[propName] : null; const replacePropName = props.replaceFields ? props.replaceFields[propName] : null;
item[propName] = x[typeof replacePropName === 'string' ? replacePropName : propName]; item2[propName] = x[typeof replacePropName === 'string' ? replacePropName : propName];
return item; return item2;
}, {key: x.key !== undefined ? x.key : i}); }, {key: x.key !== undefined ? x.key : i});
} else { } else {
item = { item = {
......
...@@ -9,7 +9,6 @@ import {useI18n} from "vue-i18n"; ...@@ -9,7 +9,6 @@ import {useI18n} from "vue-i18n";
const { t } = useI18n(); const { t } = useI18n();
import {computed, defineProps, inject} from "vue"; import {computed, defineProps, inject} from "vue";
import {ButtonProps} from "@/components/Button.vue";
export interface ColumnProps { export interface ColumnProps {
width?: string, width?: string,
...@@ -20,7 +19,7 @@ export interface ColumnProps { ...@@ -20,7 +19,7 @@ export interface ColumnProps {
const props = defineProps<ColumnProps>(); const props = defineProps<ColumnProps>();
let gutter = inject('gutter'); let gutter = inject('gutter') as any;
const colClass = computed(() => { const colClass = computed(() => {
const classes: string[] = []; const classes: string[] = [];
...@@ -30,7 +29,7 @@ const colClass = computed(() => { ...@@ -30,7 +29,7 @@ const colClass = computed(() => {
classes.push(`z-col-${span}`); classes.push(`z-col-${span}`);
} }
if (props.offset > 0) { if (props.offset && props.offset > 0) {
classes.push(`z-col-offset-${props.offset}`); classes.push(`z-col-offset-${props.offset}`);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册