dataease/frontend/src/components/widget/serviceImpl/ButtonSureServiceImpl.js

50 lines
1018 B
JavaScript
Raw Normal View History

2021-03-30 19:01:46 +08:00
import { WidgetService } from '../service/WidgetService'
const defaultOptions = {
name: 'buttonSureWidget',
icon: null,
label: '确定',
style: {
width: 100,
height: 34,
borderWidth: '',
borderColor: '',
borderRadius: '',
fontSize: 14,
fontWeight: 500,
lineHeight: '',
letterSpacing: 0,
textAlign: '',
color: '',
backgroundColor: ''
},
2021-03-31 18:23:43 +08:00
component: 'de-button',
options: {
refId: '1234567890',
attrs: {
type: 'primary',
round: true
},
value: '测试按钮'
}
2021-03-30 19:01:46 +08:00
}
class ButtonSureServiceImpl extends WidgetService {
constructor(options) {
Object.assign(options, defaultOptions)
super(options)
}
initWidget() {
// console.log('this is first initWidget')
}
toDrawWidget() {
// console.log('this is first toDrawWidget')
}
// 移动到画布之前回掉
beforeToDraw() {
}
}
const buttonSureServiceImpl = new ButtonSureServiceImpl({ name: 'buttonSureWidget' })
export default buttonSureServiceImpl