|
act a-ref这个组件具体怎样用?用例子取不到数值
- <a-popup $show="recordPopShow"
- closeable
- round
- style="height: 300px; width: 300px;">
- <view class="demo-row">
- <a-ref name="countDown">
- <a-count-down
- ref="countDown"
- :time="3000"
- millisecond
- :auto-start="false"
- format="ss:SSS"
- @finish="onFinish"/>
- </a-ref>
- </view>
- <a-grid column-num="3" style="margin-top: 10px;" gutter="10">
- <a-grid-item text="开始" icon="play-circle" @click="recordStart"/>
- <a-grid-item text="暂停" icon="pause-circle" @click="recordPause"/>
- <a-grid-item text="重置" icon="refresh" @click="recordReset"/>
- </a-grid>
- </a-popup>
复制代码
- recordStart(){
- console.log('a- ' + JSON.stringify(this.$refs));
- this.$refs.countDown.start();
- },
- recordPause(){
- this.$refs.countDown.pause();
- },
- recordReset(){
- this.$refs.countDown.reset();
- },
复制代码
点按钮,日志是: undefined |
|