Skip to content
目录

<ex-popup>

<ex-popup>是Tenon中弹窗组件

属性

属性名类型默认值说明
showBooleanfalse是否展示弹窗

样式

作为容器使用,无需样式

示例


Tenon Vue

javascript
// entry.js
import Tenon from '@hummer/tenon-vue';

import app from './app.vue';
import ExPopup from '@hummer/vue-plugin-popup';

Tenon.register(ExPopup);
Tenon.render(app);
html
<!-- App.vue -->
<template>
  <view>
    <ex-popup :show="show">
      <view class="dialog-wrapper">
        <view >
          <view class="wrapper">
            <text>{{title}}</text>
          </view>
          <button class="btn" @tap="closeDialog">关闭</button>
        </view>
      </view>
    </ex-popup>
  </view>
</template>
<script>
export default {
  props: {
    show:{
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: 'Popup'
    }
  },
  methods: {
    closeDialog(){
      this.$emit('close')
    }
  }
}
</script>

更多用法,可参考Tenon Vue 官方示例

Tenon React

支持中