Browse Source

feat: tall插件封装

develop
wally 4 years ago
parent
commit
1bcb9205ae
  1. 1
      .eslintrc.js
  2. 1
      CHANGELOG.md
  3. 7
      src/config/app.js
  4. 5
      src/config/plugin.js
  5. 5
      src/config/zIndex.js
  6. 4
      src/main.js
  7. 2
      src/pages/index/index.vue
  8. 2
      src/pages/test/test.vue
  9. 17
      src/utils/tall.js

1
.eslintrc.js

@ -36,5 +36,6 @@ module.exports = {
Vuex: true,
axios: true,
_: true,
uni: true,
},
};

1
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)

7
src/config/app.js

@ -0,0 +1,7 @@
const version = '3.0.0';
export default {
V: version,
version,
theme: [],
};

5
src/config/plugin.js

@ -0,0 +1,5 @@
// 定义插件相关信息
/* eslint-disable */
export default {
defaults: [], // 默认插件id列表
};

5
src/config/zIndex.js

@ -0,0 +1,5 @@
// 定义项目中定位的元素的层级
/* eslint-disable */
export default {
roleBar: 999, // 角色栏成绩
};

4
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';

2
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() {

2
src/pages/test/test.vue

@ -13,5 +13,3 @@ export default {
},
};
</script>
<style></style>

17
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 };
Loading…
Cancel
Save