@cmstops/pro-compo 0.3.40 → 0.3.41

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.
@@ -1,14 +1,11 @@
1
- import { defineComponent, ref, computed, watch, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, Fragment, renderList, createBlock, withDirectives, createTextVNode, vShow } from "vue";
1
+ import { defineComponent, ref, computed, watch, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createElementVNode, toDisplayString, createBlock, withDirectives, createTextVNode, vShow } from "vue";
2
2
  import { Space, Input, Select, Option, Tooltip, Button } from "@arco-design/web-vue";
3
3
  import { IconInfoCircle, IconRefresh } from "@arco-design/web-vue/es/icon";
4
4
  import { docSeries, docThumbMap } from "../../../../utils/doc.js";
5
5
  import _sfc_main$1 from "../columnTree/index.js";
6
6
  const _hoisted_1 = { class: "media-filter-container" };
7
7
  const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "5px" } };
8
- const _hoisted_3 = /* @__PURE__ */ createElementVNode("span", null, "\u7CBE\u51C6\u641C", -1);
9
- const _hoisted_4 = { style: { "display": "flex", "align-items": "center", "gap": "5px" } };
10
- const _hoisted_5 = /* @__PURE__ */ createElementVNode("span", null, "\u6A21\u7CCA\u641C", -1);
11
- const _hoisted_6 = { class: "sort-button" };
8
+ const _hoisted_3 = { class: "sort-button" };
12
9
  const _sfc_main = defineComponent({
13
10
  ...{ name: "MediaFilter" },
14
11
  __name: "index",
@@ -23,7 +20,7 @@ const _sfc_main = defineComponent({
23
20
  emits: ["update:group_id", "search"],
24
21
  setup(__props, { emit: __emit }) {
25
22
  const props = __props;
26
- const column_id = ref(0);
23
+ const column_id = ref("all");
27
24
  const emit = __emit;
28
25
  const filter = ref({
29
26
  keywords: "",
@@ -34,6 +31,18 @@ const _sfc_main = defineComponent({
34
31
  order: "create_time",
35
32
  wordState: "precision"
36
33
  });
34
+ const wordStateOptions = [
35
+ {
36
+ value: "precision",
37
+ label: "\u7CBE\u51C6\u641C",
38
+ desc: "\u4F1A\u4EE5\u8F93\u5165\u7684\u5B8C\u6574\u5173\u952E\u8BCD\u201C\u6210\u957F\u201D\u8FDB\u884C\u641C\u7D22\uFF0C\u641C\u7D22\u7ED3\u679C\u5173\u8054\u6027\u66F4\u9AD8\uFF0C\u4F46\u641C\u7D22\u7ED3\u679C\u66F4\u5C11"
39
+ },
40
+ {
41
+ value: "blur",
42
+ label: "\u6A21\u7CCA\u641C",
43
+ desc: "\u4F1A\u5C06\u8F93\u5165\u5185\u5BB9\u5206\u8BCD\uFF0C\u4F8B\u5982\u201C\u6210\u957F\u201D\u4F1A\u5206\u4E3A\u201C\u6210\u201D\u3001\u201C\u957F\u201D\u3001\u201C\u6210\u957F\u201D\uFF0C\u5185\u5BB9\u5305\u542B\u4E09\u4E2A\u8BCD\u4E2D\u4EFB\u610F\u4E00\u4E2A\u5747\u4F1A\u663E\u793A\u51FA\u6765\uFF0C\u641C\u7D22\u5185\u5BB9\u66F4\u52A0\u4E30\u5BCC"
44
+ }
45
+ ];
37
46
  const bannerOptions = computed(() => {
38
47
  const options = [
39
48
  {
@@ -91,22 +100,24 @@ const _sfc_main = defineComponent({
91
100
  return filter.value.keywords || series || filter.value.cover_type || banner || filter.value.sort !== -1;
92
101
  });
93
102
  const reset = () => {
94
- filter.value = {
103
+ const _set = {
95
104
  keywords: "",
96
105
  cover_type: "",
97
106
  sort: -1,
98
107
  order: "create_time"
99
108
  };
109
+ Object.assign(filter.value, _set);
100
110
  if (props.banner !== "all") {
101
111
  filter.value.banner = props.banner;
102
112
  } else {
103
113
  filter.value.banner = "";
104
114
  }
105
- if (props.series !== "all") {
115
+ if (props.series !== "all" && props.series.split(",").length === 1) {
106
116
  filter.value.type = props.series;
107
117
  } else {
108
118
  filter.value.type = "";
109
119
  }
120
+ column_id.value = "all";
110
121
  };
111
122
  const checkout = (type) => {
112
123
  filter.value.wordState = type;
@@ -156,6 +167,7 @@ const _sfc_main = defineComponent({
156
167
  "allow-clear": "",
157
168
  class: "filter-item keyword",
158
169
  placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9\u6807\u9898",
170
+ style: { width: "240px" },
159
171
  onPressEnter: handleSearch
160
172
  }, {
161
173
  prepend: withCtx(() => [
@@ -166,48 +178,30 @@ const _sfc_main = defineComponent({
166
178
  onSelect: checkout
167
179
  }, {
168
180
  default: withCtx(() => [
169
- createVNode(unref(Option), {
170
- value: "precision",
171
- label: "\u7CBE\u51C6\u641C"
172
- }, {
173
- default: withCtx(() => [
174
- createElementVNode("div", _hoisted_2, [
175
- _hoisted_3,
176
- createVNode(unref(Tooltip), {
177
- effect: "dark",
178
- content: "\u4F1A\u4EE5\u8F93\u5165\u7684\u5B8C\u6574\u5173\u952E\u8BCD\u201C\u6210\u957F\u201D\u8FDB\u884C\u641C\u7D22\uFF0C\u641C\u7D22\u7ED3\u679C\u5173\u8054\u6027\u66F4\u9AD8\uFF0C\u4F46\u641C\u7D22\u7ED3\u679C\u66F4\u5C11",
179
- position: "right"
180
- }, {
181
- default: withCtx(() => [
182
- createVNode(unref(IconInfoCircle))
183
- ]),
184
- _: 1
185
- })
186
- ])
187
- ]),
188
- _: 1
189
- }),
190
- createVNode(unref(Option), {
191
- value: "blur",
192
- label: "\u6A21\u7CCA\u641C"
193
- }, {
194
- default: withCtx(() => [
195
- createElementVNode("div", _hoisted_4, [
196
- _hoisted_5,
197
- createVNode(unref(Tooltip), {
198
- effect: "dark",
199
- content: "\u4F1A\u5C06\u8F93\u5165\u5185\u5BB9\u5206\u8BCD\uFF0C\u4F8B\u5982\u201C\u6210\u957F\u201D\u4F1A\u5206\u4E3A\u201C\u6210\u201D\u3001\u201C\u957F\u201D\u3001\u201C\u6210\u957F\u201D\uFF0C\u5185\u5BB9\u5305\u542B\u4E09\u4E2A\u8BCD\u4E2D\u4EFB\u610F\u4E00\u4E2A\u5747\u4F1A\u663E\u793A\u51FA\u6765\uFF0C\u641C\u7D22\u5185\u5BB9\u66F4\u52A0\u4E30\u5BCC",
200
- position: "right"
201
- }, {
202
- default: withCtx(() => [
203
- createVNode(unref(IconInfoCircle))
204
- ]),
205
- _: 1
206
- })
207
- ])
208
- ]),
209
- _: 1
210
- })
181
+ (openBlock(), createElementBlock(Fragment, null, renderList(wordStateOptions, (item, index) => {
182
+ return createVNode(unref(Option), {
183
+ key: index,
184
+ value: item.value,
185
+ label: item.label
186
+ }, {
187
+ default: withCtx(() => [
188
+ createElementVNode("div", _hoisted_2, [
189
+ createElementVNode("span", null, toDisplayString(item.label), 1),
190
+ createVNode(unref(Tooltip), {
191
+ effect: "dark",
192
+ content: item.desc,
193
+ position: "right"
194
+ }, {
195
+ default: withCtx(() => [
196
+ createVNode(unref(IconInfoCircle))
197
+ ]),
198
+ _: 2
199
+ }, 1032, ["content"])
200
+ ])
201
+ ]),
202
+ _: 2
203
+ }, 1032, ["value", "label"]);
204
+ }), 64))
211
205
  ]),
212
206
  _: 1
213
207
  }, 8, ["modelValue"])
@@ -299,7 +293,7 @@ const _sfc_main = defineComponent({
299
293
  ]),
300
294
  _: 1
301
295
  }),
302
- createElementVNode("div", _hoisted_6, [
296
+ createElementVNode("div", _hoisted_3, [
303
297
  createVNode(unref(Select), {
304
298
  modelValue: filter.value.order,
305
299
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => filter.value.order = $event),
@@ -6,10 +6,7 @@ var doc = require("../../../../utils/doc.js");
6
6
  var index = require("../columnTree/index.js");
7
7
  const _hoisted_1 = { class: "media-filter-container" };
8
8
  const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "5px" } };
9
- const _hoisted_3 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u7CBE\u51C6\u641C", -1);
10
- const _hoisted_4 = { style: { "display": "flex", "align-items": "center", "gap": "5px" } };
11
- const _hoisted_5 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u6A21\u7CCA\u641C", -1);
12
- const _hoisted_6 = { class: "sort-button" };
9
+ const _hoisted_3 = { class: "sort-button" };
13
10
  const _sfc_main = vue.defineComponent({
14
11
  ...{ name: "MediaFilter" },
15
12
  __name: "index",
@@ -24,7 +21,7 @@ const _sfc_main = vue.defineComponent({
24
21
  emits: ["update:group_id", "search"],
25
22
  setup(__props, { emit: __emit }) {
26
23
  const props = __props;
27
- const column_id = vue.ref(0);
24
+ const column_id = vue.ref("all");
28
25
  const emit = __emit;
29
26
  const filter = vue.ref({
30
27
  keywords: "",
@@ -35,6 +32,18 @@ const _sfc_main = vue.defineComponent({
35
32
  order: "create_time",
36
33
  wordState: "precision"
37
34
  });
35
+ const wordStateOptions = [
36
+ {
37
+ value: "precision",
38
+ label: "\u7CBE\u51C6\u641C",
39
+ desc: "\u4F1A\u4EE5\u8F93\u5165\u7684\u5B8C\u6574\u5173\u952E\u8BCD\u201C\u6210\u957F\u201D\u8FDB\u884C\u641C\u7D22\uFF0C\u641C\u7D22\u7ED3\u679C\u5173\u8054\u6027\u66F4\u9AD8\uFF0C\u4F46\u641C\u7D22\u7ED3\u679C\u66F4\u5C11"
40
+ },
41
+ {
42
+ value: "blur",
43
+ label: "\u6A21\u7CCA\u641C",
44
+ desc: "\u4F1A\u5C06\u8F93\u5165\u5185\u5BB9\u5206\u8BCD\uFF0C\u4F8B\u5982\u201C\u6210\u957F\u201D\u4F1A\u5206\u4E3A\u201C\u6210\u201D\u3001\u201C\u957F\u201D\u3001\u201C\u6210\u957F\u201D\uFF0C\u5185\u5BB9\u5305\u542B\u4E09\u4E2A\u8BCD\u4E2D\u4EFB\u610F\u4E00\u4E2A\u5747\u4F1A\u663E\u793A\u51FA\u6765\uFF0C\u641C\u7D22\u5185\u5BB9\u66F4\u52A0\u4E30\u5BCC"
45
+ }
46
+ ];
38
47
  const bannerOptions = vue.computed(() => {
39
48
  const options = [
40
49
  {
@@ -92,22 +101,24 @@ const _sfc_main = vue.defineComponent({
92
101
  return filter.value.keywords || series || filter.value.cover_type || banner || filter.value.sort !== -1;
93
102
  });
94
103
  const reset = () => {
95
- filter.value = {
104
+ const _set = {
96
105
  keywords: "",
97
106
  cover_type: "",
98
107
  sort: -1,
99
108
  order: "create_time"
100
109
  };
110
+ Object.assign(filter.value, _set);
101
111
  if (props.banner !== "all") {
102
112
  filter.value.banner = props.banner;
103
113
  } else {
104
114
  filter.value.banner = "";
105
115
  }
106
- if (props.series !== "all") {
116
+ if (props.series !== "all" && props.series.split(",").length === 1) {
107
117
  filter.value.type = props.series;
108
118
  } else {
109
119
  filter.value.type = "";
110
120
  }
121
+ column_id.value = "all";
111
122
  };
112
123
  const checkout = (type) => {
113
124
  filter.value.wordState = type;
@@ -157,6 +168,7 @@ const _sfc_main = vue.defineComponent({
157
168
  "allow-clear": "",
158
169
  class: "filter-item keyword",
159
170
  placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9\u6807\u9898",
171
+ style: { width: "240px" },
160
172
  onPressEnter: handleSearch
161
173
  }, {
162
174
  prepend: vue.withCtx(() => [
@@ -167,48 +179,30 @@ const _sfc_main = vue.defineComponent({
167
179
  onSelect: checkout
168
180
  }, {
169
181
  default: vue.withCtx(() => [
170
- vue.createVNode(vue.unref(webVue.Option), {
171
- value: "precision",
172
- label: "\u7CBE\u51C6\u641C"
173
- }, {
174
- default: vue.withCtx(() => [
175
- vue.createElementVNode("div", _hoisted_2, [
176
- _hoisted_3,
177
- vue.createVNode(vue.unref(webVue.Tooltip), {
178
- effect: "dark",
179
- content: "\u4F1A\u4EE5\u8F93\u5165\u7684\u5B8C\u6574\u5173\u952E\u8BCD\u201C\u6210\u957F\u201D\u8FDB\u884C\u641C\u7D22\uFF0C\u641C\u7D22\u7ED3\u679C\u5173\u8054\u6027\u66F4\u9AD8\uFF0C\u4F46\u641C\u7D22\u7ED3\u679C\u66F4\u5C11",
180
- position: "right"
181
- }, {
182
- default: vue.withCtx(() => [
183
- vue.createVNode(vue.unref(icon.IconInfoCircle))
184
- ]),
185
- _: 1
186
- })
187
- ])
188
- ]),
189
- _: 1
190
- }),
191
- vue.createVNode(vue.unref(webVue.Option), {
192
- value: "blur",
193
- label: "\u6A21\u7CCA\u641C"
194
- }, {
195
- default: vue.withCtx(() => [
196
- vue.createElementVNode("div", _hoisted_4, [
197
- _hoisted_5,
198
- vue.createVNode(vue.unref(webVue.Tooltip), {
199
- effect: "dark",
200
- content: "\u4F1A\u5C06\u8F93\u5165\u5185\u5BB9\u5206\u8BCD\uFF0C\u4F8B\u5982\u201C\u6210\u957F\u201D\u4F1A\u5206\u4E3A\u201C\u6210\u201D\u3001\u201C\u957F\u201D\u3001\u201C\u6210\u957F\u201D\uFF0C\u5185\u5BB9\u5305\u542B\u4E09\u4E2A\u8BCD\u4E2D\u4EFB\u610F\u4E00\u4E2A\u5747\u4F1A\u663E\u793A\u51FA\u6765\uFF0C\u641C\u7D22\u5185\u5BB9\u66F4\u52A0\u4E30\u5BCC",
201
- position: "right"
202
- }, {
203
- default: vue.withCtx(() => [
204
- vue.createVNode(vue.unref(icon.IconInfoCircle))
205
- ]),
206
- _: 1
207
- })
208
- ])
209
- ]),
210
- _: 1
211
- })
182
+ (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(wordStateOptions, (item, index2) => {
183
+ return vue.createVNode(vue.unref(webVue.Option), {
184
+ key: index2,
185
+ value: item.value,
186
+ label: item.label
187
+ }, {
188
+ default: vue.withCtx(() => [
189
+ vue.createElementVNode("div", _hoisted_2, [
190
+ vue.createElementVNode("span", null, vue.toDisplayString(item.label), 1),
191
+ vue.createVNode(vue.unref(webVue.Tooltip), {
192
+ effect: "dark",
193
+ content: item.desc,
194
+ position: "right"
195
+ }, {
196
+ default: vue.withCtx(() => [
197
+ vue.createVNode(vue.unref(icon.IconInfoCircle))
198
+ ]),
199
+ _: 2
200
+ }, 1032, ["content"])
201
+ ])
202
+ ]),
203
+ _: 2
204
+ }, 1032, ["value", "label"]);
205
+ }), 64))
212
206
  ]),
213
207
  _: 1
214
208
  }, 8, ["modelValue"])
@@ -300,7 +294,7 @@ const _sfc_main = vue.defineComponent({
300
294
  ]),
301
295
  _: 1
302
296
  }),
303
- vue.createElementVNode("div", _hoisted_6, [
297
+ vue.createElementVNode("div", _hoisted_3, [
304
298
  vue.createVNode(vue.unref(webVue.Select), {
305
299
  modelValue: filter.value.order,
306
300
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => filter.value.order = $event),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmstops/pro-compo",
3
- "version": "0.3.40",
3
+ "version": "0.3.41",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vue",