新增input-number(数字输入框)、tooltip(文字提示)、修改input组件可接受number类型值

This commit is contained in:
xumi
2021-12-12 17:39:02 +08:00
parent e545b9221a
commit 961eac0127
17 changed files with 857 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
import type { App } from 'vue'
import Component from './index.vue'
import type { IDefineComponent } from '../type/index'
Component.install = (app: App) => {
app.component(Component.name || 'LayTooltip', Component)
}
export default Component as IDefineComponent

View File

@@ -0,0 +1,30 @@
<script lang="ts">
import usePopper from "../popper/usePopper";
import { defineComponent} from "vue";
export default defineComponent({
name: "LayTooltip",
props: {
content: {
type: String,
required: true,
},
position: {
type: String,
default: "top",
},
isDark: {
type: Boolean,
default: true,
}
},
render() {
return this.$slots.default && this.$slots.default()[0];
},
mounted() {
const _this = this;
this.$nextTick(() => {
usePopper.createPopper(_this.$el, _this.$props, "hover");
});
},
});
</script>