@vipl520/dk-ui 1.0.52 → 1.0.54
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/attributes.json +8 -0
- package/dist/index.css +1 -1
- package/dist/index.js +2012 -1428
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +4 -4
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +2011 -1429
- package/dist/tags.json +7 -0
- package/dist/web-types.json +35 -1
- package/es/form/src/form.vue2.mjs +0 -1
- package/es/form/src/form.vue2.mjs.map +1 -1
- package/es/group/src/group.vue2.mjs +1 -0
- package/es/group/src/group.vue2.mjs.map +1 -1
- package/es/hot-area-input/src/component/hot-area-content.vue2.mjs +23 -21
- package/es/hot-area-input/src/component/hot-area-content.vue2.mjs.map +1 -1
- package/es/icon/style/index.css +0 -1
- package/es/icon/style/index.scss +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.mjs +5 -2
- package/es/index.mjs.map +1 -1
- package/es/index.scss +1 -0
- package/es/page-diy/src/config/rule/min/common/DkMinGrid.d.ts +81 -0
- package/es/page-diy/src/config/rule/min/common/DkMinGrid.mjs +114 -0
- package/es/page-diy/src/config/rule/min/common/DkMinGrid.mjs.map +1 -0
- package/es/page-diy/src/config/rule/min/common/DkMinSwiperImage.d.ts +8 -0
- package/es/page-diy/src/config/rule/min/common/DkMinSwiperImage.mjs +7 -1
- package/es/page-diy/src/config/rule/min/common/DkMinSwiperImage.mjs.map +1 -1
- package/es/page-diy/src/config/rule/min/common/DkMinTitle.d.ts +35 -30
- package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs +76 -62
- package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs.map +1 -1
- package/es/page-diy/src/config/rule/min/common/index.d.ts +240 -60
- package/es/page-diy/src/config/rule/min/common/index.mjs +4 -2
- package/es/page-diy/src/config/rule/min/common/index.mjs.map +1 -1
- package/es/page-diy/src/config/rule/min/index.d.ts +240 -60
- package/es/page-diy/src/config/rule/web/common/DkViewSwipe.mjs +1 -1
- package/es/page-diy/src/config/rule/web/common/DkViewSwipe.mjs.map +1 -1
- package/es/page-diy/src/props.mjs +1 -1
- package/es/page-diy/src/props.mjs.map +1 -1
- package/es/page-diy/src/views/min/DkMinGrid.vue.d.ts +22 -0
- package/es/page-diy/src/views/min/DkMinGrid.vue.mjs +65 -0
- package/es/page-diy/src/views/min/DkMinGrid.vue.mjs.map +1 -0
- package/es/page-diy/src/views/min/DkMinSwiperImage.vue.d.ts +9 -0
- package/es/page-diy/src/views/min/DkMinSwiperImage.vue.mjs +7 -2
- package/es/page-diy/src/views/min/DkMinSwiperImage.vue.mjs.map +1 -1
- package/es/page-diy/src/views/min/DkMinTitle.vue.d.ts +62 -17
- package/es/page-diy/src/views/min/DkMinTitle.vue.mjs +59 -30
- package/es/page-diy/src/views/min/DkMinTitle.vue.mjs.map +1 -1
- package/es/page-diy/src/views/min/index.mjs +3 -1
- package/es/page-diy/src/views/min/index.mjs.map +1 -1
- package/es/page-diy/style/drag-tool.css +1 -1
- package/es/page-diy/style/drag-tool.scss +4 -0
- package/es/page-diy/style/index.css +1 -1
- package/es/page-diy/style/minViews/index.scss +8 -0
- package/es/style-box-input/src/style-box-input.vue2.mjs +200 -130
- package/es/style-box-input/src/style-box-input.vue2.mjs.map +1 -1
- package/es/style-box-input/style/index.css +1 -1
- package/es/style-box-input/style/index.scss +13 -3
- package/es/style-font-input/src/style-font-input.vue2.mjs +105 -272
- package/es/style-font-input/src/style-font-input.vue2.mjs.map +1 -1
- package/es/style-input/src/style-input.vue2.mjs +1 -0
- package/es/style-input/src/style-input.vue2.mjs.map +1 -1
- package/es/style-shadow-input/src/style-shadow-input.vue2.mjs +1 -1
- package/es/style-shadow-input/src/style-shadow-input.vue2.mjs.map +1 -1
- package/es/test/index.d.ts +4 -2
- package/es/test/src/test.vue.d.ts +4 -2
- package/es/test/src/test.vue2.mjs +14 -3
- package/es/test/src/test.vue2.mjs.map +1 -1
- package/es/tiny-editor/src/tiny-editor.vue2.mjs +1 -1
- package/es/tiny-editor/src/tiny-editor.vue2.mjs.map +1 -1
- package/es/uni-icon/style/index.css +1 -1
- package/es/uni-icon/style/index.scss +1 -1
- package/es/url-input/index.d.ts +35 -0
- package/es/url-input/index.mjs +8 -0
- package/es/url-input/index.mjs.map +1 -0
- package/es/url-input/src/props.d.ts +16 -0
- package/es/url-input/src/props.mjs +13 -0
- package/es/url-input/src/props.mjs.map +1 -0
- package/es/url-input/src/url-input-content.vue.d.ts +25 -0
- package/es/url-input/src/url-input-content.vue.mjs +7 -0
- package/es/url-input/src/url-input-content.vue.mjs.map +1 -0
- package/es/url-input/src/url-input-content.vue2.mjs +301 -0
- package/es/url-input/src/url-input-content.vue2.mjs.map +1 -0
- package/es/url-input/src/url-input-table.vue.d.ts +16 -0
- package/es/url-input/src/url-input-table.vue.mjs +7 -0
- package/es/url-input/src/url-input-table.vue.mjs.map +1 -0
- package/es/url-input/src/url-input-table.vue2.mjs +63 -0
- package/es/url-input/src/url-input-table.vue2.mjs.map +1 -0
- package/es/url-input/src/url-input.vue.d.ts +34 -0
- package/es/url-input/src/url-input.vue.mjs +7 -0
- package/es/url-input/src/url-input.vue.mjs.map +1 -0
- package/es/url-input/src/url-input.vue2.mjs +69 -0
- package/es/url-input/src/url-input.vue2.mjs.map +1 -0
- package/es/url-input/style/index.css +1 -0
- package/es/url-input/style/index.scss +39 -0
- package/lib/form/src/form.vue2.js +0 -1
- package/lib/form/src/form.vue2.js.map +1 -1
- package/lib/group/src/group.vue2.js +1 -0
- package/lib/group/src/group.vue2.js.map +1 -1
- package/lib/hot-area-input/src/component/hot-area-content.vue2.js +23 -21
- package/lib/hot-area-input/src/component/hot-area-content.vue2.js.map +1 -1
- package/lib/icon/style/index.css +0 -1
- package/lib/icon/style/index.scss +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +8 -3
- package/lib/index.js.map +1 -1
- package/lib/index.scss +1 -0
- package/lib/page-diy/src/config/rule/min/common/DkMinGrid.d.ts +81 -0
- package/lib/page-diy/src/config/rule/min/common/DkMinGrid.js +118 -0
- package/lib/page-diy/src/config/rule/min/common/DkMinGrid.js.map +1 -0
- package/lib/page-diy/src/config/rule/min/common/DkMinSwiperImage.d.ts +8 -0
- package/lib/page-diy/src/config/rule/min/common/DkMinSwiperImage.js +7 -1
- package/lib/page-diy/src/config/rule/min/common/DkMinSwiperImage.js.map +1 -1
- package/lib/page-diy/src/config/rule/min/common/DkMinTitle.d.ts +35 -30
- package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js +76 -62
- package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js.map +1 -1
- package/lib/page-diy/src/config/rule/min/common/index.d.ts +240 -60
- package/lib/page-diy/src/config/rule/min/common/index.js +4 -2
- package/lib/page-diy/src/config/rule/min/common/index.js.map +1 -1
- package/lib/page-diy/src/config/rule/min/index.d.ts +240 -60
- package/lib/page-diy/src/config/rule/web/common/DkViewSwipe.js +1 -1
- package/lib/page-diy/src/config/rule/web/common/DkViewSwipe.js.map +1 -1
- package/lib/page-diy/src/props.js +1 -1
- package/lib/page-diy/src/props.js.map +1 -1
- package/lib/page-diy/src/views/min/DkMinGrid.vue.d.ts +22 -0
- package/lib/page-diy/src/views/min/DkMinGrid.vue.js +69 -0
- package/lib/page-diy/src/views/min/DkMinGrid.vue.js.map +1 -0
- package/lib/page-diy/src/views/min/DkMinSwiperImage.vue.d.ts +9 -0
- package/lib/page-diy/src/views/min/DkMinSwiperImage.vue.js +7 -2
- package/lib/page-diy/src/views/min/DkMinSwiperImage.vue.js.map +1 -1
- package/lib/page-diy/src/views/min/DkMinTitle.vue.d.ts +62 -17
- package/lib/page-diy/src/views/min/DkMinTitle.vue.js +58 -29
- package/lib/page-diy/src/views/min/DkMinTitle.vue.js.map +1 -1
- package/lib/page-diy/src/views/min/index.js +3 -1
- package/lib/page-diy/src/views/min/index.js.map +1 -1
- package/lib/page-diy/style/drag-tool.css +1 -1
- package/lib/page-diy/style/drag-tool.scss +4 -0
- package/lib/page-diy/style/index.css +1 -1
- package/lib/page-diy/style/minViews/index.scss +8 -0
- package/lib/style-box-input/src/style-box-input.vue2.js +199 -129
- package/lib/style-box-input/src/style-box-input.vue2.js.map +1 -1
- package/lib/style-box-input/style/index.css +1 -1
- package/lib/style-box-input/style/index.scss +13 -3
- package/lib/style-font-input/src/style-font-input.vue2.js +105 -272
- package/lib/style-font-input/src/style-font-input.vue2.js.map +1 -1
- package/lib/style-input/src/style-input.vue2.js +1 -0
- package/lib/style-input/src/style-input.vue2.js.map +1 -1
- package/lib/style-shadow-input/src/style-shadow-input.vue2.js +1 -1
- package/lib/style-shadow-input/src/style-shadow-input.vue2.js.map +1 -1
- package/lib/test/index.d.ts +4 -2
- package/lib/test/src/test.vue.d.ts +4 -2
- package/lib/test/src/test.vue2.js +14 -3
- package/lib/test/src/test.vue2.js.map +1 -1
- package/lib/tiny-editor/src/tiny-editor.vue2.js +1 -1
- package/lib/tiny-editor/src/tiny-editor.vue2.js.map +1 -1
- package/lib/uni-icon/style/index.css +1 -1
- package/lib/uni-icon/style/index.scss +1 -1
- package/lib/url-input/index.d.ts +35 -0
- package/lib/url-input/index.js +14 -0
- package/lib/url-input/index.js.map +1 -0
- package/lib/url-input/src/props.d.ts +16 -0
- package/lib/url-input/src/props.js +15 -0
- package/lib/url-input/src/props.js.map +1 -0
- package/lib/url-input/src/url-input-content.vue.d.ts +25 -0
- package/lib/url-input/src/url-input-content.vue.js +11 -0
- package/lib/url-input/src/url-input-content.vue.js.map +1 -0
- package/lib/url-input/src/url-input-content.vue2.js +305 -0
- package/lib/url-input/src/url-input-content.vue2.js.map +1 -0
- package/lib/url-input/src/url-input-table.vue.d.ts +16 -0
- package/lib/url-input/src/url-input-table.vue.js +11 -0
- package/lib/url-input/src/url-input-table.vue.js.map +1 -0
- package/lib/url-input/src/url-input-table.vue2.js +67 -0
- package/lib/url-input/src/url-input-table.vue2.js.map +1 -0
- package/lib/url-input/src/url-input.vue.d.ts +34 -0
- package/lib/url-input/src/url-input.vue.js +11 -0
- package/lib/url-input/src/url-input.vue.js.map +1 -0
- package/lib/url-input/src/url-input.vue2.js +73 -0
- package/lib/url-input/src/url-input.vue2.js.map +1 -0
- package/lib/url-input/style/index.css +1 -0
- package/lib/url-input/style/index.scss +39 -0
- package/package.json +1 -1
package/dist/tags.json
CHANGED
@@ -289,6 +289,13 @@
|
|
289
289
|
],
|
290
290
|
"description": "没办法,这边小程序大部分的不支持svg格式,所以说,这里内置Uni官方的图标,如果说需要扩展的可以直接复写一套。\n\n[Docs](https://github.com/vipl520/dk-starter/components/project/#uniiconinput)"
|
291
291
|
},
|
292
|
+
"dk-url-input": {
|
293
|
+
"attributes": [
|
294
|
+
"type",
|
295
|
+
"click"
|
296
|
+
],
|
297
|
+
"description": "组件描述组件描述组件描述组件描述组件描述组件描述。\n\n[Docs](https://github.com/vipl520/dk-starter/components/project/#urlinput)"
|
298
|
+
},
|
292
299
|
"dk-video-input": {
|
293
300
|
"attributes": [
|
294
301
|
"type",
|
package/dist/web-types.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"$schema": "http://json.schemastore.org/web-types",
|
3
3
|
"framework": "vue",
|
4
4
|
"name": "dk",
|
5
|
-
"version": "1.0.
|
5
|
+
"version": "1.0.53",
|
6
6
|
"js-types-syntax": "typescript",
|
7
7
|
"description-markup": "markdown",
|
8
8
|
"contributions": {
|
@@ -1699,6 +1699,40 @@
|
|
1699
1699
|
]
|
1700
1700
|
}
|
1701
1701
|
},
|
1702
|
+
{
|
1703
|
+
"name": "dk-url-input",
|
1704
|
+
"source": {
|
1705
|
+
"symbol": "DkUIUrlInput"
|
1706
|
+
},
|
1707
|
+
"description": "组件描述组件描述组件描述组件描述组件描述组件描述。",
|
1708
|
+
"doc-url": "https://github.com/vipl520/dk-starter/components/project/#urlinput",
|
1709
|
+
"props": [
|
1710
|
+
{
|
1711
|
+
"name": "type",
|
1712
|
+
"description": "参数类型",
|
1713
|
+
"doc-url": "https://github.com/vipl520/dk-starter/components/project/#urlinput-props",
|
1714
|
+
"type": [
|
1715
|
+
"string"
|
1716
|
+
]
|
1717
|
+
}
|
1718
|
+
],
|
1719
|
+
"slots": [
|
1720
|
+
{
|
1721
|
+
"name": "default",
|
1722
|
+
"description": "自定义默认内容",
|
1723
|
+
"doc-url": "https://github.com/vipl520/dk-starter/components/project/#urlinput-slots"
|
1724
|
+
}
|
1725
|
+
],
|
1726
|
+
"js": {
|
1727
|
+
"events": [
|
1728
|
+
{
|
1729
|
+
"name": "click",
|
1730
|
+
"description": "点击触发的事件",
|
1731
|
+
"doc-url": "https://github.com/vipl520/dk-starter/components/project/#urlinput-events"
|
1732
|
+
}
|
1733
|
+
]
|
1734
|
+
}
|
1735
|
+
},
|
1702
1736
|
{
|
1703
1737
|
"name": "dk-video-input",
|
1704
1738
|
"source": {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"form.vue2.mjs","sources":["../../../src/form/src/form.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkForm',\n});\n</script>\n<template>\n <DkDialog\n v-if=\"props.isDialog\"\n v-model=\"showDialog\"\n :title=\"_formData?.title ? _formData?.title : '表单'\"\n :width=\"dialogWidth\"\n :default-fullscreen=\"isFullscreen\"\n min-height=\"200px\"\n v-bind=\"dialogProps\"\n append-to-body\n >\n <div :style=\"dialogStyle\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n </DkDialog>\n <div v-else>\n <div :style=\"{ minHeight }\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n <!-- <div v-else :style=\"{ minHeight }\"></div>-->\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isArray, isObject, request } from '@vipl520/utils'\nimport formCreate from '@form-create/element-ui'\nimport { formProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport _config from './config'\nimport { ElButton, ElMessage } from 'element-plus'\nimport { useWindowSize } from '@vueuse/core'\n\nconst [_, bem] = createNamespace('form')\n\nformCreate.register({\n name: 'help',\n init({ value }, rule) {\n // 判断value是字符串还是数组,如果是字符串则转换为数组,如果是数组则不变\n if (!isArray(value)) {\n value = [value]\n }\n rule.suffix = {\n type: 'p',\n children: value,\n class: 'form-help',\n }\n },\n})\n\n\nconst FormCreate = formCreate.$form()\n\nconst props = defineProps(formProps)\n\nconst config = reactive(_config)\nconst fApi = ref()\nconst loading = ref(true)\nconst buttonLoading = ref(false)\n\nconst showDialog = ref(false)\nconst formConfig = computed(() => ({ ...config, ...props.extraConfig }))\nconst { width } = useWindowSize()\nconst value = ref(null)\nconst _formData = ref(props.formData || {})\n\nconst emit = defineEmits(['submit', 'fail', 'update:modelValue'])\nwatch(\n () => props.formData,\n () => {\n _formData.value = props.formData\n },\n {\n deep: true,\n }\n)\nwatch(\n () => value.value,\n (val) => {\n emit('update:modelValue', val || {})\n }\n)\n// 弹窗宽度\nconst dialogWidth = computed(() => {\n let defaultWidth = '800px'\n const config = _formData.value?.config || {}\n console.log(config)\n if (config?.width) {\n return config?.width\n }\n if (props.dialog?.width) {\n defaultWidth = props.dialog?.width\n }\n if (config?.defaultWidth) {\n defaultWidth = config?.defaultWidth\n }\n let minWidth = 768\n // 判断是否为百分比\n if (!defaultWidth.endsWith('%')) {\n minWidth = parseInt(defaultWidth)\n }\n return width.value < minWidth ? '100%' : defaultWidth\n})\n// 弹窗内样式\nconst dialogStyle = computed(() => {\n if (_formData.value?.config?.style) {\n return _formData.value?.config?.style\n }\n if (props.dialog?.style) {\n return props.dialog?.style\n }\n return {}\n})\n// const draggable = computed(() => {\n// let draggable = false\n// if (props.dialog?.draggable) {\n// draggable = props.dialog?.draggable\n// }\n// if (_formData.value?.config?.draggable !== undefined) {\n// draggable = _formData.value?.config?.draggable\n// }\n// return draggable\n// })\n// 是否全屏\nconst isFullscreen = computed(() => {\n let defaultFullscreen = false\n const autoFullscreen = _formData.value?.config?.autoFullscreen !== false\n if (props.dialog?.width) {\n defaultFullscreen = props.dialog?.fullscreen\n }\n if (_formData.value?.config?.fullscreen) {\n defaultFullscreen = _formData.value?.config?.fullscreen\n }\n\n if (width.value < 768 && autoFullscreen) {\n defaultFullscreen = true\n }\n\n return defaultFullscreen\n})\n\nconst dialogProps = computed(() => {\n return Object.assign(props.dialog, _formData.value?.config?.dialog)\n})\nconst setFormData = (formData: any) => {\n value.value = null\n _formData.value = formData\n}\n\nconst initFormData = (formUrl?: string | object) => {\n if (!formUrl) {\n formUrl = props.formUrl\n }\n\n if (props.formData) {\n loading.value = false\n } else if (formUrl) {\n let data: {}\n if (isObject(formUrl)) {\n data = formUrl\n } else {\n data = {\n url: formUrl,\n method: 'post',\n }\n }\n request(data)\n .then((res) => {\n _formData.value = res.data\n loading.value = false\n })\n .catch((res) => {\n loading.value = false\n })\n }\n}\n\nconst checkForm = () => {\n fApi.value\n .validate()\n .then(() => {\n fApi.value\n .submit((data: any) => {\n onSubmit(data)\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n}\n\nconst onSubmit = (data: any) => {\n if (props.isLoading) {\n buttonLoading.value = true\n }\n if (props.isSubmit) {\n request({\n url: props.path + _formData.value.action,\n method: _formData.value.method,\n data: { formData: data },\n })\n .then((res) => {\n ElMessage.success(res.msg)\n emit('submit', data, res)\n buttonLoading.value = false\n })\n .catch((res) => {\n ElMessage.error(res.msg)\n emit('fail', data, res)\n buttonLoading.value = false\n })\n } else {\n emit('submit', data)\n buttonLoading.value = false\n }\n showDialog.value = false\n}\n\nconst show = () => {\n showDialog.value = true\n}\nonMounted(() => {\n initFormData()\n})\n// 导出\ndefineExpose({\n showDialog,\n buttonLoading,\n fApi,\n value,\n show,\n checkForm,\n onSubmit,\n initFormData,\n setFormData,\n})\n</script>\n"],"names":["__MACROS_defineComponent","value","config","_config"],"mappings":";;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,QAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA4DD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI,gBAAgB,MAAM,CAAA,CAAA;AAEvC,IAAA,UAAA,CAAW,QAAS,CAAA;AAAA,MAClB,IAAM,EAAA,MAAA;AAAA,MACN,IAAK,CAAA,EAAE,KAAAC,EAAAA,MAAAA,IAAS,IAAM,EAAA;AAEpB,QAAI,IAAA,CAAC,OAAQA,CAAAA,MAAK,CAAG,EAAA;AACnB,UAAAA,MAAAA,GAAQ,CAACA,MAAK,CAAA,CAAA;AAAA,SAChB;AACA,QAAA,IAAA,CAAK,MAAS,GAAA;AAAA,UACZ,IAAM,EAAA,GAAA;AAAA,UACN,QAAUA,EAAAA,MAAAA;AAAA,UACV,KAAO,EAAA,WAAA;AAAA,SACT,CAAA;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAGD,IAAM,MAAA,UAAA,GAAa,WAAW,KAAM,EAAA,CAAA;AAIpC,IAAM,MAAAC,QAAA,GAAS,SAASC,MAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,OAA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AAA,CAAA;AACzB,UAAK,IAAA,CAAA,QAAA,EAAU,MAAM,GAAG,CAAA,CAAA;AACxB,UAAA,aAAA,CAAc,KAAQ,GAAA,KAAA,CAAA;AAAA,SACvB,CAAA,CACA,KAAM,CAAA,CAAC,GAAQ,KAAA;AACd,UAAU,SAAA,CAAA,KAAA,CAAM,IAAI,GAAG,CAAA,CAAA;AACvB,UAAK,IAAA,CAAA,MAAA,EAAQ,MAAM,GAAG,CAAA,CAAA;AACtB,UAAA,aAAA,CAAc,KAAQ,GAAA,KAAA,CAAA;AAAA,SACvB,CAAA,CAAA;AAAA,OACE,MAAA;AACL,QAAA,IAAA,CAAK,UAAU,IAAI,CAAA,CAAA;AACnB,QAAA,aAAA,CAAc,KAAQ,GAAA,KAAA,CAAA;AAAA,OACxB;AACA,MAAA,UAAA,CAAW,KAAQ,GAAA,KAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAA,MAAM,OAAO,MAAM;AACjB,MAAA,UAAA,CAAW,KAAQ,GAAA,IAAA,CAAA;AAAA,KACrB,CAAA;AACA,IAAA,SAAA,CAAU,MAAM;AACd,MAAa,YAAA,EAAA,CAAA;AAAA,KACd,CAAA,CAAA;AAED,IAAa,QAAA,CAAA;AAAA,MACX,UAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"form.vue2.mjs","sources":["../../../src/form/src/form.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkForm',\n});\n</script>\n<template>\n <DkDialog\n v-if=\"props.isDialog\"\n v-model=\"showDialog\"\n :title=\"_formData?.title ? _formData?.title : '表单'\"\n :width=\"dialogWidth\"\n :default-fullscreen=\"isFullscreen\"\n min-height=\"200px\"\n v-bind=\"dialogProps\"\n append-to-body\n >\n <div :style=\"dialogStyle\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n </DkDialog>\n <div v-else>\n <div :style=\"{ minHeight }\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n <!-- <div v-else :style=\"{ minHeight }\"></div>-->\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isArray, isObject, request } from '@vipl520/utils'\nimport formCreate from '@form-create/element-ui'\nimport { formProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport _config from './config'\nimport { ElButton, ElMessage } from 'element-plus'\nimport { useWindowSize } from '@vueuse/core'\n\nconst [_, bem] = createNamespace('form')\n\nformCreate.register({\n name: 'help',\n init({ value }, rule) {\n // 判断value是字符串还是数组,如果是字符串则转换为数组,如果是数组则不变\n if (!isArray(value)) {\n value = [value]\n }\n rule.suffix = {\n type: 'p',\n children: value,\n class: 'form-help',\n }\n },\n})\n\n\nconst FormCreate = formCreate.$form()\n\nconst props = defineProps(formProps)\n\nconst config = reactive(_config)\nconst fApi = ref()\nconst loading = ref(true)\nconst buttonLoading = ref(false)\n\nconst showDialog = ref(false)\nconst formConfig = computed(() => ({ ...config, ...props.extraConfig }))\nconst { width } = useWindowSize()\nconst value = ref(null)\nconst _formData = ref(props.formData || {})\n\nconst emit = defineEmits(['submit', 'fail', 'update:modelValue'])\nwatch(\n () => props.formData,\n () => {\n _formData.value = props.formData\n },\n {\n deep: true,\n }\n)\nwatch(\n () => value.value,\n (val) => {\n emit('update:modelValue', val || {})\n }\n)\n// 弹窗宽度\nconst dialogWidth = computed(() => {\n let defaultWidth = '800px'\n const config = _formData.value?.config || {}\n if (config?.width) {\n return config?.width\n }\n if (props.dialog?.width) {\n defaultWidth = props.dialog?.width\n }\n if (config?.defaultWidth) {\n defaultWidth = config?.defaultWidth\n }\n let minWidth = 768\n // 判断是否为百分比\n if (!defaultWidth.endsWith('%')) {\n minWidth = parseInt(defaultWidth)\n }\n return width.value < minWidth ? '100%' : defaultWidth\n})\n// 弹窗内样式\nconst dialogStyle = computed(() => {\n if (_formData.value?.config?.style) {\n return _formData.value?.config?.style\n }\n if (props.dialog?.style) {\n return props.dialog?.style\n }\n return {}\n})\n// const draggable = computed(() => {\n// let draggable = false\n// if (props.dialog?.draggable) {\n// draggable = props.dialog?.draggable\n// }\n// if (_formData.value?.config?.draggable !== undefined) {\n// draggable = _formData.value?.config?.draggable\n// }\n// return draggable\n// })\n// 是否全屏\nconst isFullscreen = computed(() => {\n let defaultFullscreen = false\n const autoFullscreen = _formData.value?.config?.autoFullscreen !== false\n if (props.dialog?.width) {\n defaultFullscreen = props.dialog?.fullscreen\n }\n if (_formData.value?.config?.fullscreen) {\n defaultFullscreen = _formData.value?.config?.fullscreen\n }\n\n if (width.value < 768 && autoFullscreen) {\n defaultFullscreen = true\n }\n\n return defaultFullscreen\n})\n\nconst dialogProps = computed(() => {\n return Object.assign(props.dialog, _formData.value?.config?.dialog)\n})\nconst setFormData = (formData: any) => {\n value.value = null\n _formData.value = formData\n}\n\nconst initFormData = (formUrl?: string | object) => {\n if (!formUrl) {\n formUrl = props.formUrl\n }\n\n if (props.formData) {\n loading.value = false\n } else if (formUrl) {\n let data: {}\n if (isObject(formUrl)) {\n data = formUrl\n } else {\n data = {\n url: formUrl,\n method: 'post',\n }\n }\n request(data)\n .then((res) => {\n _formData.value = res.data\n loading.value = false\n })\n .catch((res) => {\n loading.value = false\n })\n }\n}\n\nconst checkForm = () => {\n fApi.value\n .validate()\n .then(() => {\n fApi.value\n .submit((data: any) => {\n onSubmit(data)\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n}\n\nconst onSubmit = (data: any) => {\n if (props.isLoading) {\n buttonLoading.value = true\n }\n if (props.isSubmit) {\n request({\n url: props.path + _formData.value.action,\n method: _formData.value.method,\n data: { formData: data },\n })\n .then((res) => {\n ElMessage.success(res.msg)\n emit('submit', data, res)\n buttonLoading.value = false\n })\n .catch((res) => {\n ElMessage.error(res.msg)\n emit('fail', data, res)\n buttonLoading.value = false\n })\n } else {\n emit('submit', data)\n buttonLoading.value = false\n }\n showDialog.value = false\n}\n\nconst show = () => {\n showDialog.value = true\n}\nonMounted(() => {\n initFormData()\n})\n// 导出\ndefineExpose({\n showDialog,\n buttonLoading,\n fApi,\n value,\n show,\n checkForm,\n onSubmit,\n initFormData,\n setFormData,\n})\n</script>\n"],"names":["__MACROS_defineComponent","value","config","_config"],"mappings":";;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,QAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA4DD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI,gBAAgB,MAAM,CAAA,CAAA;AAEvC,IAAA,UAAA,CAAW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AED,IAAa,QAAA,CAAA;AAAA,MACX,UAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"group.vue2.mjs","sources":["../../../src/group/src/group.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkGroup',\n});\n</script>\n<template>\n <div :class=\"'dk-group _fc-group ' + (disabled ? '_fc-group-disabled' : '')\">\n <el-divider v-if=\"props.title\">{{ props.title }}</el-divider>\n <div v-if=\"data.sort.length === 0\">\n <el-button :key=\"'a_def'\" style=\"width: 100%\" @click=\"add\"> 添加数据 </el-button>\n </div>\n <draggable\n tag=\"el-collapse\"\n :list=\"props.modelValue\"\n :component-data=\"collapseComponentData\"\n item-key=\"id\"\n handle=\".collapse-title-rank\"\n >\n <template #item=\"{ element, index }\">\n <el-collapse-item :title=\"element.title\" :name=\"index\">\n <template #title>\n <div class=\"collapse-title\">\n <dk-icon icon=\"Rank\" class=\"collapse-title-rank\"></dk-icon>\n <span>{{ getTitle(index) }}</span>\n </div>\n </template>\n <template #default>\n <div :key=\"index\" class=\"_dk-group-container\">\n <Type\n :key=\"index\"\n :in-for=\"true\"\n :model-value=\"getFieldValue(index)\"\n :rule=\"data.cacheRule[index].rule\"\n :option=\"data.cacheRule[index].options\"\n :extend-option=\"true\"\n @update:modelValue=\"formData(index, $event)\"\n @emit-event=\"(name: any, ...args: any) => emitEvent(name, args, index)\"\n @update:api=\"($f: any) => add$f(index, $f)\"\n />\n <div class=\"_dk-group-handle\">\n <el-button-group>\n <el-button icon=\"Plus\" plain @click=\"add\" />\n <el-button icon=\"Delete\" plain @click=\"del(index, index + 1)\" />\n </el-button-group>\n </div>\n </div>\n </template>\n </el-collapse-item>\n </template>\n </draggable>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { markRaw, nextTick, reactive, watch, onMounted } from 'vue'\nimport { deepCopy, deepExtend, hasProperty } from '../utils/utils'\nimport extend from '../utils/extend'\n// import draggable from 'vuedraggable'\nimport { groupProps } from './props'\n\n\n\nconst props = defineProps(groupProps)\nconst emit = defineEmits(['update:modelValue', 'change', 'itemMounted', 'remove', 'add'])\nconst data: any = reactive({\n len: 0,\n cacheRule: {},\n cacheValue: {},\n sort: [],\n form: markRaw(props.formCreateInject.form.$form()),\n loading: true,\n})\n\nconst collapseComponentData = reactive({\n modelValue: [0],\n})\n\nconst Type = data.form\n\nwatch(\n () => props.rule, // 侦听 rule 属性\n (n, o) => {\n // 您原来的 handler 逻辑\n Object.keys(data.cacheRule).forEach((v) => {\n const item = data.cacheRule[v]\n if (item.$f) {\n const val = item.$f.formData()\n if (n === o) {\n item.$f.deferSyncValue(() => {\n deepExtend(item.rule, n, false)\n item.$f.setValue(val)\n }, true)\n } else {\n const val = item.$f.formData()\n item.$f.once('reloading', () => {\n item.$f.setValue(val)\n })\n item.rule = deepCopy(n)\n }\n }\n })\n },\n { deep: true } // 深度侦听\n)\n\nwatch(\n () => props.disabled, // 侦听 disabled 属性\n (n) => {\n // 您原来的 disabled 逻辑\n if (props.syncDisabled) {\n const lst = data.cacheRule\n Object.keys(lst).forEach((k) => {\n lst[k].$f.disabled(n)\n })\n }\n }\n)\n\nwatch(\n () => props.expand, // 侦听 expand 属性\n (n) => {\n // 您原来的 expand 逻辑\n const d = n - props.modelValue.length\n if (d > 0) {\n expandRule(d)\n }\n }\n)\n\nwatch(\n () => props.modelValue, // 侦听 modelValue 属性\n (n) => {\n // 您原来的 modelValue 逻辑\n n = n || []\n const keys = Object.keys(data.cacheRule)\n const total = keys.length // 缓存数\n const len = total - n.length // 缓存数-value数\n if (len < 0) {\n for (let i = len; i < 0; i++) {\n addRule(n.length - 1, true)\n }\n for (let i = 0; i < total; i++) {\n setValue(keys[i], n[i])\n }\n } else {\n if (len > 0) {\n for (let i = 0; i < len; i++) {\n console.log('keys[total - i - 1]', keys[total - i - 1])\n removeRule(keys[total - i - 1])\n }\n }\n n.forEach((val, i) => {\n setValue(keys[i], n[i])\n })\n }\n },\n { deep: true } // 深度侦听\n)\n\nwatch(\n () => ({ ...data.cacheRule }),\n (n) => {\n data.sort = Object.keys(n)\n },\n { immediate: true }\n)\n\nconst getFieldValue = (index: number) => {\n if (props.field) {\n return { [props.field]: _value(props.modelValue[index]) }\n } else {\n return props.modelValue[index]\n }\n}\n\nconst getTitle = (index: number) => {\n if (data.cacheRule[index]) {\n const { rule } = data.cacheRule[index]\n const defaultField = props.titleField ? props.titleField : rule[0]?.field\n return data.cacheRule[index].$f?.getValue(defaultField) || '点击展开'\n } else {\n return '点击展开'\n }\n}\nconst _value = (v: any) => {\n return v && hasProperty(v, props.field) ? v[props.field] : v\n}\nconst cache = (k: any, val: any) => {\n data.cacheValue[k] = JSON.stringify(val)\n}\nconst input = (value: any) => {\n emit('update:modelValue', value)\n emit('change', value)\n}\nconst formData = (index: any, formData: any) => {\n nextTick(() => {\n const keys = Object.keys(data.cacheRule)\n const value = keys.map((k: any) => {\n const _data = index === k ? formData : { ...data.cacheRule[k].$f.form }\n const value = props.field ? _data[props.field] || null : _data\n cache(k, value)\n return value\n })\n input(value)\n })\n}\n\nconst add$f = (index: any, $f: any) => {\n data.cacheRule[index].$f = $f\n nextTick(() => {\n if (props.syncDisabled) {\n $f.disabled(props.disabled)\n }\n emit('itemMounted', $f, Object.keys(data.cacheRule).indexOf(index))\n })\n}\n\nonMounted(() => {\n data.loading = false\n})\n\nconst setValue = (key: any, value: any) => {\n const field = props.field\n if (field) {\n value = { [field]: _value(value) }\n }\n if (data.cacheValue[key] === JSON.stringify(field ? value[field] : value)) {\n return\n }\n cache(key, value)\n}\nconst addRule = (index: any, isEmit = false) => {\n const rule = props.formCreateInject.form.copyRules(props.rule || [])\n const options: any = props.options\n ? { ...props.options }\n : {\n submitBtn: false,\n resetBtn: false,\n }\n if (props.defaultValue) {\n if (!options.formData) options.formData = {}\n const defVal = deepCopy(props.defaultValue)\n extend(options.formData, props.field ? { [props.field]: defVal } : defVal)\n }\n props.parse && props.parse({ rule, options, index: data.sort.length })\n data.cacheRule[index] = { rule, options }\n if (isEmit) {\n nextTick(() => emit('add', rule, Object.keys(data.cacheRule).length - 1))\n }\n}\n\nconst removeRule = (index: any, isEmit = false) => {\n delete data.cacheRule[index]\n delete data.cacheValue[index]\n if (isEmit) {\n nextTick(() => emit('remove', index))\n }\n}\nconst add = () => {\n if (props.disabled || props.onBeforeAdd(props.modelValue) === false) {\n return\n }\n const value = [...props.modelValue]\n value.push(props.defaultValue ? deepCopy(props.defaultValue) : props.field ? null : {})\n input(value)\n collapseComponentData.modelValue = [value.length - 1]\n}\nconst del = (index: number, key: number) => {\n if (props.disabled || props.onBeforeRemove(props.modelValue, index) === false) {\n return\n }\n const value = [...props.modelValue]\n value.splice(index, 1)\n input(value)\n}\n\nconst emitEvent = (name: any, args: any, index: any) => {\n emit(name, ...args, data.cacheRule[index].$f, index)\n}\n\nconst expandRule = (n: any) => {\n for (let i = 0; i < n; i++) {\n // eslint-disable-next-line vue/no-mutating-props\n props.modelValue.push(props.field ? null : {})\n }\n}\n\nconst d = (props.expand || 0) - props.modelValue.length\nfor (let i = 0; i < props.modelValue.length; i++) {\n addRule(i)\n}\nif (d > 0) {\n expandRule(d)\n}\n</script>\n"],"names":["__MACROS_defineComponent","val","d","formData","value"],"mappings":";;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,SAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA6DD,IAAA,MAAM,OA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CAAA,CAAA;AAAA,KACX;AACA,IAAA,IAAI,IAAI,CAAG,EAAA;AACT,MAAA,UAAA,CAAW,CAAC,CAAA,CAAA;AAAA,KACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"group.vue2.mjs","sources":["../../../src/group/src/group.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkGroup',\n});\n</script>\n<template>\n <div :class=\"'dk-group _fc-group ' + (disabled ? '_fc-group-disabled' : '')\">\n <el-divider v-if=\"props.title\">{{ props.title }}</el-divider>\n <div v-if=\"data.sort.length === 0\">\n <el-button :key=\"'a_def'\" style=\"width: 100%\" type=\"primary\" @click=\"add\"> 添加数据 </el-button>\n </div>\n <draggable\n tag=\"el-collapse\"\n :list=\"props.modelValue\"\n :component-data=\"collapseComponentData\"\n item-key=\"id\"\n handle=\".collapse-title-rank\"\n >\n <template #item=\"{ element, index }\">\n <el-collapse-item :title=\"element.title\" :name=\"index\">\n <template #title>\n <div class=\"collapse-title\">\n <dk-icon icon=\"Rank\" class=\"collapse-title-rank\"></dk-icon>\n <span>{{ getTitle(index) }}</span>\n </div>\n </template>\n <template #default>\n <div :key=\"index\" class=\"_dk-group-container\">\n <Type\n :key=\"index\"\n :in-for=\"true\"\n :model-value=\"getFieldValue(index)\"\n :rule=\"data.cacheRule[index].rule\"\n :option=\"data.cacheRule[index].options\"\n :extend-option=\"true\"\n @update:modelValue=\"formData(index, $event)\"\n @emit-event=\"(name: any, ...args: any) => emitEvent(name, args, index)\"\n @update:api=\"($f: any) => add$f(index, $f)\"\n />\n <div class=\"_dk-group-handle\">\n <el-button-group>\n <el-button icon=\"Plus\" plain @click=\"add\" />\n <el-button icon=\"Delete\" plain @click=\"del(index, index + 1)\" />\n </el-button-group>\n </div>\n </div>\n </template>\n </el-collapse-item>\n </template>\n </draggable>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { markRaw, nextTick, reactive, watch, onMounted } from 'vue'\nimport { deepCopy, deepExtend, hasProperty } from '../utils/utils'\nimport extend from '../utils/extend'\n// import draggable from 'vuedraggable'\nimport { groupProps } from './props'\n\n\n\nconst props = defineProps(groupProps)\nconst emit = defineEmits(['update:modelValue', 'change', 'itemMounted', 'remove', 'add'])\nconst data: any = reactive({\n len: 0,\n cacheRule: {},\n cacheValue: {},\n sort: [],\n form: markRaw(props.formCreateInject.form.$form()),\n loading: true,\n})\n\nconst collapseComponentData = reactive({\n modelValue: [0],\n})\n\nconst Type = data.form\n\nwatch(\n () => props.rule, // 侦听 rule 属性\n (n, o) => {\n // 您原来的 handler 逻辑\n Object.keys(data.cacheRule).forEach((v) => {\n const item = data.cacheRule[v]\n if (item.$f) {\n const val = item.$f.formData()\n if (n === o) {\n item.$f.deferSyncValue(() => {\n deepExtend(item.rule, n, false)\n item.$f.setValue(val)\n }, true)\n } else {\n const val = item.$f.formData()\n item.$f.once('reloading', () => {\n item.$f.setValue(val)\n })\n item.rule = deepCopy(n)\n }\n }\n })\n },\n { deep: true } // 深度侦听\n)\n\nwatch(\n () => props.disabled, // 侦听 disabled 属性\n (n) => {\n // 您原来的 disabled 逻辑\n if (props.syncDisabled) {\n const lst = data.cacheRule\n Object.keys(lst).forEach((k) => {\n lst[k].$f.disabled(n)\n })\n }\n }\n)\n\nwatch(\n () => props.expand, // 侦听 expand 属性\n (n) => {\n // 您原来的 expand 逻辑\n const d = n - props.modelValue.length\n if (d > 0) {\n expandRule(d)\n }\n }\n)\n\nwatch(\n () => props.modelValue, // 侦听 modelValue 属性\n (n) => {\n // 您原来的 modelValue 逻辑\n n = n || []\n const keys = Object.keys(data.cacheRule)\n const total = keys.length // 缓存数\n const len = total - n.length // 缓存数-value数\n if (len < 0) {\n for (let i = len; i < 0; i++) {\n addRule(n.length - 1, true)\n }\n for (let i = 0; i < total; i++) {\n setValue(keys[i], n[i])\n }\n } else {\n if (len > 0) {\n for (let i = 0; i < len; i++) {\n console.log('keys[total - i - 1]', keys[total - i - 1])\n removeRule(keys[total - i - 1])\n }\n }\n n.forEach((val, i) => {\n setValue(keys[i], n[i])\n })\n }\n },\n { deep: true } // 深度侦听\n)\n\nwatch(\n () => ({ ...data.cacheRule }),\n (n) => {\n data.sort = Object.keys(n)\n },\n { immediate: true }\n)\n\nconst getFieldValue = (index: number) => {\n if (props.field) {\n return { [props.field]: _value(props.modelValue[index]) }\n } else {\n return props.modelValue[index]\n }\n}\n\nconst getTitle = (index: number) => {\n if (data.cacheRule[index]) {\n const { rule } = data.cacheRule[index]\n const defaultField = props.titleField ? props.titleField : rule[0]?.field\n return data.cacheRule[index].$f?.getValue(defaultField) || '点击展开'\n } else {\n return '点击展开'\n }\n}\nconst _value = (v: any) => {\n return v && hasProperty(v, props.field) ? v[props.field] : v\n}\nconst cache = (k: any, val: any) => {\n data.cacheValue[k] = JSON.stringify(val)\n}\nconst input = (value: any) => {\n emit('update:modelValue', value)\n emit('change', value)\n}\nconst formData = (index: any, formData: any) => {\n nextTick(() => {\n const keys = Object.keys(data.cacheRule)\n const value = keys.map((k: any) => {\n const _data = index === k ? formData : { ...data.cacheRule[k].$f.form }\n const value = props.field ? _data[props.field] || null : _data\n cache(k, value)\n return value\n })\n input(value)\n })\n}\n\nconst add$f = (index: any, $f: any) => {\n data.cacheRule[index].$f = $f\n nextTick(() => {\n if (props.syncDisabled) {\n $f.disabled(props.disabled)\n }\n emit('itemMounted', $f, Object.keys(data.cacheRule).indexOf(index))\n })\n}\n\nonMounted(() => {\n data.loading = false\n})\n\nconst setValue = (key: any, value: any) => {\n const field = props.field\n if (field) {\n value = { [field]: _value(value) }\n }\n if (data.cacheValue[key] === JSON.stringify(field ? value[field] : value)) {\n return\n }\n cache(key, value)\n}\nconst addRule = (index: any, isEmit = false) => {\n const rule = props.formCreateInject.form.copyRules(props.rule || [])\n const options: any = props.options\n ? { ...props.options }\n : {\n submitBtn: false,\n resetBtn: false,\n }\n if (props.defaultValue) {\n if (!options.formData) options.formData = {}\n const defVal = deepCopy(props.defaultValue)\n extend(options.formData, props.field ? { [props.field]: defVal } : defVal)\n }\n props.parse && props.parse({ rule, options, index: data.sort.length })\n data.cacheRule[index] = { rule, options }\n if (isEmit) {\n nextTick(() => emit('add', rule, Object.keys(data.cacheRule).length - 1))\n }\n}\n\nconst removeRule = (index: any, isEmit = false) => {\n delete data.cacheRule[index]\n delete data.cacheValue[index]\n if (isEmit) {\n nextTick(() => emit('remove', index))\n }\n}\nconst add = () => {\n if (props.disabled || props.onBeforeAdd(props.modelValue) === false) {\n return\n }\n const value = [...props.modelValue]\n value.push(props.defaultValue ? deepCopy(props.defaultValue) : props.field ? null : {})\n input(value)\n collapseComponentData.modelValue = [value.length - 1]\n}\nconst del = (index: number, key: number) => {\n if (props.disabled || props.onBeforeRemove(props.modelValue, index) === false) {\n return\n }\n const value = [...props.modelValue]\n value.splice(index, 1)\n input(value)\n}\n\nconst emitEvent = (name: any, args: any, index: any) => {\n emit(name, ...args, data.cacheRule[index].$f, index)\n}\n\nconst expandRule = (n: any) => {\n for (let i = 0; i < n; i++) {\n // eslint-disable-next-line vue/no-mutating-props\n props.modelValue.push(props.field ? null : {})\n }\n}\n\nconst d = (props.expand || 0) - props.modelValue.length\nfor (let i = 0; i < props.modelValue.length; i++) {\n addRule(i)\n}\nif (d > 0) {\n expandRule(d)\n}\n</script>\n"],"names":["__MACROS_defineComponent","val","d","formData","value"],"mappings":";;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,SAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA6DD,IAAA,MAAM,OAAY,QAAS,CAAA;AAAA,MACzB,GAAK,EAAA,CAAA;AAAA,MACL,WAAW,EAAC;AAAA,MACZ,YAAY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,CAAA,CAAA;AAAA,KACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -18,6 +18,7 @@ const _hoisted_6 = /* @__PURE__ */ createElementVNode(
|
|
18
18
|
-1
|
19
19
|
/* HOISTED */
|
20
20
|
);
|
21
|
+
const _hoisted_7 = { style: { "width": "100%", "display": "flex", "justify-content": "space-between" } };
|
21
22
|
const __default__ = defineComponent({
|
22
23
|
name: "HotAreaContent"
|
23
24
|
});
|
@@ -113,8 +114,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
113
114
|
const _component_el_empty = resolveComponent("el-empty");
|
114
115
|
const _component_dk_image_input = resolveComponent("dk-image-input");
|
115
116
|
const _component_el_form_item = resolveComponent("el-form-item");
|
117
|
+
const _component_dk_url_input = resolveComponent("dk-url-input");
|
118
|
+
const _component_dk_icon = resolveComponent("dk-icon");
|
116
119
|
const _component_el_button = resolveComponent("el-button");
|
117
|
-
const _component_el_input = resolveComponent("el-input");
|
118
120
|
const _component_el_form = resolveComponent("el-form");
|
119
121
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
120
122
|
createElementVNode("div", _hoisted_2, [
|
@@ -203,28 +205,28 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
203
205
|
renderList(hotData.views, (item, key) => {
|
204
206
|
return openBlock(), createBlock(_component_el_form_item, {
|
205
207
|
key,
|
206
|
-
label: "\u70ED\u533A" + (key + 1)
|
208
|
+
label: "\u70ED\u533A\u5730\u5740" + (key + 1)
|
207
209
|
}, {
|
208
210
|
default: withCtx(() => [
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
211
|
+
createElementVNode("div", _hoisted_7, [
|
212
|
+
createVNode(_component_dk_url_input, {
|
213
|
+
modelValue: hotData.views[key].url,
|
214
|
+
"onUpdate:modelValue": ($event) => hotData.views[key].url = $event,
|
215
|
+
placeholder: "\u586B\u5199\u8DF3\u8F6C\u5730\u5740",
|
216
|
+
style: { "width": "100%", "margin-right": "5px" }
|
217
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
218
|
+
createVNode(_component_el_button, {
|
219
|
+
type: "danger",
|
220
|
+
plain: "",
|
221
|
+
onClick: ($event) => delView(key)
|
222
|
+
}, {
|
223
|
+
default: withCtx(() => [
|
224
|
+
createVNode(_component_dk_icon, { icon: "Delete" })
|
225
|
+
]),
|
226
|
+
_: 2
|
227
|
+
/* DYNAMIC */
|
228
|
+
}, 1032, ["onClick"])
|
229
|
+
])
|
228
230
|
]),
|
229
231
|
_: 2
|
230
232
|
/* DYNAMIC */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hot-area-content.vue2.mjs","sources":["../../../../src/hot-area-input/src/component/hot-area-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'HotAreaContent',\n});\n</script>\n<template>\n <div class=\"hot-area-content\">\n <div class=\"hot-area-draggable\">\n <div\n v-if=\"hotData.background\"\n :style=\"{\n width: hotData.width + 'px',\n height: hotData.height + 'px',\n backgroundImage: 'url(' + hotData.background + ')',\n }\"\n style=\"background-size: 100% 100%\"\n @contextmenu.prevent\n >\n <vue3-draggable-resizable\n v-for=\"(item, key) in hotData.views\"\n :key=\"key\"\n ref=\"draggables\"\n v-model:h=\"item.css.height\"\n v-model:x=\"item.css.left\"\n v-model:y=\"item.css.top\"\n v-model:w=\"item.css.width\"\n :init-w=\"item.css.width\"\n :init-h=\"item.css.height\"\n :parent=\"true\"\n style=\"cursor: move\"\n :min-width=\"20\"\n :min-height=\"20\"\n @resizing=\"onResize\"\n @dragging=\"onDrag\"\n @mousedown=\"index = key\"\n >\n <div class=\"hot-item-content\" style=\"position: relative; width: 100%; height: 100%; background: #0003\">\n {{ key + 1 }}\n </div>\n </vue3-draggable-resizable>\n </div>\n <div v-else style=\"width: 500px; height: 500px\">\n <el-empty description=\"请上传图片\"></el-empty>\n </div>\n </div>\n <div class=\"hot-area-form\">\n <h3 style=\"margin-top: 0; font-size: 16px; font-weight: 500\">热区管理</h3>\n <el-form label-width=\"80px\" label-position=\"left\">\n <el-form-item label=\"背景图 \">\n <dk-image-input v-model=\"hotData.background\" />\n </el-form-item>\n <el-form-item v-for=\"(item, key) in hotData.views\" :key=\"key\" :label=\"'
|
1
|
+
{"version":3,"file":"hot-area-content.vue2.mjs","sources":["../../../../src/hot-area-input/src/component/hot-area-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'HotAreaContent',\n});\n</script>\n<template>\n <div class=\"hot-area-content\">\n <div class=\"hot-area-draggable\">\n <div\n v-if=\"hotData.background\"\n :style=\"{\n width: hotData.width + 'px',\n height: hotData.height + 'px',\n backgroundImage: 'url(' + hotData.background + ')',\n }\"\n style=\"background-size: 100% 100%\"\n @contextmenu.prevent\n >\n <vue3-draggable-resizable\n v-for=\"(item, key) in hotData.views\"\n :key=\"key\"\n ref=\"draggables\"\n v-model:h=\"item.css.height\"\n v-model:x=\"item.css.left\"\n v-model:y=\"item.css.top\"\n v-model:w=\"item.css.width\"\n :init-w=\"item.css.width\"\n :init-h=\"item.css.height\"\n :parent=\"true\"\n style=\"cursor: move\"\n :min-width=\"20\"\n :min-height=\"20\"\n @resizing=\"onResize\"\n @dragging=\"onDrag\"\n @mousedown=\"index = key\"\n >\n <div class=\"hot-item-content\" style=\"position: relative; width: 100%; height: 100%; background: #0003\">\n {{ key + 1 }}\n </div>\n </vue3-draggable-resizable>\n </div>\n <div v-else style=\"width: 500px; height: 500px\">\n <el-empty description=\"请上传图片\"></el-empty>\n </div>\n </div>\n <div class=\"hot-area-form\">\n <h3 style=\"margin-top: 0; font-size: 16px; font-weight: 500\">热区管理</h3>\n <el-form label-width=\"80px\" label-position=\"left\">\n <el-form-item label=\"背景图 \">\n <dk-image-input v-model=\"hotData.background\" />\n </el-form-item>\n <el-form-item v-for=\"(item, key) in hotData.views\" :key=\"key\" :label=\"'热区地址' + (key + 1)\">\n <div style=\"width: 100%; display: flex; justify-content: space-between\">\n <dk-url-input\n v-model=\"hotData.views[key].url\"\n placeholder=\"填写跳转地址\"\n style=\"width: 100%; margin-right: 5px\"\n />\n <el-button type=\"danger\" plain @click=\"delView(key)\">\n <dk-icon icon=\"Delete\"></dk-icon>\n </el-button>\n </div>\n </el-form-item>\n </el-form>\n <el-button :disabled=\"!hotData.background\" type=\"primary\" @click=\"addView()\">{{\n hotData.background ? '添加热区' : '请先上传图片'\n }}</el-button>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\n// import Vue3DraggableResizable, { DraggableContainer } from 'vue3-draggable-resizable'\nimport { reactive, ref, watch, onMounted } from 'vue'\n\n\nconst props = defineProps({\n hotDataValue: {\n default: () => {\n return {\n views: [],\n width: 400,\n height: 400,\n background: null,\n }\n },\n type: Object,\n },\n})\nconst index = ref(0)\nconst hotData = reactive(props.hotDataValue)\nconst addView = () => {\n // 这里hotData可以能没有views,如果没有就添加上views\n if (!Array.isArray(hotData.views)) {\n hotData.views = []\n }\n hotData.views.push({\n css: {\n left: 0,\n top: 0,\n width: 80,\n height: 80,\n borderRadius: 0,\n borderColor: '#fff',\n },\n url: '',\n })\n}\n\nconst delView = (indexToDelete: any) => {\n if (indexToDelete >= 0 && indexToDelete < hotData.views.length) {\n hotData.views.splice(indexToDelete, 1)\n }\n}\n\nconst onDrag = (p: any) => {\n const css = hotData.views[index.value].css\n css.left = p.x\n css.top = p.y\n}\nconst onResize = (p: any) => {\n const css = hotData.views[index.value].css\n css.left = p.x\n css.top = p.y\n css.width = p.w\n css.height = p.h\n}\n\nonMounted(() => {\n resetSize()\n})\n\nwatch(\n () => hotData?.background,\n () => {\n resetSize()\n }\n)\n\nconst resetSize = () => {\n if (hotData.background) {\n getImageSize(hotData.background)\n .then((image: any) => {\n hotData.width = 500\n hotData.height = (image.height * 500) / image.width\n setTimeout(() => {\n // checkParentSize()\n }, 200)\n })\n .catch(() => {})\n }\n}\n\nconst getImageSize = (url: any) => {\n return new Promise(function (resolve, reject) {\n const image = new Image()\n image.onload = function () {\n resolve({\n width: image.width,\n height: image.height,\n })\n }\n image.onerror = function () {\n reject(new Error('error'))\n }\n image.src = url\n })\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,gBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;AAqFD,IAAM,MAAA,KAAA,GAAQ,IAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,OAAA,GAAU,QAAS,CAAA,KAAA,CAAM,YAAY,CAAA,CAAA;AAC3C,IAAA,MAAM,UAAU,MAAM;AAEpB,MAAA,IAAI,CAAC,KAAA,CAAM,OAAQ,CAAA,OAAA,CAAQ,KAAK,CAAG,EAAA;AACjC,QAAA,OAAA,CAAQ,QAAQ,EAAC,CAAA;AAAA,OACnB;AACA,MAAA,OAAA,CAAQ,MAAM,IAAK,CAAA;AAAA,QACjB,GAAK,EAAA;AAAA,UACH,IAAM,EAAA,CAAA;AAAA,UACN,GAAK,EAAA,CAAA;AAAA,UACL,KAAO,EAAA,EAAA;AAAA,UACP,MAAQ,EAAA,EAAA;AAAA,UACR,YAAc,EAAA,CAAA;AAAA,UACd,WAAa,EAAA,MAAA;AAAA,SACf;AAAA,QACA,GAAK,EAAA,EAAA;AAAA,OACN,CAAA,CAAA;AAAA,KACH,CAAA;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AA,CAAK,CAAC,KAAe,KAAA;AACpB,UAAA,OAAA,CAAQ,KAAQ,GAAA,GAAA,CAAA;AAChB,UAAA,OAAA,CAAQ,MAAU,GAAA,KAAA,CAAM,MAAS,GAAA,GAAA,GAAO,KAAM,CAAA,KAAA,CAAA;AAC9C,UAAA,UAAA,CAAW,MAAM;AAAA,aAEd,GAAG,CAAA,CAAA;AAAA,SACP,CACA,CAAA,KAAA,CAAM,MAAM;AAAA,SAAE,CAAA,CAAA;AAAA,OACnB;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,YAAA,GAAe,CAAC,GAAa,KAAA;AACjC,MAAA,OAAO,IAAI,OAAA,CAAQ,SAAU,OAAA,EAAS,MAAQ,EAAA;AAC5C,QAAM,MAAA,KAAA,GAAQ,IAAI,KAAM,EAAA,CAAA;AACxB,QAAA,KAAA,CAAM,SAAS,WAAY;AACzB,UAAQ,OAAA,CAAA;AAAA,YACN,OAAO,KAAM,CAAA,KAAA;AAAA,YACb,QAAQ,KAAM,CAAA,MAAA;AAAA,WACf,CAAA,CAAA;AAAA,SACH,CAAA;AACA,QAAA,KAAA,CAAM,UAAU,WAAY;AAC1B,UAAO,MAAA,CAAA,IAAI,KAAM,CAAA,OAAO,CAAC,CAAA,CAAA;AAAA,SAC3B,CAAA;AACA,QAAA,KAAA,CAAM,GAAM,GAAA,GAAA,CAAA;AAAA,OACb,CAAA,CAAA;AAAA,KACH,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/icon/style/index.css
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
.dk-icon:hover{color:var(--hover-color)!important}
|
package/es/icon/style/index.scss
CHANGED
package/es/index.d.ts
CHANGED
@@ -34,6 +34,7 @@ export * from './style-animation-input';
|
|
34
34
|
export * from './animate-select';
|
35
35
|
export * from './uni-icon';
|
36
36
|
export * from './uni-icon-input';
|
37
|
+
export * from './url-input';
|
37
38
|
export declare const install: (app: App, option?: any) => void;
|
38
39
|
declare const _default: {
|
39
40
|
install: (app: App<any>, option?: any) => void;
|
package/es/index.mjs
CHANGED
@@ -36,6 +36,7 @@ import { StyleAnimationInput } from './style-animation-input/index.mjs';
|
|
36
36
|
import { AnimateSelect } from './animate-select/index.mjs';
|
37
37
|
import { UniIconInput } from './uni-icon-input/index.mjs';
|
38
38
|
import { UniIcon } from './uni-icon/index.mjs';
|
39
|
+
import { UrlInput } from './url-input/index.mjs';
|
39
40
|
import { directives, setGlobalConfig } from '@vipl520/utils';
|
40
41
|
export { tinyEditorProps } from './tiny-editor/src/props.mjs';
|
41
42
|
export { iconProps } from './icon/src/props.mjs';
|
@@ -72,6 +73,7 @@ export { styleAnimationInputProps } from './style-animation-input/src/props.mjs'
|
|
72
73
|
export { animateSelectProps } from './animate-select/src/props.mjs';
|
73
74
|
export { uniIconProps } from './uni-icon/src/props.mjs';
|
74
75
|
export { uniIconInputProps } from './uni-icon-input/src/props.mjs';
|
76
|
+
export { urlInputProps } from './url-input/src/props.mjs';
|
75
77
|
|
76
78
|
const components = [
|
77
79
|
Test,
|
@@ -152,7 +154,8 @@ const components = [
|
|
152
154
|
Vue3DraggableResizable,
|
153
155
|
draggable,
|
154
156
|
UniIconInput,
|
155
|
-
UniIcon
|
157
|
+
UniIcon,
|
158
|
+
UrlInput
|
156
159
|
// TODO 普通上传 upload
|
157
160
|
// TODO tag选择器 tag-input
|
158
161
|
// TODO 链接选择器 link-input
|
@@ -173,5 +176,5 @@ var index = {
|
|
173
176
|
install
|
174
177
|
};
|
175
178
|
|
176
|
-
export { AnimateSelect, Attachment, AttachmentDialog, AudioInput, AudioListInput, BoxSizeInput, ColorInput, FileInput, FileListInput, Form, Group, HotAreaInput, Icon, IconContent, IconDialog, IconInput, ImageInput, ImageListInput, PageDiy, Poster, PosterInput, Select, StyleAnimationInput, StyleBackgroundInput, StyleBorderInput, StyleBoxInput, StyleFontInput, StyleInput, StyleNumberInput, StylePositionInput, StyleShadowContent, StyleShadowInput, Table, Test, TinyEditor, UniIcon, UniIconInput, VideoInput, VideoListInput, index as default, install };
|
179
|
+
export { AnimateSelect, Attachment, AttachmentDialog, AudioInput, AudioListInput, BoxSizeInput, ColorInput, FileInput, FileListInput, Form, Group, HotAreaInput, Icon, IconContent, IconDialog, IconInput, ImageInput, ImageListInput, PageDiy, Poster, PosterInput, Select, StyleAnimationInput, StyleBackgroundInput, StyleBorderInput, StyleBoxInput, StyleFontInput, StyleInput, StyleNumberInput, StylePositionInput, StyleShadowContent, StyleShadowInput, Table, Test, TinyEditor, UniIcon, UniIconInput, UrlInput, VideoInput, VideoListInput, index as default, install };
|
177
180
|
//# sourceMappingURL=index.mjs.map
|
package/es/index.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","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 { 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 { 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'\n\nimport { setGlobalConfig, directives } from '@vipl520/utils'\nexport * from './tiny-editor'\nexport * from './icon'\nexport * from './group'\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 './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'\n\nconst components = [\n Test,\n Group,\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 // 动画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 // TODO 普通上传 upload\n // TODO tag选择器 tag-input\n // TODO 链接选择器 link-input\n // TODO 应用框架\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":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.mjs","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 { 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 { 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 './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 './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 // 富文本编辑器\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 // 动画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 // TODO 普通上传 upload\n // TODO tag选择器 tag-input\n // TODO 链接选择器 link-input\n // TODO 应用框架\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":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgFA,MAAM,UAAa,GAAA;AAAA,EACjB,IAAA;AAAA,EACA,KAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,IAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,YAAA;AAAA;AAAA,EAEA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/B;AAAA,GACD,CAAA,CAAA;AACD,EAAA,UAAA,CAAW,GAAG,CAAA,CAAA;AACd,EAAA,eAAA,CAAgB,MAAM,CAAA,CAAA;AACxB,EAAA;AAEA,YAAe;AAAA,EACb,OAAA;AACF,CAAA;;;;"}
|
package/es/index.scss
CHANGED
@@ -0,0 +1,81 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
export let icon: string;
|
3
|
+
export { label };
|
4
|
+
export { name };
|
5
|
+
export function rule(): {
|
6
|
+
type: string;
|
7
|
+
props: {
|
8
|
+
imageStyle: {
|
9
|
+
width: string;
|
10
|
+
height: string;
|
11
|
+
marginBottom: string;
|
12
|
+
borderRadius: string;
|
13
|
+
};
|
14
|
+
list: {
|
15
|
+
title: string;
|
16
|
+
image: string;
|
17
|
+
}[];
|
18
|
+
};
|
19
|
+
showStyle: boolean;
|
20
|
+
children: never[];
|
21
|
+
style: {};
|
22
|
+
setting: {
|
23
|
+
style: {
|
24
|
+
backgroundColor: string;
|
25
|
+
};
|
26
|
+
};
|
27
|
+
};
|
28
|
+
export function props(): ({
|
29
|
+
type: string;
|
30
|
+
field: string;
|
31
|
+
title: string;
|
32
|
+
value: number;
|
33
|
+
props?: undefined;
|
34
|
+
} | {
|
35
|
+
type: string;
|
36
|
+
field: string;
|
37
|
+
title: string;
|
38
|
+
props: {
|
39
|
+
title: string;
|
40
|
+
defaultValue: {
|
41
|
+
title: string;
|
42
|
+
image: string;
|
43
|
+
};
|
44
|
+
rule: {
|
45
|
+
type: string;
|
46
|
+
field: string;
|
47
|
+
title: string;
|
48
|
+
}[];
|
49
|
+
isDrawer?: undefined;
|
50
|
+
drawerProps?: undefined;
|
51
|
+
hideComponents?: undefined;
|
52
|
+
};
|
53
|
+
value: never[];
|
54
|
+
} | {
|
55
|
+
type: string;
|
56
|
+
field: string;
|
57
|
+
title: string;
|
58
|
+
value?: undefined;
|
59
|
+
props?: undefined;
|
60
|
+
} | {
|
61
|
+
type: string;
|
62
|
+
field: string;
|
63
|
+
title: string;
|
64
|
+
props: {
|
65
|
+
isDrawer: boolean;
|
66
|
+
drawerProps: {
|
67
|
+
title: string;
|
68
|
+
size: string;
|
69
|
+
zIndex: number;
|
70
|
+
};
|
71
|
+
hideComponents: string[];
|
72
|
+
title?: undefined;
|
73
|
+
defaultValue?: undefined;
|
74
|
+
rule?: undefined;
|
75
|
+
};
|
76
|
+
value?: undefined;
|
77
|
+
})[];
|
78
|
+
}
|
79
|
+
export default _default;
|
80
|
+
declare const label: "宫格";
|
81
|
+
declare const name: "DkMinGrid";
|