vue更新3.5,以及mime打更新
This commit is contained in:
@@ -1,12 +1,3 @@
|
||||
<!--
|
||||
- MineAdmin is committed to providing solutions for quickly building web applications
|
||||
- Please view the LICENSE file that was distributed with this source code,
|
||||
- For the full copyright and license information.
|
||||
- Thank you very much for using MineAdmin.
|
||||
-
|
||||
- @Author X.Mo<root@imoi.cn>
|
||||
- @Link https://gitee.com/xmo/mineadmin-vue
|
||||
-->
|
||||
<template>
|
||||
<ma-form-item
|
||||
v-if="typeof props.component.display == 'undefined' || props.component.display === true"
|
||||
@@ -27,11 +18,11 @@
|
||||
:show-word-limit="props.component.showWordLimit"
|
||||
:word-length="props.component.wordLength"
|
||||
:word-slice="props.component.wordSlice"
|
||||
@input="maEvent.handleInputEvent(props.component, $event)"
|
||||
@change="maEvent.handleChangeEvent(props.component, $event)"
|
||||
@clear="maEvent.handleCommonEvent(props.component, 'onClear')"
|
||||
@focus="maEvent.handleCommonEvent(props.component, 'onFocus')"
|
||||
@blur="maEvent.handleCommonEvent(props.component, 'onBlur')"
|
||||
@input="rv('onInput', $event)"
|
||||
@change="rv('onChange', $event)"
|
||||
@clear="rv('onClear')"
|
||||
@focus="rv('onFocus')"
|
||||
@blur="rv('onBlur')"
|
||||
>
|
||||
</a-textarea>
|
||||
</slot>
|
||||
@@ -40,15 +31,20 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, inject, onMounted, watch } from "vue"
|
||||
import { get, set } from "lodash"
|
||||
import { get, set } from "lodash-es"
|
||||
import MaFormItem from "./form-item.vue"
|
||||
import { maEvent } from "../js/formItemMixin.js"
|
||||
import { runEvent } from "../js/event.js"
|
||||
const props = defineProps({
|
||||
component: Object,
|
||||
customField: { type: String, default: undefined }
|
||||
})
|
||||
|
||||
const formModel = inject("formModel")
|
||||
const getColumnService = inject("getColumnService")
|
||||
const columns = inject("columns")
|
||||
const rv = async (ev, value = undefined) =>
|
||||
await runEvent(props.component, ev, { formModel, getColumnService, columns }, value)
|
||||
|
||||
const index = props.customField ?? props.component.dataIndex
|
||||
const value = ref(get(formModel.value, index))
|
||||
|
||||
@@ -64,8 +60,6 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
maEvent.handleCommonEvent(props.component, "onCreated")
|
||||
onMounted(() => {
|
||||
maEvent.handleCommonEvent(props.component, "onMounted")
|
||||
})
|
||||
rv("onCreated")
|
||||
onMounted(() => rv("onMounted"))
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user