refactor(mobile): remove @opentiny/mobile-utils package, and add alia… (#2767)

* refactor(mobile): remove @opentiny/mobile-utils package, and add alias to utils

* refactor(mobile): fix pnpm dev
This commit is contained in:
申君健 2025-01-09 16:20:44 +08:00 committed by GitHub
parent 6eb80f11fd
commit 35024662ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
118 changed files with 204 additions and 207 deletions

View File

@ -51,6 +51,7 @@ module.exports = {
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-invalid-this': 'off',
'vue/no-deprecated-dollar-scopedslots-api': 'off',
'@typescript-eslint/lines-between-class-members': 'off'
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/no-this-alias': 'off'
}
}

View File

@ -135,6 +135,7 @@ export default defineConfig((config) => {
resolve: {
extensions: ['.js', '.ts', '.tsx', '.vue'],
alias: {
'@mobile-root': pathFromWorkspaceRoot('packages/mobile'),
'@': path.resolve('src'),
'@demos': path.resolve(`${demosPath}`),
'@menu': menuPath,

View File

@ -92,6 +92,7 @@ export default defineConfig((config) => {
resolve: {
extensions: ['.js', '.ts', '.tsx', '.vue'],
alias: {
'@mobile-root': pathFromWorkspaceRoot('packages/mobile'),
'vue': path.resolve('node_modules/vue/dist/vue.esm-bundler.js'),
'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js',
'@': pathFromWorkspaceRoot('examples/docs/newsrc'),

View File

@ -52,7 +52,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { $prefix, setup, defineComponent } from '../../../vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import '@opentiny/vue-theme-mobile/action-sheet/index.less'
import BScroll from '@better-scroll/core'
import { actionSheetProps } from './action-sheet'

View File

@ -28,7 +28,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { iconClose, iconSuccess, iconError, iconHelp, iconWarningTriangle } from '@opentiny/vue-icon'
import type { IAlertApi } from './alert'
import { alertProps } from './alert'

View File

@ -10,7 +10,7 @@
*
-->
<script lang="tsx">
import { $prefix, setup, h, defineComponent } from '../../../vue-common'
import { $prefix, setup, h, defineComponent } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import '@opentiny/vue-theme-mobile/avatar/index.less'

View File

@ -38,7 +38,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { badgeProps } from './badge'
import '@opentiny/vue-theme-mobile/badge/index.less'

View File

@ -11,7 +11,7 @@
*/
import { computedContent, computedValueRef, computedTransform } from './index'
import { xss } from '@opentiny/mobile-utils/xss'
import { xss } from '@mobile-root/utils/xss'
import type { IBadgeState, IBadgeProps, IBadgeApi, IBadgeRenderlessParams } from '../badge'
export const api = ['state']

View File

@ -45,7 +45,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { buttonProps } from './button'
import '@opentiny/vue-theme-mobile/button/index.less'

View File

@ -10,7 +10,7 @@
*
*/
import type { IButtonRenderlessParams, IButtonState } from '../button'
import { xss } from '@opentiny/mobile-utils'
import { xss } from '@mobile-root/utils'
export const handleClick =
({ emit, props, state }: Pick<IButtonRenderlessParams, 'emit' | 'props' | 'state'>) =>

View File

@ -26,7 +26,7 @@
<script lang="tsx">
import { renderless, api } from './renderless/vue'
import { $prefix, setup, defineComponent } from '../../../vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import Checkbox from '../../checkbox'
import { CheckboxGroupProps } from './checkbox-group'
import '@opentiny/vue-theme-mobile/checkbox-group/index.less'

View File

@ -9,8 +9,8 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import { $prefix } from '../../../vue-common'
import type { PropType } from '../../../vue-common'
import { $prefix } from '@mobile-root/vue-common'
import type { PropType } from '@mobile-root/vue-common'
import type { ExtractPropTypes, ComputedRef } from 'vue'
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'

View File

@ -64,7 +64,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { $prefix, setup, defineComponent } from '../../../vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { checkboxProps } from './checkbox'
import '@opentiny/vue-theme-mobile/checkbox/index.less'

View File

@ -11,7 +11,7 @@
*/
import type { ICheckboxRenderlessParams, ICheckboxState, ICheckboxChangeEvent, ICheckboxProps } from '../checkbox'
import { isNull } from '@opentiny/mobile-utils/type'
import { isNull } from '@mobile-root/utils/type'
export const addToStore =
({ state, props }: Pick<ICheckboxRenderlessParams, 'state' | 'props'>) =>

View File

@ -25,7 +25,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { containerProps } from './container'
import '@opentiny/vue-theme-mobile/container/index.less'

View File

@ -10,7 +10,7 @@
*
*/
import { isNumber } from '@opentiny/mobile-utils/type'
import { isNumber } from '@mobile-root/utils/type'
export const computedShowHeader =
({ constants, props }) =>
@ -128,7 +128,7 @@ export const computedLeftStyle =
export const computedShowRight =
({ constants, props }) =>
() => {
return props.pattern === constants.DEFAULT ? false : true
return props.pattern !== constants.DEFAULT
}
export const computedRightStyle =

View File

@ -9,10 +9,11 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import type { PropType } from '../../../vue-common'
import type { PropType } from '@mobile-root/vue-common'
import { iconClose } from '@opentiny/vue-icon'
import type { ComputedRef, ExtractPropTypes } from 'vue'
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'
export type { ISharedRenderlessParamHooks } from '../../../types/shared.type'
const currentYear = new Date().getFullYear()

View File

@ -35,7 +35,7 @@
</template>
<script lang="ts">
import { props, setup, defineComponent } from '../../../vue-common'
import { props, setup, defineComponent } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import MiniPicker from '../../mini-picker'
import Input from '../../input'

View File

@ -27,7 +27,7 @@ import {
onChange,
updateColumnValue
} from './index'
import { DATE } from '@opentiny/mobile-utils'
import { DATE } from '@mobile-root/utils'
import type {
IDatePickerApi,
IDatePickerProps,

View File

@ -10,7 +10,7 @@
*
*/
import { $prefix } from '../../../vue-common'
import { $prefix } from '@mobile-root/vue-common'
import type { ExtractPropTypes } from 'vue'
import type {
handleCancel,

View File

@ -38,7 +38,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { dialogBoxProps } from './dialog-box'
import '@opentiny/vue-theme-mobile/dialog-box/index.less'

View File

@ -10,9 +10,9 @@
*
*/
import { on, off, addClass, removeClass } from '@opentiny/mobile-utils/deps/dom'
import { emitEvent } from '@opentiny/mobile-utils/event'
import { getDomNode } from '@opentiny/mobile-utils/deps/dom'
import { on, off, addClass, removeClass } from '@mobile-root/utils/deps/dom'
import { emitEvent } from '@mobile-root/utils/event'
import { getDomNode } from '@mobile-root/utils/deps/dom'
import type { IDialogBoxRenderlessParams, IDialogBoxStyle } from '../dialog-box'
export const computedAnimationName =

View File

@ -31,7 +31,7 @@ import {
hideScrollbar,
computedBodyStyle
} from './index'
import usePopup from '@opentiny/mobile-utils/deps/vue-popup'
import usePopup from '@mobile-root/utils/deps/vue-popup'
import type {
IDialogBoxApi,
IDialogBoxProps,

View File

@ -99,11 +99,11 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent, directive } from '../../../vue-common'
import { setup, defineComponent, directive } from '@mobile-root/vue-common'
import { iconYes } from '@opentiny/vue-icon'
import Popup from '../../popup'
import Button from '../../button'
import Clickoutside from '@opentiny/mobile-utils/deps/clickoutside'
import Clickoutside from '@mobile-root/utils/deps/clickoutside'
import '@opentiny/vue-theme-mobile/dropdown-item/index.less'
import { dropdownItemProps } from './dropdown-item'

View File

@ -16,7 +16,7 @@ import type {
IDropdownItemTag,
IDropdownItemOptionStyle
} from '../dropdown-item'
import { on, off } from '@opentiny/mobile-utils/deps/dom'
import { on, off } from '@mobile-root/utils/deps/dom'
export const getTitle = (props: IDropdownItemRenderlessParams['props']) => (): string => {
if (props.title) {

View File

@ -51,8 +51,8 @@
item.type === 'filter'
? 'IconUnfilter'
: item.type === 'selection' && item.state.showPopup
? 'IconUp'
: 'IconDown'
? 'IconUp'
: 'IconDown'
"
:class="[item.type === 'filter' ? 'filter-icon' : '']"
/>
@ -68,10 +68,10 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent, directive } from '../../../vue-common'
import { setup, defineComponent, directive } from '@mobile-root/vue-common'
import { iconUp, iconDown, iconUnfilter, iconSort, iconDeltaDown, iconDeltaUp } from '@opentiny/vue-icon'
import { dropdownMenuProps } from './dropdown-menu'
import Clickoutside from '@opentiny/mobile-utils/deps/clickoutside'
import Clickoutside from '@mobile-root/utils/deps/clickoutside'
import '@opentiny/vue-theme-mobile/dropdown-menu/index.less'
export default defineComponent({

View File

@ -11,7 +11,7 @@
*/
import type { IDropdownMenuRenderlessParams, IDropdownMenuPopperParams, IDropdownItemVm } from '../dropdown-menu'
import userPopper from '@opentiny/mobile-utils/deps/vue-popper'
import userPopper from '@mobile-root/utils/deps/vue-popper'
export const toggleItem =
(state: IDropdownMenuRenderlessParams['state']) =>

View File

@ -38,7 +38,7 @@
<script>
import { renderless, api } from './renderless/vue'
import { setup, $prefix, defineComponent } from '../../../vue-common'
import { setup, $prefix, defineComponent } from '@mobile-root/vue-common'
import Button from '../../button'
import { exceptionProps } from './exception'
import '@opentiny/vue-theme-mobile/exception/index.less'

View File

@ -85,7 +85,7 @@ import type {
} from './renderless'
import type { downloadFile as ordinaryDownload } from '../../upload-list/src/upload-list'
import type { IUploadFormData } from '../../upload/src/upload'
import { $props } from '../../../vue-common'
import { $props } from '@mobile-root/vue-common'
export type { ISharedRenderlessParamHooks } from '../../../types/shared.type'

View File

@ -11,7 +11,7 @@
-->
<script lang="tsx">
import { renderless, api } from './renderless/vue'
import { setup, h, defineComponent } from '../../../vue-common'
import { setup, h, defineComponent } from '@mobile-root/vue-common'
import UploadList from '../../upload-list'
import Upload from '../../upload'
import { iconUpload } from '@opentiny/vue-icon'

View File

@ -29,11 +29,11 @@ import type {
IFileUploadLargeDocumentDownload
} from '../file-upload'
import { extend } from '@opentiny/mobile-utils/object'
import { xss, log } from '@opentiny/mobile-utils/xss'
import uploadAjax from '@opentiny/mobile-utils/deps/upload-ajax'
import { isObject } from '@opentiny/mobile-utils/type'
import { isEmptyObject } from '@opentiny/mobile-utils/type'
import { extend } from '@mobile-root/utils/object'
import { xss, log } from '@mobile-root/utils/xss'
import uploadAjax from '@mobile-root/utils/deps/upload-ajax'
import { isObject } from '@mobile-root/utils/type'
import { isEmptyObject } from '@mobile-root/utils/type'
let initTokenPromise = null

View File

@ -20,7 +20,7 @@ import type {
IFileUploadStreamsaver
} from '../file-upload'
import { downloadFile as ordinaryDownload } from '../../../upload-list/src/renderless'
import { formatFileSize } from '@opentiny/mobile-utils/string'
import { formatFileSize } from '@mobile-root/utils/string'
import {
initService,
@ -96,7 +96,7 @@ import {
closeRecordPanel,
getTipMessage
} from './index'
import { isEmptyObject } from '@opentiny/mobile-utils/type'
import { isEmptyObject } from '@mobile-root/utils/type'
export const api = [
'state',

View File

@ -1,4 +1,4 @@
import { setup, h, $props, defineComponent } from '../../../vue-common'
import { setup, h, $props, defineComponent } from '@mobile-root/vue-common'
export default defineComponent({
props: {

View File

@ -10,7 +10,7 @@
*
-->
<script lang="tsx">
import { $prefix, setup, parseVnode, h, defineComponent, isVue2 } from '../../../vue-common'
import { $prefix, setup, parseVnode, h, defineComponent, isVue2 } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import LabelWrap from './label-wrap'
import Tooltip from '../../tooltip'

View File

@ -10,12 +10,12 @@
*
*/
import { POSITION, VALIDATE_STATE } from '@opentiny/mobile-utils'
import { omitText } from '@opentiny/mobile-utils/string'
import { merge } from '@opentiny/mobile-utils/object'
import Validator from '@opentiny/mobile-utils/validate'
import { isNull } from '@opentiny/mobile-utils/type'
import debounce from '@opentiny/mobile-utils/deps/debounce'
import { POSITION, VALIDATE_STATE } from '@mobile-root/utils'
import { omitText } from '@mobile-root/utils/string'
import { merge } from '@mobile-root/utils/object'
import Validator from '@mobile-root/utils/validate'
import { isNull } from '@mobile-root/utils/type'
import debounce from '@mobile-root/utils/deps/debounce'
import type {
IFormItemRenderlessParams,
IFormItemDisplayedValueParam,

View File

@ -25,7 +25,7 @@
<script lang="tsx">
import { renderless, api } from './renderless/vue'
import { $prefix, setup, defineComponent } from '../../../vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import type { IFormApi } from '@opentiny/vue-renderless/types/form.type'
import { formProps } from './form'
import '@opentiny/vue-theme-mobile/form/index.less'

View File

@ -10,7 +10,7 @@
*
*/
import { merge } from '@opentiny/mobile-utils/object'
import { merge } from '@mobile-root/utils/object'
import type { IFormRenderlessParams } from '../form'

View File

@ -112,7 +112,7 @@
<script lang="tsx">
import { renderless, api } from './renderless/vue'
import { props, setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import {
iconClose,
iconChevronLeft,

View File

@ -9,8 +9,8 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import { directive } from '../../../vue-common'
import { isObject } from '@opentiny/mobile-utils/type'
import { directive } from '@mobile-root/vue-common'
import { isObject } from '@mobile-root/utils/type'
class TinyTouch {
constructor(element, tinyBinding, type) {
@ -49,7 +49,7 @@ class TinyTouch {
this.time = setTimeout(() => {
if (this.tinyVueLeave && this.tinyVueMoves) {
this.touchType == 'longtap' && this.tinyVueCallBack(this.tinyBinding.value, e)
this.touchType === 'longtap' && this.tinyVueCallBack(this.tinyBinding.value, e)
this.tinyLongTouch = false
}
}, 1000)
@ -66,28 +66,28 @@ class TinyTouch {
clearTimeout(this.time)
if (Math.abs(disX) > 10 || Math.abs(disY) > 100) {
this.touchType == 'swipe' && this.tinyVueCallBack(this.tinyBinding.value, e)
this.touchType === 'swipe' && this.tinyVueCallBack(this.tinyBinding.value, e)
if (Math.abs(disX) > Math.abs(disY)) {
if (disX > 10) {
this.touchType == 'swiperight' && this.tinyVueCallBack(this.tinyBinding.value, e)
this.touchType === 'swiperight' && this.tinyVueCallBack(this.tinyBinding.value, e)
}
if (disX < -10) {
this.touchType == 'swipeleft' && this.tinyVueCallBack(this.tinyBinding.value, e)
this.touchType === 'swipeleft' && this.tinyVueCallBack(this.tinyBinding.value, e)
}
} else {
if (disY > 10) {
this.touchType == 'swipedown' && this.tinyVueCallBack(this.tinyBinding.value, e)
this.touchType === 'swipedown' && this.tinyVueCallBack(this.tinyBinding.value, e)
}
if (disY < -10) {
this.touchType == 'swipeup' && this.tinyVueCallBack(this.tinyBinding.value, e)
this.touchType === 'swipeup' && this.tinyVueCallBack(this.tinyBinding.value, e)
}
}
} else {
if (this.tinyLongTouch && this.tinyVueMoves) {
this.touchType == 'tap' && this.tinyVueCallBack(this.tinyBinding.value, e)
this.touchType === 'tap' && this.tinyVueCallBack(this.tinyBinding.value, e)
this.tinyVueLeave = false
}
}
@ -106,6 +106,7 @@ const mapDirective = () => {
deactives[name] = directive({
vTouch: {
bind(el, tinyBinding) {
// eslint-disable-next-line no-new
new TinyTouch(el, tinyBinding, name)
}
}

View File

@ -10,10 +10,10 @@
*
*/
import { on, off } from '@opentiny/mobile-utils/deps/dom'
import { KEY_CODE } from '@opentiny/mobile-utils'
import PopupManager from '@opentiny/mobile-utils/deps/popup-manager'
import { xss } from '@opentiny/mobile-utils/xss'
import { on, off } from '@mobile-root/utils/deps/dom'
import { KEY_CODE } from '@mobile-root/utils'
import PopupManager from '@mobile-root/utils/deps/popup-manager'
import { xss } from '@mobile-root/utils/xss'
const isFirefox = () => !!window.navigator.userAgent.match(/firefox/i)

View File

@ -18,7 +18,7 @@
</template>
<script lang="ts">
import { $prefix, setup, defineComponent } from '../../../vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import '@opentiny/vue-theme-mobile/index-bar-anchor/index.less'

View File

@ -39,7 +39,7 @@
</template>
<script lang="ts">
import { setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import '@opentiny/vue-theme-mobile/index-bar/index.less'

View File

@ -9,7 +9,7 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import type { PropType } from '../../../vue-common'
import type { PropType } from '@mobile-root/vue-common'
import type { ExtractPropTypes, ComputedRef } from 'vue'
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'

View File

@ -173,7 +173,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { props, setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { iconClose, iconEyeopen, iconEyeclose, iconChevronRight } from '@opentiny/vue-icon'
import ActionSheet from '../../action-sheet'
import { inputProps } from './input'

View File

@ -10,7 +10,7 @@
*
*/
import { omitText } from '@opentiny/mobile-utils/string'
import { omitText } from '@mobile-root/utils/string'
import type {
IInputApi,
IInputClassPrefixConstants,

View File

@ -10,7 +10,7 @@
*
*/
import { KEY_CODE } from '@opentiny/mobile-utils'
import { KEY_CODE } from '@mobile-root/utils'
export const mousedown = (event) => {
if (event && event.preventDefault) {

View File

@ -18,7 +18,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { labelProps } from './label'
import '@opentiny/vue-theme-mobile/label/index.less'

View File

@ -35,7 +35,7 @@
</template>
<script lang="ts">
import { $prefix, setup, defineComponent } from '../../../vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import '@opentiny/vue-theme-mobile/list/index.less'

View File

@ -9,11 +9,11 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import afterLeave from '@opentiny/mobile-utils/deps/after-leave'
import PopupManager from '@opentiny/mobile-utils/deps/popup-manager'
import { addClass, getStyle, removeClass } from '@opentiny/mobile-utils/deps/dom'
import afterLeave from '@mobile-root/utils/deps/after-leave'
import PopupManager from '@mobile-root/utils/deps/popup-manager'
import { addClass, getStyle, removeClass } from '@mobile-root/utils/deps/dom'
import Loading from './mobile.vue'
import { hooks, directive, createComponent, appProperties } from '../../../vue-common'
import { hooks, directive, createComponent, appProperties } from '@mobile-root/vue-common'
import { constants, defaults } from './service'
const insertDom = (parent, el, binding) => {

View File

@ -15,7 +15,7 @@
</template>
<script lang="ts">
import { $prefix, setup, $props, defineComponent } from '../../../vue-common'
import { $prefix, setup, $props, defineComponent } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import loadingImg from '@opentiny/vue-theme-mobile/images/loading.png'
import '@opentiny/vue-theme-mobile/loading/index.less'

View File

@ -11,8 +11,8 @@
*/
import type { ILoadingRenderlessParamUtils, ILoadingRenderlessParams, ILoadingState } from '../loading'
import afterLeave from '@opentiny/mobile-utils/deps/after-leave'
import { removeClass } from '@opentiny/mobile-utils/deps/dom'
import afterLeave from '@mobile-root/utils/deps/after-leave'
import { removeClass } from '@mobile-root/utils/deps/dom'
export const handleAfterLeave = (emit: ILoadingRenderlessParamUtils['emit']) => (): void => {
emit('after-leave')

View File

@ -10,9 +10,9 @@
*
*/
import PopupManager from '@opentiny/mobile-utils/deps/popup-manager'
import { getStyle, addClass } from '@opentiny/mobile-utils/deps/dom'
import { createComponent, hooks, appProperties } from '../../../vue-common'
import PopupManager from '@mobile-root/utils/deps/popup-manager'
import { getStyle, addClass } from '@mobile-root/utils/deps/dom'
import { createComponent, hooks, appProperties } from '@mobile-root/vue-common'
import Loading from './mobile.vue'
export const defaults = {

View File

@ -25,7 +25,7 @@
</template>
<script lang="ts">
import { props, setup, defineComponent, $prefix } from '../../../vue-common'
import { props, setup, defineComponent, $prefix } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import '@opentiny/vue-theme-mobile/mask/index.less'

View File

@ -1,6 +1,6 @@
import Modal from '../modal'
import { extend } from '@opentiny/mobile-utils/object'
import { $prefix } from '../../../vue-common'
import { extend } from '@mobile-root/utils/object'
import { $prefix } from '@mobile-root/vue-common'
const Message = extend(true, { props: { componentName: { type: String, default: 'Message' } } }, Modal, {
name: $prefix + 'Message'

View File

@ -45,7 +45,7 @@
<script lang="tsx">
import { t } from '@opentiny/vue-locale'
import { renderless, api } from './renderless/vue'
import { $prefix, setup, defineComponent } from '../../../vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import PickerColumn from '../../picker-column'
import '@opentiny/vue-theme-mobile/mini-picker/index.less'

View File

@ -10,7 +10,7 @@
*
-->
<script lang="tsx">
import { props, setup, h, defineComponent } from '../../../vue-common'
import { setup, h, defineComponent } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import Button from '../../button'
import { iconFullscreenLeft, iconMinscreenLeft } from '@opentiny/vue-icon'
@ -19,9 +19,6 @@ import '@opentiny/vue-theme-mobile/modal/index.less'
export default defineComponent({
props: modalProps,
components: {
Button
},
provide() {
return { dialog: this }
},

View File

@ -10,11 +10,11 @@
*
*/
import { KEY_CODE } from '@opentiny/mobile-utils'
import { on, off, addClass, hasClass, removeClass } from '@opentiny/mobile-utils/deps/dom'
import PopupManager from '@opentiny/mobile-utils/deps/popup-manager'
import { getDomNode } from '@opentiny/mobile-utils/deps/dom'
import { getViewportWindow } from '@opentiny/mobile-utils/global'
import { KEY_CODE } from '@mobile-root/utils'
import { on, off, addClass, hasClass, removeClass } from '@mobile-root/utils/deps/dom'
import PopupManager from '@mobile-root/utils/deps/popup-manager'
import { getDomNode } from '@mobile-root/utils/deps/dom'
import { getViewportWindow } from '@mobile-root/utils/global'
import type {
IModalProps,

View File

@ -49,7 +49,7 @@
</template>
<script lang="ts">
import { $prefix, setup, defineComponent } from '../../../vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import { iconChevronDown } from '@opentiny/vue-icon'
import Button from '../../button'

View File

@ -116,8 +116,8 @@
</template>
<script lang="ts">
import type { PropType } from '../../../vue-common'
import { $prefix, setup, defineComponent, directive } from '../../../vue-common'
import type { PropType } from '@mobile-root/vue-common'
import { $prefix, setup, defineComponent, directive } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import { iconChevronDown, iconSearch } from '@opentiny/vue-icon'
import Button from '../../button'
@ -125,9 +125,8 @@ import Input from '../../input'
import Mask from '../../mask'
import MultiSelectItem from '../../multi-select-item'
import Wheel from '../../wheel'
import Clickoutside from '@opentiny/mobile-utils/deps/clickoutside'
import Clickoutside from '@mobile-root/utils/deps/clickoutside'
import { t } from '@opentiny/vue-locale'
import { multiSelectProps } from './multi-select'
import '@opentiny/vue-theme-mobile/multi-select/index.less'
export default defineComponent({

View File

@ -9,7 +9,7 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import type { PropType } from '../../../vue-common'
import type { PropType } from '@mobile-root/vue-common'
export const multiSelectProps = {
dataSource: {

View File

@ -10,7 +10,7 @@
*
*/
import { cloneDeep } from '@opentiny/mobile-utils/object'
import { cloneDeep } from '@mobile-root/utils/object'
export const initValue =
({ props, emit }) =>

View File

@ -10,7 +10,7 @@
*
-->
<script lang="tsx">
import { $prefix, h, defineComponent } from '../../../vue-common'
import { $prefix, h, defineComponent } from '@mobile-root/vue-common'
// h h
import { iconChevronLeft, iconPlus } from '@opentiny/vue-icon'

View File

@ -71,8 +71,8 @@
<script lang="tsx">
import { renderless, api } from './renderless/vue'
import { props, setup, directive, defineComponent } from '../../../vue-common'
import bind from '@opentiny/mobile-utils/deps/repeat-click'
import { setup, directive, defineComponent } from '@mobile-root/vue-common'
import bind from '@mobile-root/utils/deps/repeat-click'
import { iconChevronDown, iconChevronUp, iconMinus, iconPlus } from '@opentiny/vue-icon'
import { numericProps } from './numeric'
import '@opentiny/vue-theme-mobile/numeric/index.less'

View File

@ -10,7 +10,7 @@
*
*/
import type { ExtractPropTypes } from 'vue'
import type { BigIntDecimal } from '@opentiny/mobile-utils/bigInt'
import type { BigIntDecimal } from '@mobile-root/utils/bigInt'
import type {
focus,
select,
@ -42,6 +42,7 @@ import type {
handleChange
} from './renderless'
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'
export type { ISharedRenderlessParamHooks } from '../../../types/shared.type'
export const $constants = {

View File

@ -18,12 +18,12 @@ import type {
INumericGetEmitValueParams,
INumericUnitPrecision
} from '../numeric'
import type { BigIntDecimal } from '@opentiny/mobile-utils/bigInt'
import { formatNumber, roundFixed } from '@opentiny/mobile-utils/decimal'
import { getMiniDecimal, lessEquals, equalsDecimal } from '@opentiny/mobile-utils/bigInt'
import { isNumber, isNull } from '@opentiny/mobile-utils/type'
import { MOUSEDELTA } from '@opentiny/mobile-utils'
import { on, off } from '@opentiny/mobile-utils/deps/dom'
import type { BigIntDecimal } from '@mobile-root/utils/bigInt'
import { formatNumber, roundFixed } from '@mobile-root/utils/decimal'
import { getMiniDecimal, lessEquals, equalsDecimal } from '@mobile-root/utils/bigInt'
import { isNumber, isNull } from '@mobile-root/utils/type'
import { MOUSEDELTA } from '@mobile-root/utils'
import { on, off } from '@mobile-root/utils/deps/dom'
export const initService = (
service: INumericRenderlessParamUtils['service']

View File

@ -33,7 +33,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { $prefix, setup, defineComponent } from '../../../vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import '@opentiny/vue-theme-mobile/picker-column/index.less'
export default defineComponent({

View File

@ -10,7 +10,7 @@
*
*/
import { on, off } from '@opentiny/mobile-utils/deps/dom'
import { on, off } from '@mobile-root/utils/deps/dom'
export const computedWrapperStyle = (state) => () => {
const wrapperStyle = {

View File

@ -53,7 +53,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { props, setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { popoverProps } from './popover'
import '@opentiny/vue-theme-mobile/popover/index.less'

View File

@ -10,9 +10,9 @@
*
*/
import type { IPopoverRenderlessParams, IPopoverState } from '../popover'
import { on, off, addClass, removeClass } from '@opentiny/mobile-utils/deps/dom'
import { guid } from '@opentiny/mobile-utils/string'
import { KEY_CODE } from '@opentiny/mobile-utils'
import { on, off, addClass, removeClass } from '@mobile-root/utils/deps/dom'
import { guid } from '@mobile-root/utils/string'
import { KEY_CODE } from '@mobile-root/utils'
const processTrigger = ({
api,

View File

@ -31,7 +31,7 @@ import {
handleItemClick,
observeCallback
} from './index'
import userPopper from '@opentiny/mobile-utils/deps/vue-popper'
import userPopper from '@mobile-root/utils/deps/vue-popper'
import type {
IPopoverApi,
IPopoverProps,

View File

@ -46,7 +46,7 @@
</template>
<script lang="ts">
import { setup, $prefix, $props, defineComponent } from '../../../vue-common'
import { setup, $prefix, $props, defineComponent } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import { iconClose } from '@opentiny/vue-icon'
import '@opentiny/vue-theme-mobile/popup/index.less'

View File

@ -10,10 +10,10 @@
*
*/
import { on, off } from '@opentiny/mobile-utils/deps/dom'
import { touchStart, touchMove } from '@opentiny/mobile-utils/deps/touch'
import { on, off } from '@mobile-root/utils/deps/dom'
import { touchStart, touchMove } from '@mobile-root/utils/deps/touch'
import { getScroller } from '../../../dropdown-menu/src/renderless'
import { isNull } from '@opentiny/mobile-utils/type'
import { isNull } from '@mobile-root/utils/type'
export const getStyle = (props) => () => {
const style = { ...props.popupStyle }

View File

@ -68,7 +68,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { iconClose, iconSuccessful, iconError, iconYes, iconWarning } from '@opentiny/vue-icon'
import '@opentiny/vue-theme-mobile/progress/index.less'
import { progressProps } from './progress'

View File

@ -60,7 +60,7 @@
</template>
<script lang="tsx">
import { $prefix, setup, defineComponent } from '../../../vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import { pullRefreshProps } from './pull-refresh'
import '@opentiny/vue-theme-mobile/pull-refresh/index.less'

View File

@ -10,7 +10,7 @@
*
*/
import { on, off } from '@opentiny/mobile-utils/deps/dom'
import { on, off } from '@mobile-root/utils/deps/dom'
// 上拉触发事件超时时间
const PULL_UP_TIME_OUT = 300

View File

@ -28,7 +28,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import Radio from '../../radio'
import { radioGroupProps } from './radio-group'
import type { IRadioGroupApi } from './radio-group'

View File

@ -11,7 +11,7 @@
*/
import type { IRadioGroupRenderlessParams } from '../radio-group'
import { KEY_CODE } from '@opentiny/mobile-utils'
import { KEY_CODE } from '@mobile-root/utils'
export const handleKeydown =
(parent: IRadioGroupRenderlessParams['parent']) =>

View File

@ -47,7 +47,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { props, setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { radioProps } from './radio'
import '@opentiny/vue-theme-mobile/radio/index.less'

View File

@ -66,7 +66,7 @@
<script lang="tsx">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { iconSearch, iconClose } from '@opentiny/vue-icon'
import '@opentiny/vue-theme-mobile/search/index.less'
import type { ISearchApi } from './search'

View File

@ -10,9 +10,9 @@
*
*/
import type { ISearchRenderlessParams, ISearchValue } from '../search'
import { on, off } from '@opentiny/mobile-utils/deps/dom'
import PopupManager from '@opentiny/mobile-utils/deps/popup-manager'
import { isObject, typeOf } from '@opentiny/mobile-utils/type'
import { on, off } from '@mobile-root/utils/deps/dom'
import PopupManager from '@mobile-root/utils/deps/popup-manager'
import { isObject, typeOf } from '@mobile-root/utils/type'
export const emitInput =
({ emit }: Pick<ISearchRenderlessParams, 'emit'>) =>

View File

@ -58,7 +58,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { $prefix, setup, defineComponent } from '../../../vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import type { ISliderApi } from './slider'
import { sliderProps } from './slider'
import '@opentiny/vue-theme-mobile/slider/index.less'

View File

@ -10,10 +10,10 @@
*
*/
import { KEY_CODE } from '@opentiny/mobile-utils'
import { emitEvent } from '@opentiny/mobile-utils/event'
import { on, off, hasClass } from '@opentiny/mobile-utils/deps/dom'
import { toNumber } from '@opentiny/mobile-utils/string'
import { KEY_CODE } from '@mobile-root/utils'
import { emitEvent } from '@mobile-root/utils/event'
import { on, off, hasClass } from '@mobile-root/utils/deps/dom'
import { toNumber } from '@mobile-root/utils/string'
import type { ISliderApi, ISliderRenderlessParams, ISliderState } from '../slider'
export const bindEvent = (api: ISliderApi) => () => {

View File

@ -19,7 +19,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import '@opentiny/vue-theme-mobile/switch/index.less'
import { switchProps } from './switch'

View File

@ -24,7 +24,7 @@
</template>
<script lang="ts">
import { $prefix, setup, defineComponent } from '../../../vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import type { ITabItemApi } from '@opentiny/vue-renderless/types/tab-item.type'
import { tabItemProps } from './tab-item'

View File

@ -32,7 +32,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { $props, $prefix, setup, defineComponent } from '../../../vue-common'
import { $prefix, setup, defineComponent } from '@mobile-root/vue-common'
import { tabbarItemProps } from './tabbar-item'
import '@opentiny/vue-theme-mobile/tabbar-item/index.less'

View File

@ -10,7 +10,7 @@
*
*/
import { isObject, isNull } from '@opentiny/mobile-utils/type'
import { isObject, isNull } from '@mobile-root/utils/type'
export const getRouteActive =
({ props, route }) =>

View File

@ -11,7 +11,7 @@
*/
import { getRouteActive, onClick, bindChildren, routeTab, getTabbarItemsWidth } from './index'
import { xss } from '@opentiny/mobile-utils'
import { xss } from '@mobile-root/utils'
export const api = ['state', 'onClick', 'getTabbarItemsWidth']

View File

@ -22,7 +22,7 @@
</template>
<script lang="ts">
import { setup, $prefix, defineComponent } from '../../../vue-common'
import { setup, $prefix, defineComponent } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import { tabbarProps } from './tabbar'
import '@opentiny/vue-theme-mobile/tabbar/index.less'

View File

@ -10,7 +10,7 @@
*
*/
import { off } from '@opentiny/mobile-utils/deps/dom'
import { off } from '@mobile-root/utils/deps/dom'
export const setActiveItem =
({ props, state }) =>

View File

@ -11,7 +11,7 @@
*/
import { setActiveItem, onChange, getChildrens, getItems, beforeDestroy, initPage } from './index'
import { on } from '@opentiny/mobile-utils/deps/dom'
import { on } from '@mobile-root/utils/deps/dom'
export const api = ['state', 'onChange', 'getChildrens']

View File

@ -90,7 +90,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { iconRadioselected, iconRadio, iconCheck, iconCheckedSur, iconHalfselect } from '@opentiny/vue-icon'
import { tableProps } from './table'
import '@opentiny/vue-theme-mobile/table/index.less'

View File

@ -11,10 +11,10 @@
-->
<script lang="tsx">
import { renderless, api } from './renderless/vue'
import { setup, h, defineComponent } from '../../../vue-common'
import { setup, h, defineComponent } from '@mobile-root/vue-common'
import TabNav from './tab-nav/mb.vue'
import { iconPlus } from '@opentiny/vue-icon'
import { touchStart, touchMove } from '@opentiny/mobile-utils/deps/touch'
import { touchStart, touchMove } from '@mobile-root/utils/deps/touch'
import '@opentiny/vue-theme-mobile/tabs/index.less'
import type { ITabsApi } from './tabs'
import { tabsProps } from './tabs'

View File

@ -10,10 +10,10 @@
*
*/
import type { ITabNavRenderlessParams } from '../tab-nav'
import { KEY_CODE, POSITION } from '@opentiny/mobile-utils'
import { capitalize } from '@opentiny/mobile-utils/string'
import { addResizeListener, removeResizeListener } from '@opentiny/mobile-utils/deps/resize-event'
import { on, off } from '@opentiny/mobile-utils/deps/dom'
import { KEY_CODE, POSITION } from '@mobile-root/utils'
import { capitalize } from '@mobile-root/utils/string'
import { addResizeListener, removeResizeListener } from '@mobile-root/utils/deps/resize-event'
import { on, off } from '@mobile-root/utils/deps/dom'
export const computedNavStyle = (state: ITabNavRenderlessParams['state']): { transform: string; width?: string } => {
const dir = ~[POSITION.Top, POSITION.Bottom].indexOf(state.rootTabs.position) ? 'X' : 'Y'

View File

@ -21,7 +21,7 @@
<script lang="ts">
import { renderless, api } from './renderless/vue'
import { props, setup, h, defineComponent } from '../../../vue-common'
import { setup, h, defineComponent } from '@mobile-root/vue-common'
import { tagProps } from './tag'
import type { ITagApi } from '@opentiny/vue-renderless/types/tag.type'
import '@opentiny/vue-theme-mobile/tag/index.less'

View File

@ -81,7 +81,7 @@
<script lang="tsx">
import { renderless, api } from './renderless/vue'
import { setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { iconYes } from '@opentiny/vue-icon'
import { timelineProps } from './time-line'
import '@opentiny/vue-theme-mobile/steps/index.less'

View File

@ -10,7 +10,7 @@
*
*/
import { format } from '@opentiny/mobile-utils/date'
import { format } from '@mobile-root/utils/date'
import type {
ITimelineProps,
ITimelineRenderlessParams,

View File

@ -9,10 +9,11 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import type { PropType } from '../../../vue-common'
import type { PropType } from '@mobile-root/vue-common'
import type { ExtractPropTypes } from 'vue'
import type { toggleFold } from './renderless'
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'
export type { ISharedRenderlessParamHooks } from '../../../types/shared.type'
export const $constants = {

View File

@ -11,7 +11,7 @@
</template>
<script lang="ts">
import { props, setup, defineComponent } from '../../../vue-common'
import { setup, defineComponent } from '@mobile-root/vue-common'
import { renderless, api } from './renderless/vue'
import '@opentiny/vue-theme-mobile/toast/index.less'
import { IconMobileErrorWhite, IconMobileSuccessWhite } from '@opentiny/vue-icon'

View File

@ -10,7 +10,7 @@
*
*/
import { createComponent } from '../../../vue-common'
import { createComponent } from '@mobile-root/vue-common'
import Toast from './mobile.vue'
const defaults = {

View File

@ -22,7 +22,7 @@ import {
defineComponent,
isEmptyVnode,
hooks
} from '../../../vue-common'
} from '@mobile-root/vue-common'
import type { ITooltipApi, ITinyVm } from './tooltip'
import { tooltipProps } from './tooltip'

Some files were not shown because too many files have changed in this diff Show More