xt-element-ui 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/components/base/xt-date-picker.md +7 -26
- package/docs/components/base/xt-grid-box.md +34 -34
- package/docs/components/base/xt-tabs.md +51 -6
- package/docs/components/base/xt-text.md +20 -3
- package/lib/css/1.87a493be.css +1 -0
- package/lib/index.common.1.js +294 -0
- package/lib/index.common.2.js +141 -0
- package/lib/index.common.js +342 -492
- package/lib/index.css +1 -1
- package/lib/index.umd.1.js +294 -0
- package/lib/index.umd.2.js +141 -0
- package/lib/index.umd.js +342 -492
- package/lib/index.umd.min.1.js +1 -0
- package/lib/index.umd.min.2.js +1 -0
- package/lib/index.umd.min.js +1 -1
- package/lib/xt-date-picker/css/1.87a493be.css +1 -0
- package/lib/xt-date-picker/xt-date-picker.common.1.js +294 -0
- package/lib/xt-date-picker/xt-date-picker.common.2.js +141 -0
- package/lib/xt-date-picker/xt-date-picker.common.js +201 -332
- package/lib/xt-date-picker/xt-date-picker.css +1 -1
- package/lib/xt-date-picker/xt-date-picker.umd.1.js +294 -0
- package/lib/xt-date-picker/xt-date-picker.umd.2.js +141 -0
- package/lib/xt-date-picker/xt-date-picker.umd.js +201 -332
- package/lib/xt-date-picker/xt-date-picker.umd.min.1.js +1 -0
- package/lib/xt-date-picker/xt-date-picker.umd.min.2.js +1 -0
- package/lib/xt-date-picker/xt-date-picker.umd.min.js +1 -1
- package/lib/xt-tabs/xt-tabs.common.js +5 -27
- package/lib/xt-tabs/xt-tabs.css +1 -1
- package/lib/xt-tabs/xt-tabs.umd.js +5 -27
- package/lib/xt-tabs/xt-tabs.umd.min.js +1 -1
- package/lib/xt-text/xt-text.common.js +7 -4
- package/lib/xt-text/xt-text.umd.js +7 -4
- package/lib/xt-text/xt-text.umd.min.js +1 -1
- package/package.json +1 -1
- package/src/components/index.scss +3 -0
- package/src/components/xt-date-picker/component/Picker.vue +2 -46
- package/src/components/xt-date-picker/component/RangeDate.vue +4 -4
- package/src/components/xt-date-picker/index.js +1 -0
- package/src/components/xt-date-picker/index.vue +3 -23
- package/src/components/xt-date-picker/style/index.scss +64 -0
- package/src/components/xt-input/style/index.scss +1 -1
- package/src/components/xt-tabs/index.vue +3 -174
- package/src/components/xt-tabs/style/index.scss +131 -121
- package/src/components/xt-text/index.vue +5 -2
- package/src/styles/theme/index.scss +0 -1
- package/src/styles/theme/dark-variables.scss +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
((typeof self !== 'undefined' ? self : this)["webpackJsonpindex"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpindex"] || []).push([[2],{
|
|
2
|
+
|
|
3
|
+
/***/ "b0ea":
|
|
4
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
// ESM COMPAT FLAG
|
|
8
|
+
__webpack_require__.r(__webpack_exports__);
|
|
9
|
+
|
|
10
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"b8cd9b04-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-date-picker/component/Picker.vue?vue&type=template&id=4a866a03
|
|
11
|
+
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"date-picker"},[(_vm.type !== 'quarter')?_c('el-date-picker',_vm._g(_vm._b({attrs:{"type":_vm.pickerType,"value-format":_vm.valueFormat,"disabled":_vm.disabled,"placeholder":_vm.placeholder,"popper-append-to-body":"","popper-class":"base-date-popper"},model:{value:(_vm.innerValue),callback:function ($$v) {_vm.innerValue=$$v},expression:"innerValue"}},'el-date-picker',_vm.$attrs,false),_vm.$listeners)):_c('el-popover',{attrs:{"trigger":"manual","placement":"bottom-start","width":"240"},model:{value:(_vm.quarterPopVisible),callback:function ($$v) {_vm.quarterPopVisible=$$v},expression:"quarterPopVisible"}},[_c('div',{staticClass:"quarter-panel"},[_c('div',{staticClass:"quarter-header"},[_c('el-button',{attrs:{"icon":"el-icon-d-arrow-left"},on:{"click":function($event){_vm.year--}}}),_c('span',[_vm._v(_vm._s(_vm.year)+" 年")]),_c('el-button',{attrs:{"icon":"el-icon-d-arrow-right"},on:{"click":function($event){_vm.year++}}})],1),_c('div',{staticClass:"quarter-list"},_vm._l((4),function(q){return _c('div',{key:q,staticClass:"quarter-item",class:{ active: _vm.quarterNum === q },on:{"click":function($event){return _vm.selectQuarter(q)}}},[_vm._v(" Q"+_vm._s(q)+" ")])}),0)]),_c('el-input',{ref:"quarterInput",attrs:{"slot":"reference","size":"small","readonly":"","placeholder":_vm.placeholder,"disabled":_vm.disabled,"clearable":""},on:{"clear":_vm.handleClearQuarter},slot:"reference",model:{value:(_vm.quarterShowText),callback:function ($$v) {_vm.quarterShowText=$$v},expression:"quarterShowText"}},[_c('i',{staticClass:"el-icon-date",attrs:{"slot":"affix"},slot:"affix"})])],1)],1)
|
|
12
|
+
}
|
|
13
|
+
var staticRenderFns = []
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// CONCATENATED MODULE: ./src/components/xt-date-picker/component/Picker.vue?vue&type=template&id=4a866a03
|
|
17
|
+
|
|
18
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-date-picker/component/Picker.vue?vue&type=script&lang=js
|
|
19
|
+
|
|
20
|
+
/* harmony default export */ var Pickervue_type_script_lang_js = ({
|
|
21
|
+
name: 'BaseDatePicker',
|
|
22
|
+
inheritAttrs: false,
|
|
23
|
+
props: {
|
|
24
|
+
value: {
|
|
25
|
+
type: [String, null],
|
|
26
|
+
default: null
|
|
27
|
+
},
|
|
28
|
+
type: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: 'date',
|
|
31
|
+
validator: val => ['date', 'month', 'year', 'quarter', 'week'].includes(val)
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
data() {
|
|
39
|
+
return {
|
|
40
|
+
quarterPopVisible: false,
|
|
41
|
+
year: new Date().getFullYear(),
|
|
42
|
+
quarterNum: null
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
computed: {
|
|
46
|
+
pickerType() {
|
|
47
|
+
return this.type === 'quarter' ? null : this.type
|
|
48
|
+
},
|
|
49
|
+
placeholder() {
|
|
50
|
+
const map = {
|
|
51
|
+
date: '请选择日期',
|
|
52
|
+
month: '请选择月份',
|
|
53
|
+
year: '请选择年份',
|
|
54
|
+
quarter: '请选择季度',
|
|
55
|
+
week: '请选择周'
|
|
56
|
+
}
|
|
57
|
+
return map[this.type] || '请选择日期'
|
|
58
|
+
},
|
|
59
|
+
valueFormat() {
|
|
60
|
+
const map = {
|
|
61
|
+
date: 'yyyy-MM-dd',
|
|
62
|
+
month: 'yyyy-MM',
|
|
63
|
+
year: 'yyyy',
|
|
64
|
+
quarter: 'yyyy-Qq',
|
|
65
|
+
week: 'yyyy-WW'
|
|
66
|
+
}
|
|
67
|
+
return map[this.type] || 'yyyy-MM-dd'
|
|
68
|
+
},
|
|
69
|
+
innerValue: {
|
|
70
|
+
get() { return this.value },
|
|
71
|
+
set(val) { this.$emit('input', val) }
|
|
72
|
+
},
|
|
73
|
+
quarterShowText() {
|
|
74
|
+
if (!this.value) return ''
|
|
75
|
+
return `${this.year}-Q${this.quarterNum}`
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
watch: {
|
|
79
|
+
value: {
|
|
80
|
+
handler(val) {
|
|
81
|
+
if (this.type !== 'quarter' || !val) {
|
|
82
|
+
this.quarterNum = null
|
|
83
|
+
return
|
|
84
|
+
}
|
|
85
|
+
const [y, q] = val.split('-Q')
|
|
86
|
+
this.year = Number(y)
|
|
87
|
+
this.quarterNum = Number(q)
|
|
88
|
+
},
|
|
89
|
+
immediate: true
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
methods: {
|
|
93
|
+
selectQuarter(q) {
|
|
94
|
+
this.quarterNum = q
|
|
95
|
+
const val = `${this.year}-Q${q}`
|
|
96
|
+
this.$emit('input', val)
|
|
97
|
+
this.quarterPopVisible = false
|
|
98
|
+
},
|
|
99
|
+
handleClearQuarter() {
|
|
100
|
+
this.quarterNum = null
|
|
101
|
+
this.$emit('input', null)
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
mounted() {
|
|
105
|
+
if (this.type === 'quarter' && this.$refs.quarterInput) {
|
|
106
|
+
this.$refs.quarterInput.$el.addEventListener('click', () => {
|
|
107
|
+
if (!this.disabled) this.quarterPopVisible = true
|
|
108
|
+
})
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
// CONCATENATED MODULE: ./src/components/xt-date-picker/component/Picker.vue?vue&type=script&lang=js
|
|
114
|
+
/* harmony default export */ var component_Pickervue_type_script_lang_js = (Pickervue_type_script_lang_js);
|
|
115
|
+
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
116
|
+
var componentNormalizer = __webpack_require__("2877");
|
|
117
|
+
|
|
118
|
+
// CONCATENATED MODULE: ./src/components/xt-date-picker/component/Picker.vue
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
/* normalize component */
|
|
125
|
+
|
|
126
|
+
var component = Object(componentNormalizer["a" /* default */])(
|
|
127
|
+
component_Pickervue_type_script_lang_js,
|
|
128
|
+
render,
|
|
129
|
+
staticRenderFns,
|
|
130
|
+
false,
|
|
131
|
+
null,
|
|
132
|
+
null,
|
|
133
|
+
null
|
|
134
|
+
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
/* harmony default export */ var Picker = __webpack_exports__["default"] = (component.exports);
|
|
138
|
+
|
|
139
|
+
/***/ })
|
|
140
|
+
|
|
141
|
+
}]);
|