yxuse 3.0.45 → 3.0.46

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.es6.js CHANGED
@@ -49,13 +49,13 @@ var __async = (__this, __arguments, generator) => {
49
49
  step((generator = generator.apply(__this, __arguments)).next());
50
50
  });
51
51
  };
52
- import { defineComponent, reactive, resolveComponent, createBlock, openBlock, createSlots, withCtx, renderSlot, createElementVNode, createVNode, createTextVNode, watch, resolveDynamicComponent, mergeProps, createElementBlock, createCommentVNode, Fragment, renderList, useSlots, useAttrs, ref, onMounted, nextTick, withModifiers, isVNode, toDisplayString, unref, normalizeStyle } from "vue";
52
+ import { defineComponent, reactive, resolveComponent, createBlock, openBlock, createSlots, withCtx, renderSlot, createElementVNode, createVNode, createTextVNode, watch, resolveDynamicComponent, mergeProps, createElementBlock, createCommentVNode, Fragment, renderList, useSlots, useAttrs, ref, onMounted, nextTick, withModifiers, isVNode, toDisplayString, unref, normalizeStyle, normalizeClass, version, createApp } from "vue";
53
53
  import { S as Sortable, _ as _export_sfc, T as Toolbar } from "./index.es5.js";
54
- import "./index.es12.js";
54
+ import { j as jumpToHome, b as getUserConfig } from "./index.es12.js";
55
55
  import "element-plus";
56
56
  import { u as uploadResourceApi } from "./index.es13.js";
57
- const _hoisted_1$2 = { class: "dialog-footer flex justify-end" };
58
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
57
+ const _hoisted_1$3 = { class: "dialog-footer flex justify-end" };
58
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
59
59
  __name: "index",
60
60
  setup(__props, { expose: __expose }) {
61
61
  const dialogOptions = reactive({
@@ -116,7 +116,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
116
116
  dialogOptions.showFooter ? {
117
117
  name: "footer",
118
118
  fn: withCtx(() => [
119
- createElementVNode("span", _hoisted_1$2, [
119
+ createElementVNode("span", _hoisted_1$3, [
120
120
  createVNode(_component_el_button, {
121
121
  plain: "",
122
122
  onClick: close
@@ -143,8 +143,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
143
143
  };
144
144
  }
145
145
  });
146
- const _hoisted_1$1 = { class: "dialog-footer flex justify-end" };
147
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
146
+ const _hoisted_1$2 = { class: "dialog-footer flex justify-end" };
147
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
148
148
  __name: "index",
149
149
  setup(__props, { expose: __expose }) {
150
150
  const drawerOptions = reactive({
@@ -204,7 +204,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
204
204
  drawerOptions.showFooter ? {
205
205
  name: "footer",
206
206
  fn: withCtx(() => [
207
- createElementVNode("span", _hoisted_1$1, [
207
+ createElementVNode("span", _hoisted_1$2, [
208
208
  createVNode(_component_el_button, {
209
209
  plain: "",
210
210
  onClick: close
@@ -231,7 +231,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
231
231
  };
232
232
  }
233
233
  });
234
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
234
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
235
235
  __name: "index",
236
236
  props: {
237
237
  conf: {},
@@ -20450,7 +20450,7 @@ const exportToExcel = ({ header, tableData, fileName }) => {
20450
20450
  function _isSlot$1(s) {
20451
20451
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
20452
20452
  }
20453
- const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
20453
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
20454
20454
  name: "YxTable"
20455
20455
  }), {
20456
20456
  __name: "index",
@@ -20524,7 +20524,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
20524
20524
  prop: cell.prop,
20525
20525
  config: cell.config
20526
20526
  };
20527
- return createVNode(_sfc_main$6, {
20527
+ return createVNode(_sfc_main$7, {
20528
20528
  "conf": conf,
20529
20529
  "model": scope.row,
20530
20530
  "onChange": cell == null ? void 0 : cell.change
@@ -20607,7 +20607,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
20607
20607
  };
20608
20608
  }
20609
20609
  }));
20610
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
20610
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
20611
20611
  __name: "index",
20612
20612
  props: {
20613
20613
  searchColumns: {},
@@ -20657,7 +20657,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
20657
20657
  }, [createVNode("span", {
20658
20658
  "class": `whitespace-nowrap label ${classLabelName != null ? classLabelName : ""} ${(_b = cell.classLabelName) != null ? _b : ""}`,
20659
20659
  "style": __spreadValues(__spreadValues({}, labelStyle), cell.labelStyle)
20660
- }, [createTextVNode(" "), cell.label, createTextVNode(" ")]), createVNode(_sfc_main$6, {
20660
+ }, [createTextVNode(" "), cell.label, createTextVNode(" ")]), createVNode(_sfc_main$7, {
20661
20661
  "class": cell.componentClassName,
20662
20662
  "style": cell.componentStyle,
20663
20663
  "conf": conf,
@@ -20685,11 +20685,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
20685
20685
  };
20686
20686
  }
20687
20687
  });
20688
- const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-c70da20e"]]);
20688
+ const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-c70da20e"]]);
20689
20689
  function _isSlot(s) {
20690
20690
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
20691
20691
  }
20692
- const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
20692
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
20693
20693
  name: "YxForm"
20694
20694
  }), {
20695
20695
  __name: "index",
@@ -20952,7 +20952,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
20952
20952
  };
20953
20953
  }
20954
20954
  }));
20955
- const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-91a038d9"]]);
20955
+ const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-91a038d9"]]);
20956
20956
  let versionKey, curVersion, updateApp;
20957
20957
  const updateSysVersion = () => {
20958
20958
  localStorage.setItem(versionKey, curVersion);
@@ -20963,7 +20963,7 @@ const delayUpdateSysVersion = () => {
20963
20963
  document.body.removeChild(document.querySelector("#update"));
20964
20964
  localStorage.setItem(versionKey, curVersion);
20965
20965
  };
20966
- const _hoisted_1 = { class: "update-wrap flex items-center justify-center" };
20966
+ const _hoisted_1$1 = { class: "update-wrap flex items-center justify-center" };
20967
20967
  const _hoisted_2 = { class: "relative update-content" };
20968
20968
  const _hoisted_3 = { class: "flex items-center justify-center" };
20969
20969
  const _hoisted_4 = { class: "flex flex-col gap-5 mt-10" };
@@ -20971,7 +20971,7 @@ const _hoisted_5 = { class: "update-title" };
20971
20971
  const _hoisted_6 = { class: "update-item px-20" };
20972
20972
  const _hoisted_7 = { class: "text-end" };
20973
20973
  const _hoisted_8 = { class: "flex justify-end items-center mt-10" };
20974
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
20974
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
20975
20975
  __name: "index",
20976
20976
  props: {
20977
20977
  title: {},
@@ -20983,7 +20983,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
20983
20983
  const props = __props;
20984
20984
  return (_ctx, _cache) => {
20985
20985
  const _component_el_button = resolveComponent("el-button");
20986
- return openBlock(), createElementBlock("div", _hoisted_1, [
20986
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
20987
20987
  createElementVNode("div", _hoisted_2, [
20988
20988
  createElementVNode("div", _hoisted_3, toDisplayString(props == null ? void 0 : props.title), 1),
20989
20989
  createElementVNode("div", _hoisted_4, [
@@ -21020,8 +21020,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
21020
21020
  };
21021
21021
  }
21022
21022
  });
21023
- const Update = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-ebf4f18f"]]);
21024
- const _sfc_main$1 = {
21023
+ const Update = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-ebf4f18f"]]);
21024
+ const _sfc_main$2 = {
21025
21025
  props: {
21026
21026
  color: {
21027
21027
  type: String,
@@ -21033,7 +21033,7 @@ const _sfc_main$1 = {
21033
21033
  }
21034
21034
  }
21035
21035
  };
21036
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
21036
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
21037
21037
  return openBlock(), createElementBlock("i", {
21038
21038
  class: "yx-icon",
21039
21039
  style: normalizeStyle([{ "--color": $props.color, "font-size": $props.size + "px" }])
@@ -21041,8 +21041,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
21041
21041
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
21042
21042
  ], 4);
21043
21043
  }
21044
- const index = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-75aef834"]]);
21045
- const _sfc_main = /* @__PURE__ */ defineComponent({
21044
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-75aef834"]]);
21045
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
21046
21046
  __name: "index",
21047
21047
  props: {
21048
21048
  uploadTips: {},
@@ -21112,27 +21112,107 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21112
21112
  };
21113
21113
  }
21114
21114
  });
21115
+ const _sfc_main = {
21116
+ name: "LogoTitle",
21117
+ props: {
21118
+ showLogo: {
21119
+ type: Boolean,
21120
+ default: true
21121
+ },
21122
+ showTitle: {
21123
+ type: Boolean,
21124
+ default: true
21125
+ }
21126
+ },
21127
+ data() {
21128
+ return {
21129
+ customConfig: {
21130
+ iconStyle: {
21131
+ width: "116px",
21132
+ height: "20px"
21133
+ }
21134
+ }
21135
+ };
21136
+ },
21137
+ created() {
21138
+ return __async(this, null, function* () {
21139
+ try {
21140
+ const data = yield getUserConfig();
21141
+ this.customConfig = __spreadValues(__spreadValues({}, this.customConfig), data);
21142
+ } catch (e) {
21143
+ }
21144
+ });
21145
+ },
21146
+ methods: {
21147
+ logoJumpHandle() {
21148
+ var _a;
21149
+ if (((_a = this.customConfig) == null ? void 0 : _a.logoCanJump) === false) return;
21150
+ jumpToHome();
21151
+ }
21152
+ }
21153
+ };
21154
+ const _hoisted_1 = ["innerHTML"];
21155
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
21156
+ var _a, _b, _c, _d;
21157
+ return openBlock(), createElementBlock("div", {
21158
+ class: normalizeClass(["flex items-center gap-x-10 logo-wrap", { "cursor-pointer": ((_a = $data.customConfig) == null ? void 0 : _a.logoCanJump) !== false }]),
21159
+ onClick: _cache[0] || (_cache[0] = (...args) => $options.logoJumpHandle && $options.logoJumpHandle(...args))
21160
+ }, [
21161
+ $props.showLogo && ((_b = $data.customConfig) == null ? void 0 : _b.icon) ? (openBlock(), createElementBlock("div", {
21162
+ key: 0,
21163
+ style: normalizeStyle($data.customConfig.iconStyle),
21164
+ class: "yx-icon theme-icon",
21165
+ innerHTML: $data.customConfig.icon
21166
+ }, null, 12, _hoisted_1)) : createCommentVNode("", true),
21167
+ $props.showTitle && ((_c = $data.customConfig) == null ? void 0 : _c.title) ? (openBlock(), createElementBlock("div", {
21168
+ key: 1,
21169
+ style: normalizeStyle($data.customConfig.titleStyle),
21170
+ class: "text-xl text-[var(--text-color-title)] title"
21171
+ }, toDisplayString((_d = $data.customConfig) == null ? void 0 : _d.title), 5)) : createCommentVNode("", true)
21172
+ ], 2);
21173
+ }
21174
+ const LogoTitle = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-58f15867"]]);
21175
+ class LogoTitleRender {
21176
+ constructor(domId = "system-logo-title") {
21177
+ this.render(domId);
21178
+ }
21179
+ get vueVersion() {
21180
+ return version[0];
21181
+ }
21182
+ render(domId) {
21183
+ if (this.vueVersion === "3") {
21184
+ createApp(LogoTitle).mount(`#${domId}`);
21185
+ } else {
21186
+ const Vue = require("vue");
21187
+ return new Vue({ render: (h) => h(LogoTitle) }).$mount(`#${domId}`);
21188
+ }
21189
+ }
21190
+ }
21115
21191
  const components2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
21116
21192
  __proto__: null,
21193
+ LogoTitle,
21194
+ LogoTitleRender,
21117
21195
  Toolbar,
21118
21196
  Update,
21119
- YxDialog: _sfc_main$8,
21120
- YxDrawer: _sfc_main$7,
21197
+ YxDialog: _sfc_main$9,
21198
+ YxDrawer: _sfc_main$8,
21121
21199
  YxForm: index$1,
21122
21200
  YxIcon: index,
21123
21201
  YxSearchForm: index$2,
21124
- YxTable: _sfc_main$5,
21125
- YxUpload: _sfc_main
21202
+ YxTable: _sfc_main$6,
21203
+ YxUpload: _sfc_main$1
21126
21204
  }, Symbol.toStringTag, { value: "Module" }));
21127
21205
  export {
21206
+ LogoTitleRender as L,
21128
21207
  Update as U,
21129
- _sfc_main$8 as _,
21130
- _sfc_main$7 as a,
21131
- _sfc_main$5 as b,
21208
+ _sfc_main$9 as _,
21209
+ _sfc_main$8 as a,
21210
+ _sfc_main$6 as b,
21132
21211
  components2 as c,
21133
21212
  index$1 as d,
21134
21213
  index as e,
21135
- _sfc_main as f,
21214
+ _sfc_main$1 as f,
21215
+ LogoTitle as g,
21136
21216
  index$2 as i
21137
21217
  };
21138
21218
  //# sourceMappingURL=index.es6.js.map
Binary file