koala-ui

0.0.52 • Public • Published

测试使用的 UI 框架,暂不建议使用..

添加合作人员,小芳

  • root-page

    z-root-page.homepage(:noHeader='false' background='red' title='首页')

  • view

    z-textarea(placeholder="placeholer1" :maxlength="140" initialValue="initialValue" :autofocus="true" @updateValue="updateValue")

    updateValue(value) {
      console.log(value)
    }
    
  • button

    z-button.button(@click='logic' :hasLoading="true" :loadingShow="loadingShow") title 可用 slot 两个,left 和 right

    如果设置了 hasLoading 则必须设置 loadingShow 来控制显示隐藏

    mounted() {
      setTimeout(() => {
        this.loadingShow = true
      }, 1000);
      setTimeout(() => {
        this.loadingShow = false
      }, 2000);
    }
    
  • list

    z-list(:items="items" @itemClick="itemClick") 如果不是自定义 slot,items 为字符串数组,若自定义,则省略

  • item

    item(:item="item") 若果不是自定义 slot,item 为字符串,若自定义,可省略

  • button

    z-button(@click="clickButton") 赞

  • header 配置

    默认红色背景 background: Vue.prototype.$headerBackground = 'blue'

  • textarea

    z-textarea(placeholder="placeholer1" :max="140" initialText="initialText" :autofocus="true")

  • message

    z-message(:show='messageShow' @close='messageShow=false' message='I\'m a Message' :time="1")
  • countdown

    <zCountdown class="countdown"
      waitText="获取验证码"
      second=""
      :time="time"
      :frequency="1"
      :min="0"
      @event="event" />
    methods: {
      // 回调,满足条件后启动计时器
      event(start) {
        console.log("event");
        start()
      }
    }
  • cascade-selector

    c-cascade-selector.cascade(:lists="lists"
      :autoHidden="true"
      :placeholder="placeholders.companyLocation"
      :currentShow="currentCity"
      showKey="name"
      valueKey="code"
      :floor="currentFloor"
      :itemClick="itemClick")
    methods: {
      itemClick(floorIndex, item, close) {
        this.ajax().then(res => {
          if(res) logic()
          else close()
        });
      }
    }

Readme

Keywords

Package Sidebar

Install

npm i koala-ui

Weekly Downloads

6

Version

0.0.52

License

MIT

Last publish

Collaborators

  • zweizhao