|
@@ -8,7 +8,8 @@
|
|
import { ref, onMounted, watch, nextTick, onUnmounted } from 'vue'
|
|
import { ref, onMounted, watch, nextTick, onUnmounted } from 'vue'
|
|
import Keyboard from 'simple-keyboard'
|
|
import Keyboard from 'simple-keyboard'
|
|
import 'simple-keyboard/build/css/index.css'
|
|
import 'simple-keyboard/build/css/index.css'
|
|
-
|
|
|
|
|
|
+ // 支持中文输入
|
|
|
|
+ import layout from 'simple-keyboard-layouts/build/layouts/chinese';
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
keyboardClass: {
|
|
keyboardClass: {
|
|
type: String,
|
|
type: String,
|
|
@@ -25,7 +26,7 @@
|
|
const keyboardEl = ref(null)
|
|
const keyboardEl = ref(null)
|
|
const keyboard = ref(null)
|
|
const keyboard = ref(null)
|
|
const currentLayout = ref('default')
|
|
const currentLayout = ref('default')
|
|
- const isChineseMode = ref(false)
|
|
|
|
|
|
+ const isChineseMode = ref(true)
|
|
const isShiftOn = ref(false)
|
|
const isShiftOn = ref(false)
|
|
const chineseLayoutModule = ref(null)
|
|
const chineseLayoutModule = ref(null)
|
|
|
|
|