QSInputsPickerMixin.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. export default () => {
  2. return {
  3. props: {
  4. placherhold: {
  5. type: String,
  6. default: '请选择'
  7. },
  8. height: { //picker高度
  9. type: Number,
  10. default: 0
  11. },
  12. fontScale: { //picker内文字大小
  13. type: Number,
  14. default: .034
  15. },
  16. buttonSet: { //按钮设置
  17. type: Object,
  18. default () {
  19. return {};
  20. }
  21. },
  22. dataSet: { //各类型携带的数据
  23. type: Object,
  24. default () {
  25. return {};
  26. }
  27. },
  28. showReset: { //每次显示是否重置value
  29. type: Boolean,
  30. default: false
  31. },
  32. pickerTitle: { //title标题
  33. type: String,
  34. default: ''
  35. },
  36. mode: {
  37. type: String,
  38. default: 'bottom'
  39. },
  40. zIndex: {
  41. type: [Number, String],
  42. default: 9999
  43. },
  44. bgColor_title: {
  45. type: String,
  46. default: '#F8F8F8'
  47. },
  48. autoHide: {
  49. type: Boolean,
  50. default: true
  51. },
  52. pickerTitleColor: {
  53. type: String,
  54. default: '#999'
  55. }
  56. },
  57. data() {
  58. return {
  59. nValue: this.value || {}
  60. }
  61. },
  62. methods: {
  63. confirm(obj) {
  64. this.nValue = obj;
  65. this.setValue(obj);
  66. },
  67. show() {
  68. this.$refs.inputsRef.show();
  69. },
  70. hide() {
  71. this.$refs.inputsRef.hide();
  72. },
  73. pickerChange(obj) {
  74. this.$emit('pickerChange', obj);
  75. }
  76. }
  77. }
  78. }