widget.qw 1.0.6 → 1.0.7
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/build/style.css +19 -19
- package/build/widget.qw.es.js +10 -13
- package/build/widget.qw.umd.js +10 -13
- package/package.json +1 -1
- package/src/components/CascaderPicker.vue +5 -4
- package/src/components/CascaderPop.vue +3 -7
- package/src/router/index.ts +4 -0
- package/vite.config.ts +2 -2
package/build/style.css
CHANGED
|
@@ -762,25 +762,25 @@
|
|
|
762
762
|
margin:3px;
|
|
763
763
|
}
|
|
764
764
|
|
|
765
|
-
.cascader-pop[data-v-
|
|
765
|
+
.cascader-pop[data-v-e8f93d5a] {
|
|
766
766
|
width: 100%;
|
|
767
767
|
overflow: hidden;
|
|
768
768
|
}
|
|
769
|
-
.cascader-selector[data-v-
|
|
769
|
+
.cascader-selector[data-v-e8f93d5a] {
|
|
770
770
|
padding: 10px;
|
|
771
771
|
}
|
|
772
|
-
.search-buttons[data-v-
|
|
772
|
+
.search-buttons[data-v-e8f93d5a] {
|
|
773
773
|
display: flex;
|
|
774
774
|
gap: 10px;
|
|
775
775
|
}
|
|
776
|
-
.clear-btn[data-v-
|
|
776
|
+
.clear-btn[data-v-e8f93d5a] {
|
|
777
777
|
background-color: #f2f3f5;
|
|
778
778
|
border: none;
|
|
779
779
|
border-radius: 4px;
|
|
780
780
|
padding: 4px 8px;
|
|
781
781
|
font-size: 14px;
|
|
782
782
|
}
|
|
783
|
-
.confirm-btn[data-v-
|
|
783
|
+
.confirm-btn[data-v-e8f93d5a] {
|
|
784
784
|
background-color: #1989fa;
|
|
785
785
|
color: white;
|
|
786
786
|
border: none;
|
|
@@ -788,19 +788,19 @@
|
|
|
788
788
|
padding: 4px 8px;
|
|
789
789
|
font-size: 14px;
|
|
790
790
|
}
|
|
791
|
-
.no-results[data-v-
|
|
791
|
+
.no-results[data-v-e8f93d5a] {
|
|
792
792
|
text-align: center;
|
|
793
793
|
padding: 20px;
|
|
794
794
|
color: #969799;
|
|
795
795
|
}
|
|
796
|
-
.cascader-header[data-v-
|
|
796
|
+
.cascader-header[data-v-e8f93d5a] {
|
|
797
797
|
padding: 10px;
|
|
798
798
|
border-bottom: 1px solid #ebedf0;
|
|
799
799
|
display: flex;
|
|
800
800
|
justify-content: space-between;
|
|
801
801
|
align-items: center;
|
|
802
802
|
}
|
|
803
|
-
.current-path[data-v-
|
|
803
|
+
.current-path[data-v-e8f93d5a] {
|
|
804
804
|
flex: 1;
|
|
805
805
|
font-size: 14px;
|
|
806
806
|
color: #323233;
|
|
@@ -808,25 +808,25 @@
|
|
|
808
808
|
overflow: hidden;
|
|
809
809
|
text-overflow: ellipsis;
|
|
810
810
|
}
|
|
811
|
-
.header-right[data-v-
|
|
811
|
+
.header-right[data-v-e8f93d5a] {
|
|
812
812
|
display: flex;
|
|
813
813
|
gap: 8px;
|
|
814
814
|
margin-left: auto;
|
|
815
815
|
}
|
|
816
|
-
.cancel-btn[data-v-
|
|
816
|
+
.cancel-btn[data-v-e8f93d5a] {
|
|
817
817
|
color: #969799;
|
|
818
818
|
margin-right: 5px;
|
|
819
819
|
}
|
|
820
|
-
.scroll-container[data-v-
|
|
820
|
+
.scroll-container[data-v-e8f93d5a] {
|
|
821
821
|
height: calc(80vh - 150px);
|
|
822
822
|
overflow-y: auto;
|
|
823
823
|
}
|
|
824
|
-
.cell-content[data-v-
|
|
824
|
+
.cell-content[data-v-e8f93d5a] {
|
|
825
825
|
display: flex;
|
|
826
826
|
align-items: center;
|
|
827
827
|
gap: 12px;
|
|
828
828
|
}
|
|
829
|
-
.circle-selector[data-v-
|
|
829
|
+
.circle-selector[data-v-e8f93d5a] {
|
|
830
830
|
width: 20px;
|
|
831
831
|
height: 20px;
|
|
832
832
|
border-radius: 50%;
|
|
@@ -836,29 +836,29 @@
|
|
|
836
836
|
transition: all 0.2s;
|
|
837
837
|
flex-shrink: 0;
|
|
838
838
|
}
|
|
839
|
-
.circle-selector.selected[data-v-
|
|
839
|
+
.circle-selector.selected[data-v-e8f93d5a] {
|
|
840
840
|
background-color: #1989fa;
|
|
841
841
|
border-color: #1989fa;
|
|
842
842
|
}
|
|
843
|
-
.circle-selector.selected .van-icon[data-v-
|
|
843
|
+
.circle-selector.selected .van-icon[data-v-e8f93d5a] {
|
|
844
844
|
color: white;
|
|
845
845
|
font-size: 14px;
|
|
846
846
|
}
|
|
847
|
-
.van-cell__right-icon[data-v-
|
|
847
|
+
.van-cell__right-icon[data-v-e8f93d5a] {
|
|
848
848
|
color: #969799;
|
|
849
849
|
font-size: 16px;
|
|
850
850
|
margin-left: 8px;
|
|
851
851
|
}
|
|
852
|
-
.name[data-v-
|
|
852
|
+
.name[data-v-e8f93d5a] {
|
|
853
853
|
flex: 1;
|
|
854
854
|
overflow: hidden;
|
|
855
855
|
text-overflow: ellipsis;
|
|
856
856
|
white-space: nowrap;
|
|
857
857
|
}
|
|
858
|
-
.cancel-btn[data-v-
|
|
858
|
+
.cancel-btn[data-v-e8f93d5a] {
|
|
859
859
|
color: #969799;
|
|
860
860
|
}
|
|
861
|
-
.search-field[data-v-
|
|
861
|
+
.search-field[data-v-e8f93d5a] {
|
|
862
862
|
background: #fff;
|
|
863
863
|
padding: 10px 16px;
|
|
864
864
|
border-bottom: 1px solid #ebedf0;
|
package/build/widget.qw.es.js
CHANGED
|
@@ -2949,7 +2949,7 @@ var lib = {
|
|
|
2949
2949
|
parse,
|
|
2950
2950
|
stringify
|
|
2951
2951
|
};
|
|
2952
|
-
const NEED_LOGIN = { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG":
|
|
2952
|
+
const NEED_LOGIN = { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG": true, "VUE_APP_DEBUG_TOKEN": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIwMTQzOTEiLCJyblN0ciI6ImZ0ejhnaFpLMWR4ejhnOTFDZkJUMXQxVWNJajF3R3c1In0.tgI4iGOJ8OrjoqWIqC2pjH7J52l6H7wyuUwJATKIVns" }.VUE_APP_NEED_LOGIN_CODE;
|
|
2953
2953
|
const NEED_LOGIN_CODES = [
|
|
2954
2954
|
NEED_LOGIN
|
|
2955
2955
|
];
|
|
@@ -2959,11 +2959,10 @@ function setCacheValueByKey(key, val) {
|
|
|
2959
2959
|
function removeCacheByKey(key) {
|
|
2960
2960
|
localStorage.removeItem(key);
|
|
2961
2961
|
}
|
|
2962
|
-
const TOKEN_KEY = { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG":
|
|
2963
|
-
const TOKEN_PREFIX = { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG":
|
|
2962
|
+
const TOKEN_KEY = { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG": true, "VUE_APP_DEBUG_TOKEN": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIwMTQzOTEiLCJyblN0ciI6ImZ0ejhnaFpLMWR4ejhnOTFDZkJUMXQxVWNJajF3R3c1In0.tgI4iGOJ8OrjoqWIqC2pjH7J52l6H7wyuUwJATKIVns" }.VUE_APP_TOKEN_KEY;
|
|
2963
|
+
const TOKEN_PREFIX = { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG": true, "VUE_APP_DEBUG_TOKEN": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIwMTQzOTEiLCJyblN0ciI6ImZ0ejhnaFpLMWR4ejhnOTFDZkJUMXQxVWNJajF3R3c1In0.tgI4iGOJ8OrjoqWIqC2pjH7J52l6H7wyuUwJATKIVns" }.VUE_APP_TOKEN_PREFIX;
|
|
2964
2964
|
function getToken() {
|
|
2965
|
-
|
|
2966
|
-
return vm.tokenCallback();
|
|
2965
|
+
return TOKEN_PREFIX + { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG": true, "VUE_APP_DEBUG_TOKEN": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIwMTQzOTEiLCJyblN0ciI6ImZ0ejhnaFpLMWR4ejhnOTFDZkJUMXQxVWNJajF3R3c1In0.tgI4iGOJ8OrjoqWIqC2pjH7J52l6H7wyuUwJATKIVns" }.VUE_APP_DEBUG_TOKEN;
|
|
2967
2966
|
}
|
|
2968
2967
|
function setToken(token2) {
|
|
2969
2968
|
setCacheValueByKey(TOKEN_KEY, token2);
|
|
@@ -20570,7 +20569,7 @@ const _sfc_main$2 = {
|
|
|
20570
20569
|
}
|
|
20571
20570
|
};
|
|
20572
20571
|
var TreePicker = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6744b874"]]);
|
|
20573
|
-
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-
|
|
20572
|
+
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-e8f93d5a] {\r\n width: 100%;\r\n overflow: hidden;\n}\n.cascader-selector[data-v-e8f93d5a] {\r\n padding: 10px;\n}\n.search-buttons[data-v-e8f93d5a] {\r\n display: flex;\r\n gap: 10px;\n}\n.clear-btn[data-v-e8f93d5a] {\r\n background-color: #f2f3f5;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.confirm-btn[data-v-e8f93d5a] {\r\n background-color: #1989fa;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.no-results[data-v-e8f93d5a] {\r\n text-align: center;\r\n padding: 20px;\r\n color: #969799;\n}\n.cascader-header[data-v-e8f93d5a] {\r\n padding: 10px;\r\n border-bottom: 1px solid #ebedf0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.current-path[data-v-e8f93d5a] {\r\n flex: 1;\r\n font-size: 14px;\r\n color: #323233;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\n}\n.header-right[data-v-e8f93d5a] {\r\n display: flex;\r\n gap: 8px;\r\n margin-left: auto;\n}\n.cancel-btn[data-v-e8f93d5a] {\r\n color: #969799;\r\n margin-right: 5px;\n}\n.scroll-container[data-v-e8f93d5a] {\r\n height: calc(80vh - 150px);\r\n overflow-y: auto;\n}\n.cell-content[data-v-e8f93d5a] {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\n}\n.circle-selector[data-v-e8f93d5a] {\r\n width: 20px;\r\n height: 20px;\r\n border-radius: 50%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.2s;\r\n flex-shrink: 0;\n}\n.circle-selector.selected[data-v-e8f93d5a] {\r\n background-color: #1989fa;\r\n border-color: #1989fa;\n}\n.circle-selector.selected .van-icon[data-v-e8f93d5a] {\r\n color: white;\r\n font-size: 14px;\n}\n.van-cell__right-icon[data-v-e8f93d5a] {\r\n color: #969799;\r\n font-size: 16px;\r\n margin-left: 8px;\n}\n.name[data-v-e8f93d5a] {\r\n flex: 1;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\n}\n.cancel-btn[data-v-e8f93d5a] {\r\n color: #969799;\n}\n.search-field[data-v-e8f93d5a] {\r\n background: #fff;\r\n padding: 10px 16px;\r\n border-bottom: 1px solid #ebedf0;\r\n position: sticky;\r\n top: 0;\r\n z-index: 999;\r\n margin-bottom: 10px;\r\n flex-shrink: 0;\r\n /* \u9632\u6B62\u538B\u7F29 */\n}\r\n")();
|
|
20574
20573
|
const _hoisted_1 = {
|
|
20575
20574
|
class: "cascader-selector"
|
|
20576
20575
|
};
|
|
@@ -20634,15 +20633,12 @@ const _sfc_main$1 = {
|
|
|
20634
20633
|
const data2 = reactive({
|
|
20635
20634
|
totalNodes: [],
|
|
20636
20635
|
keyword: "",
|
|
20637
|
-
searchNodes: [],
|
|
20638
20636
|
currentNode: null,
|
|
20639
20637
|
selectedNodeId: ""
|
|
20640
20638
|
});
|
|
20641
20639
|
const optionNodes = computed(() => {
|
|
20642
20640
|
var _a;
|
|
20643
|
-
if (data2.
|
|
20644
|
-
return data2.searchNodes;
|
|
20645
|
-
else if (data2.currentNode)
|
|
20641
|
+
if (data2.currentNode)
|
|
20646
20642
|
return ((_a = data2.currentNode) == null ? void 0 : _a.children) ? data2.currentNode.children : [];
|
|
20647
20643
|
else
|
|
20648
20644
|
return data2.totalNodes ? data2.totalNodes : [];
|
|
@@ -20668,7 +20664,8 @@ const _sfc_main$1 = {
|
|
|
20668
20664
|
keyword: data2.keyword,
|
|
20669
20665
|
parentId: ""
|
|
20670
20666
|
}, (nodes) => {
|
|
20671
|
-
data2.
|
|
20667
|
+
data2.totalNodes = nodes;
|
|
20668
|
+
data2.currentNode = null;
|
|
20672
20669
|
});
|
|
20673
20670
|
});
|
|
20674
20671
|
const onBack = () => {
|
|
@@ -20679,7 +20676,6 @@ const _sfc_main$1 = {
|
|
|
20679
20676
|
};
|
|
20680
20677
|
const onClear = () => {
|
|
20681
20678
|
data2.keyword = "";
|
|
20682
|
-
data2.searchNodes = [];
|
|
20683
20679
|
};
|
|
20684
20680
|
const reset = () => {
|
|
20685
20681
|
data2.currentNode = null;
|
|
@@ -20809,7 +20805,7 @@ const _sfc_main$1 = {
|
|
|
20809
20805
|
};
|
|
20810
20806
|
}
|
|
20811
20807
|
};
|
|
20812
|
-
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
20808
|
+
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-e8f93d5a"]]);
|
|
20813
20809
|
const _sfc_main = {
|
|
20814
20810
|
__name: "CascaderPicker",
|
|
20815
20811
|
props: {
|
|
@@ -20872,6 +20868,7 @@ const _sfc_main = {
|
|
|
20872
20868
|
});
|
|
20873
20869
|
const onSelect = (node) => {
|
|
20874
20870
|
data2.selectedNode = node;
|
|
20871
|
+
emit("select", data2.selectedNode);
|
|
20875
20872
|
};
|
|
20876
20873
|
const onDelete = () => {
|
|
20877
20874
|
data2.selectedNode = {};
|
package/build/widget.qw.umd.js
CHANGED
|
@@ -2952,7 +2952,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
2952
2952
|
parse,
|
|
2953
2953
|
stringify
|
|
2954
2954
|
};
|
|
2955
|
-
const NEED_LOGIN = { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG":
|
|
2955
|
+
const NEED_LOGIN = { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG": true, "VUE_APP_DEBUG_TOKEN": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIwMTQzOTEiLCJyblN0ciI6ImZ0ejhnaFpLMWR4ejhnOTFDZkJUMXQxVWNJajF3R3c1In0.tgI4iGOJ8OrjoqWIqC2pjH7J52l6H7wyuUwJATKIVns" }.VUE_APP_NEED_LOGIN_CODE;
|
|
2956
2956
|
const NEED_LOGIN_CODES = [
|
|
2957
2957
|
NEED_LOGIN
|
|
2958
2958
|
];
|
|
@@ -2962,11 +2962,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
2962
2962
|
function removeCacheByKey(key) {
|
|
2963
2963
|
localStorage.removeItem(key);
|
|
2964
2964
|
}
|
|
2965
|
-
const TOKEN_KEY = { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG":
|
|
2966
|
-
const TOKEN_PREFIX = { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG":
|
|
2965
|
+
const TOKEN_KEY = { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG": true, "VUE_APP_DEBUG_TOKEN": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIwMTQzOTEiLCJyblN0ciI6ImZ0ejhnaFpLMWR4ejhnOTFDZkJUMXQxVWNJajF3R3c1In0.tgI4iGOJ8OrjoqWIqC2pjH7J52l6H7wyuUwJATKIVns" }.VUE_APP_TOKEN_KEY;
|
|
2966
|
+
const TOKEN_PREFIX = { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG": true, "VUE_APP_DEBUG_TOKEN": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIwMTQzOTEiLCJyblN0ciI6ImZ0ejhnaFpLMWR4ejhnOTFDZkJUMXQxVWNJajF3R3c1In0.tgI4iGOJ8OrjoqWIqC2pjH7J52l6H7wyuUwJATKIVns" }.VUE_APP_TOKEN_PREFIX;
|
|
2967
2967
|
function getToken() {
|
|
2968
|
-
|
|
2969
|
-
return vm.tokenCallback();
|
|
2968
|
+
return TOKEN_PREFIX + { "VUE_APP_DOMAIN": "https://www.hbhjhx.asia", "VUE_APP_TOKEN_KEY": "Authorization", "VUE_APP_TOKEN_PREFIX": "Bearer ", "VUE_APP_NEED_LOGIN_CODE": 401, "VUE_APP_IS_DEBUG": true, "VUE_APP_DEBUG_TOKEN": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIwMTQzOTEiLCJyblN0ciI6ImZ0ejhnaFpLMWR4ejhnOTFDZkJUMXQxVWNJajF3R3c1In0.tgI4iGOJ8OrjoqWIqC2pjH7J52l6H7wyuUwJATKIVns" }.VUE_APP_DEBUG_TOKEN;
|
|
2970
2969
|
}
|
|
2971
2970
|
function setToken(token2) {
|
|
2972
2971
|
setCacheValueByKey(TOKEN_KEY, token2);
|
|
@@ -20573,7 +20572,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20573
20572
|
}
|
|
20574
20573
|
};
|
|
20575
20574
|
var TreePicker = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6744b874"]]);
|
|
20576
|
-
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-
|
|
20575
|
+
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-e8f93d5a] {\r\n width: 100%;\r\n overflow: hidden;\n}\n.cascader-selector[data-v-e8f93d5a] {\r\n padding: 10px;\n}\n.search-buttons[data-v-e8f93d5a] {\r\n display: flex;\r\n gap: 10px;\n}\n.clear-btn[data-v-e8f93d5a] {\r\n background-color: #f2f3f5;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.confirm-btn[data-v-e8f93d5a] {\r\n background-color: #1989fa;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.no-results[data-v-e8f93d5a] {\r\n text-align: center;\r\n padding: 20px;\r\n color: #969799;\n}\n.cascader-header[data-v-e8f93d5a] {\r\n padding: 10px;\r\n border-bottom: 1px solid #ebedf0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.current-path[data-v-e8f93d5a] {\r\n flex: 1;\r\n font-size: 14px;\r\n color: #323233;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\n}\n.header-right[data-v-e8f93d5a] {\r\n display: flex;\r\n gap: 8px;\r\n margin-left: auto;\n}\n.cancel-btn[data-v-e8f93d5a] {\r\n color: #969799;\r\n margin-right: 5px;\n}\n.scroll-container[data-v-e8f93d5a] {\r\n height: calc(80vh - 150px);\r\n overflow-y: auto;\n}\n.cell-content[data-v-e8f93d5a] {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\n}\n.circle-selector[data-v-e8f93d5a] {\r\n width: 20px;\r\n height: 20px;\r\n border-radius: 50%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.2s;\r\n flex-shrink: 0;\n}\n.circle-selector.selected[data-v-e8f93d5a] {\r\n background-color: #1989fa;\r\n border-color: #1989fa;\n}\n.circle-selector.selected .van-icon[data-v-e8f93d5a] {\r\n color: white;\r\n font-size: 14px;\n}\n.van-cell__right-icon[data-v-e8f93d5a] {\r\n color: #969799;\r\n font-size: 16px;\r\n margin-left: 8px;\n}\n.name[data-v-e8f93d5a] {\r\n flex: 1;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\n}\n.cancel-btn[data-v-e8f93d5a] {\r\n color: #969799;\n}\n.search-field[data-v-e8f93d5a] {\r\n background: #fff;\r\n padding: 10px 16px;\r\n border-bottom: 1px solid #ebedf0;\r\n position: sticky;\r\n top: 0;\r\n z-index: 999;\r\n margin-bottom: 10px;\r\n flex-shrink: 0;\r\n /* \u9632\u6B62\u538B\u7F29 */\n}\r\n")();
|
|
20577
20576
|
const _hoisted_1 = {
|
|
20578
20577
|
class: "cascader-selector"
|
|
20579
20578
|
};
|
|
@@ -20637,15 +20636,12 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20637
20636
|
const data2 = vue.reactive({
|
|
20638
20637
|
totalNodes: [],
|
|
20639
20638
|
keyword: "",
|
|
20640
|
-
searchNodes: [],
|
|
20641
20639
|
currentNode: null,
|
|
20642
20640
|
selectedNodeId: ""
|
|
20643
20641
|
});
|
|
20644
20642
|
const optionNodes = vue.computed(() => {
|
|
20645
20643
|
var _a;
|
|
20646
|
-
if (data2.
|
|
20647
|
-
return data2.searchNodes;
|
|
20648
|
-
else if (data2.currentNode)
|
|
20644
|
+
if (data2.currentNode)
|
|
20649
20645
|
return ((_a = data2.currentNode) == null ? void 0 : _a.children) ? data2.currentNode.children : [];
|
|
20650
20646
|
else
|
|
20651
20647
|
return data2.totalNodes ? data2.totalNodes : [];
|
|
@@ -20671,7 +20667,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20671
20667
|
keyword: data2.keyword,
|
|
20672
20668
|
parentId: ""
|
|
20673
20669
|
}, (nodes) => {
|
|
20674
|
-
data2.
|
|
20670
|
+
data2.totalNodes = nodes;
|
|
20671
|
+
data2.currentNode = null;
|
|
20675
20672
|
});
|
|
20676
20673
|
});
|
|
20677
20674
|
const onBack = () => {
|
|
@@ -20682,7 +20679,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20682
20679
|
};
|
|
20683
20680
|
const onClear = () => {
|
|
20684
20681
|
data2.keyword = "";
|
|
20685
|
-
data2.searchNodes = [];
|
|
20686
20682
|
};
|
|
20687
20683
|
const reset = () => {
|
|
20688
20684
|
data2.currentNode = null;
|
|
@@ -20812,7 +20808,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20812
20808
|
};
|
|
20813
20809
|
}
|
|
20814
20810
|
};
|
|
20815
|
-
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
20811
|
+
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-e8f93d5a"]]);
|
|
20816
20812
|
const _sfc_main = {
|
|
20817
20813
|
__name: "CascaderPicker",
|
|
20818
20814
|
props: {
|
|
@@ -20875,6 +20871,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20875
20871
|
});
|
|
20876
20872
|
const onSelect = (node) => {
|
|
20877
20873
|
data2.selectedNode = node;
|
|
20874
|
+
emit("select", data2.selectedNode);
|
|
20878
20875
|
};
|
|
20879
20876
|
const onDelete = () => {
|
|
20880
20877
|
data2.selectedNode = {};
|
package/package.json
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
:placeholder="props.placeholder" :is-link="isReadonly ? false : true" @click="data.isShowPop = !isReadonly"
|
|
4
4
|
label-class="label">
|
|
5
5
|
<template #input v-if="modelValue">
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
<van-tag class="selected-node" v-if="modelValue" :closeable="!isDisabled" color="#fff" text-color="#333" size="medium"
|
|
7
|
+
@close.stop="onDelete">
|
|
8
|
+
{{ data.selectedNode.formatLabel }}
|
|
9
|
+
</van-tag>
|
|
10
10
|
</template>
|
|
11
11
|
</van-field>
|
|
12
12
|
|
|
@@ -78,6 +78,7 @@ onMounted(() => {
|
|
|
78
78
|
|
|
79
79
|
const onSelect = (node) => {
|
|
80
80
|
data.selectedNode = node
|
|
81
|
+
emit('select', data.selectedNode)
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
const onDelete=()=>{
|
|
@@ -84,8 +84,6 @@ const data = reactive({
|
|
|
84
84
|
totalNodes: [],
|
|
85
85
|
// 搜索关键字
|
|
86
86
|
keyword: "",
|
|
87
|
-
//关键字搜索到的节点列表
|
|
88
|
-
searchNodes: [],
|
|
89
87
|
//当前节点
|
|
90
88
|
currentNode: null,
|
|
91
89
|
//勾选的节点id
|
|
@@ -94,9 +92,7 @@ const data = reactive({
|
|
|
94
92
|
|
|
95
93
|
// 待选节点列表
|
|
96
94
|
const optionNodes = computed(() => {
|
|
97
|
-
if (data.
|
|
98
|
-
return data.searchNodes
|
|
99
|
-
else if (data.currentNode)
|
|
95
|
+
if (data.currentNode)
|
|
100
96
|
return data.currentNode?.children ? data.currentNode.children : []
|
|
101
97
|
else
|
|
102
98
|
return data.totalNodes ? data.totalNodes : []
|
|
@@ -123,7 +119,8 @@ const queryTotalNodes = async () => {
|
|
|
123
119
|
// 关键字查询
|
|
124
120
|
const onSearch = async () => {
|
|
125
121
|
await props.queryNodes({keyword:data.keyword,parentId:''}, (nodes) => {
|
|
126
|
-
data.
|
|
122
|
+
data.totalNodes = nodes
|
|
123
|
+
data.currentNode = null
|
|
127
124
|
})
|
|
128
125
|
}
|
|
129
126
|
|
|
@@ -138,7 +135,6 @@ const onBack = () => {
|
|
|
138
135
|
|
|
139
136
|
const onClear=()=>{
|
|
140
137
|
data.keyword = ''
|
|
141
|
-
data.searchNodes = []
|
|
142
138
|
}
|
|
143
139
|
|
|
144
140
|
// 清除掉选中节点
|
package/src/router/index.ts
CHANGED
|
@@ -165,10 +165,14 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
165
165
|
const router = createRouter({
|
|
166
166
|
history: createWebHashHistory(process.env.BASE_URL),
|
|
167
167
|
routes,
|
|
168
|
+
scrollBehavior(to, from, savedPosition) {
|
|
169
|
+
return { top: 0 }; // 强制滚动到顶部
|
|
170
|
+
}
|
|
168
171
|
});
|
|
169
172
|
|
|
170
173
|
router.beforeEach((to, from, next) => {
|
|
171
174
|
console.log("+++路由回调++++++++++++++++++++++");
|
|
175
|
+
const showTabBar = to.meta.showTabBar ?? true // 默认显示
|
|
172
176
|
next();
|
|
173
177
|
});
|
|
174
178
|
|
package/vite.config.ts
CHANGED
|
@@ -40,8 +40,8 @@ export default {
|
|
|
40
40
|
VUE_APP_NEED_LOGIN_CODE: 401,
|
|
41
41
|
//注意:发布时 VUE_APP_IS_DEBUG必须配置为false
|
|
42
42
|
// 本地开发时 VUE_APP_IS_DEBUG必须配置为true
|
|
43
|
-
VUE_APP_IS_DEBUG: false,
|
|
44
|
-
|
|
43
|
+
// VUE_APP_IS_DEBUG: false,
|
|
44
|
+
VUE_APP_IS_DEBUG: true,
|
|
45
45
|
VUE_APP_DEBUG_TOKEN: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIwMTQzOTEiLCJyblN0ciI6ImZ0ejhnaFpLMWR4ejhnOTFDZkJUMXQxVWNJajF3R3c1In0.tgI4iGOJ8OrjoqWIqC2pjH7J52l6H7wyuUwJATKIVns'
|
|
46
46
|
},
|
|
47
47
|
},
|