我查看了http://codepen.io/mhartington/pen/KwBpRq?editors=101,我还没有在android上看过cancelButton.在iOS上一切正常.如何显示cancelButton?
$ionicActionSheet.show({
titleText: 'ActionSheet Example',
buttons: [
{ text: '<i class="icon ion-share balanced"></i> Share' },
{ text: '<i class="icon ion-arrow-move assertive"></i> Move' },
],
destructiveText: 'Delete', // <<
cancelText: 'Cancel',
cancel: function() {
console.log('CANCELLED');
},
Run Code Online (Sandbox Code Playgroud) 方法一:
const mixin = {
beforeCreate() {
// do something
}
}
mount(TestComponent, {
mixins: [mixin]
})
Run Code Online (Sandbox Code Playgroud)
和方法二:
const mixin = {
beforeCreate() {
// do something
}
}
localVue = createLocalVue()
localVue.mixin(mixin)
mount(TestComponent, {
localVue
})
Run Code Online (Sandbox Code Playgroud)
两种方法都不适合我。我收到一个错误:在开发环境和CodeSandbox上'无法读取未定义的属性'props'。 https://codesandbox.io/s/4031x2r769
如何正确模拟生命周期挂钩?