diff --git a/.eslintrc.js b/.eslintrc.js index 6f481d2..2824b10 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -36,5 +36,6 @@ module.exports = { Vuex: true, axios: true, _: true, + uni: true, }, }; diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bede5c..935b7ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ --|--|-- - | db store | [6414c4f](http://gitea@dd.tall.wiki:wally/TALL-MUI-3/commits/6414c4f) - | indexedDB | [687394e](http://gitea@dd.tall.wiki:wally/TALL-MUI-3/commits/687394e) + - | post 封装 | [da52e94](http://gitea@dd.tall.wiki:wally/TALL-MUI-3/commits/da52e94) - | 提交到本地 | [9cbe411](http://gitea@dd.tall.wiki:wally/TALL-MUI-3/commits/9cbe411) - | 时间基准线,默认插件 | [a33ba1e](http://gitea@dd.tall.wiki:wally/TALL-MUI-3/commits/a33ba1e) - | 时间轴修改状态时提示框增加 | [e841392](http://gitea@dd.tall.wiki:wally/TALL-MUI-3/commits/e841392) diff --git a/src/config/app.js b/src/config/app.js new file mode 100644 index 0000000..6602ed5 --- /dev/null +++ b/src/config/app.js @@ -0,0 +1,7 @@ +const version = '3.0.0'; + +export default { + V: version, + version, + theme: [], +}; diff --git a/src/config/plugin.js b/src/config/plugin.js new file mode 100644 index 0000000..f89949e --- /dev/null +++ b/src/config/plugin.js @@ -0,0 +1,5 @@ +// 定义插件相关信息 +/* eslint-disable */ +export default { + defaults: [], // 默认插件id列表 +}; diff --git a/src/config/zIndex.js b/src/config/zIndex.js new file mode 100644 index 0000000..4d1dab2 --- /dev/null +++ b/src/config/zIndex.js @@ -0,0 +1,5 @@ +// 定义项目中定位的元素的层级 +/* eslint-disable */ +export default { + roleBar: 999, // 角色栏成绩 +}; diff --git a/src/main.js b/src/main.js index 83ecd3d..4a2a524 100644 --- a/src/main.js +++ b/src/main.js @@ -1,6 +1,7 @@ import Vue from 'vue'; -import App from './App'; import uView from 'uview-ui'; +import Tall from '@/utils/tall'; +import App from './App'; import './common/styles/index.css'; import store from './store'; @@ -16,6 +17,7 @@ Vue.use(indexedDB); Vue.config.productionTip = false; Vue.use(uView); +Vue.use(Tall); App.mpType = 'app'; diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index a0892b5..d77f7b4 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -18,8 +18,8 @@ export default { onLoad() { console.log(this.$u.config.v); // this.openPage(); - // DEBUG: this.$u.api.getToken('1217651354919636992'); + console.log(this.$t); }, mounted() { diff --git a/src/pages/test/test.vue b/src/pages/test/test.vue index 25e8d53..b1d76dd 100644 --- a/src/pages/test/test.vue +++ b/src/pages/test/test.vue @@ -13,5 +13,3 @@ export default { }, }; - - diff --git a/src/utils/tall.js b/src/utils/tall.js new file mode 100644 index 0000000..b7bd84e --- /dev/null +++ b/src/utils/tall.js @@ -0,0 +1,17 @@ +import app from '@/config/app.js'; +import zIndex from '@/config/zIndex.js'; +import plugin from '@/config/plugin.js'; + +const $t = { + zIndex, // 定位元素层级 + app, // app级别的相关配置 + plugin, // 插件相关配置信息 +}; + +uni.$t = $t; + +const install = Vue => { + Vue.prototype.$t = $t; +}; + +export default { install };