xt-element-ui 2.1.72 → 2.2.1
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/lib/index.common.js +267 -61
- package/lib/index.css +1 -1
- package/lib/index.umd.js +267 -61
- package/lib/index.umd.min.js +1 -1
- package/lib/xt-badge/demo.html +10 -0
- package/lib/xt-badge/index.js +1 -0
- package/lib/xt-badge/xt-badge.common.js +335 -0
- package/lib/xt-badge/xt-badge.css +1 -0
- package/lib/xt-badge/xt-badge.umd.js +345 -0
- package/lib/xt-badge/xt-badge.umd.min.js +1 -0
- package/lib/xt-button/demo.html +10 -0
- package/lib/xt-button/index.js +1 -0
- package/lib/xt-button/xt-button.common.js +331 -0
- package/lib/xt-button/xt-button.css +1 -0
- package/lib/xt-button/xt-button.umd.js +341 -0
- package/lib/xt-button/xt-button.umd.min.js +1 -0
- package/lib/xt-card/demo.html +10 -0
- package/lib/xt-card/index.js +1 -0
- package/lib/xt-card/xt-card.common.js +325 -0
- package/lib/xt-card/xt-card.css +1 -0
- package/lib/xt-card/xt-card.umd.js +335 -0
- package/lib/xt-card/xt-card.umd.min.js +1 -0
- package/lib/xt-card-item/demo.html +10 -0
- package/lib/xt-card-item/index.js +1 -0
- package/lib/xt-card-item/xt-card-item.common.js +291 -0
- package/lib/xt-card-item/xt-card-item.css +1 -0
- package/lib/xt-card-item/xt-card-item.umd.js +301 -0
- package/lib/xt-card-item/xt-card-item.umd.min.js +1 -0
- package/lib/xt-chart/demo.html +10 -0
- package/lib/xt-chart/index.js +1 -0
- package/lib/xt-chart/xt-chart.common.js +109203 -0
- package/lib/xt-chart/xt-chart.css +1 -0
- package/lib/xt-chart/xt-chart.umd.js +109213 -0
- package/lib/xt-chart/xt-chart.umd.min.js +1 -0
- package/lib/xt-config-provider/demo.html +10 -0
- package/lib/xt-config-provider/index.js +1 -0
- package/lib/xt-config-provider/xt-config-provider.common.js +108388 -0
- package/lib/xt-config-provider/xt-config-provider.css +1 -0
- package/lib/xt-config-provider/xt-config-provider.umd.js +108398 -0
- package/lib/xt-config-provider/xt-config-provider.umd.min.js +1 -0
- package/lib/xt-date-picker/demo.html +10 -0
- package/lib/xt-date-picker/index.js +1 -0
- package/lib/xt-date-picker/xt-date-picker.common.js +768 -0
- package/lib/xt-date-picker/xt-date-picker.css +1 -0
- package/lib/xt-date-picker/xt-date-picker.umd.js +778 -0
- package/lib/xt-date-picker/xt-date-picker.umd.min.js +1 -0
- package/lib/xt-flex-box/demo.html +10 -0
- package/lib/xt-flex-box/index.js +1 -0
- package/lib/xt-flex-box/xt-flex-box.common.js +303 -0
- package/lib/xt-flex-box/xt-flex-box.css +1 -0
- package/lib/xt-flex-box/xt-flex-box.umd.js +313 -0
- package/lib/xt-flex-box/xt-flex-box.umd.min.js +1 -0
- package/lib/xt-form-schema/demo.html +10 -0
- package/lib/xt-form-schema/index.js +1 -0
- package/lib/xt-form-schema/xt-form-schema.common.js +510 -0
- package/lib/xt-form-schema/xt-form-schema.css +1 -0
- package/lib/xt-form-schema/xt-form-schema.umd.js +520 -0
- package/lib/xt-form-schema/xt-form-schema.umd.min.js +1 -0
- package/lib/xt-grid-box/demo.html +10 -0
- package/lib/xt-grid-box/index.js +1 -0
- package/lib/xt-grid-box/xt-grid-box.common.js +404 -0
- package/lib/xt-grid-box/xt-grid-box.css +1 -0
- package/lib/xt-grid-box/xt-grid-box.umd.js +414 -0
- package/lib/xt-grid-box/xt-grid-box.umd.min.js +1 -0
- package/lib/xt-grid-item/demo.html +10 -0
- package/lib/xt-grid-item/index.js +1 -0
- package/lib/xt-grid-item/xt-grid-item.common.js +381 -0
- package/lib/xt-grid-item/xt-grid-item.css +1 -0
- package/lib/xt-grid-item/xt-grid-item.umd.js +391 -0
- package/lib/xt-grid-item/xt-grid-item.umd.min.js +1 -0
- package/lib/xt-icon/demo.html +10 -0
- package/lib/xt-icon/index.js +1 -0
- package/lib/xt-icon/xt-icon.common.js +430 -0
- package/lib/xt-icon/xt-icon.css +1 -0
- package/lib/xt-icon/xt-icon.umd.js +440 -0
- package/lib/xt-icon/xt-icon.umd.min.js +1 -0
- package/lib/xt-input/demo.html +10 -0
- package/lib/xt-input/index.js +1 -0
- package/lib/xt-input/xt-input.common.js +584 -0
- package/lib/xt-input/xt-input.css +1 -0
- package/lib/xt-input/xt-input.umd.js +594 -0
- package/lib/xt-input/xt-input.umd.min.js +1 -0
- package/lib/xt-list/demo.html +10 -0
- package/lib/xt-list/index.js +1 -0
- package/lib/xt-list/xt-list.common.js +714 -0
- package/lib/xt-list/xt-list.css +1 -0
- package/lib/xt-list/xt-list.umd.js +724 -0
- package/lib/xt-list/xt-list.umd.min.js +1 -0
- package/lib/xt-map/demo.html +10 -0
- package/lib/xt-map/index.js +1 -0
- package/lib/xt-map/xt-map.common.js +1951 -0
- package/lib/xt-map/xt-map.css +1 -0
- package/lib/xt-map/xt-map.umd.js +1961 -0
- package/lib/xt-map/xt-map.umd.min.js +1 -0
- package/lib/xt-map-provider/demo.html +10 -0
- package/lib/xt-map-provider/index.js +1 -0
- package/lib/xt-map-provider/xt-map-provider.common.js +644 -0
- package/lib/xt-map-provider/xt-map-provider.css +1 -0
- package/lib/xt-map-provider/xt-map-provider.umd.js +654 -0
- package/lib/xt-map-provider/xt-map-provider.umd.min.js +1 -0
- package/lib/xt-page/demo.html +10 -0
- package/lib/xt-page/index.js +1 -0
- package/lib/xt-page/xt-page.common.js +353 -0
- package/lib/xt-page/xt-page.css +1 -0
- package/lib/xt-page/xt-page.umd.js +363 -0
- package/lib/xt-page/xt-page.umd.min.js +1 -0
- package/lib/xt-progress/demo.html +10 -0
- package/lib/xt-progress/index.js +1 -0
- package/lib/xt-progress/xt-progress.common.js +327 -0
- package/lib/xt-progress/xt-progress.css +1 -0
- package/lib/xt-progress/xt-progress.umd.js +337 -0
- package/lib/xt-progress/xt-progress.umd.min.js +1 -0
- package/lib/xt-scroll-arrow/demo.html +10 -0
- package/lib/xt-scroll-arrow/index.js +1 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.common.js +495 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.css +1 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.js +505 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.min.js +1 -0
- package/lib/xt-select-tree/demo.html +10 -0
- package/lib/xt-select-tree/index.js +1 -0
- package/lib/xt-select-tree/xt-select-tree.common.js +1791 -0
- package/lib/xt-select-tree/xt-select-tree.css +1 -0
- package/lib/xt-select-tree/xt-select-tree.umd.js +1801 -0
- package/lib/xt-select-tree/xt-select-tree.umd.min.js +1 -0
- package/lib/xt-step-price/demo.html +10 -0
- package/lib/xt-step-price/index.js +1 -0
- package/lib/xt-step-price/xt-step-price.common.js +800 -0
- package/lib/xt-step-price/xt-step-price.css +1 -0
- package/lib/xt-step-price/xt-step-price.umd.js +810 -0
- package/lib/xt-step-price/xt-step-price.umd.min.js +1 -0
- package/lib/xt-step-price-item/demo.html +10 -0
- package/lib/xt-step-price-item/index.js +1 -0
- package/lib/xt-step-price-item/xt-step-price-item.common.js +417 -0
- package/lib/xt-step-price-item/xt-step-price-item.umd.js +427 -0
- package/lib/xt-step-price-item/xt-step-price-item.umd.min.js +1 -0
- package/lib/xt-tab-pane/demo.html +10 -0
- package/lib/xt-tab-pane/index.js +1 -0
- package/lib/xt-tab-pane/xt-tab-pane.common.js +309 -0
- package/lib/xt-tab-pane/xt-tab-pane.umd.js +319 -0
- package/lib/xt-tab-pane/xt-tab-pane.umd.min.js +1 -0
- package/lib/xt-table/demo.html +10 -0
- package/lib/xt-table/index.js +1 -0
- package/lib/xt-table/xt-table.common.js +1027 -0
- package/lib/xt-table/xt-table.css +1 -0
- package/lib/xt-table/xt-table.umd.js +1037 -0
- package/lib/xt-table/xt-table.umd.min.js +1 -0
- package/lib/xt-tabs/demo.html +10 -0
- package/lib/xt-tabs/index.js +1 -0
- package/lib/xt-tabs/xt-tabs.common.js +463 -0
- package/lib/xt-tabs/xt-tabs.css +1 -0
- package/lib/xt-tabs/xt-tabs.umd.js +473 -0
- package/lib/xt-tabs/xt-tabs.umd.min.js +1 -0
- package/lib/xt-text/demo.html +10 -0
- package/lib/xt-text/index.js +1 -0
- package/lib/xt-text/xt-text.common.js +536 -0
- package/lib/xt-text/xt-text.css +1 -0
- package/lib/xt-text/xt-text.umd.js +546 -0
- package/lib/xt-text/xt-text.umd.min.js +1 -0
- package/lib/xt-time/demo.html +10 -0
- package/lib/xt-time/index.js +1 -0
- package/lib/xt-time/xt-time.common.js +555 -0
- package/lib/xt-time/xt-time.css +1 -0
- package/lib/xt-time/xt-time.umd.js +565 -0
- package/lib/xt-time/xt-time.umd.min.js +1 -0
- package/lib/xt-transfer-tree/demo.html +10 -0
- package/lib/xt-transfer-tree/index.js +1 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.common.js +594 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.css +1 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.umd.js +604 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.umd.min.js +1 -0
- package/lib/xt-upload/demo.html +10 -0
- package/lib/xt-upload/index.js +1 -0
- package/lib/xt-upload/xt-upload.common.js +1292 -0
- package/lib/xt-upload/xt-upload.css +1 -0
- package/lib/xt-upload/xt-upload.umd.js +1302 -0
- package/lib/xt-upload/xt-upload.umd.min.js +1 -0
- package/package.json +4 -2
- package/src/components/xt-badge/index.js +8 -7
- package/src/components/xt-button/index.js +1 -0
- package/src/components/xt-card/index.js +1 -0
- package/src/components/xt-card-item/index.js +1 -0
- package/src/components/xt-config-provider/index.js +1 -0
- package/src/components/xt-flex-box/index.js +1 -0
- package/src/components/xt-grid-box/index.js +1 -0
- package/src/components/xt-icon/index.js +1 -0
- package/src/components/xt-input/index.js +1 -0
- package/src/components/xt-map/index.js +1 -0
- package/src/components/xt-progress/index.js +8 -7
- package/src/components/xt-scroll-arrow/index.js +8 -7
- package/src/components/xt-step-price/index.js +1 -0
- package/src/components/xt-tabs/index.js +9 -8
- package/src/components/xt-text/index.js +1 -0
- package/src/components/xt-time/index.js +1 -0
- package/src/index.js +32 -2
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
+
/******/ // The module cache
|
|
4
|
+
/******/ var installedModules = {};
|
|
5
|
+
/******/
|
|
6
|
+
/******/ // The require function
|
|
7
|
+
/******/ function __webpack_require__(moduleId) {
|
|
8
|
+
/******/
|
|
9
|
+
/******/ // Check if module is in cache
|
|
10
|
+
/******/ if(installedModules[moduleId]) {
|
|
11
|
+
/******/ return installedModules[moduleId].exports;
|
|
12
|
+
/******/ }
|
|
13
|
+
/******/ // Create a new module (and put it into the cache)
|
|
14
|
+
/******/ var module = installedModules[moduleId] = {
|
|
15
|
+
/******/ i: moduleId,
|
|
16
|
+
/******/ l: false,
|
|
17
|
+
/******/ exports: {}
|
|
18
|
+
/******/ };
|
|
19
|
+
/******/
|
|
20
|
+
/******/ // Execute the module function
|
|
21
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
+
/******/
|
|
23
|
+
/******/ // Flag the module as loaded
|
|
24
|
+
/******/ module.l = true;
|
|
25
|
+
/******/
|
|
26
|
+
/******/ // Return the exports of the module
|
|
27
|
+
/******/ return module.exports;
|
|
28
|
+
/******/ }
|
|
29
|
+
/******/
|
|
30
|
+
/******/
|
|
31
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
+
/******/ __webpack_require__.m = modules;
|
|
33
|
+
/******/
|
|
34
|
+
/******/ // expose the module cache
|
|
35
|
+
/******/ __webpack_require__.c = installedModules;
|
|
36
|
+
/******/
|
|
37
|
+
/******/ // define getter function for harmony exports
|
|
38
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
+
/******/ }
|
|
42
|
+
/******/ };
|
|
43
|
+
/******/
|
|
44
|
+
/******/ // define __esModule on exports
|
|
45
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
/******/ }
|
|
49
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
/******/ };
|
|
51
|
+
/******/
|
|
52
|
+
/******/ // create a fake namespace object
|
|
53
|
+
/******/ // mode & 1: value is a module id, require it
|
|
54
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
+
/******/ // mode & 4: return value when already ns object
|
|
56
|
+
/******/ // mode & 8|1: behave like require
|
|
57
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
+
/******/ if(mode & 8) return value;
|
|
60
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
+
/******/ var ns = Object.create(null);
|
|
62
|
+
/******/ __webpack_require__.r(ns);
|
|
63
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
+
/******/ return ns;
|
|
66
|
+
/******/ };
|
|
67
|
+
/******/
|
|
68
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
+
/******/ __webpack_require__.n = function(module) {
|
|
70
|
+
/******/ var getter = module && module.__esModule ?
|
|
71
|
+
/******/ function getDefault() { return module['default']; } :
|
|
72
|
+
/******/ function getModuleExports() { return module; };
|
|
73
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
+
/******/ return getter;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
+
/******/
|
|
80
|
+
/******/ // __webpack_public_path__
|
|
81
|
+
/******/ __webpack_require__.p = "";
|
|
82
|
+
/******/
|
|
83
|
+
/******/
|
|
84
|
+
/******/ // Load entry module and return exports
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ "86ae":
|
|
91
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
92
|
+
|
|
93
|
+
// extracted by mini-css-extract-plugin
|
|
94
|
+
|
|
95
|
+
/***/ }),
|
|
96
|
+
|
|
97
|
+
/***/ "fb15":
|
|
98
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
99
|
+
|
|
100
|
+
"use strict";
|
|
101
|
+
// ESM COMPAT FLAG
|
|
102
|
+
__webpack_require__.r(__webpack_exports__);
|
|
103
|
+
|
|
104
|
+
// EXPORTS
|
|
105
|
+
__webpack_require__.d(__webpack_exports__, "XtText", function() { return /* reexport */ xt_text; });
|
|
106
|
+
|
|
107
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
108
|
+
// This file is imported into lib/wc client bundles.
|
|
109
|
+
|
|
110
|
+
if (typeof window !== 'undefined') {
|
|
111
|
+
var currentScript = window.document.currentScript
|
|
112
|
+
if (false) { var getCurrentScript; }
|
|
113
|
+
|
|
114
|
+
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
115
|
+
if (src) {
|
|
116
|
+
__webpack_require__.p = src[1] // eslint-disable-line
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Indicate to webpack that this file can be concatenated
|
|
121
|
+
/* harmony default export */ var setPublicPath = (null);
|
|
122
|
+
|
|
123
|
+
// EXTERNAL MODULE: ./src/components/xt-text/style/index.scss
|
|
124
|
+
var style = __webpack_require__("86ae");
|
|
125
|
+
|
|
126
|
+
// 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-text/index.vue?vue&type=template&id=eec3daca
|
|
127
|
+
var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.showTooltip && _vm.ellipsis)?_c('el-tooltip',{attrs:{"content":_vm.displayTooltipContent,"placement":_vm.tooltipPlacement,"disabled":!_vm.isOverflow,"effect":"dark"}},[_c('span',{ref:"textRef",staticClass:"xt-text",class:[
|
|
128
|
+
_vm.type ? 'xt-text--' + _vm.type : '',
|
|
129
|
+
'xt-text--' + _vm.size,
|
|
130
|
+
{ 'xt-text--bold': _vm.bold },
|
|
131
|
+
{ 'xt-text--money': _vm.format === 'money' },
|
|
132
|
+
{ 'xt-text--ellipsis': _vm.ellipsis },
|
|
133
|
+
{ 'xt-text--ellipsis-multiline': _vm.ellipsis && _vm.ellipsisRows > 1 }
|
|
134
|
+
],style:(_vm.customStyle),on:{"mouseenter":_vm.handleMouseEnter}},[(_vm.$slots.prefix)?[_vm._t("prefix")]:(_vm.prefix)?[_vm._v(_vm._s(_vm.prefix))]:_vm._e(),_vm._t("default",function(){return [(_vm.formattedValue !== undefined)?[_vm._v(_vm._s(_vm.formattedValue))]:_vm._e()]}),(_vm.$slots.suffix)?[_vm._t("suffix")]:(_vm.suffix)?[_vm._v(_vm._s(_vm.suffix))]:_vm._e()],2)]):_c('span',{ref:"textRef",staticClass:"xt-text",class:[
|
|
135
|
+
_vm.type ? 'xt-text--' + _vm.type : '',
|
|
136
|
+
'xt-text--' + _vm.size,
|
|
137
|
+
{ 'xt-text--bold': _vm.bold },
|
|
138
|
+
{ 'xt-text--money': _vm.format === 'money' },
|
|
139
|
+
{ 'xt-text--ellipsis': _vm.ellipsis },
|
|
140
|
+
{ 'xt-text--ellipsis-multiline': _vm.ellipsis && _vm.ellipsisRows > 1 }
|
|
141
|
+
],style:(_vm.customStyle)},[(_vm.$slots.prefix)?[_vm._t("prefix")]:(_vm.prefix)?[_vm._v(_vm._s(_vm.prefix))]:_vm._e(),_vm._t("default",function(){return [(_vm.formattedValue !== undefined)?[_vm._v(_vm._s(_vm.formattedValue))]:_vm._e()]}),(_vm.$slots.suffix)?[_vm._t("suffix")]:(_vm.suffix)?[_vm._v(_vm._s(_vm.suffix))]:_vm._e()],2)
|
|
142
|
+
}
|
|
143
|
+
var staticRenderFns = []
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
// CONCATENATED MODULE: ./src/components/xt-text/index.vue?vue&type=template&id=eec3daca
|
|
147
|
+
|
|
148
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-text/index.vue?vue&type=script&lang=js
|
|
149
|
+
|
|
150
|
+
/* harmony default export */ var xt_textvue_type_script_lang_js = ({
|
|
151
|
+
name: 'XtText',
|
|
152
|
+
model: {
|
|
153
|
+
prop: 'value',
|
|
154
|
+
event: 'input'
|
|
155
|
+
},
|
|
156
|
+
props: {
|
|
157
|
+
type: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: '',
|
|
160
|
+
validator: (val) => ['', 'primary', 'success', 'warning', 'danger'].includes(val)
|
|
161
|
+
},
|
|
162
|
+
size: {
|
|
163
|
+
type: String,
|
|
164
|
+
default: 'small',
|
|
165
|
+
validator: (val) => ['extra-large', 'large', 'medium', 'small', 'mini', 'extra-small'].includes(val)
|
|
166
|
+
},
|
|
167
|
+
bold: {
|
|
168
|
+
type: Boolean,
|
|
169
|
+
default: false
|
|
170
|
+
},
|
|
171
|
+
letterSpacing: {
|
|
172
|
+
type: [String, Number],
|
|
173
|
+
default: ''
|
|
174
|
+
},
|
|
175
|
+
ellipsis: {
|
|
176
|
+
type: Boolean,
|
|
177
|
+
default: false
|
|
178
|
+
},
|
|
179
|
+
ellipsisRows: {
|
|
180
|
+
type: Number,
|
|
181
|
+
default: 1,
|
|
182
|
+
validator: (val) => val >= 1 && val <= 10
|
|
183
|
+
},
|
|
184
|
+
showTooltip: {
|
|
185
|
+
type: Boolean,
|
|
186
|
+
default: true
|
|
187
|
+
},
|
|
188
|
+
tooltipPlacement: {
|
|
189
|
+
type: String,
|
|
190
|
+
default: 'top',
|
|
191
|
+
validator: (val) => ['top', 'bottom', 'left', 'right', 'top-start', 'top-end', 'bottom-start', 'bottom-end', 'left-start', 'left-end', 'right-start', 'right-end'].includes(val)
|
|
192
|
+
},
|
|
193
|
+
tooltipContent: {
|
|
194
|
+
type: String,
|
|
195
|
+
default: ''
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
// 格式化模式:normal 普通 | thousand 千分位 | money 金额
|
|
199
|
+
format: {
|
|
200
|
+
type: String,
|
|
201
|
+
default: 'normal',
|
|
202
|
+
validator: (val) => ['normal', 'thousand', 'money'].includes(val)
|
|
203
|
+
},
|
|
204
|
+
|
|
205
|
+
// 兼容旧属性 money(老项目继续使用)
|
|
206
|
+
money: {
|
|
207
|
+
type: Boolean,
|
|
208
|
+
default: false
|
|
209
|
+
},
|
|
210
|
+
value: {
|
|
211
|
+
type: [Number, String],
|
|
212
|
+
default: ''
|
|
213
|
+
},
|
|
214
|
+
currency: {
|
|
215
|
+
type: String,
|
|
216
|
+
default: 'CNY',
|
|
217
|
+
validator: (val) => ['CNY', 'USD', 'EUR', 'JPY', 'GBP', 'AUD', 'CAD'].includes(val)
|
|
218
|
+
},
|
|
219
|
+
decimals: {
|
|
220
|
+
type: Number,
|
|
221
|
+
default: 2,
|
|
222
|
+
validator: (val) => val >= 0 && val <= 10
|
|
223
|
+
},
|
|
224
|
+
locale: {
|
|
225
|
+
type: String,
|
|
226
|
+
default: 'zh-CN'
|
|
227
|
+
},
|
|
228
|
+
showSign: {
|
|
229
|
+
type: Boolean,
|
|
230
|
+
default: false
|
|
231
|
+
},
|
|
232
|
+
prefix: {
|
|
233
|
+
type: String,
|
|
234
|
+
default: ''
|
|
235
|
+
},
|
|
236
|
+
suffix: {
|
|
237
|
+
type: String,
|
|
238
|
+
default: ''
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
data() {
|
|
242
|
+
return {
|
|
243
|
+
isOverflow: false
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
computed: {
|
|
247
|
+
// 兼容旧 money 属性:如果传了 money=true,自动切为金额模式
|
|
248
|
+
realFormat() {
|
|
249
|
+
return this.money ? 'money' : this.format
|
|
250
|
+
},
|
|
251
|
+
|
|
252
|
+
customStyle() {
|
|
253
|
+
const style = {}
|
|
254
|
+
if (this.letterSpacing) {
|
|
255
|
+
style.letterSpacing = typeof this.letterSpacing === 'number' ? `${this.letterSpacing}px` : this.letterSpacing
|
|
256
|
+
}
|
|
257
|
+
if (this.ellipsis && this.ellipsisRows > 1) {
|
|
258
|
+
style.WebkitLineClamp = this.ellipsisRows
|
|
259
|
+
}
|
|
260
|
+
return style
|
|
261
|
+
},
|
|
262
|
+
|
|
263
|
+
displayTooltipContent() {
|
|
264
|
+
if (this.tooltipContent) {
|
|
265
|
+
return this.tooltipContent
|
|
266
|
+
}
|
|
267
|
+
if (this.formattedValue !== undefined) {
|
|
268
|
+
return this.formattedValue
|
|
269
|
+
}
|
|
270
|
+
if (this.$slots.default && this.$slots.default.length > 0) {
|
|
271
|
+
return this.extractSlotText(this.$slots.default)
|
|
272
|
+
}
|
|
273
|
+
return this.value
|
|
274
|
+
},
|
|
275
|
+
|
|
276
|
+
formattedValue() {
|
|
277
|
+
const fmt = this.realFormat
|
|
278
|
+
const { value } = this
|
|
279
|
+
|
|
280
|
+
if (value === '' || value === undefined || value === null) {
|
|
281
|
+
return undefined
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const numValue = typeof value === 'string' ? parseFloat(value) : value
|
|
285
|
+
if (isNaN(numValue)) {
|
|
286
|
+
return value
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
try {
|
|
290
|
+
let result = ''
|
|
291
|
+
const signOpt = this.showSign ? 'always' : 'auto'
|
|
292
|
+
|
|
293
|
+
switch (fmt) {
|
|
294
|
+
// 千分位格式化(纯数字)
|
|
295
|
+
case 'thousand':
|
|
296
|
+
result = new Intl.NumberFormat(this.locale, {
|
|
297
|
+
minimumFractionDigits: this.decimals,
|
|
298
|
+
maximumFractionDigits: this.decimals,
|
|
299
|
+
signDisplay: signOpt
|
|
300
|
+
}).format(numValue)
|
|
301
|
+
break
|
|
302
|
+
|
|
303
|
+
// 金额格式化(原有逻辑)
|
|
304
|
+
case 'money':
|
|
305
|
+
result = new Intl.NumberFormat(this.locale, {
|
|
306
|
+
style: 'currency',
|
|
307
|
+
currency: this.currency,
|
|
308
|
+
minimumFractionDigits: this.decimals,
|
|
309
|
+
maximumFractionDigits: this.decimals,
|
|
310
|
+
signDisplay: signOpt
|
|
311
|
+
}).format(numValue)
|
|
312
|
+
break
|
|
313
|
+
|
|
314
|
+
// 普通文本,直接返回原值
|
|
315
|
+
default:
|
|
316
|
+
return undefined
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
return result
|
|
320
|
+
} catch (e) {
|
|
321
|
+
return value
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
methods: {
|
|
326
|
+
handleMouseEnter() {
|
|
327
|
+
this.checkOverflow()
|
|
328
|
+
},
|
|
329
|
+
checkOverflow() {
|
|
330
|
+
const el = this.$refs.textRef
|
|
331
|
+
if (!el) {
|
|
332
|
+
this.isOverflow = false
|
|
333
|
+
return
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (this.ellipsisRows > 1) {
|
|
337
|
+
this.isOverflow = el.scrollHeight > el.clientHeight
|
|
338
|
+
} else {
|
|
339
|
+
this.isOverflow = el.scrollWidth > el.clientWidth
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
extractSlotText(nodes) {
|
|
343
|
+
let text = ''
|
|
344
|
+
nodes.forEach(node => {
|
|
345
|
+
if (typeof node.children === 'string') {
|
|
346
|
+
text += node.children
|
|
347
|
+
} else if (typeof node.text === 'string') {
|
|
348
|
+
text += node.text
|
|
349
|
+
} else if (node.children && Array.isArray(node.children)) {
|
|
350
|
+
text += this.extractSlotText(node.children)
|
|
351
|
+
}
|
|
352
|
+
})
|
|
353
|
+
return text.trim()
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
mounted() {
|
|
357
|
+
if (this.ellipsis && this.showTooltip) {
|
|
358
|
+
this.$nextTick(() => {
|
|
359
|
+
this.checkOverflow()
|
|
360
|
+
})
|
|
361
|
+
}
|
|
362
|
+
this._resizeObserver = new ResizeObserver(() => {
|
|
363
|
+
if (this.ellipsis && this.showTooltip) {
|
|
364
|
+
this.checkOverflow()
|
|
365
|
+
}
|
|
366
|
+
})
|
|
367
|
+
this.$nextTick(() => {
|
|
368
|
+
if (this.$refs.textRef) {
|
|
369
|
+
this._resizeObserver.observe(this.$refs.textRef)
|
|
370
|
+
}
|
|
371
|
+
})
|
|
372
|
+
},
|
|
373
|
+
beforeDestroy() {
|
|
374
|
+
if (this._resizeObserver) {
|
|
375
|
+
this._resizeObserver.disconnect()
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
watch: {
|
|
379
|
+
value() {
|
|
380
|
+
if (this.ellipsis && this.showTooltip) {
|
|
381
|
+
this.$nextTick(() => {
|
|
382
|
+
this.checkOverflow()
|
|
383
|
+
})
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
ellipsis(newVal) {
|
|
387
|
+
if (newVal && this.showTooltip) {
|
|
388
|
+
this.$nextTick(() => {
|
|
389
|
+
this.checkOverflow()
|
|
390
|
+
})
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
// CONCATENATED MODULE: ./src/components/xt-text/index.vue?vue&type=script&lang=js
|
|
397
|
+
/* harmony default export */ var components_xt_textvue_type_script_lang_js = (xt_textvue_type_script_lang_js);
|
|
398
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
399
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
400
|
+
|
|
401
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
402
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
403
|
+
// be included in the final webpack user bundle.
|
|
404
|
+
|
|
405
|
+
function normalizeComponent(
|
|
406
|
+
scriptExports,
|
|
407
|
+
render,
|
|
408
|
+
staticRenderFns,
|
|
409
|
+
functionalTemplate,
|
|
410
|
+
injectStyles,
|
|
411
|
+
scopeId,
|
|
412
|
+
moduleIdentifier /* server only */,
|
|
413
|
+
shadowMode /* vue-cli only */
|
|
414
|
+
) {
|
|
415
|
+
// Vue.extend constructor export interop
|
|
416
|
+
var options =
|
|
417
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
418
|
+
|
|
419
|
+
// render functions
|
|
420
|
+
if (render) {
|
|
421
|
+
options.render = render
|
|
422
|
+
options.staticRenderFns = staticRenderFns
|
|
423
|
+
options._compiled = true
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// functional template
|
|
427
|
+
if (functionalTemplate) {
|
|
428
|
+
options.functional = true
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// scopedId
|
|
432
|
+
if (scopeId) {
|
|
433
|
+
options._scopeId = 'data-v-' + scopeId
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
var hook
|
|
437
|
+
if (moduleIdentifier) {
|
|
438
|
+
// server build
|
|
439
|
+
hook = function (context) {
|
|
440
|
+
// 2.3 injection
|
|
441
|
+
context =
|
|
442
|
+
context || // cached call
|
|
443
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
444
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
445
|
+
// 2.2 with runInNewContext: true
|
|
446
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
447
|
+
context = __VUE_SSR_CONTEXT__
|
|
448
|
+
}
|
|
449
|
+
// inject component styles
|
|
450
|
+
if (injectStyles) {
|
|
451
|
+
injectStyles.call(this, context)
|
|
452
|
+
}
|
|
453
|
+
// register component module identifier for async chunk inferrence
|
|
454
|
+
if (context && context._registeredComponents) {
|
|
455
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
// used by ssr in case component is cached and beforeCreate
|
|
459
|
+
// never gets called
|
|
460
|
+
options._ssrRegister = hook
|
|
461
|
+
} else if (injectStyles) {
|
|
462
|
+
hook = shadowMode
|
|
463
|
+
? function () {
|
|
464
|
+
injectStyles.call(
|
|
465
|
+
this,
|
|
466
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
467
|
+
)
|
|
468
|
+
}
|
|
469
|
+
: injectStyles
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
if (hook) {
|
|
473
|
+
if (options.functional) {
|
|
474
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
475
|
+
// go through the normalizer
|
|
476
|
+
options._injectStyles = hook
|
|
477
|
+
// register for functional component in vue file
|
|
478
|
+
var originalRender = options.render
|
|
479
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
480
|
+
hook.call(context)
|
|
481
|
+
return originalRender(h, context)
|
|
482
|
+
}
|
|
483
|
+
} else {
|
|
484
|
+
// inject component registration as beforeCreate hook
|
|
485
|
+
var existing = options.beforeCreate
|
|
486
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
return {
|
|
491
|
+
exports: scriptExports,
|
|
492
|
+
options: options
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
// CONCATENATED MODULE: ./src/components/xt-text/index.vue
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
/* normalize component */
|
|
503
|
+
|
|
504
|
+
var component = normalizeComponent(
|
|
505
|
+
components_xt_textvue_type_script_lang_js,
|
|
506
|
+
render,
|
|
507
|
+
staticRenderFns,
|
|
508
|
+
false,
|
|
509
|
+
null,
|
|
510
|
+
null,
|
|
511
|
+
null
|
|
512
|
+
|
|
513
|
+
)
|
|
514
|
+
|
|
515
|
+
/* harmony default export */ var xt_text = (component.exports);
|
|
516
|
+
// CONCATENATED MODULE: ./src/components/xt-text/index.js
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
xt_text.install = function (Vue) {
|
|
521
|
+
Vue.component(xt_text.name, xt_text)
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/* harmony default export */ var components_xt_text = (xt_text);
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (components_xt_text);
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
/***/ })
|
|
535
|
+
|
|
536
|
+
/******/ });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.xt-text{letter-spacing:normal}.xt-text--extra-large{font-size:var(--xt-font-size-extra-large)}.xt-text--large{font-size:var(--xt-font-size-large)}.xt-text--medium{font-size:var(--xt-font-size-medium)}.xt-text--small{font-size:var(--xt-font-size-small)}.xt-text--mini{font-size:calc(var(--xt-font-size-mini))}.xt-text--extra-small{font-size:calc(var(--xt-font-size-extra-small))}.xt-text--primary{color:var(--xt-color-primary,#1890ff)}.xt-text--success{color:#37c3a4}.xt-text--warning{color:#ffb74d}.xt-text--danger{color:#ea1d34}.xt-text--bold{font-weight:700}.xt-text--ellipsis{display:inline-block;white-space:nowrap}.xt-text--ellipsis,.xt-text--ellipsis-multiline{overflow:hidden;text-overflow:ellipsis;max-width:100%}.xt-text--ellipsis-multiline{display:-webkit-box;-webkit-box-orient:vertical}.xt-text--money{font-family:Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:500;letter-spacing:0}.xt-text--money.xt-text--primary{color:var(--xt-color-primary,#1890ff)}.xt-text--money.xt-text--success{color:#37c3a4}.xt-text--money.xt-text--warning{color:#ffb74d}.xt-text--money.xt-text--danger{color:#ea1d34}
|