Skip to content

Commit

Permalink
修复bug,更新代码,迭代需求
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkhe1051931999 committed Jan 9, 2024
1 parent 765a34c commit ab486b5
Show file tree
Hide file tree
Showing 28 changed files with 2,652 additions and 2,398 deletions.
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quasar-vue3-admin-template",
"version": "0.0.1",
"version": "2.3.5",
"description": "A Quasar Project with Vue3 and have class API",
"productName": "Quasar Project",
"author": "dirk.he <hejiandirk@163.com>",
Expand All @@ -19,7 +19,7 @@
"@fullcalendar/interaction": "^5.11.3",
"@fullcalendar/vue3": "^5.11.3",
"@quasar/extras": "^1.0.0",
"axios": "^1.1.3",
"axios": "1.6.0",
"chart.js": "^4.0.1",
"codemirror": "^5.56.0",
"core-js": "^3.6.5",
Expand All @@ -29,19 +29,19 @@
"js-cookie": "^3.0.1",
"jsencrypt": "^3.2.1",
"json-editor-vue": "^0.9.2",
"marked": "^2.0.0",
"marked": "4.0.10",
"path-browserify": "^1.0.1",
"path-to-regexp": "^6.2.1",
"prismjs": "^1.29.0",
"quasar": "^2.6.0",
"quasar": "^2.14.2",
"sass.js": "^0.11.1",
"sha256": "^0.2.0",
"shepherd.js": "^11.0.1",
"ts-md5": "^1.2.7",
"uuid": "^9.0.0",
"vanilla-jsoneditor": "^0.9.2",
"vue": "^3.2.29",
"vue-facing-decorator": "^2.1.12",
"vue-facing-decorator": "^3.0.3",
"vue-i18n": "^9.3.0-beta.6",
"vue-router": "^4.1.6",
"vue-shepherd": "^2.0.1",
Expand Down Expand Up @@ -74,7 +74,9 @@
"html-webpack-plugin": "^5.5.0",
"prettier": "^2.5.1",
"typescript": "^4.5.4",
"vuex-module-decorators": "^2.0.0"
"vuex-module-decorators": "^2.0.0",
"sass": "1.69.7",
"sass-loader": "^12.3.0"
},
"browserslist": [
"last 10 Chrome versions",
Expand Down
4 changes: 4 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export default class myComponentApp extends Vue {
this.$q.dark.set(false);
document.querySelector('html')?.classList.remove('dark');
}
this.$globalMessage.show({
type: 'success',
content: '欢迎使用本系统',
});
const iconPath = path;
this.$q.iconMapFn = (iconName) => {
const icon = myIcons[iconName];
Expand Down
114 changes: 57 additions & 57 deletions src/boot/main.ts
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
import * as directives from 'src/directives/index';
import { boot } from 'quasar/wrappers';
import { type Directive } from 'vue';
import ElementPlus from 'element-plus';
import 'src/router/permission';
import 'element-plus/dist/index.css';
import 'element-plus/theme-chalk/dark/css-vars.css';
import vue3PhotoPreview from 'vue3-photo-preview';
import 'vue3-photo-preview/dist/index.css';
import globalMessage from 'src/utils/notify';
import globalConfirm from 'src/utils/dialogConfirm';
import 'src/utils/types';
import VueSidePanel from 'vue3-side-panel';
import 'vue3-side-panel/dist/vue3-side-panel.css';
import { defaultFill } from 'src/utils/tools';
import { date } from 'quasar';

import { Platform } from 'quasar';
export default boot(({ app }) => {
// We globally register our directive with Vue;
// Rememeber that all directives in Vue will start with 'v-'
// but that should not be part of your directive name
// https://vuejs.org/v2/guide/custom-directive.html
// 'my-directive' will be used as 'v-my-directive'
Object.keys(directives).forEach((key) => {
app.directive(key, (directives as { [key: string]: Directive })[key]);
});
app.use(vue3PhotoPreview);
app.use(VueSidePanel);
app.use(ElementPlus);
app.config.globalProperties.$globalMessage = globalMessage;
app.config.globalProperties.$window = window;
app.config.globalProperties.$globalConfirm = globalConfirm;
app.config.globalProperties.defaultFill = defaultFill;
app.config.globalProperties.parseTime = (time: number | string | null | undefined) => {
let timeStamp = '';
if (!time || String(time).length < 10) return '--';
if (!/^\d+$/g.test(time.toString())) {
if (String(time).indexOf('T') !== -1 && !Number.isNaN(new Date(time).getTimezoneOffset())) {
const formattedString = date.formatDate(+new Date(time), 'YYYY-MM-DD HH:mm:ss');
return formattedString;
} else {
if (/\d/.test(String(time))) {
return String(time);
} else {
return '--';
}
}
} else {
if (String(time).length === 10) timeStamp = time += '000';
else timeStamp = String(time);
const formattedString = date.formatDate(Number(timeStamp), 'YYYY-MM-DD HH:mm:ss');
return formattedString;
}
};
document.querySelector('body')?.classList.add(Platform.is.platform);
});
import * as directives from 'src/directives/index';
import { boot } from 'quasar/wrappers';
import { type Directive } from 'vue';
import ElementPlus from 'element-plus';
import 'src/router/permission';
import 'element-plus/dist/index.css';
import 'element-plus/theme-chalk/dark/css-vars.css';
import vue3PhotoPreview from 'vue3-photo-preview';
import 'vue3-photo-preview/dist/index.css';
import globalMessage from 'src/utils/notify';
import globalConfirm from 'src/utils/dialogConfirm';
import 'src/utils/types';
import VueSidePanel from 'vue3-side-panel';
import 'vue3-side-panel/dist/vue3-side-panel.css';
import { defaultFill } from 'src/utils/tools';
import { date } from 'quasar';

import { Platform } from 'quasar';
export default boot(({ app }) => {
// We globally register our directive with Vue;
// Rememeber that all directives in Vue will start with 'v-'
// but that should not be part of your directive name
// https://vuejs.org/v2/guide/custom-directive.html
// 'my-directive' will be used as 'v-my-directive'
Object.keys(directives).forEach((key) => {
app.directive(key, (directives as { [key: string]: Directive })[key]);
});
app.use(vue3PhotoPreview);
app.use(VueSidePanel);
app.use(ElementPlus);
app.config.globalProperties.$globalMessage = globalMessage;
app.config.globalProperties.$window = window;
app.config.globalProperties.$globalConfirm = globalConfirm;
app.config.globalProperties.defaultFill = defaultFill;
app.config.globalProperties.parseTime = (time: number | string | null | undefined) => {
let timeStamp = '';
if (!time || String(time).length < 10) return '--';
if (!/^\d+$/g.test(time.toString())) {
if (String(time).indexOf('T') !== -1 && !Number.isNaN(new Date(time).getTimezoneOffset())) {
const formattedString = date.formatDate(+new Date(time), 'YYYY-MM-DD HH:mm:ss');
return formattedString;
} else {
if (/\d/.test(String(time))) {
return String(time);
} else {
return '--';
}
}
} else {
if (String(time).length === 10) timeStamp = time += '000';
else timeStamp = String(time);
const formattedString = date.formatDate(Number(timeStamp), 'YYYY-MM-DD HH:mm:ss');
return formattedString;
}
};
document.querySelector('body')?.classList.add(Platform.is.platform);
});
72 changes: 36 additions & 36 deletions src/boot/register-component.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
// 文件: /src/boot/register-component.js
import { boot } from 'quasar/wrappers';
import MyBanner from 'src/components/myBanner/index.vue';
import RightPanel from 'src/components/rightPanel/index.vue';
import TextToInput from 'src/components/textToInput/index.vue';
import MyTooltip from 'src/components/myTooltip/index.vue';
import MyPagination from 'src/components/myPagination/index.vue';
import MyDialog from 'src/components/myDialog/index.vue';
import MyFormInput from 'src/components/myForm/input.vue';
import MyFormSelect from 'src/components/myForm/select.vue';
import MyFormMultipleSelect from 'src/components/myForm/multipleSelect.vue';
import MyFormDateRange from 'src/components/myForm/dateRange.vue';
import MyFormDateRangeWithTime from 'src/components/myForm/dateRangeWithTime.vue';
import MyFormSlider from 'src/components/myForm/slider.vue';
import MyFormRadio from 'src/components/myForm/radio.vue';
import MyMaskInput from 'src/components/myForm/maskInput.vue';
import MyTreeSelect from 'src/components/myForm/treeSelect.vue';

// 我们使用Vue全局注册了我们的组件
export default boot(({ app }) => {
app.component('MyBanner', MyBanner);
app.component('RightPanel', RightPanel);
app.component('TextToInput', TextToInput);
app.component('MyPagination', MyPagination);
app.component('MyTooltip', MyTooltip);
app.component('MyDialog', MyDialog);
app.component('MyFormInput', MyFormInput);
app.component('MyMaskInput', MyMaskInput);
app.component('MyFormSelect', MyFormSelect);
app.component('MyFormMultipleSelect', MyFormMultipleSelect);
app.component('MyFormDateRange', MyFormDateRange);
app.component('MyFormDateRangeWithTime', MyFormDateRangeWithTime);
app.component('MyFormSlider', MyFormSlider);
app.component('MyFormRadio', MyFormRadio);
app.component('MyTreeSelect', MyTreeSelect);
});
// 文件: /src/boot/register-component.js
import { boot } from 'quasar/wrappers';
import MyBanner from 'src/components/myBanner/index.vue';
import RightPanel from 'src/components/rightPanel/index.vue';
import TextToInput from 'src/components/textToInput/index.vue';
import MyTooltip from 'src/components/myTooltip/index.vue';
import MyPagination from 'src/components/myPagination/index.vue';
import MyDialog from 'src/components/myDialog/index.vue';
import MyFormInput from 'src/components/myForm/input.vue';
import MyFormSelect from 'src/components/myForm/select.vue';
import MyFormMultipleSelect from 'src/components/myForm/multipleSelect.vue';
import MyFormDateRange from 'src/components/myForm/dateRange.vue';
import MyFormDateRangeWithTime from 'src/components/myForm/dateRangeWithTime.vue';
import MyFormSlider from 'src/components/myForm/slider.vue';
import MyFormRadio from 'src/components/myForm/radio.vue';
import MyMaskInput from 'src/components/myForm/maskInput.vue';
import MyTreeSelect from 'src/components/myForm/treeSelect.vue';

// 我们使用Vue全局注册了我们的组件
export default boot(({ app }) => {
app.component('MyBanner', MyBanner);
app.component('RightPanel', RightPanel);
app.component('TextToInput', TextToInput);
app.component('MyPagination', MyPagination);
app.component('MyTooltip', MyTooltip);
app.component('MyDialog', MyDialog);
app.component('MyFormInput', MyFormInput);
app.component('MyMaskInput', MyMaskInput);
app.component('MyFormSelect', MyFormSelect);
app.component('MyFormMultipleSelect', MyFormMultipleSelect);
app.component('MyFormDateRange', MyFormDateRange);
app.component('MyFormDateRangeWithTime', MyFormDateRangeWithTime);
app.component('MyFormSlider', MyFormSlider);
app.component('MyFormRadio', MyFormRadio);
app.component('MyTreeSelect', MyTreeSelect);
});
Loading

0 comments on commit ab486b5

Please sign in to comment.