export default { props: { // 定义标题 title: { type: String, default: '我是标题' }, bkClass: { type: String, default: 'bk_normal' }, /** * 是否可以伸缩 */ flexIble: { type: Boolean, default: false }, // 定义跳转页面url uri: { type: String, default: '' }, // 定义组件高度 height: { type: String, default: '300' }, // 定义组件高度 width: { type: String, default: '430' } }, computed: { style: function () { return { height: this.height + 'px', width: this.isOpen ? 1000 + 'px' : this.width + 'px' }; } }, data () { return { // 是否展开 isOpen: false }; }, methods: { open () { this.isOpen = !this.isOpen } } };