@ywfe/materials-design
Version:
YwDesign for lowcode
150 lines (148 loc) • 3.08 kB
JavaScript
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _utils = require("../_utils");
// import AntdIconSetter from '../_setters/antd-icon-setter';
var YwButtonBaseProps = [{
title: {
label: '按钮文字',
tip: 'btnText | 按钮文字'
},
name: 'btnText',
description: '按钮文字',
supportVariable: false,
setter: {
componentName: 'StringSetter',
initialValue: '按钮'
}
}, {
title: {
label: '按钮类型',
tip: 'btnType | 按钮类型'
},
supportVariable: false,
name: 'btnType',
description: '按钮类型',
defaultValue: 'default',
setter: {
componentName: 'SelectSetter',
props: {
options: [{
label: '主按钮',
value: 'primary'
}, {
label: '次按钮',
value: 'default'
}, {
label: '虚线按钮',
value: 'dashed'
}, {
label: '链接按钮',
value: 'link'
}, {
label: '文本按钮',
value: 'text'
}, {
label: '自定义按钮',
value: ''
}]
},
initialValue: 'primary'
}
}, {
title: {
label: '危险操作按钮',
tip: 'danger | 危险操作按钮'
},
supportVariable: false,
name: 'danger',
setter: {
componentName: 'BoolSetter',
isRequired: false
}
},
// {
// title: {
// label: '跳转类型',
// tip: 'target | 是否新开浏览器页面,默认当前页跳转',
// },
// supportVariable: false,
// name: 'target',
// setter: {
// componentName: 'SelectSetter',
// props: {
// options: [
// {
// label: '当前页面',
// value: '_self',
// },
// {
// label: '新开页面',
// value: '_blank',
// },
// ],
// },
// },
// },
// {
// title: {
// label: '跳转链接',
// tip: 'href | 跳转链接',
// },
// name: 'href',
// setter: {
// componentName: 'StringSetter',
// isRequired: false,
// initialValue: null,
// },
// },
// {
// title: {
// label: '左侧icon',
// tip: 'leftIcon | 左侧icon',
// },
// supportVariable: false,
// name: 'leftIcon',
// description: '左侧icon',
// setter: {
// componentName: AntdIconSetter,
// props: {
// type: 'node',
// },
// },
// },
// {
// title: {
// label: '右侧icon',
// tip: 'rightIcon | 右侧icon',
// },
// supportVariable: false,
// name: 'rightIcon',
// description: '右侧icon',
// setter: {
// componentName: AntdIconSetter,
// props: {
// type: 'node',
// },
// },
// },
{
title: {
label: '自定义按钮',
tip: 'children | 自定义按钮'
},
supportVariable: false,
name: 'children',
setter: {
componentName: 'SlotSetter',
title: '组件坑位',
initialValue: {
type: 'JSSlot',
value: []
}
},
condition: function condition(target) {
return (0, _utils.getPropValueWithPath)(target, '.btnType') === '';
}
}];
var _default = exports["default"] = YwButtonBaseProps;