-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
765a34c
commit ab486b5
Showing
28 changed files
with
2,652 additions
and
2,398 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
Oops, something went wrong.