@kyfe/ks-query-table 0.0.9 → 0.0.10
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/{qt-npm/ks-query-table.common.js → index.js} +1 -1
- package/{qt-npm/ks-query-table.umd.js → ks-query-table.umd.js} +1 -1
- package/{qt-npm/ks-query-table.umd.min.js → ks-query-table.umd.min.js} +1 -1
- package/{qt-npm/ks-query-table.umd.min.js.map → ks-query-table.umd.min.js.map} +1 -1
- package/package.json +10 -81
- package/.bitmap +0 -38
- package/.editorconfig +0 -5
- package/.env.dev +0 -2
- package/.env.gray +0 -2
- package/.env.prod +0 -2
- package/.env.stg +0 -3
- package/.env.uat +0 -2
- package/.eslintignore +0 -1
- package/.eslintrc.js +0 -25
- package/.gitmodules +0 -4
- package/.prettierrc +0 -11
- package/README.md +0 -6
- package/babel.config.js +0 -10
- package/build-apm.sh +0 -9
- package/build.sh +0 -16
- package/config/index.js +0 -20
- package/jsconfig.json +0 -7
- package/kuasheng-sdk/index.js +0 -80
- package/kuasheng-sdk/lib/assets.js +0 -304
- package/kuasheng-sdk/lib/context.js +0 -199
- package/kuasheng-sdk/lib/layout.js +0 -346
- package/kuasheng-sdk/lib/location.js +0 -46
- package/kuasheng-sdk/lib/media.js +0 -342
- package/kuasheng-sdk/lib/navigation.js +0 -30
- package/kuasheng-sdk/lib/request.js +0 -76
- package/kuasheng-sdk/lib/system.js +0 -190
- package/kuasheng-sdk/lib/userinfo.js +0 -98
- package/kuasheng-sdk/util/check.js +0 -102
- package/kuasheng-sdk/util/config.js +0 -47
- package/kuasheng-sdk/util/device.js +0 -25
- package/kuasheng-sdk/util/error.js +0 -19
- package/kuasheng-sdk/util/funtional.js +0 -153
- package/kuasheng-sdk/util/mixin.js +0 -36
- package/kuasheng-sdk/util/requestUtil.js +0 -41
- package/kuasheng-sdk/util/response.js +0 -33
- package/kuasheng-sdk/util/warn.js +0 -35
- package/kuasheng-ui/CHANGELOG.md +0 -9
- package/kuasheng-ui/components/card.vue +0 -57
- package/kuasheng-ui/components/ks-area-select/README.md +0 -43
- package/kuasheng-ui/components/ks-area-select/area-picker.vue +0 -554
- package/kuasheng-ui/components/ks-area-select/area-search.vue +0 -363
- package/kuasheng-ui/components/ks-area-select/areas-pop.vue +0 -56
- package/kuasheng-ui/components/ks-area-select/common.js +0 -183
- package/kuasheng-ui/components/ks-area-select/index.vue +0 -355
- package/kuasheng-ui/components/ks-area-select/mixins.js +0 -216
- package/kuasheng-ui/components/ks-area-single-select/README.md +0 -50
- package/kuasheng-ui/components/ks-area-single-select/hot-city.js +0 -45
- package/kuasheng-ui/components/ks-area-single-select/index.vue +0 -324
- package/kuasheng-ui/components/ks-calendar/index.vue +0 -269
- package/kuasheng-ui/components/ks-call-phone/call-tips.vue +0 -70
- package/kuasheng-ui/components/ks-call-phone/call.vue +0 -178
- package/kuasheng-ui/components/ks-call-phone/index.js +0 -48
- package/kuasheng-ui/components/ks-call-phone/index.vue +0 -131
- package/kuasheng-ui/components/ks-call-phone//345/221/274/345/217/253/347/273/204/344/273/266.md +0 -0
- package/kuasheng-ui/components/ks-date-picker/README.md +0 -23
- package/kuasheng-ui/components/ks-date-picker/date-picker-bottom.vue +0 -123
- package/kuasheng-ui/components/ks-date-picker/date-picker-dropdown.vue +0 -80
- package/kuasheng-ui/components/ks-date-picker/date-picker-right.vue +0 -87
- package/kuasheng-ui/components/ks-date-picker/date-picker-top.vue +0 -88
- package/kuasheng-ui/components/ks-date-picker/date-picker.js +0 -15
- package/kuasheng-ui/components/ks-date-picker/date-range-select.vue +0 -92
- package/kuasheng-ui/components/ks-date-picker/date-select.vue +0 -65
- package/kuasheng-ui/components/ks-date-picker/date-week-month.vue +0 -131
- package/kuasheng-ui/components/ks-date-picker/index.js +0 -12
- package/kuasheng-ui/components/ks-date-picker/mixin.js +0 -92
- package/kuasheng-ui/components/ks-date-picker/month-range-select.vue +0 -129
- package/kuasheng-ui/components/ks-date-picker/month-select.vue +0 -85
- package/kuasheng-ui/components/ks-date-picker/quarter-select.vue +0 -94
- package/kuasheng-ui/components/ks-date-picker/style.less +0 -121
- package/kuasheng-ui/components/ks-date-picker/utils.js +0 -109
- package/kuasheng-ui/components/ks-date-picker/week-select.vue +0 -99
- package/kuasheng-ui/components/ks-decrypt/index.vue +0 -159
- package/kuasheng-ui/components/ks-employee/README.md +0 -78
- package/kuasheng-ui/components/ks-employee/employee-input.vue +0 -173
- package/kuasheng-ui/components/ks-employee/employee-list.vue +0 -662
- package/kuasheng-ui/components/ks-employee/employee-popup.vue +0 -197
- package/kuasheng-ui/components/ks-employee/employee-search.vue +0 -250
- package/kuasheng-ui/components/ks-employee/employee-selected.vue +0 -173
- package/kuasheng-ui/components/ks-employee/index.js +0 -17
- package/kuasheng-ui/components/ks-employee/package-lock.json +0 -5
- package/kuasheng-ui/components/ks-employee/package.json +0 -15
- package/kuasheng-ui/components/ks-employee/yarn.lock +0 -4
- package/kuasheng-ui/components/ks-field-money/index.js +0 -8
- package/kuasheng-ui/components/ks-field-money/index.vue +0 -212
- package/kuasheng-ui/components/ks-field-money/package.json +0 -11
- package/kuasheng-ui/components/ks-field-money/utils.js +0 -65
- package/kuasheng-ui/components/ks-field-money//351/207/221/351/242/235/350/275/254/346/215/242/345/231/250.md +0 -0
- package/kuasheng-ui/components/ks-history-search/history-input.vue +0 -131
- package/kuasheng-ui/components/ks-history-search/history-list.vue +0 -188
- package/kuasheng-ui/components/ks-history-search/img/delete.png +0 -0
- package/kuasheng-ui/components/ks-history-search/index.js +0 -9
- package/kuasheng-ui/components/ks-history-search/index.vue +0 -125
- package/kuasheng-ui/components/ks-history-search/package-lock.json +0 -5
- package/kuasheng-ui/components/ks-history-search/package.json +0 -15
- package/kuasheng-ui/components/ks-history-search/utils.js +0 -35
- package/kuasheng-ui/components/ks-input-search/index.vue +0 -106
- package/kuasheng-ui/components/ks-list/index.vue +0 -75
- package/kuasheng-ui/components/ks-loading/index.js +0 -16
- package/kuasheng-ui/components/ks-month/index.vue +0 -47
- package/kuasheng-ui/components/ks-month/package.json +0 -3
- package/kuasheng-ui/components/ks-month/range.vue +0 -172
- package/kuasheng-ui/components/ks-month/single.vue +0 -136
- package/kuasheng-ui/components/ks-month/style.less +0 -125
- package/kuasheng-ui/components/ks-month/utils.js +0 -35
- package/kuasheng-ui/components/ks-nav/index.vue +0 -264
- package/kuasheng-ui/components/ks-nav-bar.js +0 -35
- package/kuasheng-ui/components/ks-org/ks-org-tree.vue +0 -247
- package/kuasheng-ui/components/ks-org/ks-popup-tree.vue +0 -154
- package/kuasheng-ui/components/ks-org/ks-tree-input.vue +0 -240
- package/kuasheng-ui/components/ks-org/ks-tree-node.vue +0 -94
- package/kuasheng-ui/components/ks-org/ks-tree.vue +0 -229
- package/kuasheng-ui/components/ks-org/utils.js +0 -54
- package/kuasheng-ui/components/ks-popover/index.vue +0 -457
- package/kuasheng-ui/components/ks-popover/mixin.js +0 -28
- package/kuasheng-ui/components/ks-popover/utils.js +0 -60
- package/kuasheng-ui/components/ks-pull-refresh/index.vue +0 -43
- package/kuasheng-ui/components/ks-quarter/index.vue +0 -256
- package/kuasheng-ui/components/ks-table/README.md +0 -103
- package/kuasheng-ui/components/ks-table/cell.vue +0 -31
- package/kuasheng-ui/components/ks-table/index.js +0 -8
- package/kuasheng-ui/components/ks-table/index.less +0 -486
- package/kuasheng-ui/components/ks-table/index.vue +0 -1088
- package/kuasheng-ui/components/ks-table/package.json +0 -12
- package/kuasheng-ui/components/ks-table/release.md +0 -7
- package/kuasheng-ui/components/ks-toast.js +0 -35
- package/kuasheng-ui/components/ks-upload/index.vue +0 -174
- package/kuasheng-ui/components/ks-user-access.vue +0 -229
- package/kuasheng-ui/components/no-data/README.md +0 -45
- package/kuasheng-ui/components/no-data/image.js +0 -1
- package/kuasheng-ui/components/no-data/index.vue +0 -83
- package/kuasheng-ui/components/notice-bar.vue +0 -16
- package/kuasheng-ui/components/steps.js +0 -11
- package/kuasheng-ui/components/tabs.vue +0 -40
- package/kuasheng-ui/index.js +0 -239
- package/kuasheng-ui/patch/datetime-picker/datetimePicker.md +0 -0
- package/kuasheng-ui/patch/datetime-picker/index.js +0 -46
- package/kuasheng-ui/patch/datetime-picker/utils.js +0 -78
- package/kuasheng-ui/patch/field/field.md +0 -1
- package/kuasheng-ui/patch/field/index.js +0 -122
- package/kuasheng-ui/patch/field/utils.js +0 -36
- package/kuasheng-ui/patch/form/form.md +0 -7
- package/kuasheng-ui/patch/form/index.js +0 -106
- package/kuasheng-ui/patch/index.js +0 -12
- package/kuasheng-ui/patch/pagination/index.js +0 -78
- package/kuasheng-ui/style/animation-ui.less +0 -31
- package/kuasheng-ui/style/font/number/font-number1.otf +0 -0
- package/kuasheng-ui/style/font/number/font-number2.ttf +0 -0
- package/kuasheng-ui/style/images/checked.svg +0 -1
- package/kuasheng-ui/style/images/success.svg +0 -1
- package/kuasheng-ui/style/index.less +0 -6
- package/kuasheng-ui/style/kuasheng-ui.less +0 -207
- package/kuasheng-ui/style/reset-vant.less +0 -307
- package/kuasheng-ui/style/vant-var.less +0 -138
- package/kuasheng-ui/utils/apis.js +0 -17
- package/kuasheng-ui/utils/axios-adapter.js +0 -47
- package/kuasheng-ui/utils/bem.js +0 -39
- package/kuasheng-ui/utils/bus.js +0 -97
- package/kuasheng-ui/utils/common.js +0 -88
- package/kuasheng-ui/utils/decrypt/config.js +0 -12
- package/kuasheng-ui/utils/decrypt/decrypt-api.js +0 -139
- package/kuasheng-ui/utils/decrypt/index.js +0 -6
- package/kuasheng-ui/utils/decrypt/mask.js +0 -36
- package/kuasheng-ui/utils/decrypt/virtual.js +0 -44
- package/kuasheng-ui/utils/directive.js +0 -57
- package/kuasheng-ui/utils/directive.md +0 -23
- package/kuasheng-ui/utils/drcheck-plugin.js +0 -219
- package/kuasheng-ui/utils/error-plugin.js +0 -88
- package/kuasheng-ui/utils/filter.js +0 -149
- package/kuasheng-ui/utils/http-interceptors.js +0 -18
- package/kuasheng-ui/utils/http.js +0 -140
- package/kuasheng-ui/utils/index.js +0 -5
- package/kuasheng-ui/utils/init-event.js +0 -20
- package/kuasheng-ui/utils/log.js +0 -309
- package/kuasheng-ui/utils/token.js +0 -9
- package/kuasheng-ui/utils/type.js +0 -45
- package/kuasheng-ui/utils/validate.js +0 -20
- package/kuasheng-ui/utils/watermark.js +0 -67
- package/kuasheng-ui/version.js +0 -1
- package/ky-apm/client.js +0 -37
- package/ky-apm/customHttp.js +0 -38
- package/ky-apm/index.js +0 -68
- package/ky-apm/plugins/performance.js +0 -84
- package/ky-apm/plugins/self-error.js +0 -26
- package/ky-apm/warn-log.js +0 -3
- package/plugin/ks-chii-webpack-html/index.js +0 -53
- package/plugin/ks-chii-webpack-html/package.json +0 -16
- package/postcss.config.js +0 -15
- package/public/capsule-positon.js +0 -50
- package/public/fonts/DingTalkJinBuTi.ttf +0 -0
- package/public/framework/axios@0.19.0.min.js +0 -9
- package/public/framework/fastclick@1.0.6.min.js +0 -1
- package/public/framework/iconfont/iconfont.css +0 -91
- package/public/framework/iconfont/iconfont.js +0 -1
- package/public/framework/iconfont/iconfont.json +0 -142
- package/public/framework/iconfont/iconfont.ttf +0 -0
- package/public/framework/iconfont/iconfont.woff +0 -0
- package/public/framework/iconfont/iconfont.woff2 +0 -0
- package/public/framework/vant@2.5.6.min.js +0 -7
- package/public/framework/vue-router@3.1.3.min.js +0 -6
- package/public/framework/vue@2.6.10.runtime.min.js +0 -6
- package/public/framework/vuex@3.1.1.min.js +0 -6
- package/public/index.html +0 -260
- package/public/ks@3.0.8.umd.min.js +0 -1
- package/public/ksui@4.0.27.umd.min.js +0 -10
- package/public/status-bar-preset.js +0 -39
- package/qt-npm/package.json +0 -13
- package/src/App.vue +0 -204
- package/src/common/README.md +0 -94
- package/src/common/http/axios-adapter.js +0 -47
- package/src/common/http/common.js +0 -88
- package/src/common/http/http-interceptors.js +0 -18
- package/src/common/http/http-lock.js +0 -45
- package/src/common/http/index.js +0 -163
- package/src/common/http/token.js +0 -9
- package/src/common/styles/font/AlibabaSans102Ver2-Md.ttf +0 -0
- package/src/common/styles/font.less +0 -12
- package/src/common/styles/variables.less +0 -43
- package/src/common/utils/index.js +0 -1
- package/src/common/utils/platform/README.md +0 -1
- package/src/common/utils/platform/android/.gitkeep +0 -0
- package/src/common/utils/platform/core/index.js +0 -24
- package/src/common/utils/platform/index.js +0 -164
- package/src/common/utils/platform/ios/.gitkeep +0 -0
- package/src/common/utils/platform/subscribe/helper.js +0 -38
- package/src/common/utils/platform/subscribe/index.js +0 -204
- package/src/common/utils/platform/subscribe/table-animation.js +0 -75
- package/src/config/index.js +0 -31
- package/src/config.js +0 -1
- package/src/main.js +0 -73
- package/src/router.js +0 -52
- package/src/view/home/config.js +0 -101
- package/src/view/home/demo1.vue +0 -223
- package/src/view/home/demo2.vue +0 -124
- package/src/view/home/demo3.vue +0 -51
- package/src/view/home/demo4.vue +0 -139
- package/src/view/home/index.vue +0 -97
- package/src/view/home/query-table/README.md +0 -45
- package/src/view/home/query-table/api/index.js +0 -12
- package/src/view/home/query-table/assets/horizontal-back.svg +0 -1
- package/src/view/home/query-table/components/pe-table/cell.js +0 -184
- package/src/view/home/query-table/components/pe-table/collapse.js +0 -334
- package/src/view/home/query-table/components/pe-table/empty.vue +0 -48
- package/src/view/home/query-table/components/pe-table/header.js +0 -328
- package/src/view/home/query-table/components/pe-table/images/abnormal.png +0 -0
- package/src/view/home/query-table/components/pe-table/images/empty.png +0 -0
- package/src/view/home/query-table/components/pe-table/images/fold.svg +0 -1
- package/src/view/home/query-table/components/pe-table/images/sort.svg +0 -1
- package/src/view/home/query-table/components/pe-table/images/sorting.svg +0 -1
- package/src/view/home/query-table/components/pe-table/images/unfold.svg +0 -1
- package/src/view/home/query-table/components/pe-table/index.vue +0 -841
- package/src/view/home/query-table/components/pe-table/load-more.js +0 -46
- package/src/view/home/query-table/components/pe-table/props/index.js +0 -193
- package/src/view/home/query-table/components/pe-table/row.vue +0 -118
- package/src/view/home/query-table/components/pe-table/scrollbar.js +0 -424
- package/src/view/home/query-table/components/pe-table/stretch-damping.js +0 -112
- package/src/view/home/query-table/components/pe-table/style/cell.less +0 -89
- package/src/view/home/query-table/components/pe-table/style/empty.less +0 -48
- package/src/view/home/query-table/components/pe-table/style/header.less +0 -141
- package/src/view/home/query-table/components/pe-table/style/index.less +0 -88
- package/src/view/home/query-table/components/pe-table/style/load-more.less +0 -61
- package/src/view/home/query-table/components/pe-table/style/row.less +0 -6
- package/src/view/home/query-table/components/pe-table/table-loading.vue +0 -119
- package/src/view/home/query-table/components/pe-table/table-total.vue +0 -53
- package/src/view/home/query-table/components/pe-table/utils/animate.js +0 -80
- package/src/view/home/query-table/components/pe-table/utils/columns.js +0 -290
- package/src/view/home/query-table/components/pe-table/utils/data.js +0 -12
- package/src/view/home/query-table/components/pe-table/utils/fixed.js +0 -69
- package/src/view/home/query-table/components/pe-table/utils/formatter.js +0 -327
- package/src/view/home/query-table/components/pe-table/utils/render-cells.js +0 -424
- package/src/view/home/query-table/components/pe-table/utils/slot.js +0 -28
- package/src/view/home/query-table/components/pe-table/utils/tools.js +0 -84
- package/src/view/home/query-table/components/pe-table/utils/touch-scroll.js +0 -417
- package/src/view/home/query-table/components/query-table/index.vue +0 -496
- package/src/view/home/query-table/components/query-table/mixins/column-mixin.js +0 -102
- package/src/view/home/query-table/components/query-table/mixins/column-setting.js +0 -143
- package/src/view/home/query-table/components/query-table/mixins/data-mixin.js +0 -511
- package/src/view/home/query-table/components/query-table/mixins/pagination-mixin.js +0 -26
- package/src/view/home/query-table/components/query-table/mixins/table-fixed.js +0 -115
- package/src/view/home/query-table/components/query-table/mixins/table-horizontal.js +0 -118
- package/src/view/home/query-table/components/table-horizontal.vue +0 -99
- package/src/view/home/query-table/components/table-pagination.vue +0 -32
- package/src/view/home/query-table/components/table-settings/assets/arrpw-up.svg +0 -1
- package/src/view/home/query-table/components/table-settings/assets/disabled-down.svg +0 -1
- package/src/view/home/query-table/components/table-settings/assets/disabled-up.svg +0 -1
- package/src/view/home/query-table/components/table-settings/assets/down.svg +0 -1
- package/src/view/home/query-table/components/table-settings/assets/up.svg +0 -1
- package/src/view/home/query-table/components/table-settings/index.less +0 -294
- package/src/view/home/query-table/components/table-settings/index.vue +0 -260
- package/src/view/home/query-table/components/table-settings/settings.vue +0 -479
- package/src/view/home/query-table/components/table-settings/test.js +0 -626
- package/src/view/home/query-table/components/table-settings//344/270/252/346/200/247/350/256/276/347/275/256.md +0 -0
- package/src/view/home/query-table/components/tooltip.js +0 -124
- package/src/view/home/query-table/hooks/use-cache-promise.js +0 -27
- package/src/view/home/query-table/hooks/use-column-config.js +0 -190
- package/src/view/home/query-table/hooks/use-encryption.js +0 -0
- package/src/view/home/query-table/hooks/use-generic-search.js +0 -95
- package/src/view/home/query-table/index.js +0 -7
- package/src/view/home/query-table/store/column-store.js +0 -0
- package/src/view/home/query-table/styles/table.less +0 -24
- package/src/view/home/query-table/utils/column.js +0 -36
- package/src/view/home/query-table/utils/config.js +0 -12
- package/src/view/home/query-table/utils/encryption.js +0 -32
- package/src/view/home/query-table/utils/http.js +0 -1
- package/src/view/home/query-table/utils/localStorage.js +0 -35
- package/src/view/home//351/246/226/351/241/265.md +0 -0
- package/src/web.js +0 -99
- package/vue.config.js +0 -128
- /package/{qt-npm/ks-query-table.common.js.map → ks-query-table.common.js.map} +0 -0
- /package/{qt-npm/ks-query-table.css → ks-query-table.css} +0 -0
- /package/{qt-npm/ks-query-table.umd.js.map → ks-query-table.umd.js.map} +0 -0
package/src/view/home/demo3.vue
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="container3">
|
|
3
|
-
<QueryTable ref="table"
|
|
4
|
-
:showIndex="true"
|
|
5
|
-
searchCode="pe_im_stocks-selection_index_field"
|
|
6
|
-
:config="configs">
|
|
7
|
-
<template slot="topFixed">
|
|
8
|
-
<div @click="$refs.table.openSetting()">打开个性设置</div>
|
|
9
|
-
<div @click="$refs.table.loadData()">刷新</div>
|
|
10
|
-
<div @click="$refs.table.openHorizontal()">横屏</div>
|
|
11
|
-
</template>
|
|
12
|
-
</QueryTable>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
import QueryTable from './query-table/index.js'
|
|
18
|
-
export default {
|
|
19
|
-
components: {
|
|
20
|
-
QueryTable,
|
|
21
|
-
},
|
|
22
|
-
data() {
|
|
23
|
-
return {
|
|
24
|
-
configs: {
|
|
25
|
-
// apiCode
|
|
26
|
-
// apiCode
|
|
27
|
-
url: 'pe.stock.app.resource.search.v1',
|
|
28
|
-
// appkey
|
|
29
|
-
appkey: '61189',
|
|
30
|
-
// 请求前,可用于处理入参
|
|
31
|
-
beforeHttp({ params, appkey }) {
|
|
32
|
-
params.vos = []
|
|
33
|
-
return { params, appkey }
|
|
34
|
-
},
|
|
35
|
-
// 请求后,可用于处理出参
|
|
36
|
-
afterHttp(res) {
|
|
37
|
-
res.rows[0].key1= 'test'
|
|
38
|
-
return res
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<style lang="less" scoped>
|
|
47
|
-
.container3 {
|
|
48
|
-
width: 100vw;
|
|
49
|
-
height: 500px;
|
|
50
|
-
}
|
|
51
|
-
</style>
|
package/src/view/home/demo4.vue
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- 上拉加载更多 -->
|
|
3
|
-
<div class="container">
|
|
4
|
-
<div class="tab">
|
|
5
|
-
顶部固定区域
|
|
6
|
-
</div>
|
|
7
|
-
<div class="table">
|
|
8
|
-
<QueryTable ref="table"
|
|
9
|
-
:showIndex="true"
|
|
10
|
-
:decrypt="true"
|
|
11
|
-
:overflow="true"
|
|
12
|
-
:isScrollShowTotal="false"
|
|
13
|
-
:enableLoadMore="true"
|
|
14
|
-
:rowCellRenderOptions="rowCellRenderOptions"
|
|
15
|
-
searchCode="pe_im_stocks-selection_index_field"
|
|
16
|
-
:config="configs">
|
|
17
|
-
<template slot="topUnfixed">
|
|
18
|
-
<div class="top-Unfixed">
|
|
19
|
-
可滚动区域
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
<template slot="topFixed">
|
|
23
|
-
<div class="top-Fixed">
|
|
24
|
-
<div>吸顶区域</div>
|
|
25
|
-
<div class="btn-bar">
|
|
26
|
-
<div @click="$refs.table.openSetting()">打开个性设置</div>
|
|
27
|
-
<div @click="$refs.table.loadData()">刷新</div>
|
|
28
|
-
<div @click="$refs.table.openHorizontal()">横屏</div>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</template>
|
|
32
|
-
</QueryTable>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
36
|
-
|
|
37
|
-
<script>
|
|
38
|
-
import QueryTable from './query-table/index.js'
|
|
39
|
-
import { mockParams, mockSorollParams } from './config.js'
|
|
40
|
-
|
|
41
|
-
export default {
|
|
42
|
-
mixins: [],
|
|
43
|
-
components: {
|
|
44
|
-
QueryTable,
|
|
45
|
-
},
|
|
46
|
-
data() {
|
|
47
|
-
return {
|
|
48
|
-
rowCellRenderOptions: {
|
|
49
|
-
nae: (h, { rowData, column }) => {
|
|
50
|
-
return <span style="color:red;">{rowData.currPrice}</span>
|
|
51
|
-
},
|
|
52
|
-
pctChg: (h, { rowData, column }) => {
|
|
53
|
-
return <span style="color:#7972fe;">{rowData.pctChg}</span>
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
configs: {
|
|
57
|
-
// apiCode
|
|
58
|
-
url: 'pe.stock.app.resource.search.v1',
|
|
59
|
-
// appkey
|
|
60
|
-
appkey: '61189',
|
|
61
|
-
pageSize: 100,
|
|
62
|
-
// 请求前,可用于处理入参
|
|
63
|
-
beforeHttp({ params, appkey }) {
|
|
64
|
-
|
|
65
|
-
params = { ...mockParams }
|
|
66
|
-
params.pageSize = 100
|
|
67
|
-
return { params, appkey }
|
|
68
|
-
},
|
|
69
|
-
// 请求后,可用于处理出参
|
|
70
|
-
afterHttp(res) {
|
|
71
|
-
res.rows.forEach((v, i) => {
|
|
72
|
-
v.name = '名称' + i
|
|
73
|
-
v.pctChgMask = 'd31b6ca48a214457d6d438e0cee3cbf9'
|
|
74
|
-
v.pctChg = '***'
|
|
75
|
-
})
|
|
76
|
-
console.log(res)
|
|
77
|
-
res.rows[0].tradeAmount = '很长很长很长很长很长很长很长很长很长'
|
|
78
|
-
return res
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
methods: {},
|
|
84
|
-
}
|
|
85
|
-
</script>
|
|
86
|
-
|
|
87
|
-
<style lang="less" scoped>
|
|
88
|
-
.container {
|
|
89
|
-
height: calc(100vh);
|
|
90
|
-
width: 100vw;
|
|
91
|
-
.tab {
|
|
92
|
-
height: 100px;
|
|
93
|
-
width: 100vw;
|
|
94
|
-
background: rgba(121, 114, 254, 0.5);
|
|
95
|
-
display: flex;
|
|
96
|
-
align-items: center;
|
|
97
|
-
justify-content: center;
|
|
98
|
-
font-size: 20px;
|
|
99
|
-
color: #666;
|
|
100
|
-
}
|
|
101
|
-
.table {
|
|
102
|
-
height: calc(100vh - 100px);
|
|
103
|
-
width: 100vw;
|
|
104
|
-
.top-Unfixed {
|
|
105
|
-
display: flex;
|
|
106
|
-
align-items: center;
|
|
107
|
-
justify-content: center;
|
|
108
|
-
font-size: 20px;
|
|
109
|
-
height: 100px;
|
|
110
|
-
background: rgba(0, 197, 141, 0.2);
|
|
111
|
-
color: #666;
|
|
112
|
-
}
|
|
113
|
-
.top-Fixed {
|
|
114
|
-
display: flex;
|
|
115
|
-
flex-direction: column;
|
|
116
|
-
align-items: center;
|
|
117
|
-
justify-content: center;
|
|
118
|
-
font-size: 20px;
|
|
119
|
-
height: 100px;
|
|
120
|
-
background: rgba(255, 112, 108, 0.3);
|
|
121
|
-
color: #666;
|
|
122
|
-
.btn-bar {
|
|
123
|
-
width: 90%;
|
|
124
|
-
color: #666;
|
|
125
|
-
display: flex;
|
|
126
|
-
justify-content: flex-end;
|
|
127
|
-
padding-right: 30px;
|
|
128
|
-
margin-top: 20px;
|
|
129
|
-
> div {
|
|
130
|
-
font-size: 14px;
|
|
131
|
-
border: 1px solid #666;
|
|
132
|
-
margin-left: 20px;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
</style>
|
|
139
|
-
|
package/src/view/home/index.vue
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="container">
|
|
3
|
-
<div class="tab">tab</div>
|
|
4
|
-
<div class="table">
|
|
5
|
-
<QueryTable
|
|
6
|
-
:isScrollShowTotal="isScrollShowTotal"
|
|
7
|
-
ref="table"
|
|
8
|
-
showPage
|
|
9
|
-
:showIndex="true"
|
|
10
|
-
menuId="156439900739872047"
|
|
11
|
-
searchCode="pe_im_stocks-selection_index_field"
|
|
12
|
-
:config="configs">
|
|
13
|
-
<template slot="topUnfixed">
|
|
14
|
-
<div>不吸住</div>
|
|
15
|
-
<div>不吸住</div>
|
|
16
|
-
<div>不吸住</div>
|
|
17
|
-
<div>不吸住</div>
|
|
18
|
-
</template>
|
|
19
|
-
<template slot="topFixed">
|
|
20
|
-
<div>吸住</div>
|
|
21
|
-
<div>吸住</div>
|
|
22
|
-
<div>吸住</div>
|
|
23
|
-
<div>吸住</div>
|
|
24
|
-
<div>吸住</div>
|
|
25
|
-
<div>吸住</div>
|
|
26
|
-
<div @click="$refs.table.openSetting()">打开个性设置</div>
|
|
27
|
-
<div @click="$refs.table.loadData()">刷新</div>
|
|
28
|
-
</template>
|
|
29
|
-
</QueryTable>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
<!-- </div> -->
|
|
33
|
-
<!-- </div> -->
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<script>
|
|
37
|
-
import QueryTable from './query-table/index.js'
|
|
38
|
-
import { mockParams } from './config'
|
|
39
|
-
export default {
|
|
40
|
-
mixins: [],
|
|
41
|
-
components: {
|
|
42
|
-
QueryTable,
|
|
43
|
-
},
|
|
44
|
-
data() {
|
|
45
|
-
return {
|
|
46
|
-
isScrollShowTotal: true,
|
|
47
|
-
shwoTable: true,
|
|
48
|
-
// props分功能块
|
|
49
|
-
configs: {
|
|
50
|
-
url: 'pe.stock.app.resource.search.v1',
|
|
51
|
-
appkey: '61189',
|
|
52
|
-
beforeHttp({ params }) {
|
|
53
|
-
// 增加header
|
|
54
|
-
params = { ...mockParams }
|
|
55
|
-
return { params }
|
|
56
|
-
},
|
|
57
|
-
// 处理出参
|
|
58
|
-
afterHttp(res) {
|
|
59
|
-
res.rows[0].name = 'afterHttp'
|
|
60
|
-
return res
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
methods: {
|
|
66
|
-
init() {
|
|
67
|
-
// this.resetTableHeight()
|
|
68
|
-
},
|
|
69
|
-
resetTableHeight() {
|
|
70
|
-
// TODO 先显示再隐藏,让表格继承到正确的高度
|
|
71
|
-
this.shwoTable = false
|
|
72
|
-
this.$nextTick(() => {
|
|
73
|
-
setTimeout(() => {
|
|
74
|
-
this.shwoTable = true
|
|
75
|
-
}, 0)
|
|
76
|
-
})
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
mounted() {
|
|
80
|
-
this.init()
|
|
81
|
-
},
|
|
82
|
-
}
|
|
83
|
-
</script>
|
|
84
|
-
|
|
85
|
-
<style lang="less" scoped>
|
|
86
|
-
.container {
|
|
87
|
-
height: 100vh;
|
|
88
|
-
.tab {
|
|
89
|
-
height: 100px;
|
|
90
|
-
background: #f96a26;
|
|
91
|
-
}
|
|
92
|
-
.table {
|
|
93
|
-
height: calc(100vh - 100px);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
</style>
|
|
97
|
-
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
## 目录说明
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
- **/assets**: 存放公共资源,如图标。
|
|
5
|
-
- **/components**: 存放组件。
|
|
6
|
-
- **/query-table**: 主组件。
|
|
7
|
-
- **/index.vue**: 主组件。
|
|
8
|
-
- **/mixins**: query-table的mixins。
|
|
9
|
-
- **/column-mixin**: 表格列头相关。
|
|
10
|
-
- **/column-setting**: 个性设置相关。
|
|
11
|
-
- **/data-mixin**: 行数据相关。
|
|
12
|
-
- **/pagination-mixin**: 表格分页相关。
|
|
13
|
-
- **/table-fixed**: 吸顶相关。
|
|
14
|
-
- **/table-horizontal.js**: 横屏相关。
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- **/table-horizontal**: 表格横屏组件。
|
|
18
|
-
- **/table-pagination**: 表格分页组件。
|
|
19
|
-
- **table-settings**: 个性设置组件。
|
|
20
|
-
- **tooltip**: 单元格气泡组件。
|
|
21
|
-
- **/demo**: 存放demo。
|
|
22
|
-
- **/hooks**: 存放封装的通用逻辑。与utils不同的是,hooks内部是可以有状态、多实例的。
|
|
23
|
-
- **/use-cache-promise**: 缓存promise结果。
|
|
24
|
-
- **/use-column-config**: 获取列配置
|
|
25
|
-
- **/use-encryption**: 加解密
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- **/index.js**: 项目主入口。
|
|
30
|
-
- **/mixins**: 项目级mixins。
|
|
31
|
-
- **/store**: 存放共享数据。注意,不带响应式。
|
|
32
|
-
- **/column-store**: 列存储
|
|
33
|
-
|
|
34
|
-
- **/styles**: 存放样式。
|
|
35
|
-
- **/utils**: 存放工具函数。
|
|
36
|
-
- **/column**: 列工具
|
|
37
|
-
- **/encryption**: 加解密
|
|
38
|
-
- **/http**: http
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- **/tests**: 存放测试文件,确保代码的质量。
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
- **README.md**: 项目说明文件,提供项目的基本信息和使用说明。
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { http } from '../utils/http'
|
|
2
|
-
|
|
3
|
-
export const APPKEY_SYSTEM = '10124'
|
|
4
|
-
|
|
5
|
-
// 获取当前菜单下的通用查询配置
|
|
6
|
-
export const getGenericSearch = () => {
|
|
7
|
-
return http('system.genericSearch.listByMenuId', APPKEY_SYSTEM, { menuId: ksui.menu.id })
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
// 通过id获取详细配置
|
|
11
|
-
export const getGenericSearchById = (params) =>
|
|
12
|
-
http('system.genericSearch.get', APPKEY_SYSTEM, params)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M16.799951171875,4.299951171875L8.994601171875,11.999951171875L16.799951171875,19.699951171875L15.684901171875,20.799951171875L7.507864171875,12.733281171875C7.097313171875,12.328281171875,7.097313171875,11.671631171875,7.507864171875,11.266621171875L15.684901171875,3.199951171875L16.799951171875,4.299951171875Z" fill-rule="evenodd" fill="#1C1E23" fill-opacity="1"/></g></g></svg>
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
|
|
3
|
-
import isFunction from 'lodash/isFunction'
|
|
4
|
-
import './style/cell.less'
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
name: 'cellCompoent',
|
|
8
|
-
computed: {
|
|
9
|
-
style() {
|
|
10
|
-
const obj = this.fixed
|
|
11
|
-
? {
|
|
12
|
-
zIndex: '10',
|
|
13
|
-
}
|
|
14
|
-
: {}
|
|
15
|
-
return {
|
|
16
|
-
width: this.width + 'px',
|
|
17
|
-
transform: `translateX(${this.offset}px)`,
|
|
18
|
-
...obj,
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
fixedClassName() {
|
|
22
|
-
return this.fixed ? 'pe-table-cell__fixed' : ''
|
|
23
|
-
},
|
|
24
|
-
lastFixedClassName() {
|
|
25
|
-
return this.lastFixedCell ? 'pe-table-cell__last-fixed' : ''
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
data() {
|
|
29
|
-
return {
|
|
30
|
-
width: 0,
|
|
31
|
-
offset: 0,
|
|
32
|
-
text: '',
|
|
33
|
-
column: undefined,
|
|
34
|
-
fixed: false,
|
|
35
|
-
lastFixedCell: false,
|
|
36
|
-
rowData: undefined,
|
|
37
|
-
handleEvent: undefined,
|
|
38
|
-
cellClassName: undefined,
|
|
39
|
-
globalCellClassName: undefined,
|
|
40
|
-
placeholderSign: false,
|
|
41
|
-
longPressTimer: null,
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
mounted() {
|
|
45
|
-
const $cell = this.$refs.cell
|
|
46
|
-
$cell.addEventListener('mousedown', this.startLongPress)
|
|
47
|
-
$cell.addEventListener('mouseup', this.endLongPress)
|
|
48
|
-
$cell.addEventListener('mouseleave', this.endLongPress)
|
|
49
|
-
|
|
50
|
-
$cell.addEventListener('touchstart', this.startLongPress)
|
|
51
|
-
$cell.addEventListener('touchend', this.endLongPress)
|
|
52
|
-
$cell.addEventListener('touchmove', this.endLongPress)
|
|
53
|
-
$cell.addEventListener('touchcancel', this.endLongPress)
|
|
54
|
-
},
|
|
55
|
-
beforeDestroy() {
|
|
56
|
-
const $cell = this.$refs.cell
|
|
57
|
-
$cell.removeEventListener('mousedown', this.startLongPress)
|
|
58
|
-
$cell.removeEventListener('mouseup', this.endLongPress)
|
|
59
|
-
$cell.removeEventListener('mouseleave', this.endLongPress)
|
|
60
|
-
|
|
61
|
-
$cell.removeEventListener('touchstart', this.startLongPress)
|
|
62
|
-
$cell.removeEventListener('touchend', this.endLongPress)
|
|
63
|
-
$cell.removeEventListener('touchmove', this.endLongPress)
|
|
64
|
-
$cell.removeEventListener('touchcancel', this.endLongPress)
|
|
65
|
-
},
|
|
66
|
-
render(h) {
|
|
67
|
-
const { rowCellRender, key } = this.column || {}
|
|
68
|
-
const createContent = () => {
|
|
69
|
-
if (this.placeholderSign) {
|
|
70
|
-
return null
|
|
71
|
-
}
|
|
72
|
-
let labelNode = null
|
|
73
|
-
const params = {
|
|
74
|
-
column: this.column,
|
|
75
|
-
value: this.text,
|
|
76
|
-
rowData: this.originRowData,
|
|
77
|
-
columnIndex: this.columnIndex,
|
|
78
|
-
rowIndex: this.rowIndex,
|
|
79
|
-
}
|
|
80
|
-
const defaultLable = () => <span class="pe-table-cell_label">{this.text}</span>
|
|
81
|
-
if (isFunction(rowCellRender)) {
|
|
82
|
-
labelNode = rowCellRender(h, params)
|
|
83
|
-
if (labelNode === null) {
|
|
84
|
-
labelNode = defaultLable()
|
|
85
|
-
}
|
|
86
|
-
} else {
|
|
87
|
-
labelNode = defaultLable()
|
|
88
|
-
}
|
|
89
|
-
return labelNode
|
|
90
|
-
}
|
|
91
|
-
const content = createContent()
|
|
92
|
-
let classNames = [
|
|
93
|
-
'pe-table-cell',
|
|
94
|
-
this.globalCellClassName,
|
|
95
|
-
this.cellClassName,
|
|
96
|
-
this.lastFixedClassName,
|
|
97
|
-
this.fixedClassName
|
|
98
|
-
]
|
|
99
|
-
return (
|
|
100
|
-
<div
|
|
101
|
-
ref="cell"
|
|
102
|
-
class={classNames}
|
|
103
|
-
style={this.style}
|
|
104
|
-
on-click={this.handleClickEvent}
|
|
105
|
-
data-cellkey={key}
|
|
106
|
-
>
|
|
107
|
-
{content}
|
|
108
|
-
</div>
|
|
109
|
-
)
|
|
110
|
-
},
|
|
111
|
-
methods: {
|
|
112
|
-
setContent(text) {
|
|
113
|
-
// 判空,否则没有值会显示undefined,特别是自定义列没有返回的时候
|
|
114
|
-
if (undefined === text) {
|
|
115
|
-
return ''
|
|
116
|
-
}
|
|
117
|
-
this.text = String(text)
|
|
118
|
-
},
|
|
119
|
-
setOffset(offset) {
|
|
120
|
-
this.offset = offset
|
|
121
|
-
},
|
|
122
|
-
reuse({
|
|
123
|
-
id,
|
|
124
|
-
offset,
|
|
125
|
-
text,
|
|
126
|
-
width,
|
|
127
|
-
column,
|
|
128
|
-
fixed,
|
|
129
|
-
lastFixedCell,
|
|
130
|
-
rowData,
|
|
131
|
-
columnIndex,
|
|
132
|
-
rowIndex,
|
|
133
|
-
cellClassName,
|
|
134
|
-
originRowData,
|
|
135
|
-
globalCellClassName,
|
|
136
|
-
placeholderSign,
|
|
137
|
-
}) {
|
|
138
|
-
this.id = id
|
|
139
|
-
this.width = width
|
|
140
|
-
this.column = column
|
|
141
|
-
this.fixed = fixed
|
|
142
|
-
this.lastFixedCell = lastFixedCell
|
|
143
|
-
this.rowData = rowData
|
|
144
|
-
this.columnIndex = columnIndex
|
|
145
|
-
this.rowIndex = rowIndex
|
|
146
|
-
this.cellClassName = cellClassName
|
|
147
|
-
this.globalCellClassName = globalCellClassName
|
|
148
|
-
this.originRowData = originRowData
|
|
149
|
-
this.placeholderSign = placeholderSign
|
|
150
|
-
this.setOffset(offset)
|
|
151
|
-
this.setContent(text)
|
|
152
|
-
},
|
|
153
|
-
handleClickEvent(event) {
|
|
154
|
-
const params = {
|
|
155
|
-
column: this.column,
|
|
156
|
-
rowData: this.originRowData,
|
|
157
|
-
name: 'cell-click',
|
|
158
|
-
rowIndex: this.rowIndex,
|
|
159
|
-
columnIndex: this.columnIndex,
|
|
160
|
-
}
|
|
161
|
-
this.handleEvent && this.handleEvent(event, params)
|
|
162
|
-
},
|
|
163
|
-
handleLongEvent(event, params) {
|
|
164
|
-
this.handleEvent && this.handleEvent(event, params)
|
|
165
|
-
},
|
|
166
|
-
startLongPress(event) {
|
|
167
|
-
this.longPressTimer && this.endLongPress()
|
|
168
|
-
const params = {
|
|
169
|
-
column: this.column,
|
|
170
|
-
rowData: this.originRowData,
|
|
171
|
-
name: 'cell-long',
|
|
172
|
-
rowIndex: this.rowIndex,
|
|
173
|
-
columnIndex: this.columnIndex,
|
|
174
|
-
}
|
|
175
|
-
this.longPressTimer = setTimeout(() => {
|
|
176
|
-
this.handleLongEvent(event, params)
|
|
177
|
-
}, 500);
|
|
178
|
-
},
|
|
179
|
-
endLongPress() {
|
|
180
|
-
clearTimeout(this.longPressTimer)
|
|
181
|
-
this.longPressTimer = null
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
}
|