@tongfun/tf-widget 0.1.153 → 0.1.155
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/tf-widget.common.js +72 -25
- package/lib/tf-widget.umd.js +72 -25
- package/lib/tf-widget.umd.min.js +2 -2
- package/package.json +1 -1
package/lib/tf-widget.common.js
CHANGED
|
@@ -140080,8 +140080,8 @@ var component = (0,componentNormalizer/* default */.Z)(
|
|
|
140080
140080
|
/* harmony default export */ var tf_filter = (component.exports);
|
|
140081
140081
|
// EXTERNAL MODULE: ./src/utils/index.js
|
|
140082
140082
|
var utils = __webpack_require__(42325);
|
|
140083
|
-
// EXTERNAL MODULE: ./src/directives/index.js +
|
|
140084
|
-
var directives = __webpack_require__(
|
|
140083
|
+
// EXTERNAL MODULE: ./src/directives/index.js + 33 modules
|
|
140084
|
+
var directives = __webpack_require__(65146);
|
|
140085
140085
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-table/src/index.vue?vue&type=script&lang=js&
|
|
140086
140086
|
//
|
|
140087
140087
|
//
|
|
@@ -140831,7 +140831,7 @@ function getVoucherIds(data) {
|
|
|
140831
140831
|
|
|
140832
140832
|
/***/ }),
|
|
140833
140833
|
|
|
140834
|
-
/***/
|
|
140834
|
+
/***/ 65146:
|
|
140835
140835
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
140836
140836
|
|
|
140837
140837
|
"use strict";
|
|
@@ -141073,16 +141073,20 @@ async function initColumnDrag(el, binding, vNode) {
|
|
|
141073
141073
|
oldIndex
|
|
141074
141074
|
}) => {
|
|
141075
141075
|
const {
|
|
141076
|
-
collectColumn
|
|
141077
|
-
|
|
141076
|
+
collectColumn,
|
|
141077
|
+
tableColumn
|
|
141078
|
+
} = tableInstance.getTableColumn(); // 转换真实索引
|
|
141078
141079
|
|
|
141079
|
-
|
|
141080
|
+
const oldColumnIndex = tableInstance.getColumnIndex(tableColumn[oldIndex]);
|
|
141081
|
+
const newColumnIndex = tableInstance.getColumnIndex(tableColumn[newIndex]);
|
|
141082
|
+
|
|
141083
|
+
if (newColumnIndex === oldColumnIndex) {
|
|
141080
141084
|
return;
|
|
141081
141085
|
} // 移动到目标列
|
|
141082
141086
|
|
|
141083
141087
|
|
|
141084
|
-
const currRow = collectColumn.splice(
|
|
141085
|
-
collectColumn.splice(
|
|
141088
|
+
const currRow = collectColumn.splice(oldColumnIndex, 1)[0];
|
|
141089
|
+
collectColumn.splice(newColumnIndex, 0, currRow);
|
|
141086
141090
|
tableInstance.loadColumn(collectColumn); // 配置更新
|
|
141087
141091
|
|
|
141088
141092
|
columnChange(el, binding, vNode);
|
|
@@ -141109,6 +141113,18 @@ async function initColumnDrag(el, binding, vNode) {
|
|
|
141109
141113
|
el.tfSettingInstance?.forceInit(el.umyTableSetting.tableConfigList);
|
|
141110
141114
|
};
|
|
141111
141115
|
}
|
|
141116
|
+
;// CONCATENATED MODULE: ./src/directives/modules/umy-table-setting/js/util.js
|
|
141117
|
+
function getFieldIndex(obj) {
|
|
141118
|
+
let fieldIndex,
|
|
141119
|
+
current = obj;
|
|
141120
|
+
|
|
141121
|
+
while (!fieldIndex && current) {
|
|
141122
|
+
fieldIndex = current.fieldIndex;
|
|
141123
|
+
current = obj.children ? obj.children[0] : null;
|
|
141124
|
+
}
|
|
141125
|
+
|
|
141126
|
+
return fieldIndex;
|
|
141127
|
+
}
|
|
141112
141128
|
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
141113
141129
|
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(13797);
|
|
141114
141130
|
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
|
@@ -141818,6 +141834,7 @@ var tf_setting_component = (0,componentNormalizer/* default */.Z)(
|
|
|
141818
141834
|
|
|
141819
141835
|
|
|
141820
141836
|
|
|
141837
|
+
|
|
141821
141838
|
external_commonjs_vue_commonjs2_vue_root_Vue_default().component('DirectiveColumnHeader', column_header);
|
|
141822
141839
|
/** 初始化表格配置信息 */
|
|
141823
141840
|
|
|
@@ -142006,11 +142023,12 @@ const reloadColumns = async (el, binding, vNode) => {
|
|
|
142006
142023
|
const {
|
|
142007
142024
|
collectColumn
|
|
142008
142025
|
} = tableInstance.getTableColumn();
|
|
142009
|
-
collectColumn.sort((a, b) => a
|
|
142026
|
+
collectColumn.sort((a, b) => getFieldIndex(a) - getFieldIndex(b));
|
|
142010
142027
|
tableInstance.reloadColumn(collectColumn);
|
|
142011
142028
|
};
|
|
142012
142029
|
;// CONCATENATED MODULE: ./src/directives/modules/umy-table-setting/js/watch.js
|
|
142013
142030
|
|
|
142031
|
+
|
|
142014
142032
|
/** 表格列宽变化事件 */
|
|
142015
142033
|
|
|
142016
142034
|
function watch_watchTableHeaderNode(el, binding, vNode) {
|
|
@@ -142101,19 +142119,6 @@ const addSettingColumn = (el, binding, vNode) => {
|
|
|
142101
142119
|
const newColumns = settingColumn ? [...columns, { ...settingColumn,
|
|
142102
142120
|
...mixinObj
|
|
142103
142121
|
}] : [...columns, mixinObj];
|
|
142104
|
-
|
|
142105
|
-
const getFieldIndex = obj => {
|
|
142106
|
-
let fieldIndex,
|
|
142107
|
-
current = obj;
|
|
142108
|
-
|
|
142109
|
-
while (!fieldIndex && current) {
|
|
142110
|
-
fieldIndex = current.fieldIndex;
|
|
142111
|
-
current = obj.children ? obj.children[0] : null;
|
|
142112
|
-
}
|
|
142113
|
-
|
|
142114
|
-
return fieldIndex;
|
|
142115
|
-
};
|
|
142116
|
-
|
|
142117
142122
|
newColumns.sort((a, b) => getFieldIndex(a) - getFieldIndex(b));
|
|
142118
142123
|
tableInstance.loadColumn(newColumns);
|
|
142119
142124
|
};
|
|
@@ -142281,8 +142286,44 @@ const tableAutoHeight = {
|
|
|
142281
142286
|
;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/init.js
|
|
142282
142287
|
/** 弹框初始化 */
|
|
142283
142288
|
function init(el, binding, vNode) {
|
|
142289
|
+
//初始化弹框属性
|
|
142290
|
+
initAttrs(el, binding, vNode); // 初始化弹框位置
|
|
142291
|
+
|
|
142292
|
+
initPostion(el, binding, vNode);
|
|
142293
|
+
}
|
|
142294
|
+
/** 初始化弹框属性 */
|
|
142295
|
+
|
|
142296
|
+
function initAttrs(el, binding, vNode) {
|
|
142297
|
+
const dialogInstance = vNode.componentInstance; // 禁止用户点击外侧关闭弹框
|
|
142298
|
+
// dialogInstance.closeOnClickModal = false
|
|
142299
|
+
}
|
|
142300
|
+
/** 第一次打开弹框时初始化弹框位置 */
|
|
142301
|
+
|
|
142302
|
+
function initPostion(el, binding, vNode) {
|
|
142303
|
+
let hasInit = false;
|
|
142304
|
+
|
|
142305
|
+
const initFn = el => {
|
|
142306
|
+
const dragDom = el.querySelector('.el-dialog');
|
|
142307
|
+
const offsetLeft = dragDom.offsetLeft;
|
|
142308
|
+
const dargDomWidth = dragDom.clientWidth;
|
|
142309
|
+
const dargDomHeight = dragDom.clientHeight;
|
|
142310
|
+
dragDom.style.width = dargDomWidth + 'px';
|
|
142311
|
+
dragDom.style.height = dargDomHeight + 'px';
|
|
142312
|
+
dragDom.style.marginLeft = offsetLeft + 'px';
|
|
142313
|
+
};
|
|
142314
|
+
|
|
142315
|
+
const vm = vNode.context;
|
|
142284
142316
|
const dialogInstance = vNode.componentInstance;
|
|
142285
|
-
|
|
142317
|
+
vm.$watch(() => {
|
|
142318
|
+
return dialogInstance.visible;
|
|
142319
|
+
}, newVal => {
|
|
142320
|
+
if (!hasInit && newVal) {
|
|
142321
|
+
initFn(el);
|
|
142322
|
+
hasInit = true;
|
|
142323
|
+
}
|
|
142324
|
+
}, {
|
|
142325
|
+
immediate: true
|
|
142326
|
+
});
|
|
142286
142327
|
}
|
|
142287
142328
|
;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/drag.js
|
|
142288
142329
|
/** 弹框支持拖拽 */
|
|
@@ -142469,6 +142510,7 @@ function resize(el, binding, vNode) {
|
|
|
142469
142510
|
;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/full.js
|
|
142470
142511
|
/** 弹框支持全屏 */
|
|
142471
142512
|
function fullScreen(el, binding, vNode) {
|
|
142513
|
+
const timeout = 0.3;
|
|
142472
142514
|
let nowWidth = 0;
|
|
142473
142515
|
let nowHight = 0;
|
|
142474
142516
|
let nowMarginTop = 0;
|
|
@@ -142499,6 +142541,11 @@ function fullScreen(el, binding, vNode) {
|
|
|
142499
142541
|
dragDom.style.marginLeft = nowMarginLeft;
|
|
142500
142542
|
dialogHeaderEl.style.cursor = 'move';
|
|
142501
142543
|
}
|
|
142544
|
+
|
|
142545
|
+
dragDom.style.transition = `all ${timeout}s linear`;
|
|
142546
|
+
setTimeout(() => {
|
|
142547
|
+
dragDom.style.transition = 'none';
|
|
142548
|
+
}, timeout * 1000);
|
|
142502
142549
|
};
|
|
142503
142550
|
}
|
|
142504
142551
|
;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/index.js
|
|
@@ -244356,8 +244403,8 @@ var push_down_component = (0,componentNormalizer/* default */.Z)(
|
|
|
244356
244403
|
|
|
244357
244404
|
}
|
|
244358
244405
|
});
|
|
244359
|
-
// EXTERNAL MODULE: ./src/directives/index.js +
|
|
244360
|
-
var directives = __webpack_require__(
|
|
244406
|
+
// EXTERNAL MODULE: ./src/directives/index.js + 33 modules
|
|
244407
|
+
var directives = __webpack_require__(65146);
|
|
244361
244408
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/t-data-list/main.vue?vue&type=script&lang=js&
|
|
244362
244409
|
//
|
|
244363
244410
|
//
|
package/lib/tf-widget.umd.js
CHANGED
|
@@ -140090,8 +140090,8 @@ var component = (0,componentNormalizer/* default */.Z)(
|
|
|
140090
140090
|
/* harmony default export */ var tf_filter = (component.exports);
|
|
140091
140091
|
// EXTERNAL MODULE: ./src/utils/index.js
|
|
140092
140092
|
var utils = __webpack_require__(68023);
|
|
140093
|
-
// EXTERNAL MODULE: ./src/directives/index.js +
|
|
140094
|
-
var directives = __webpack_require__(
|
|
140093
|
+
// EXTERNAL MODULE: ./src/directives/index.js + 33 modules
|
|
140094
|
+
var directives = __webpack_require__(2445);
|
|
140095
140095
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-table/src/index.vue?vue&type=script&lang=js&
|
|
140096
140096
|
//
|
|
140097
140097
|
//
|
|
@@ -140841,7 +140841,7 @@ function getVoucherIds(data) {
|
|
|
140841
140841
|
|
|
140842
140842
|
/***/ }),
|
|
140843
140843
|
|
|
140844
|
-
/***/
|
|
140844
|
+
/***/ 2445:
|
|
140845
140845
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
140846
140846
|
|
|
140847
140847
|
"use strict";
|
|
@@ -141083,16 +141083,20 @@ async function initColumnDrag(el, binding, vNode) {
|
|
|
141083
141083
|
oldIndex
|
|
141084
141084
|
}) => {
|
|
141085
141085
|
const {
|
|
141086
|
-
collectColumn
|
|
141087
|
-
|
|
141086
|
+
collectColumn,
|
|
141087
|
+
tableColumn
|
|
141088
|
+
} = tableInstance.getTableColumn(); // 转换真实索引
|
|
141088
141089
|
|
|
141089
|
-
|
|
141090
|
+
const oldColumnIndex = tableInstance.getColumnIndex(tableColumn[oldIndex]);
|
|
141091
|
+
const newColumnIndex = tableInstance.getColumnIndex(tableColumn[newIndex]);
|
|
141092
|
+
|
|
141093
|
+
if (newColumnIndex === oldColumnIndex) {
|
|
141090
141094
|
return;
|
|
141091
141095
|
} // 移动到目标列
|
|
141092
141096
|
|
|
141093
141097
|
|
|
141094
|
-
const currRow = collectColumn.splice(
|
|
141095
|
-
collectColumn.splice(
|
|
141098
|
+
const currRow = collectColumn.splice(oldColumnIndex, 1)[0];
|
|
141099
|
+
collectColumn.splice(newColumnIndex, 0, currRow);
|
|
141096
141100
|
tableInstance.loadColumn(collectColumn); // 配置更新
|
|
141097
141101
|
|
|
141098
141102
|
columnChange(el, binding, vNode);
|
|
@@ -141119,6 +141123,18 @@ async function initColumnDrag(el, binding, vNode) {
|
|
|
141119
141123
|
el.tfSettingInstance?.forceInit(el.umyTableSetting.tableConfigList);
|
|
141120
141124
|
};
|
|
141121
141125
|
}
|
|
141126
|
+
;// CONCATENATED MODULE: ./src/directives/modules/umy-table-setting/js/util.js
|
|
141127
|
+
function getFieldIndex(obj) {
|
|
141128
|
+
let fieldIndex,
|
|
141129
|
+
current = obj;
|
|
141130
|
+
|
|
141131
|
+
while (!fieldIndex && current) {
|
|
141132
|
+
fieldIndex = current.fieldIndex;
|
|
141133
|
+
current = obj.children ? obj.children[0] : null;
|
|
141134
|
+
}
|
|
141135
|
+
|
|
141136
|
+
return fieldIndex;
|
|
141137
|
+
}
|
|
141122
141138
|
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
141123
141139
|
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(77203);
|
|
141124
141140
|
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
|
@@ -141828,6 +141844,7 @@ var tf_setting_component = (0,componentNormalizer/* default */.Z)(
|
|
|
141828
141844
|
|
|
141829
141845
|
|
|
141830
141846
|
|
|
141847
|
+
|
|
141831
141848
|
external_commonjs_vue_commonjs2_vue_root_Vue_default().component('DirectiveColumnHeader', column_header);
|
|
141832
141849
|
/** 初始化表格配置信息 */
|
|
141833
141850
|
|
|
@@ -142016,11 +142033,12 @@ const reloadColumns = async (el, binding, vNode) => {
|
|
|
142016
142033
|
const {
|
|
142017
142034
|
collectColumn
|
|
142018
142035
|
} = tableInstance.getTableColumn();
|
|
142019
|
-
collectColumn.sort((a, b) => a
|
|
142036
|
+
collectColumn.sort((a, b) => getFieldIndex(a) - getFieldIndex(b));
|
|
142020
142037
|
tableInstance.reloadColumn(collectColumn);
|
|
142021
142038
|
};
|
|
142022
142039
|
;// CONCATENATED MODULE: ./src/directives/modules/umy-table-setting/js/watch.js
|
|
142023
142040
|
|
|
142041
|
+
|
|
142024
142042
|
/** 表格列宽变化事件 */
|
|
142025
142043
|
|
|
142026
142044
|
function watch_watchTableHeaderNode(el, binding, vNode) {
|
|
@@ -142111,19 +142129,6 @@ const addSettingColumn = (el, binding, vNode) => {
|
|
|
142111
142129
|
const newColumns = settingColumn ? [...columns, { ...settingColumn,
|
|
142112
142130
|
...mixinObj
|
|
142113
142131
|
}] : [...columns, mixinObj];
|
|
142114
|
-
|
|
142115
|
-
const getFieldIndex = obj => {
|
|
142116
|
-
let fieldIndex,
|
|
142117
|
-
current = obj;
|
|
142118
|
-
|
|
142119
|
-
while (!fieldIndex && current) {
|
|
142120
|
-
fieldIndex = current.fieldIndex;
|
|
142121
|
-
current = obj.children ? obj.children[0] : null;
|
|
142122
|
-
}
|
|
142123
|
-
|
|
142124
|
-
return fieldIndex;
|
|
142125
|
-
};
|
|
142126
|
-
|
|
142127
142132
|
newColumns.sort((a, b) => getFieldIndex(a) - getFieldIndex(b));
|
|
142128
142133
|
tableInstance.loadColumn(newColumns);
|
|
142129
142134
|
};
|
|
@@ -142291,8 +142296,44 @@ const tableAutoHeight = {
|
|
|
142291
142296
|
;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/init.js
|
|
142292
142297
|
/** 弹框初始化 */
|
|
142293
142298
|
function init(el, binding, vNode) {
|
|
142299
|
+
//初始化弹框属性
|
|
142300
|
+
initAttrs(el, binding, vNode); // 初始化弹框位置
|
|
142301
|
+
|
|
142302
|
+
initPostion(el, binding, vNode);
|
|
142303
|
+
}
|
|
142304
|
+
/** 初始化弹框属性 */
|
|
142305
|
+
|
|
142306
|
+
function initAttrs(el, binding, vNode) {
|
|
142307
|
+
const dialogInstance = vNode.componentInstance; // 禁止用户点击外侧关闭弹框
|
|
142308
|
+
// dialogInstance.closeOnClickModal = false
|
|
142309
|
+
}
|
|
142310
|
+
/** 第一次打开弹框时初始化弹框位置 */
|
|
142311
|
+
|
|
142312
|
+
function initPostion(el, binding, vNode) {
|
|
142313
|
+
let hasInit = false;
|
|
142314
|
+
|
|
142315
|
+
const initFn = el => {
|
|
142316
|
+
const dragDom = el.querySelector('.el-dialog');
|
|
142317
|
+
const offsetLeft = dragDom.offsetLeft;
|
|
142318
|
+
const dargDomWidth = dragDom.clientWidth;
|
|
142319
|
+
const dargDomHeight = dragDom.clientHeight;
|
|
142320
|
+
dragDom.style.width = dargDomWidth + 'px';
|
|
142321
|
+
dragDom.style.height = dargDomHeight + 'px';
|
|
142322
|
+
dragDom.style.marginLeft = offsetLeft + 'px';
|
|
142323
|
+
};
|
|
142324
|
+
|
|
142325
|
+
const vm = vNode.context;
|
|
142294
142326
|
const dialogInstance = vNode.componentInstance;
|
|
142295
|
-
|
|
142327
|
+
vm.$watch(() => {
|
|
142328
|
+
return dialogInstance.visible;
|
|
142329
|
+
}, newVal => {
|
|
142330
|
+
if (!hasInit && newVal) {
|
|
142331
|
+
initFn(el);
|
|
142332
|
+
hasInit = true;
|
|
142333
|
+
}
|
|
142334
|
+
}, {
|
|
142335
|
+
immediate: true
|
|
142336
|
+
});
|
|
142296
142337
|
}
|
|
142297
142338
|
;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/drag.js
|
|
142298
142339
|
/** 弹框支持拖拽 */
|
|
@@ -142479,6 +142520,7 @@ function resize(el, binding, vNode) {
|
|
|
142479
142520
|
;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/full.js
|
|
142480
142521
|
/** 弹框支持全屏 */
|
|
142481
142522
|
function fullScreen(el, binding, vNode) {
|
|
142523
|
+
const timeout = 0.3;
|
|
142482
142524
|
let nowWidth = 0;
|
|
142483
142525
|
let nowHight = 0;
|
|
142484
142526
|
let nowMarginTop = 0;
|
|
@@ -142509,6 +142551,11 @@ function fullScreen(el, binding, vNode) {
|
|
|
142509
142551
|
dragDom.style.marginLeft = nowMarginLeft;
|
|
142510
142552
|
dialogHeaderEl.style.cursor = 'move';
|
|
142511
142553
|
}
|
|
142554
|
+
|
|
142555
|
+
dragDom.style.transition = `all ${timeout}s linear`;
|
|
142556
|
+
setTimeout(() => {
|
|
142557
|
+
dragDom.style.transition = 'none';
|
|
142558
|
+
}, timeout * 1000);
|
|
142512
142559
|
};
|
|
142513
142560
|
}
|
|
142514
142561
|
;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/index.js
|
|
@@ -244366,8 +244413,8 @@ var push_down_component = (0,componentNormalizer/* default */.Z)(
|
|
|
244366
244413
|
|
|
244367
244414
|
}
|
|
244368
244415
|
});
|
|
244369
|
-
// EXTERNAL MODULE: ./src/directives/index.js +
|
|
244370
|
-
var directives = __webpack_require__(
|
|
244416
|
+
// EXTERNAL MODULE: ./src/directives/index.js + 33 modules
|
|
244417
|
+
var directives = __webpack_require__(2445);
|
|
244371
244418
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/t-data-list/main.vue?vue&type=script&lang=js&
|
|
244372
244419
|
//
|
|
244373
244420
|
//
|