Commit 50598eec authored by 郝聪敏's avatar 郝聪敏

feature: 升级组件库

parent 0b5ce231
fixIosTitle.html
\ No newline at end of file
...@@ -18,6 +18,7 @@ export default class Activity extends Mixins(TransformStyleMixin) { ...@@ -18,6 +18,7 @@ export default class Activity extends Mixins(TransformStyleMixin) {
isLayoutComReady = false; isLayoutComReady = false;
showBackTop = false; showBackTop = false;
targetEle: HTMLElement | null = null; targetEle: HTMLElement | null = null;
loading: boolean = true;
get layout() { get layout() {
return this.pageData && this.pageData.elements.map(v => v.point) || []; return this.pageData && this.pageData.elements.map(v => v.point) || [];
...@@ -31,7 +32,7 @@ export default class Activity extends Mixins(TransformStyleMixin) { ...@@ -31,7 +32,7 @@ export default class Activity extends Mixins(TransformStyleMixin) {
if (navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) { if (navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
const hackIframe = document.createElement('iframe'); const hackIframe = document.createElement('iframe');
hackIframe.style.display = 'none'; hackIframe.style.display = 'none';
hackIframe.src = '/public/fixIosTitle.html?r=' + Math.random(); hackIframe.src = '/public/asset/fixIosTitle.html?r=' + Math.random();
document.body.appendChild(hackIframe); document.body.appendChild(hackIframe);
setTimeout(() => { setTimeout(() => {
document.body.removeChild(hackIframe); document.body.removeChild(hackIframe);
...@@ -43,6 +44,7 @@ export default class Activity extends Mixins(TransformStyleMixin) { ...@@ -43,6 +44,7 @@ export default class Activity extends Mixins(TransformStyleMixin) {
} }
mounted() { mounted() {
console.log('loading', this);
this.targetEle = document.querySelector('body'); this.targetEle = document.querySelector('body');
this.showBackTop = true; this.showBackTop = true;
const timer = setTimeout(() => { const timer = setTimeout(() => {
...@@ -85,6 +87,11 @@ export default class Activity extends Mixins(TransformStyleMixin) { ...@@ -85,6 +87,11 @@ export default class Activity extends Mixins(TransformStyleMixin) {
}; };
} }
layoutReadyEvent(newLayout) {
// console.log('Mounted layout: ', newLayout);
// this.loading = false;
}
modfiTabsStyle() { modfiTabsStyle() {
const tabsEle = document.querySelector('.tabs'); const tabsEle = document.querySelector('.tabs');
if (tabsEle) { if (tabsEle) {
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
:is-mirrored="false" :is-mirrored="false"
:vertical-compact="true" :vertical-compact="true"
:use-css-transforms="true" :use-css-transforms="true"
@layout-mounted="layoutReadyEvent"
> >
<grid-item :style="transformStyle(item.commonStyle)" v-for="(item, index) in pageData.elements" <grid-item :style="transformStyle(item.commonStyle)" v-for="(item, index) in pageData.elements"
:x="item.point.x" :x="item.point.x"
...@@ -52,5 +53,27 @@ ...@@ -52,5 +53,27 @@
} }
} }
} }
.loading-container {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
background: #fff;
.loading {
padding: 6px;
border-radius: 6px;
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
/deep/ .cr-loading--text {
color: #fff;
}
}
}
} }
</style> </style>
...@@ -39,6 +39,7 @@ import BackTop from '@qg/cherry-ui/src/back-top'; ...@@ -39,6 +39,7 @@ import BackTop from '@qg/cherry-ui/src/back-top';
import Notify from '@qg/cherry-ui/src/notify'; import Notify from '@qg/cherry-ui/src/notify';
import Toast from '@qg/cherry-ui/src/toast'; import Toast from '@qg/cherry-ui/src/toast';
import citrusUi from '@qg/citrus-ui'; import citrusUi from '@qg/citrus-ui';
import Loading from '@qg/cherry-ui/src/loading';
Vue.use(Button); Vue.use(Button);
Vue.use(Image); Vue.use(Image);
...@@ -57,7 +58,7 @@ Vue.use(Field); ...@@ -57,7 +58,7 @@ Vue.use(Field);
// Vue.use(Overlay); // Vue.use(Overlay);
Vue.use(Form); Vue.use(Form);
// Vue.use(CardList); // Vue.use(CardList);
// Vue.use(Loading); Vue.use(Loading);
// Vue.use(List); // Vue.use(List);
Vue.use(Tab); Vue.use(Tab);
Vue.use(Tabs); Vue.use(Tabs);
......
...@@ -1600,9 +1600,9 @@ ...@@ -1600,9 +1600,9 @@
} }
}, },
"@qg/citrus-ui": { "@qg/citrus-ui": {
"version": "0.0.46", "version": "0.0.47",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.0.46.tgz", "resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.0.47.tgz",
"integrity": "sha512-uhZH2sdGLc65TjnHiiFvkJPmp1AbYSqzQKDBFAkdYyyX6DpD5vEFIwFdRIHG+WV3enbNhep7iIvXE83qx55YUQ==", "integrity": "sha512-SWld0LQ++qtq4Tw+HDKlD1IoITbWAcJIA3j0mDS17UAlRpGaiY7pzPq/9eyqGm7aQwDiJ6NeeofMXHMvF6Sqwg==",
"requires": { "requires": {
"@better-scroll/core": "^2.1.1", "@better-scroll/core": "^2.1.1",
"@qg/cherry-ui": "^2.20.5", "@qg/cherry-ui": "^2.20.5",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment