@qikdev/vue-ui 0.2.1 → 0.2.4
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/dist/lib.es.js +36 -15
- package/dist/lib.es.js.map +1 -1
- package/dist/lib.umd.js +3 -3
- package/dist/lib.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/lib.es.js
CHANGED
|
@@ -32,7 +32,7 @@ var __objRest = (source, exclude) => {
|
|
|
32
32
|
};
|
|
33
33
|
import { openBlock, createElementBlock, renderSlot, resolveComponent, createBlock, withCtx, createVNode, Fragment, renderList, normalizeClass, toDisplayString, withDirectives, resolveDynamicComponent, vShow, withModifiers, createTextVNode, createCommentVNode, createElementVNode, mergeProps, toHandlers, pushScopeId, popScopeId, normalizeStyle, Teleport, vModelText, vModelSelect, withKeys, TransitionGroup, defineComponent, h, nextTick, vModelDynamic, vModelCheckbox, reactive, watch } from "vue";
|
|
34
34
|
import { EventDispatcher } from "@qikdev/sdk";
|
|
35
|
-
const version$1 = "0.2.
|
|
35
|
+
const version$1 = "0.2.4";
|
|
36
36
|
var flexColumn_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
37
37
|
var _export_sfc = (sfc, props2) => {
|
|
38
38
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -702,24 +702,32 @@ var Thumbnail_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
|
702
702
|
const _sfc_main$17 = {
|
|
703
703
|
mixins: [TableCellMixin],
|
|
704
704
|
computed: {
|
|
705
|
+
imageSource() {
|
|
706
|
+
return this.value && this.value._id ? this.value : this.row;
|
|
707
|
+
},
|
|
705
708
|
type() {
|
|
706
709
|
var _a, _b;
|
|
707
|
-
return (_b = (_a = this.
|
|
710
|
+
return (_b = (_a = this.imageSource) == null ? void 0 : _a.meta) == null ? void 0 : _b.type;
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
methods: {
|
|
714
|
+
clicked(item) {
|
|
715
|
+
this.$sdk.dispatch("item:view", this.imageSource);
|
|
708
716
|
}
|
|
709
717
|
}
|
|
710
718
|
};
|
|
711
719
|
const _hoisted_1$S = { class: "table-image-cell" };
|
|
712
|
-
const _hoisted_2$I = {
|
|
713
|
-
key: 0,
|
|
714
|
-
class: "image-wrapper"
|
|
715
|
-
};
|
|
716
720
|
function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
|
|
717
721
|
const _component_ux_image = resolveComponent("ux-image");
|
|
718
722
|
const _component_ux_icon = resolveComponent("ux-icon");
|
|
719
723
|
return openBlock(), createElementBlock("td", _hoisted_1$S, [
|
|
720
|
-
$options.type == "image" || $options.type == "video" ? (openBlock(), createElementBlock("div",
|
|
724
|
+
$options.type == "image" || $options.type == "video" ? (openBlock(), createElementBlock("div", {
|
|
725
|
+
key: 0,
|
|
726
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => $options.clicked(_ctx.value), ["stop", "prevent"])),
|
|
727
|
+
class: "image-wrapper"
|
|
728
|
+
}, [
|
|
721
729
|
createVNode(_component_ux_image, {
|
|
722
|
-
item:
|
|
730
|
+
item: $options.imageSource,
|
|
723
731
|
type: $options.type,
|
|
724
732
|
width: 100,
|
|
725
733
|
height: 100
|
|
@@ -730,7 +738,7 @@ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
730
738
|
}))
|
|
731
739
|
]);
|
|
732
740
|
}
|
|
733
|
-
var ThumbnailCell = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$17], ["__scopeId", "data-v-
|
|
741
|
+
var ThumbnailCell = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$17], ["__scopeId", "data-v-246a2688"]]);
|
|
734
742
|
var Button_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
735
743
|
const _sfc_main$16 = {
|
|
736
744
|
data() {
|
|
@@ -4827,8 +4835,13 @@ const _sfc_main$10 = {
|
|
|
4827
4835
|
async created() {
|
|
4828
4836
|
const self2 = this;
|
|
4829
4837
|
let component;
|
|
4830
|
-
|
|
4831
|
-
|
|
4838
|
+
let cellType = self2.column.type;
|
|
4839
|
+
let cellRenderer = self2.column.renderer;
|
|
4840
|
+
if (cellType == "reference") {
|
|
4841
|
+
if (self2.column.referenceType === "image") {
|
|
4842
|
+
cellRenderer = "thumbnail";
|
|
4843
|
+
}
|
|
4844
|
+
}
|
|
4832
4845
|
switch (cellRenderer) {
|
|
4833
4846
|
case "button":
|
|
4834
4847
|
component = ButtonCell;
|
|
@@ -4940,7 +4953,7 @@ function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4940
4953
|
}, null, 8, ["type", "value"]))
|
|
4941
4954
|
]));
|
|
4942
4955
|
}
|
|
4943
|
-
var TableCell = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$10], ["__scopeId", "data-v-
|
|
4956
|
+
var TableCell = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$10], ["__scopeId", "data-v-6c8f100b"]]);
|
|
4944
4957
|
const _sfc_main$$ = {
|
|
4945
4958
|
components: {
|
|
4946
4959
|
TableCell
|
|
@@ -6062,6 +6075,9 @@ const _sfc_main$R = {
|
|
|
6062
6075
|
item: {
|
|
6063
6076
|
type: Object
|
|
6064
6077
|
},
|
|
6078
|
+
alt: {
|
|
6079
|
+
type: String
|
|
6080
|
+
},
|
|
6065
6081
|
width: {
|
|
6066
6082
|
type: Number
|
|
6067
6083
|
},
|
|
@@ -6106,6 +6122,9 @@ const _sfc_main$R = {
|
|
|
6106
6122
|
};
|
|
6107
6123
|
},
|
|
6108
6124
|
computed: {
|
|
6125
|
+
altText() {
|
|
6126
|
+
return this.alt || this.model.title;
|
|
6127
|
+
},
|
|
6109
6128
|
className() {
|
|
6110
6129
|
var classes = [];
|
|
6111
6130
|
if (this.portrait) {
|
|
@@ -6230,8 +6249,8 @@ const _sfc_main$R = {
|
|
|
6230
6249
|
}
|
|
6231
6250
|
}
|
|
6232
6251
|
};
|
|
6233
|
-
const _hoisted_1$J = ["data"];
|
|
6234
|
-
const _hoisted_2$C = ["src"];
|
|
6252
|
+
const _hoisted_1$J = ["alt", "data"];
|
|
6253
|
+
const _hoisted_2$C = ["alt", "src"];
|
|
6235
6254
|
function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6236
6255
|
return openBlock(), createElementBlock("div", {
|
|
6237
6256
|
class: normalizeClass(["ux-image", $options.className]),
|
|
@@ -6239,16 +6258,18 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6239
6258
|
}, [
|
|
6240
6259
|
$props.svg ? (openBlock(), createElementBlock("object", {
|
|
6241
6260
|
key: 0,
|
|
6261
|
+
alt: $options.altText,
|
|
6242
6262
|
type: "image/svg+xml",
|
|
6243
6263
|
data: $options.src
|
|
6244
6264
|
}, null, 8, _hoisted_1$J)) : (openBlock(), createElementBlock("img", {
|
|
6245
6265
|
key: 1,
|
|
6266
|
+
alt: $options.altText,
|
|
6246
6267
|
style: normalizeStyle($options.imageStyle),
|
|
6247
6268
|
src: $options.src
|
|
6248
6269
|
}, null, 12, _hoisted_2$C))
|
|
6249
6270
|
], 6);
|
|
6250
6271
|
}
|
|
6251
|
-
var UXImage = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$R], ["__scopeId", "data-v-
|
|
6272
|
+
var UXImage = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$R], ["__scopeId", "data-v-a7872864"]]);
|
|
6252
6273
|
var progressbar_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
6253
6274
|
const _sfc_main$Q = {
|
|
6254
6275
|
props: {
|