@vipl520/dk-ui 1.0.79 → 1.0.81
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/attributes.json +183 -59
- package/dist/index.css +1 -1
- package/dist/index.js +1 -18
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +1 -18
- package/dist/tags.json +50 -34
- package/dist/web-types.json +383 -225
- package/es/icon-input/src/props.mjs +0 -11
- package/es/icon-input/src/props.mjs.map +1 -1
- package/es/index.mjs +0 -4
- package/es/index.mjs.map +1 -1
- package/es/index.scss +311 -67
- package/es/table/src/components/FieldRender.vue2.mjs +0 -1
- package/es/table/src/components/FieldRender.vue2.mjs.map +1 -1
- package/es/table/src/table.vue2.mjs +1 -1
- package/es/table/src/table.vue2.mjs.map +1 -1
- package/es/url-input/src/url-input-content.vue2.mjs +0 -1
- package/es/url-input/src/url-input-content.vue2.mjs.map +1 -1
- package/lib/icon-input/src/props.js +0 -11
- package/lib/icon-input/src/props.js.map +1 -1
- package/lib/index.js +0 -4
- package/lib/index.js.map +1 -1
- package/lib/index.scss +311 -67
- package/lib/table/src/components/FieldRender.vue2.js +0 -1
- package/lib/table/src/components/FieldRender.vue2.js.map +1 -1
- package/lib/table/src/table.vue2.js +1 -1
- package/lib/table/src/table.vue2.js.map +1 -1
- package/lib/url-input/src/url-input-content.vue2.js +0 -1
- package/lib/url-input/src/url-input-content.vue2.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"url-input-content.vue2.mjs","sources":["../../../src/url-input/src/url-input-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkUrlInputContent',\n});\n</script>\n<template>\n <el-tabs tab-position=\"left\" style=\"height: 430px\" class=\"dk-url-input-content\" @tab-change=\"onTabChange()\">\n <el-tab-pane v-for=\"(item, key) in _urlData\" :key=\"key\" :label=\"item.title\">\n <div style=\"padding: 10px\">\n <div v-if=\"item.type === 'table'\">\n <dk-url-input-table :item=\"item\" @on-choose-url=\"onChooseUrl\"></dk-url-input-table>\n </div>\n <div v-else-if=\"item.type === 'component'\">\n <component :is=\"item.componentName\" @on-choose-url=\"onChooseUrl\"></component>\n </div>\n <div v-else>\n <div v-if=\"item.lists?.length > 0\">\n <div v-for=\"(val, k) in item.lists\" :key=\"k\">\n <div v-if=\"val.list\">\n <div style=\"padding-bottom: 10px; font-weight: 700; color: #000\">\n {{ val.title }}\n </div>\n <div class=\"url-list\">\n <div\n v-for=\"(v, k) in val.list\"\n :key=\"k\"\n class=\"url-box\"\n :class=\"chooseUrl == v.url ? 'choose' : ''\"\n @click=\"chooseUrl = v.url\"\n >\n {{ v.title }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div v-else class=\"url-list\">\n <div\n v-for=\"(val, k) in item.list\"\n :key=\"k\"\n class=\"url-box\"\n :class=\"chooseUrl == val.url ? 'choose' : ''\"\n @click=\"chooseUrl = val.url\"\n >\n {{ val.title }}\n </div>\n </div>\n </div>\n </div>\n </el-tab-pane>\n <el-tab-pane label=\"自定义链接\">\n <div style=\"width: 500px; margin: 100px auto\">\n <div v-if=\"_jumpMinApp\" style=\"padding-bottom: 20px\">\n <el-radio-group v-model=\"urlType\" class=\"ml-4\">\n <el-radio :value=\"1\" size=\"large\">链接或路径</el-radio>\n <el-radio :value=\"2\" size=\"large\">跳转其他小程序</el-radio>\n </el-radio-group>\n </div>\n <el-form label-width=\"100px\" label-position=\"top\" size=\"default\">\n <div v-if=\"urlType === 1\">\n <el-form-item label=\"填写地址或路径\" required>\n <el-input v-model=\"chooseUrl\" size=\"default\" />\n </el-form-item>\n </div>\n <div v-else>\n <el-form-item label=\"填写小程序APPID\" required>\n <el-input v-model=\"minapp.appid\" size=\"default\" />\n </el-form-item>\n <el-form-item label=\"填写小程序路径\">\n <el-input v-model=\"minapp.path\" size=\"default\" />\n </el-form-item>\n </div>\n </el-form>\n </div>\n </el-tab-pane>\n </el-tabs>\n <div style=\"text-align: center\">\n <el-button size=\"default\" style=\"width: 200px\" type=\"primary\" :disabled=\"!chooseUrl\" @click=\"onSubmit()\">\n 确定\n </el-button>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, reactive, ref, watch, inject } from 'vue'\nimport DkUrlInputTable from './url-input-table.vue'\n\n\nconst emit = defineEmits(['submit'])\n\nconst props = defineProps({\n urlData: {\n default: () => {\n return []\n },\n type: Array,\n },\n jumpMinApp: { default: false, type: Boolean },\n})\n\nconst urlInputData: any = inject('urlInputData', [])\n\nconst _urlData: any = computed(() => {\n
|
1
|
+
{"version":3,"file":"url-input-content.vue2.mjs","sources":["../../../src/url-input/src/url-input-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkUrlInputContent',\n});\n</script>\n<template>\n <el-tabs tab-position=\"left\" style=\"height: 430px\" class=\"dk-url-input-content\" @tab-change=\"onTabChange()\">\n <el-tab-pane v-for=\"(item, key) in _urlData\" :key=\"key\" :label=\"item.title\">\n <div style=\"padding: 10px\">\n <div v-if=\"item.type === 'table'\">\n <dk-url-input-table :item=\"item\" @on-choose-url=\"onChooseUrl\"></dk-url-input-table>\n </div>\n <div v-else-if=\"item.type === 'component'\">\n <component :is=\"item.componentName\" @on-choose-url=\"onChooseUrl\"></component>\n </div>\n <div v-else>\n <div v-if=\"item.lists?.length > 0\">\n <div v-for=\"(val, k) in item.lists\" :key=\"k\">\n <div v-if=\"val.list\">\n <div style=\"padding-bottom: 10px; font-weight: 700; color: #000\">\n {{ val.title }}\n </div>\n <div class=\"url-list\">\n <div\n v-for=\"(v, k) in val.list\"\n :key=\"k\"\n class=\"url-box\"\n :class=\"chooseUrl == v.url ? 'choose' : ''\"\n @click=\"chooseUrl = v.url\"\n >\n {{ v.title }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div v-else class=\"url-list\">\n <div\n v-for=\"(val, k) in item.list\"\n :key=\"k\"\n class=\"url-box\"\n :class=\"chooseUrl == val.url ? 'choose' : ''\"\n @click=\"chooseUrl = val.url\"\n >\n {{ val.title }}\n </div>\n </div>\n </div>\n </div>\n </el-tab-pane>\n <el-tab-pane label=\"自定义链接\">\n <div style=\"width: 500px; margin: 100px auto\">\n <div v-if=\"_jumpMinApp\" style=\"padding-bottom: 20px\">\n <el-radio-group v-model=\"urlType\" class=\"ml-4\">\n <el-radio :value=\"1\" size=\"large\">链接或路径</el-radio>\n <el-radio :value=\"2\" size=\"large\">跳转其他小程序</el-radio>\n </el-radio-group>\n </div>\n <el-form label-width=\"100px\" label-position=\"top\" size=\"default\">\n <div v-if=\"urlType === 1\">\n <el-form-item label=\"填写地址或路径\" required>\n <el-input v-model=\"chooseUrl\" size=\"default\" />\n </el-form-item>\n </div>\n <div v-else>\n <el-form-item label=\"填写小程序APPID\" required>\n <el-input v-model=\"minapp.appid\" size=\"default\" />\n </el-form-item>\n <el-form-item label=\"填写小程序路径\">\n <el-input v-model=\"minapp.path\" size=\"default\" />\n </el-form-item>\n </div>\n </el-form>\n </div>\n </el-tab-pane>\n </el-tabs>\n <div style=\"text-align: center\">\n <el-button size=\"default\" style=\"width: 200px\" type=\"primary\" :disabled=\"!chooseUrl\" @click=\"onSubmit()\">\n 确定\n </el-button>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, reactive, ref, watch, inject } from 'vue'\nimport DkUrlInputTable from './url-input-table.vue'\n\n\nconst emit = defineEmits(['submit'])\n\nconst props = defineProps({\n urlData: {\n default: () => {\n return []\n },\n type: Array,\n },\n jumpMinApp: { default: false, type: Boolean },\n})\n\nconst urlInputData: any = inject('urlInputData', [])\n\nconst _urlData: any = computed(() => {\n if (props.urlData?.length > 0) {\n return props.urlData\n } else {\n return urlInputData.urlData\n }\n})\n\nconst _jumpMinApp = computed(() => {\n if (urlInputData.jumpMinApp !== undefined) {\n return urlInputData.jumpMinApp\n } else {\n return props.jumpMinApp\n }\n})\n\nconst minapp = reactive({\n appid: '',\n path: '',\n})\nconst chooseUrl = ref('')\nconst urlType = ref(1)\n\nconst onTabChange = () => {\n chooseUrl.value = ''\n}\n\nconst onChooseUrl = (url: any) => {\n chooseUrl.value = url\n}\n\nwatch(\n () => minapp,\n () => {\n if (minapp.appid) {\n chooseUrl.value = minapp.appid + '@' + minapp.path || '/'\n }\n },\n {\n deep: true,\n }\n)\n\nconst onSubmit = () => {\n emit('submit', chooseUrl.value)\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,mBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;AAgGD,IAAA,MAAM,YAAoB,GAAA,MAAA,CAAO,cAAgB,EAAA,EAAE,CAAA,CAAA;AAEnD,IAAM,MAAA,QAAA,GAAgB,SAAS,MAAM;AACnC,MAAI,IAAA,KAAA,CAAM,OAAS,EAAA,MAAA,GAAS,CAAG,EAAA;AAC7B,QAAA,OAAO,KAAM,CAAA,OAAA,CAAA;AAAA,OACR,MAAA;AACL,QAAA,OAAO,YAAa,CAAA,OAAA,CAAA;AAAA,OACtB;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,WAAA,GAAc,SAAS,MAAM;AACjC,MAAI,IAAA,YAAA,CAAa,eAAe,KAAW,CAAA,EAAA;AACzC,QAAA,OAAO,YAAa,CAAA,UAAA,CAAA;AAAA,OACf,MAAA;AACL,QAAA,OAAO,KAAM,CAAA,UAAA,CAAA;AAAA,OACf;AAAA,KACD,CAAA,CAAA;AAED,IAAA,MAAM,SAAS,QAAS,CAAA;AAAA,MACtB,KAAO,EAAA,EAAA;AAAA,MACP,IAAM,EAAA,EAAA;AAAA,KACP,CAAA,CAAA;AACD,IAAM,MAAA,SAAA,GAAY,IAAI,EAAE,CAAA,CAAA;AACxB,IAAM,MAAA,OAAA,GAAU,IAAI,CAAC,CAAA,CAAA;AAErB,IAAA,MAAM,cAAc,MAAM;AACxB,MAAA,SAAA,CAAU,KAAQ,GAAA,EAAA,CAAA;AAAA,KACpB,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,GAAa,KAAA;AAChC,MAAA,SAAA,CAAU,KAAQ,GAAA,GAAA,CAAA;AAAA,KACpB,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,MAAA;AAAA,MACN,MAAM;AACJ,QAAA,IAAI,OAAO,KAAO,EAAA;AAChB,UAAA,SAAA,CAAU,KAAQ,GAAA,MAAA,CAAO,KAAQ,GAAA,GAAA,GAAM,OAAO,IAAQ,IAAA,GAAA,CAAA;AAAA,SACxD;AAAA,OACF;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,WAAW,MAAM;AACrB,MAAK,IAAA,CAAA,QAAA,EAAU,UAAU,KAAK,CAAA,CAAA;AAAA,KAChC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -14,17 +14,6 @@ const iconInputProps = {
|
|
14
14
|
default: true,
|
15
15
|
type: Boolean
|
16
16
|
}
|
17
|
-
// showEl: {
|
18
|
-
// default: true,
|
19
|
-
// type: Boolean,
|
20
|
-
// },
|
21
|
-
// showVant: {
|
22
|
-
// default: true,
|
23
|
-
// type: Boolean,
|
24
|
-
// },
|
25
|
-
// showCloud:{
|
26
|
-
//
|
27
|
-
// }
|
28
17
|
};
|
29
18
|
const iconContentProps = {
|
30
19
|
icon: { default: "", type: String },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../../src/icon-input/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\ntype iconType = 'cloud' | 'element' | 'vant'\n\nexport const iconInputProps = {\n type: { default: 'element', type: String as () => iconType },\n modelValue: { type: String, default: '' },\n placeholder: { type: String, default: '' },\n showTab: {\n default: () => {\n return { el: true, vant: true, cloud: true }\n },\n type: Object,\n },\n preview: {\n default: true,\n type: Boolean,\n },\n
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../src/icon-input/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\ntype iconType = 'cloud' | 'element' | 'vant'\n\nexport const iconInputProps = {\n type: { default: 'element', type: String as () => iconType },\n modelValue: { type: String, default: '' },\n placeholder: { type: String, default: '' },\n showTab: {\n default: () => {\n return { el: true, vant: true, cloud: true }\n },\n type: Object,\n },\n preview: {\n default: true,\n type: Boolean,\n },\n}\n\nexport const iconContentProps = {\n icon: { default: '', type: String },\n type: { default: 'element', type: String as () => iconType },\n showTab: {\n default: () => {\n return { el: true, vant: true, cloud: true }\n },\n type: Object,\n },\n}\n\nexport const iconDialogProps = {\n type: { default: 'element', type: String as () => iconType },\n showTab: {\n default: () => {\n return { el: true, vant: true, cloud: true }\n },\n type: Object,\n },\n}\n\nexport type IconInputProps = ExtractPropTypes<typeof iconInputProps>\n"],"names":[],"mappings":";;AAGO,MAAM,cAAiB,GAAA;AAAA,EAC5B,IAAM,EAAA,EAAE,OAAS,EAAA,SAAA,EAAW,MAAM,MAAyB,EAAA;AAAA,EAC3D,UAAY,EAAA,EAAE,IAAM,EAAA,MAAA,EAAQ,SAAS,EAAG,EAAA;AAAA,EACxC,WAAa,EAAA,EAAE,IAAM,EAAA,MAAA,EAAQ,SAAS,EAAG,EAAA;AAAA,EACzC,OAAS,EAAA;AAAA,IACP,SAAS,MAAM;AACb,MAAA,OAAO,EAAE,EAAI,EAAA,IAAA,EAAM,IAAM,EAAA,IAAA,EAAM,OAAO,IAAK,EAAA,CAAA;AAAA,KAC7C;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,OAAS,EAAA;AAAA,IACP,OAAS,EAAA,IAAA;AAAA,IACT,IAAM,EAAA,OAAA;AAAA,GACR;AACF,EAAA;AAEO,MAAM,gBAAmB,GAAA;AAAA,EAC9B,IAAM,EAAA,EAAE,OAAS,EAAA,EAAA,EAAI,MAAM,MAAO,EAAA;AAAA,EAClC,IAAM,EAAA,EAAE,OAAS,EAAA,SAAA,EAAW,MAAM,MAAyB,EAAA;AAAA,EAC3D,OAAS,EAAA;AAAA,IACP,SAAS,MAAM;AACb,MAAA,OAAO,EAAE,EAAI,EAAA,IAAA,EAAM,IAAM,EAAA,IAAA,EAAM,OAAO,IAAK,EAAA,CAAA;AAAA,KAC7C;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AACF,EAAA;AAEO,MAAM,eAAkB,GAAA;AAAA,EAC7B,IAAM,EAAA,EAAE,OAAS,EAAA,SAAA,EAAW,MAAM,MAAyB,EAAA;AAAA,EAC3D,OAAS,EAAA;AAAA,IACP,SAAS,MAAM;AACb,MAAA,OAAO,EAAE,EAAI,EAAA,IAAA,EAAM,IAAM,EAAA,IAAA,EAAM,OAAO,IAAK,EAAA,CAAA;AAAA,KAC7C;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AACF;;;;;;"}
|
package/lib/index.js
CHANGED
@@ -167,10 +167,6 @@ const components = [
|
|
167
167
|
index$B.UniIconInput,
|
168
168
|
index$A.UniIcon,
|
169
169
|
index$C.UrlInput
|
170
|
-
// TODO 普通上传 upload
|
171
|
-
// TODO tag选择器 tag-input
|
172
|
-
// TODO 链接选择器 link-input
|
173
|
-
// TODO 应用框架
|
174
170
|
];
|
175
171
|
const install = (app, option = {}) => {
|
176
172
|
components.forEach((item) => {
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { Test } from './test'\nimport draggable from 'vuedraggable'\nimport Vue3DraggableResizable from 'vue3-draggable-resizable'\n\nimport { Group } from './group'\nimport { TableForm } from './table-form'\nimport { TinyEditor } from './tiny-editor'\nimport { Icon } from './icon'\nimport { ColorInput } from './color-input'\nimport { HotAreaInput } from './hot-area-input'\nimport { Dialog } from './dialog'\nimport { Form } from './form'\nimport { Attachment } from './attachment'\nimport { AttachmentDialog } from './attachment-dialog'\nimport { FileInput } from './file-input'\nimport { ImageInput } from './image-input'\nimport { AudioInput } from './audio-input'\nimport { VideoInput } from './video-input'\nimport { FileListInput } from './file-list-input'\nimport { ImageListInput } from './image-list-input'\nimport { AudioListInput } from './audio-list-input'\nimport { VideoListInput } from './video-list-input'\nimport { IconInput, IconContent, IconDialog } from './icon-input'\nimport { StyleInput } from './style-input'\nimport { BoxSizeInput } from './box-size-input'\nimport { StyleBoxInput } from './style-box-input'\nimport { StyleFontInput } from './style-font-input'\nimport { StyleBorderInput } from './style-border-input'\nimport { StyleBackgroundInput } from './style-background-input'\nimport { StyleShadowContent, StyleShadowInput } from './style-shadow-input'\nimport { StylePositionInput } from './style-position-input'\nimport { StyleNumberInput } from './style-number-input'\nimport { StyleCustomInput } from './style-custom-input'\nimport { PageDiy } from './page-diy'\nimport { Table } from './table'\nimport { Select } from './select'\nimport { Poster, PosterInput } from './poster-input'\nimport { StyleAnimationInput } from './style-animation-input'\nimport { AnimateSelect } from './animate-select'\nimport { UniIconInput } from './uni-icon-input'\nimport { UniIcon } from './uni-icon'\nimport { UrlInput } from './url-input'\n\nimport { setGlobalConfig, directives } from '@vipl520/utils'\nexport * from './tiny-editor'\nexport * from './icon'\nexport * from './group'\nexport * from './table-form'\nexport * from './color-input'\nexport * from './hot-area-input'\nexport * from './form'\nexport * from './attachment'\nexport * from './attachment-dialog'\nexport * from './file-input'\nexport * from './image-input'\nexport * from './audio-input'\nexport * from './video-input'\nexport * from './file-list-input'\nexport * from './image-list-input'\nexport * from './audio-list-input'\nexport * from './video-list-input'\nexport * from './icon-input'\nexport * from './page-diy'\nexport * from './box-size-input'\nexport * from './test'\nexport * from './style-input'\nexport * from './style-box-input'\nexport * from './style-font-input'\nexport * from './style-border-input'\nexport * from './style-shadow-input'\nexport * from './style-background-input'\nexport * from './style-position-input'\nexport * from './style-number-input'\nexport * from './style-custom-input'\nexport * from './table'\nexport * from './select'\nexport * from './poster-input'\nexport * from './style-animation-input'\nexport * from './animate-select'\nexport * from './uni-icon'\nexport * from './uni-icon-input'\nexport * from './url-input'\n\nconst components = [\n Test,\n Group,\n TableForm,\n // 富文本编辑器\n TinyEditor,\n // 图标\n Icon,\n // 颜色选择器\n ColorInput,\n // 热区选择器\n HotAreaInput,\n // 对话框\n Dialog,\n // json表单\n Form,\n // 附件\n Attachment,\n // 附件弹窗\n AttachmentDialog,\n // 文件选择器\n FileInput,\n // 图片选择器\n ImageInput,\n // 音频选择器\n AudioInput,\n // 视频选择器\n VideoInput,\n // 多文件选择器\n FileListInput,\n // 多图片选择器\n ImageListInput,\n // 多音频选择器\n AudioListInput,\n // 多视频选择器\n VideoListInput,\n // 图标选择器\n IconInput,\n // 图标展示框\n IconContent,\n // 图片弹出框\n IconDialog,\n // DIY编辑器\n PageDiy,\n // 尺寸输入框(带px/%/rem/等单位)\n BoxSizeInput,\n // DIV盒子编辑器(padding/margin/width/height)\n StyleBoxInput,\n // 文字样式编辑器\n StyleFontInput,\n // 边框样式编辑器\n StyleBorderInput,\n // 阴影编辑器\n StyleShadowInput,\n // 阴影编辑框\n StyleShadowContent,\n // 背景编辑器\n StyleBackgroundInput,\n // 合并样式编辑\n StyleInput,\n // 定位编辑器\n StylePositionInput,\n // 样式文字\n StyleNumberInput,\n // 动画配置\n StyleAnimationInput,\n // 自定义样式\n StyleCustomInput,\n // 动画class选择\n AnimateSelect,\n // 数据表格\n Table,\n // 选择\n Select,\n // 表单组/对象表单\n // 海报选择器\n PosterInput,\n // 海报\n Poster,\n Vue3DraggableResizable,\n draggable,\n UniIconInput,\n UniIcon,\n UrlInput,\n
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { Test } from './test'\nimport draggable from 'vuedraggable'\nimport Vue3DraggableResizable from 'vue3-draggable-resizable'\n\nimport { Group } from './group'\nimport { TableForm } from './table-form'\nimport { TinyEditor } from './tiny-editor'\nimport { Icon } from './icon'\nimport { ColorInput } from './color-input'\nimport { HotAreaInput } from './hot-area-input'\nimport { Dialog } from './dialog'\nimport { Form } from './form'\nimport { Attachment } from './attachment'\nimport { AttachmentDialog } from './attachment-dialog'\nimport { FileInput } from './file-input'\nimport { ImageInput } from './image-input'\nimport { AudioInput } from './audio-input'\nimport { VideoInput } from './video-input'\nimport { FileListInput } from './file-list-input'\nimport { ImageListInput } from './image-list-input'\nimport { AudioListInput } from './audio-list-input'\nimport { VideoListInput } from './video-list-input'\nimport { IconInput, IconContent, IconDialog } from './icon-input'\nimport { StyleInput } from './style-input'\nimport { BoxSizeInput } from './box-size-input'\nimport { StyleBoxInput } from './style-box-input'\nimport { StyleFontInput } from './style-font-input'\nimport { StyleBorderInput } from './style-border-input'\nimport { StyleBackgroundInput } from './style-background-input'\nimport { StyleShadowContent, StyleShadowInput } from './style-shadow-input'\nimport { StylePositionInput } from './style-position-input'\nimport { StyleNumberInput } from './style-number-input'\nimport { StyleCustomInput } from './style-custom-input'\nimport { PageDiy } from './page-diy'\nimport { Table } from './table'\nimport { Select } from './select'\nimport { Poster, PosterInput } from './poster-input'\nimport { StyleAnimationInput } from './style-animation-input'\nimport { AnimateSelect } from './animate-select'\nimport { UniIconInput } from './uni-icon-input'\nimport { UniIcon } from './uni-icon'\nimport { UrlInput } from './url-input'\n\nimport { setGlobalConfig, directives } from '@vipl520/utils'\nexport * from './tiny-editor'\nexport * from './icon'\nexport * from './group'\nexport * from './table-form'\nexport * from './color-input'\nexport * from './hot-area-input'\nexport * from './form'\nexport * from './attachment'\nexport * from './attachment-dialog'\nexport * from './file-input'\nexport * from './image-input'\nexport * from './audio-input'\nexport * from './video-input'\nexport * from './file-list-input'\nexport * from './image-list-input'\nexport * from './audio-list-input'\nexport * from './video-list-input'\nexport * from './icon-input'\nexport * from './page-diy'\nexport * from './box-size-input'\nexport * from './test'\nexport * from './style-input'\nexport * from './style-box-input'\nexport * from './style-font-input'\nexport * from './style-border-input'\nexport * from './style-shadow-input'\nexport * from './style-background-input'\nexport * from './style-position-input'\nexport * from './style-number-input'\nexport * from './style-custom-input'\nexport * from './table'\nexport * from './select'\nexport * from './poster-input'\nexport * from './style-animation-input'\nexport * from './animate-select'\nexport * from './uni-icon'\nexport * from './uni-icon-input'\nexport * from './url-input'\n\nconst components = [\n Test,\n Group,\n TableForm,\n // 富文本编辑器\n TinyEditor,\n // 图标\n Icon,\n // 颜色选择器\n ColorInput,\n // 热区选择器\n HotAreaInput,\n // 对话框\n Dialog,\n // json表单\n Form,\n // 附件\n Attachment,\n // 附件弹窗\n AttachmentDialog,\n // 文件选择器\n FileInput,\n // 图片选择器\n ImageInput,\n // 音频选择器\n AudioInput,\n // 视频选择器\n VideoInput,\n // 多文件选择器\n FileListInput,\n // 多图片选择器\n ImageListInput,\n // 多音频选择器\n AudioListInput,\n // 多视频选择器\n VideoListInput,\n // 图标选择器\n IconInput,\n // 图标展示框\n IconContent,\n // 图片弹出框\n IconDialog,\n // DIY编辑器\n PageDiy,\n // 尺寸输入框(带px/%/rem/等单位)\n BoxSizeInput,\n // DIV盒子编辑器(padding/margin/width/height)\n StyleBoxInput,\n // 文字样式编辑器\n StyleFontInput,\n // 边框样式编辑器\n StyleBorderInput,\n // 阴影编辑器\n StyleShadowInput,\n // 阴影编辑框\n StyleShadowContent,\n // 背景编辑器\n StyleBackgroundInput,\n // 合并样式编辑\n StyleInput,\n // 定位编辑器\n StylePositionInput,\n // 样式文字\n StyleNumberInput,\n // 动画配置\n StyleAnimationInput,\n // 自定义样式\n StyleCustomInput,\n // 动画class选择\n AnimateSelect,\n // 数据表格\n Table,\n // 选择\n Select,\n // 表单组/对象表单\n // 海报选择器\n PosterInput,\n // 海报\n Poster,\n Vue3DraggableResizable,\n draggable,\n UniIconInput,\n UniIcon,\n UrlInput,\n]\n\nexport const install = (app: App, option: any = {}) => {\n components.forEach((item) => {\n if (item.install!) {\n app.use(item)\n } else if (item.name) {\n app.component(item.name, item)\n }\n })\n directives(app)\n setGlobalConfig(option)\n}\n\nexport default {\n install,\n}\n"],"names":["Test","Group","TableForm","TinyEditor","Icon","ColorInput","HotAreaInput","Dialog","Form","Attachment","AttachmentDialog","FileInput","ImageInput","AudioInput","VideoInput","FileListInput","ImageListInput","AudioListInput","VideoListInput","IconInput","IconContent","IconDialog","PageDiy","BoxSizeInput","StyleBoxInput","StyleFontInput","StyleBorderInput","StyleShadowInput","StyleShadowContent","StyleBackgroundInput","StyleInput","StylePositionInput","StyleNumberInput","StyleAnimationInput","StyleCustomInput","AnimateSelect","Table","Select","PosterInput","Poster","UniIconInput","UniIcon","UrlInput","directives","setGlobalConfig"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFA,MAAM,UAAa,GAAA;AAAA,EACjBA,YAAA;AAAA,EACAC,aAAA;AAAA,EACAC,iBAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,YAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,oBAAA;AAAA;AAAA,EAEAC,cAAA;AAAA;AAAA,EAEAC,YAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,iBAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,qBAAA;AAAA;AAAA,EAEAC,sBAAA;AAAA;AAAA,EAEAC,sBAAA;AAAA;AAAA,EAEAC,sBAAA;AAAA;AAAA,EAEAC,iBAAA;AAAA;AAAA,EAEAC,mBAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,eAAA;AAAA;AAAA,EAEAC,oBAAA;AAAA;AAAA,EAEAC,qBAAA;AAAA;AAAA,EAEAC,sBAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,0BAAA;AAAA;AAAA,EAEAC,4BAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,0BAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,2BAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,qBAAA;AAAA;AAAA,EAEAC,aAAA;AAAA;AAAA,EAEAC,cAAA;AAAA;AAAA;AAAA,EAGAC,mBAAA;AAAA;AAAA,EAEAC,cAAA;AAAA,EACA,sBAAA;AAAA,EACA,SAAA;AAAA,EACAC,oBAAA;AAAA,EACAC,eAAA;AAAA,EACAC,gBAAA;AACF,CAAA,CAAA;AAEO,MAAM,OAAU,GAAA,CAAC,GAAU,EAAA,MAAA,GAAc,EAAO,KAAA;AACrD,EAAW,UAAA,CAAA,OAAA,CAAQ,CAAC,IAAS,KAAA;AAC3B,IAAA,IAAI,KAAK,OAAU,EAAA;AACjB,MAAA,GAAA,CAAI,IAAI,IAAI,CAAA,CAAA;AAAA,KACd,MAAA,IAAW,KAAK,IAAM,EAAA;AACpB,MAAI,GAAA,CAAA,SAAA,CAAU,IAAK,CAAA,IAAA,EAAM,IAAI,CAAA,CAAA;AAAA,KAC/B;AAAA,GACD,CAAA,CAAA;AACD,EAAAC,gBAAA,CAAW,GAAG,CAAA,CAAA;AACd,EAAAC,qBAAA,CAAgB,MAAM,CAAA,CAAA;AACxB,EAAA;AAEA,YAAe;AAAA,EACb,OAAA;AACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.scss
CHANGED
@@ -66,76 +66,320 @@
|
|
66
66
|
}
|
67
67
|
|
68
68
|
//unocss
|
69
|
-
|
69
|
+
*,
|
70
|
+
::before,
|
71
|
+
::after {
|
72
|
+
--un-rotate: 0;
|
73
|
+
--un-rotate-x: 0;
|
74
|
+
--un-rotate-y: 0;
|
75
|
+
--un-rotate-z: 0;
|
76
|
+
--un-scale-x: 1;
|
77
|
+
--un-scale-y: 1;
|
78
|
+
--un-scale-z: 1;
|
79
|
+
--un-skew-x: 0;
|
80
|
+
--un-skew-y: 0;
|
81
|
+
--un-translate-x: 0;
|
82
|
+
--un-translate-y: 0;
|
83
|
+
--un-translate-z: 0;
|
84
|
+
--un-pan-x: ;
|
85
|
+
--un-pan-y: ;
|
86
|
+
--un-pinch-zoom: ;
|
87
|
+
--un-scroll-snap-strictness: proximity;
|
88
|
+
--un-ordinal: ;
|
89
|
+
--un-slashed-zero: ;
|
90
|
+
--un-numeric-figure: ;
|
91
|
+
--un-numeric-spacing: ;
|
92
|
+
--un-numeric-fraction: ;
|
93
|
+
--un-border-spacing-x: 0;
|
94
|
+
--un-border-spacing-y: 0;
|
95
|
+
--un-ring-offset-shadow: 0 0 rgba(0, 0, 0, 0);
|
96
|
+
--un-ring-shadow: 0 0 rgba(0, 0, 0, 0);
|
97
|
+
--un-shadow-inset: ;
|
98
|
+
--un-shadow: 0 0 rgba(0, 0, 0, 0);
|
99
|
+
--un-ring-inset: ;
|
100
|
+
--un-ring-offset-width: 0px;
|
101
|
+
--un-ring-offset-color: #fff;
|
102
|
+
--un-ring-width: 0px;
|
103
|
+
--un-ring-color: rgba(147, 197, 253, 0.5);
|
104
|
+
--un-blur: ;
|
105
|
+
--un-brightness: ;
|
106
|
+
--un-contrast: ;
|
107
|
+
--un-drop-shadow: ;
|
108
|
+
--un-grayscale: ;
|
109
|
+
--un-hue-rotate: ;
|
110
|
+
--un-invert: ;
|
111
|
+
--un-saturate: ;
|
112
|
+
--un-sepia: ;
|
113
|
+
--un-backdrop-blur: ;
|
114
|
+
--un-backdrop-brightness: ;
|
115
|
+
--un-backdrop-contrast: ;
|
116
|
+
--un-backdrop-grayscale: ;
|
117
|
+
--un-backdrop-hue-rotate: ;
|
118
|
+
--un-backdrop-invert: ;
|
119
|
+
--un-backdrop-opacity: ;
|
120
|
+
--un-backdrop-saturate: ;
|
121
|
+
--un-backdrop-sepia: ;
|
122
|
+
}
|
123
|
+
::backdrop {
|
124
|
+
--un-rotate: 0;
|
125
|
+
--un-rotate-x: 0;
|
126
|
+
--un-rotate-y: 0;
|
127
|
+
--un-rotate-z: 0;
|
128
|
+
--un-scale-x: 1;
|
129
|
+
--un-scale-y: 1;
|
130
|
+
--un-scale-z: 1;
|
131
|
+
--un-skew-x: 0;
|
132
|
+
--un-skew-y: 0;
|
133
|
+
--un-translate-x: 0;
|
134
|
+
--un-translate-y: 0;
|
135
|
+
--un-translate-z: 0;
|
136
|
+
--un-pan-x: ;
|
137
|
+
--un-pan-y: ;
|
138
|
+
--un-pinch-zoom: ;
|
139
|
+
--un-scroll-snap-strictness: proximity;
|
140
|
+
--un-ordinal: ;
|
141
|
+
--un-slashed-zero: ;
|
142
|
+
--un-numeric-figure: ;
|
143
|
+
--un-numeric-spacing: ;
|
144
|
+
--un-numeric-fraction: ;
|
145
|
+
--un-border-spacing-x: 0;
|
146
|
+
--un-border-spacing-y: 0;
|
147
|
+
--un-ring-offset-shadow: 0 0 rgba(0, 0, 0, 0);
|
148
|
+
--un-ring-shadow: 0 0 rgba(0, 0, 0, 0);
|
149
|
+
--un-shadow-inset: ;
|
150
|
+
--un-shadow: 0 0 rgba(0, 0, 0, 0);
|
151
|
+
--un-ring-inset: ;
|
152
|
+
--un-ring-offset-width: 0px;
|
153
|
+
--un-ring-offset-color: #fff;
|
154
|
+
--un-ring-width: 0px;
|
155
|
+
--un-ring-color: rgba(147, 197, 253, 0.5);
|
156
|
+
--un-blur: ;
|
157
|
+
--un-brightness: ;
|
158
|
+
--un-contrast: ;
|
159
|
+
--un-drop-shadow: ;
|
160
|
+
--un-grayscale: ;
|
161
|
+
--un-hue-rotate: ;
|
162
|
+
--un-invert: ;
|
163
|
+
--un-saturate: ;
|
164
|
+
--un-sepia: ;
|
165
|
+
--un-backdrop-blur: ;
|
166
|
+
--un-backdrop-brightness: ;
|
167
|
+
--un-backdrop-contrast: ;
|
168
|
+
--un-backdrop-grayscale: ;
|
169
|
+
--un-backdrop-hue-rotate: ;
|
170
|
+
--un-backdrop-invert: ;
|
171
|
+
--un-backdrop-opacity: ;
|
172
|
+
--un-backdrop-saturate: ;
|
173
|
+
--un-backdrop-sepia: ;
|
174
|
+
}
|
70
175
|
/* layer: default */
|
71
|
-
.visible{
|
72
|
-
|
73
|
-
|
74
|
-
.
|
75
|
-
|
76
|
-
|
77
|
-
.
|
78
|
-
|
79
|
-
|
80
|
-
.
|
81
|
-
|
82
|
-
|
83
|
-
.
|
84
|
-
|
85
|
-
|
86
|
-
.
|
87
|
-
|
88
|
-
|
89
|
-
.
|
90
|
-
|
91
|
-
|
92
|
-
.
|
93
|
-
|
94
|
-
|
95
|
-
.
|
96
|
-
|
97
|
-
|
98
|
-
.
|
99
|
-
|
100
|
-
|
101
|
-
.
|
102
|
-
|
103
|
-
|
104
|
-
.
|
105
|
-
|
106
|
-
|
107
|
-
.
|
108
|
-
|
109
|
-
|
110
|
-
.
|
111
|
-
|
112
|
-
|
113
|
-
.
|
114
|
-
.
|
115
|
-
|
116
|
-
.
|
176
|
+
.visible {
|
177
|
+
visibility: visible;
|
178
|
+
}
|
179
|
+
.absolute {
|
180
|
+
position: absolute;
|
181
|
+
}
|
182
|
+
.fixed {
|
183
|
+
position: fixed;
|
184
|
+
}
|
185
|
+
.relative {
|
186
|
+
position: relative;
|
187
|
+
}
|
188
|
+
.left-0 {
|
189
|
+
left: 0;
|
190
|
+
}
|
191
|
+
.left-5\% {
|
192
|
+
left: 5%;
|
193
|
+
}
|
194
|
+
.left-99\% {
|
195
|
+
left: 99%;
|
196
|
+
}
|
197
|
+
.right-0 {
|
198
|
+
right: 0;
|
199
|
+
}
|
200
|
+
.right-5\% {
|
201
|
+
right: 5%;
|
202
|
+
}
|
203
|
+
.right-99\% {
|
204
|
+
right: 99%;
|
205
|
+
}
|
206
|
+
.top-\[50\%\] {
|
207
|
+
top: 50%;
|
208
|
+
}
|
209
|
+
.top-10px {
|
210
|
+
top: 10px;
|
211
|
+
}
|
212
|
+
.grid {
|
213
|
+
display: grid;
|
214
|
+
}
|
215
|
+
.m-1px {
|
216
|
+
margin: 1px;
|
217
|
+
}
|
218
|
+
.m2 {
|
219
|
+
margin: 0.5rem;
|
220
|
+
}
|
221
|
+
.m-b-10px {
|
222
|
+
margin-bottom: 10px;
|
223
|
+
}
|
224
|
+
.m-b-5px {
|
225
|
+
margin-bottom: 5px;
|
226
|
+
}
|
227
|
+
.m-l-20px {
|
228
|
+
margin-left: 20px;
|
229
|
+
}
|
230
|
+
.m-l-5px {
|
231
|
+
margin-left: 5px;
|
232
|
+
}
|
233
|
+
.m-l-6px {
|
234
|
+
margin-left: 6px;
|
235
|
+
}
|
236
|
+
.m-r-4px {
|
237
|
+
margin-right: 4px;
|
238
|
+
}
|
239
|
+
.m-r-5px {
|
240
|
+
margin-right: 5px;
|
241
|
+
}
|
242
|
+
.m-t-10px {
|
243
|
+
margin-top: 10px;
|
244
|
+
}
|
245
|
+
.m-t-5px {
|
246
|
+
margin-top: 5px;
|
247
|
+
}
|
248
|
+
.me {
|
249
|
+
margin-inline-end: 1rem;
|
250
|
+
}
|
251
|
+
.ml-10px {
|
252
|
+
margin-left: 10px;
|
253
|
+
}
|
254
|
+
.ml-4 {
|
255
|
+
margin-left: 1rem;
|
256
|
+
}
|
257
|
+
.mr {
|
258
|
+
margin-right: 1rem;
|
259
|
+
}
|
260
|
+
.mr-1 {
|
261
|
+
margin-right: 0.25rem;
|
262
|
+
}
|
263
|
+
.mr-10px {
|
264
|
+
margin-right: 10px;
|
265
|
+
}
|
266
|
+
.block {
|
267
|
+
display: block;
|
268
|
+
}
|
269
|
+
.hidden {
|
270
|
+
display: none;
|
271
|
+
}
|
272
|
+
.min-h-30px {
|
273
|
+
min-height: 30px;
|
274
|
+
}
|
275
|
+
.w-100\% {
|
276
|
+
width: 100%;
|
277
|
+
}
|
278
|
+
.w-40px {
|
279
|
+
width: 40px;
|
280
|
+
}
|
281
|
+
.w-50\% {
|
282
|
+
width: 50%;
|
283
|
+
}
|
284
|
+
.flex {
|
285
|
+
display: flex;
|
286
|
+
}
|
287
|
+
.table {
|
288
|
+
display: table;
|
289
|
+
}
|
290
|
+
.translate-y-\[-50\%\] {
|
291
|
+
--un-translate-y: -50%;
|
292
|
+
transform: translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z))
|
293
|
+
rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z))
|
294
|
+
skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y))
|
295
|
+
scaleZ(var(--un-scale-z));
|
296
|
+
}
|
297
|
+
.cursor-pointer {
|
298
|
+
cursor: pointer;
|
299
|
+
}
|
300
|
+
.resize {
|
301
|
+
resize: both;
|
302
|
+
}
|
303
|
+
.content-center {
|
304
|
+
align-content: center;
|
305
|
+
}
|
306
|
+
.items-center {
|
307
|
+
align-items: center;
|
308
|
+
}
|
309
|
+
.justify-center {
|
310
|
+
justify-content: center;
|
311
|
+
}
|
312
|
+
.justify-between {
|
313
|
+
justify-content: space-between;
|
314
|
+
}
|
117
315
|
.border,
|
118
|
-
.border-1px{
|
119
|
-
|
120
|
-
|
121
|
-
.
|
122
|
-
|
123
|
-
|
316
|
+
.border-1px {
|
317
|
+
border-width: 1px;
|
318
|
+
}
|
319
|
+
.border-white {
|
320
|
+
--un-border-opacity: 1;
|
321
|
+
border-color: rgba(255, 255, 255, var(--un-border-opacity));
|
322
|
+
}
|
323
|
+
.hover\:border-blue:hover {
|
324
|
+
--un-border-opacity: 1;
|
325
|
+
border-color: rgba(96, 165, 250, var(--un-border-opacity));
|
326
|
+
}
|
327
|
+
.rd-4px {
|
328
|
+
border-radius: 4px;
|
329
|
+
}
|
330
|
+
.border-solid {
|
331
|
+
border-style: solid;
|
332
|
+
}
|
333
|
+
.bg-black {
|
334
|
+
--un-bg-opacity: 1;
|
335
|
+
background-color: rgba(0, 0, 0, var(--un-bg-opacity));
|
336
|
+
}
|
124
337
|
.p-10px,
|
125
|
-
.p10px{
|
126
|
-
|
127
|
-
|
128
|
-
.
|
129
|
-
|
130
|
-
|
131
|
-
.
|
132
|
-
.
|
133
|
-
|
134
|
-
.
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
.
|
338
|
+
.p10px {
|
339
|
+
padding: 10px;
|
340
|
+
}
|
341
|
+
.p-5px {
|
342
|
+
padding: 5px;
|
343
|
+
}
|
344
|
+
.p2 {
|
345
|
+
padding: 0.5rem;
|
346
|
+
}
|
347
|
+
.px {
|
348
|
+
padding-left: 1rem;
|
349
|
+
padding-right: 1rem;
|
350
|
+
}
|
351
|
+
.pb-5px {
|
352
|
+
padding-bottom: 5px;
|
353
|
+
}
|
354
|
+
.pl-20 {
|
355
|
+
padding-left: 5rem;
|
356
|
+
}
|
357
|
+
.pt-5px {
|
358
|
+
padding-top: 5px;
|
359
|
+
}
|
360
|
+
.text-center {
|
361
|
+
text-align: center;
|
362
|
+
}
|
363
|
+
.vertical-text-top {
|
364
|
+
vertical-align: text-top;
|
365
|
+
}
|
366
|
+
.italic {
|
367
|
+
font-style: italic;
|
368
|
+
}
|
369
|
+
.color-blue {
|
370
|
+
--un-text-opacity: 1;
|
371
|
+
color: rgba(96, 165, 250, var(--un-text-opacity));
|
372
|
+
}
|
373
|
+
.hover\:color-blue:hover {
|
374
|
+
--un-text-opacity: 1;
|
375
|
+
color: rgba(96, 165, 250, var(--un-text-opacity));
|
376
|
+
}
|
377
|
+
.line-through {
|
378
|
+
text-decoration-line: line-through;
|
379
|
+
}
|
380
|
+
.underline {
|
381
|
+
text-decoration-line: underline;
|
382
|
+
}
|
139
383
|
//.tab{-moz-tab-size:4;-o-tab-size:4;tab-size:4;}
|
140
384
|
//.blur{--un-blur:blur(8px);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}
|
141
385
|
//.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
|
@@ -57,7 +57,6 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
57
57
|
const props = __props;
|
58
58
|
const DkTable = vue.inject("DkTable");
|
59
59
|
const fieldName = vue.ref(props.field.prop);
|
60
|
-
console.log("fieldName.value", fieldName.value);
|
61
60
|
const fieldValue = vue.ref(props.row[fieldName.value] ?? "");
|
62
61
|
if (fieldName.value && fieldName.value.indexOf(".") > -1) {
|
63
62
|
const fieldNameArr = fieldName.value.split(".");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FieldRender.vue2.js","sources":["../../../../src/table/src/components/FieldRender.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFieldRender',\n});\n</script>\n<template>\n <!--图标-->\n <div v-if=\"field.render == 'icon'\">\n <dk-icon v-if=\"fieldValue || field.default\" :icon=\"fieldValue ? fieldValue : field.default\" />\n <span v-else>-</span>\n </div>\n\n <!--开关-->\n <el-switch\n v-if=\"field.render == 'switch' && fieldValue !== ''\"\n :model-value=\"fieldValue.toString()\"\n :loading=\"row.loading\"\n inactive-value=\"0\"\n active-value=\"1\"\n size=\"small\"\n @change=\"onChangeField\"\n ></el-switch>\n\n <!-- 单图 -->\n <div v-if=\"field.render == 'image' && fieldValue\" class=\"ba-render-image\">\n <el-image\n :hide-on-click-modal=\"true\"\n :preview-teleported=\"true\"\n :preview-src-list=\"[fieldValue]\"\n :src=\"fieldValue\"\n fit=\"cover\"\n style=\"width: 50px; height: 50px\"\n ></el-image>\n </div>\n\n <!--多图片-->\n <div v-if=\"field.render == 'images'\" class=\"ba-render-image\">\n <template v-if=\"Array.isArray(fieldValue) && fieldValue.length\">\n <el-image\n v-for=\"(item, idx) in fieldValue\"\n :key=\"idx\"\n :initial-index=\"idx\"\n :preview-teleported=\"true\"\n :preview-src-list=\"fieldValue\"\n class=\"images-item\"\n :src=\"item\"\n style=\"width: 50px; height: 50px\"\n :hide-on-click-modal=\"true\"\n ></el-image>\n </template>\n </div>\n\n <div v-if=\"field.render == 'tag' && fieldValue !== ''\">\n <el-tag\n :type=\"getTagType(fieldValue, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[fieldValue] : fieldValue }}\n </el-tag>\n </div>\n\n <div v-if=\"field.render == 'copy' && fieldValue\">\n <el-tag style=\"cursor: pointer\" @click=\"copy(fieldValue, $event)\">复制</el-tag>\n </div>\n\n <!-- tags -->\n <div v-if=\"field.render == 'tags'\">\n <template v-if=\"Array.isArray(fieldValue)\">\n <template v-for=\"(tag, idx) in fieldValue\" :key=\"idx\">\n <el-tag\n v-if=\"tag !== ''\"\n class=\"m-1px\"\n :type=\"getTagType(tag, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[tag] ?? tag : tag }}</el-tag\n >\n </template>\n </template>\n <template v-else>\n <el-tag\n v-if=\"fieldValue !== ''\"\n class=\"m-1px\"\n :type=\"getTagType(fieldValue, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[fieldValue] ?? fieldValue : fieldValue }}\n </el-tag>\n </template>\n </div>\n\n <!-- url -->\n <div v-if=\"field.render == 'url' && fieldValue\">\n <el-input :model-value=\"fieldValue\" placeholder=\"链接地址\">\n <template #append>\n <el-button\n @click=\"\n typeof field.click == 'function'\n ? field.click(row, field, fieldValue, column, index)\n : openUrl(fieldValue, field.target)\n \"\n >\n <dk-icon :color=\"'#606266'\" icon=\"Position\" />\n </el-button>\n </template>\n </el-input>\n </div>\n\n <!-- datetime -->\n <div v-if=\"field.render == 'datetime' || field.render == 'timestamp'\">\n {{ !fieldValue ? '-' : timeFormat(fieldValue, field.timeFormat ?? undefined) }}\n </div>\n\n <div v-if=\"field.render == 'time'\">\n {{ fieldValue }}\n </div>\n <div v-if=\"field.render == 'year'\">\n {{ fieldValue }}\n </div>\n <!-- color -->\n <div v-if=\"field.render == 'color'\">\n <div :style=\"{ background: fieldValue }\" class=\"dk-render-color\"></div>\n </div>\n\n <!-- 自定义组件/函数渲染 -->\n <component\n :is=\"field.customRender\"\n v-if=\"field.render == 'customRender'\"\n :render-row=\"row\"\n :render-field=\"field\"\n :render-value=\"fieldValue\"\n :render-column=\"column\"\n :render-index=\"index\"\n />\n\n <!-- 按钮组 -->\n <!-- 只对默认的编辑、删除、排序按钮进行鉴权,其他按钮请通过 display 属性控制按钮是否显示 -->\n <div v-if=\"field.render == 'buttons' && field.buttons\">\n <template v-for=\"(btn, idx) in field.buttons\" :key=\"idx\">\n <template v-if=\"btn.display ? btn.display(row, field) : true\">\n <!-- 常规按钮 未使用-->\n <el-button\n v-if=\"btn.render == 'basicButton'\"\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n @click=\"onButtonClick(btn)\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n\n <!-- 带提示信息的按钮 -->\n <el-tooltip\n v-if=\"btn.render == 'tipButton' && ((btn.name == 'edit' && DkTable.auth('edit')) || btn.name != 'edit')\"\n :disabled=\"!(btn.title && !btn.disabledTip)\"\n :content=\"btn.title ?? ''\"\n placement=\"top\"\n :hide-after=\"0\"\n :show-after=\"100\"\n >\n <el-button\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n @click=\"onButtonClick(btn)\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n </el-tooltip>\n\n <!-- 带确认框的按钮 -->\n <el-popconfirm\n v-if=\"\n btn.render == 'confirmButton' && ((btn.name == 'delete' && DkTable.auth('del')) || btn.name != 'delete')\n \"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.popconfirm\"\n :hide-after=\"0\"\n :show-after=\"100\"\n @confirm=\"onButtonClick(btn)\"\n >\n <template #reference>\n <div class=\"dk-tooltip-button\">\n <el-tooltip :disabled=\"!btn.title\" :content=\"btn.title ?? ''\" placement=\"top\">\n <el-button\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">\n {{ btn.text }}\n </div>\n </el-button>\n </el-tooltip>\n </div>\n </template>\n </el-popconfirm>\n\n <!-- 带提示的可拖拽按钮 -->\n <el-tooltip\n v-if=\"\n btn.render == 'moveButton' &&\n ((btn.name == 'weigh-sort' && DkTable.auth('sortable')) || btn.name != 'weigh-sort')\n \"\n :disabled=\"!(btn.title && !btn.disabledTip)\"\n :content=\"btn.title ?? ''\"\n :hide-after=\"0\"\n :show-after=\"100\"\n placement=\"top\"\n >\n <el-button\n :class=\"btn.class\"\n class=\"table-operate move-button\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n size=\"small\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n </el-tooltip>\n </template>\n </template>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { inject, ref } from 'vue'\nimport type { TableColumnCtx, TagProps } from 'element-plus'\nimport { ElMessage } from 'element-plus'\nimport { openUrl, timeFormat, handleClipboard } from '@vipl520/utils'\nimport type dkTable from '../../utils/dkTable'\n\nconst DkTable = inject('DkTable') as dkTable\n\ninterface Props {\n row: TableRow\n field: TableColumn\n column: TableColumnCtx<TableRow>\n index: number\n}\nconst props = defineProps<Props>()\n\nconst fieldName: any = ref(props.field.prop)\nconsole.log('fieldName.value', fieldName.value)\nconst fieldValue = ref(props.row[fieldName.value] ?? '')\n\nif (fieldName.value && fieldName.value.indexOf('.') > -1) {\n const fieldNameArr = fieldName.value.split('.')\n const val: any = ref(props.row[fieldNameArr[0]])\n for (let index = 1; index < fieldNameArr.length; index++) {\n val.value = val.value ? val.value[fieldNameArr[index]] ?? '' : ''\n }\n fieldValue.value = val.value\n}\n\nconst getTagType = (value: string, custom: any): TagProps['type'] => {\n return custom && custom[value] ? custom[value] : 'primary'\n}\n\nconst onChangeField = (value: any) => {\n DkTable.onTableAction('field-change', {\n ...props,\n value,\n })\n}\n\nconst copy = (text: string, event: any) => {\n handleClipboard(text, event).then((res) => {\n ElMessage.success('复制成功')\n })\n}\n\nconst onButtonClick = (btn: OptButton) => {\n if (typeof btn.click === 'function') {\n btn.click(props.row, props.field)\n return\n }\n DkTable.onTableAction(btn.name, props)\n}\n</script>\n<style scoped></style>\n"],"names":["__MACROS_defineComponent","inject","ref","handleClipboard","ElMessage"],"mappings":"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"}
|
1
|
+
{"version":3,"file":"FieldRender.vue2.js","sources":["../../../../src/table/src/components/FieldRender.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFieldRender',\n});\n</script>\n<template>\n <!--图标-->\n <div v-if=\"field.render == 'icon'\">\n <dk-icon v-if=\"fieldValue || field.default\" :icon=\"fieldValue ? fieldValue : field.default\" />\n <span v-else>-</span>\n </div>\n\n <!--开关-->\n <el-switch\n v-if=\"field.render == 'switch' && fieldValue !== ''\"\n :model-value=\"fieldValue.toString()\"\n :loading=\"row.loading\"\n inactive-value=\"0\"\n active-value=\"1\"\n size=\"small\"\n @change=\"onChangeField\"\n ></el-switch>\n\n <!-- 单图 -->\n <div v-if=\"field.render == 'image' && fieldValue\" class=\"ba-render-image\">\n <el-image\n :hide-on-click-modal=\"true\"\n :preview-teleported=\"true\"\n :preview-src-list=\"[fieldValue]\"\n :src=\"fieldValue\"\n fit=\"cover\"\n style=\"width: 50px; height: 50px\"\n ></el-image>\n </div>\n\n <!--多图片-->\n <div v-if=\"field.render == 'images'\" class=\"ba-render-image\">\n <template v-if=\"Array.isArray(fieldValue) && fieldValue.length\">\n <el-image\n v-for=\"(item, idx) in fieldValue\"\n :key=\"idx\"\n :initial-index=\"idx\"\n :preview-teleported=\"true\"\n :preview-src-list=\"fieldValue\"\n class=\"images-item\"\n :src=\"item\"\n style=\"width: 50px; height: 50px\"\n :hide-on-click-modal=\"true\"\n ></el-image>\n </template>\n </div>\n\n <div v-if=\"field.render == 'tag' && fieldValue !== ''\">\n <el-tag\n :type=\"getTagType(fieldValue, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[fieldValue] : fieldValue }}\n </el-tag>\n </div>\n\n <div v-if=\"field.render == 'copy' && fieldValue\">\n <el-tag style=\"cursor: pointer\" @click=\"copy(fieldValue, $event)\">复制</el-tag>\n </div>\n\n <!-- tags -->\n <div v-if=\"field.render == 'tags'\">\n <template v-if=\"Array.isArray(fieldValue)\">\n <template v-for=\"(tag, idx) in fieldValue\" :key=\"idx\">\n <el-tag\n v-if=\"tag !== ''\"\n class=\"m-1px\"\n :type=\"getTagType(tag, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[tag] ?? tag : tag }}</el-tag\n >\n </template>\n </template>\n <template v-else>\n <el-tag\n v-if=\"fieldValue !== ''\"\n class=\"m-1px\"\n :type=\"getTagType(fieldValue, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[fieldValue] ?? fieldValue : fieldValue }}\n </el-tag>\n </template>\n </div>\n\n <!-- url -->\n <div v-if=\"field.render == 'url' && fieldValue\">\n <el-input :model-value=\"fieldValue\" placeholder=\"链接地址\">\n <template #append>\n <el-button\n @click=\"\n typeof field.click == 'function'\n ? field.click(row, field, fieldValue, column, index)\n : openUrl(fieldValue, field.target)\n \"\n >\n <dk-icon :color=\"'#606266'\" icon=\"Position\" />\n </el-button>\n </template>\n </el-input>\n </div>\n\n <!-- datetime -->\n <div v-if=\"field.render == 'datetime' || field.render == 'timestamp'\">\n {{ !fieldValue ? '-' : timeFormat(fieldValue, field.timeFormat ?? undefined) }}\n </div>\n\n <div v-if=\"field.render == 'time'\">\n {{ fieldValue }}\n </div>\n <div v-if=\"field.render == 'year'\">\n {{ fieldValue }}\n </div>\n <!-- color -->\n <div v-if=\"field.render == 'color'\">\n <div :style=\"{ background: fieldValue }\" class=\"dk-render-color\"></div>\n </div>\n\n <!-- 自定义组件/函数渲染 -->\n <component\n :is=\"field.customRender\"\n v-if=\"field.render == 'customRender'\"\n :render-row=\"row\"\n :render-field=\"field\"\n :render-value=\"fieldValue\"\n :render-column=\"column\"\n :render-index=\"index\"\n />\n\n <!-- 按钮组 -->\n <!-- 只对默认的编辑、删除、排序按钮进行鉴权,其他按钮请通过 display 属性控制按钮是否显示 -->\n <div v-if=\"field.render == 'buttons' && field.buttons\">\n <template v-for=\"(btn, idx) in field.buttons\" :key=\"idx\">\n <template v-if=\"btn.display ? btn.display(row, field) : true\">\n <!-- 常规按钮 未使用-->\n <el-button\n v-if=\"btn.render == 'basicButton'\"\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n @click=\"onButtonClick(btn)\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n\n <!-- 带提示信息的按钮 -->\n <el-tooltip\n v-if=\"btn.render == 'tipButton' && ((btn.name == 'edit' && DkTable.auth('edit')) || btn.name != 'edit')\"\n :disabled=\"!(btn.title && !btn.disabledTip)\"\n :content=\"btn.title ?? ''\"\n placement=\"top\"\n :hide-after=\"0\"\n :show-after=\"100\"\n >\n <el-button\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n @click=\"onButtonClick(btn)\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n </el-tooltip>\n\n <!-- 带确认框的按钮 -->\n <el-popconfirm\n v-if=\"\n btn.render == 'confirmButton' && ((btn.name == 'delete' && DkTable.auth('del')) || btn.name != 'delete')\n \"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.popconfirm\"\n :hide-after=\"0\"\n :show-after=\"100\"\n @confirm=\"onButtonClick(btn)\"\n >\n <template #reference>\n <div class=\"dk-tooltip-button\">\n <el-tooltip :disabled=\"!btn.title\" :content=\"btn.title ?? ''\" placement=\"top\">\n <el-button\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">\n {{ btn.text }}\n </div>\n </el-button>\n </el-tooltip>\n </div>\n </template>\n </el-popconfirm>\n\n <!-- 带提示的可拖拽按钮 -->\n <el-tooltip\n v-if=\"\n btn.render == 'moveButton' &&\n ((btn.name == 'weigh-sort' && DkTable.auth('sortable')) || btn.name != 'weigh-sort')\n \"\n :disabled=\"!(btn.title && !btn.disabledTip)\"\n :content=\"btn.title ?? ''\"\n :hide-after=\"0\"\n :show-after=\"100\"\n placement=\"top\"\n >\n <el-button\n :class=\"btn.class\"\n class=\"table-operate move-button\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n size=\"small\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n </el-tooltip>\n </template>\n </template>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { inject, ref } from 'vue'\nimport type { TableColumnCtx, TagProps } from 'element-plus'\nimport { ElMessage } from 'element-plus'\nimport { openUrl, timeFormat, handleClipboard } from '@vipl520/utils'\nimport type dkTable from '../../utils/dkTable'\n\nconst DkTable = inject('DkTable') as dkTable\n\ninterface Props {\n row: TableRow\n field: TableColumn\n column: TableColumnCtx<TableRow>\n index: number\n}\nconst props = defineProps<Props>()\n\nconst fieldName: any = ref(props.field.prop)\nconst fieldValue = ref(props.row[fieldName.value] ?? '')\n\nif (fieldName.value && fieldName.value.indexOf('.') > -1) {\n const fieldNameArr = fieldName.value.split('.')\n const val: any = ref(props.row[fieldNameArr[0]])\n for (let index = 1; index < fieldNameArr.length; index++) {\n val.value = val.value ? val.value[fieldNameArr[index]] ?? '' : ''\n }\n fieldValue.value = val.value\n}\n\nconst getTagType = (value: string, custom: any): TagProps['type'] => {\n return custom && custom[value] ? custom[value] : 'primary'\n}\n\nconst onChangeField = (value: any) => {\n DkTable.onTableAction('field-change', {\n ...props,\n value,\n })\n}\n\nconst copy = (text: string, event: any) => {\n handleClipboard(text, event).then((res) => {\n ElMessage.success('复制成功')\n })\n}\n\nconst onButtonClick = (btn: OptButton) => {\n if (typeof btn.click === 'function') {\n btn.click(props.row, props.field)\n return\n }\n DkTable.onTableAction(btn.name, props)\n}\n</script>\n<style scoped></style>\n"],"names":["__MACROS_defineComponent","inject","ref","handleClipboard","ElMessage"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;AAqPD,IAAM,MAAA,OAAA,GAAUC,WAAO,SAAS,CAAA,CAAA;AAUhC,IAAA,MAAM,SAAiB,GAAAC,OAAA,CAAI,KAAM,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;AAC3C,IAAA,MAAM,aAAaA,OAAI,CAAA,KAAA,CAAM,IAAI,SAAU,CAAA,KAAK,KAAK,EAAE,CAAA,CAAA;AAEvD,IAAA,IAAI,UAAU,KAAS,IAAA,SAAA,CAAU,MAAM,OAAQ,CAAA,GAAG,IAAI,CAAI,CAAA,EAAA;AACxD,MAAA,MAAM,YAAe,GAAA,SAAA,CAAU,KAAM,CAAA,KAAA,CAAM,GAAG,CAAA,CAAA;AAC9C,MAAA,MAAM,MAAWA,OAAI,CAAA,KAAA,CAAM,IAAI,YAAa,CAAA,CAAC,CAAC,CAAC,CAAA,CAAA;AAC/C,MAAA,KAAA,IAAS,KAAQ,GAAA,CAAA,EAAG,KAAQ,GAAA,YAAA,CAAa,QAAQ,KAAS,EAAA,EAAA;AACxD,QAAI,GAAA,CAAA,KAAA,GAAQ,IAAI,KAAQ,GAAA,GAAA,CAAI,MAAM,YAAa,CAAA,KAAK,CAAC,CAAA,IAAK,EAAK,GAAA,EAAA,CAAA;AAAA,OACjE;AACA,MAAA,UAAA,CAAW,QAAQ,GAAI,CAAA,KAAA,CAAA;AAAA,KACzB;AAEA,IAAM,MAAA,UAAA,GAAa,CAAC,KAAA,EAAe,MAAkC,KAAA;AACnE,MAAA,OAAO,UAAU,MAAO,CAAA,KAAK,CAAI,GAAA,MAAA,CAAO,KAAK,CAAI,GAAA,SAAA,CAAA;AAAA,KACnD,CAAA;AAEA,IAAM,MAAA,aAAA,GAAgB,CAAC,KAAe,KAAA;AACpC,MAAA,OAAA,CAAQ,cAAc,cAAgB,EAAA;AAAA,QACpC,GAAG,KAAA;AAAA,QACH,KAAA;AAAA,OACD,CAAA,CAAA;AAAA,KACH,CAAA;AAEA,IAAM,MAAA,IAAA,GAAO,CAAC,IAAA,EAAc,KAAe,KAAA;AACzC,MAAAC,qBAAA,CAAgB,IAAM,EAAA,KAAK,CAAE,CAAA,IAAA,CAAK,CAAC,GAAQ,KAAA;AACzC,QAAAC,qBAAA,CAAU,QAAQ,0BAAM,CAAA,CAAA;AAAA,OACzB,CAAA,CAAA;AAAA,KACH,CAAA;AAEA,IAAM,MAAA,aAAA,GAAgB,CAAC,GAAmB,KAAA;AACxC,MAAI,IAAA,OAAO,GAAI,CAAA,KAAA,KAAU,UAAY,EAAA;AACnC,QAAA,GAAA,CAAI,KAAM,CAAA,KAAA,CAAM,GAAK,EAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AAChC,QAAA,OAAA;AAAA,OACF;AACA,MAAQ,OAAA,CAAA,aAAA,CAAc,GAAI,CAAA,IAAA,EAAM,KAAK,CAAA,CAAA;AAAA,KACvC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -173,7 +173,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
173
173
|
vue.withDirectives((vue.openBlock(), vue.createBlock(_component_el_table, vue.mergeProps({
|
174
174
|
ref_key: "TableRef",
|
175
175
|
ref: TableRef,
|
176
|
-
class: "dk-data-table
|
176
|
+
class: "dk-data-table",
|
177
177
|
"header-cell-class-name": "table-header-cell",
|
178
178
|
"default-expand-all": vue.unref(DkTable).table.expandAll,
|
179
179
|
data: vue.unref(DkTable).table.data,
|