tree: 7ea5b050b69a65a6855b97ae8b776e137c41d18c [path history] [tgz]
  1. index.js
  2. index.vue
  3. package.json
  4. README.md
  5. README_cn.md
  6. type.js
packages/wxc-result/README.md

wxc-result

Common error result pages, which include general errors, no products, no network, and error of locating errors

Rule

  • Used for error pages to reduce user anxiety.
  • You can configure this type.js#L5 for custom errors

Demo

    

Code Example

<template>
  <wxc-result type="errorPage"
              :show="show"
              padding-top="232"
              @wxcResultButtonClicked="wxcResultButtonClicked"></wxc-result>
</template>
<script>
  import { WxcResult } from 'weex-ui';
  export default {
    components: { WxcResult },
    data: () => ({
        show: true
    }),
    methods: {
      wxcResultButtonClicked(e){
        modal.toast({
          'message': e.type,
          'duration': 1,
        })
      }
    }
  };
</script>

More details can be found in here

API

PropTypeRequiredDefaultDescription
typeStringNerrorPageerrorPage、noNetwork、noGoods、errorLocation
showBooleanNtruewhether to show
padding-topNumberN240padding top from screen
custom-setObjectN{}custom config type.js#L4
wrap-styleObjectN{}custom wrap style

Custom Config

this.customSet={errorPage: { button: null, desc: 'You can try to reduce the filter content', content: 'I'm sorry, Sir. I haven't found the recommended conditions' }}

Event

@wxcResultButtonClicked="wxcResultButtonClicked"