示例
基本用法
点击按钮触发,可自定义内容与按钮功能
PCPhonePad
<page>
<actions>
<button @click="showFullLoading" text="显示loading"></button>
</actions>
<x-module title="moduleLoading" x="module" height="500px">
</x-module>
</page>
export default XPage({
showFullLoading(){
const myModule = this.getComponent('module');
myModule.loading();
setTimeout(() => {
myModule.hideLoading();
}, 3000);
//全局Loading
CabinX.loading({text:'测试文案'});
setTimeout(() => {
CabinX.hideLoading();
}, 3000);
}
})
局部/组件 loading
const myModule = this.getComponent('module');
myModule.loading();
myModule.hideLoading();
全局loading
CabinX.loading({text:'测试文案'});
CabinX.hideLoading();
参数 | 说明 | 类型 | 可选值 | 默认值 | 端 | 版本 |
---|---|---|---|---|---|---|
text | 提示文案 | Strng | -- | -- | PC/Mobile | -- |