1 Star 0 Fork 0

卡拉阿库/uniapp_hospital

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.js 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
ak12 提交于 2024-07-17 15:50 . 添加
Date.prototype.VP_FORMAT = function(format) {
var ds = parseInt(this.getTime() / (24 * 60 * 60 * 1000)) - parseInt(new Date().getTime() / (24 * 60 * 60 *
1000));
var n = '';
if (ds == 0) {
n = '(今天)';
}
if (ds == 1) {
n = '(明天)';
}
if (ds == 2) {
n = '(后天)';
}
if (ds == -1) {
n = '(昨天)';
}
if (ds == -2) {
n = '(前天)';
}
var date = {
'M+': this.getMonth() + 1,
'd+': this.getDate(),
'h+': this.getHours(),
'm+': this.getMinutes(),
's+': this.getSeconds(),
'q+': Math.floor((this.getMonth() + 3) / 3),
'S+': this.getMilliseconds(),
'n+': n
};
if (/(y+)/i.test(format)) {
format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
}
for (var k in date) {
if (new RegExp('(' + k + ')').test(format)) {
format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? date[k] : ('00' + date[k]).substr(('' + date[
k]).length));
}
}
return format;
};
// #ifndef VUE3
import Vue from 'vue'
import App from './App'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import {
createSSRApp
} from 'vue'
import App from './App.vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kalaaku/uniapp_hospital.git
git@gitee.com:kalaaku/uniapp_hospital.git
kalaaku
uniapp_hospital
uniapp_hospital
master

搜索帮助