123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- import { Empty } from 'ant-design-vue'
- const pickerSourceMixin = {
- props: {
- /**
- * 多个数据源时,Tab页的标题
- */
- title: {
- type: String,
- default: undefined,
- },
- /**
- * 多个数据源时,Tab页的图标
- */
- icon: {
- type: String,
- default: undefined,
- },
- /**
- * @ignore
- */
- optionLabel: {
- type: String,
- default: 'name',
- },
- /**
- * @ignore
- */
- optionValue: {
- type: String,
- default: 'id',
- },
- /**
- * @ignore
- */
- render: {
- type: Function,
- default: function(item) {
- return item[this.optionLabel]
- },
- },
- /**
- * @ignore
- */
- single: {
- type: Boolean,
- default: false,
- },
- /**
- * @ignore
- */
- targetKeys: {
- type: Array,
- default: undefined,
- },
- /**
- * @ignore
- */
- selectedKeys: {
- type: Array,
- default: undefined,
- },
- /**
- * @ignore
- */
- itemSelect: {
- type: Function,
- default: () => {},
- },
- /**
- * @ignore
- */
- updateDataSource: {
- type: Function,
- default: () => {},
- },
- /**
- * @ignore
- */
- dataSource: {
- type: Array,
- default: undefined,
- },
- /**
- * @ignore
- */
- itemDblClick: {
- type: Function,
- default: () => {},
- },
- /**
- * @ignore
- */
- searchValue: {
- type: String,
- default: undefined,
- },
- /**
- * @ignore
- */
- updateShowSearch: {
- type: Function,
- default: () => {},
- },
- /**
- * @ignore
- */
- disabledKeys: {
- type: Array,
- default: () => [],
- },
- },
- data() {
- return {
- dataLoaded: false,
- }
- },
- beforeCreate() {
- this.simpleImage = Empty.PRESENTED_IMAGE_SIMPLE
- },
- inheritAttrs: false,
- }
- export default pickerSourceMixin
|