提交 07c9f2a3 编写于 作者: fxy060608's avatar fxy060608

feat(i18n): refactor

上级 3f6eac4a
const path = require('path')
const path = require('path')
const json = require('@rollup/plugin-json')
const alias = require('@rollup/plugin-alias')
const replace = require('@rollup/plugin-replace')
......@@ -71,7 +72,8 @@ module.exports = {
find: 'uni-helpers',
replacement: path.resolve(__dirname, '../src/core/helpers')
}]
}),
}),
json(),
replace({
__GLOBAL__: platform.prefix,
__PLATFORM_TITLE__: platform.title,
......
const path = require('path')
const path = require('path')
const json = require('@rollup/plugin-json')
const alias = require('@rollup/plugin-alias')
const replace = require('@rollup/plugin-replace')
const nodeResolve = require('@rollup/plugin-node-resolve')
......@@ -56,7 +57,8 @@ alias({
find: 'uni-api-protocol',
replacement: resolve('src/core/helpers/protocol')
}]
}),
}),
json(),
nodeResolve(),
requireContext(),
commonjs(),
......
const path = require('path')
const path = require('path')
const json = require('@rollup/plugin-json')
const alias = require('@rollup/plugin-alias')
const replace = require('@rollup/plugin-replace')
......@@ -23,7 +24,8 @@ module.exports = {
replacement: path.resolve(__dirname, '../src/core/helpers')
}
]
}),
}),
json(),
replace({
__GLOBAL__: 'getGlobalUni()',
__PLATFORM_TITLE__: 'app-plus-nvue'
......
......@@ -2272,10 +2272,6 @@ var serviceContext = (function () {
return compiled;
}
let curLocale = 'en';
let fallbackLocale = 'en';
let curMessages = {};
let messages = {};
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
const hasOwn$1 = (val, key) => hasOwnProperty$1.call(val, key);
const defaultFormatter = new BaseFormatter();
......@@ -2285,9 +2281,9 @@ var serviceContext = (function () {
function startsWith(str, parts) {
return parts.find((part) => str.indexOf(part) === 0);
}
function normalizeLocale(locale) {
function normalizeLocale(locale, messages) {
if (!locale) {
return fallbackLocale;
return;
}
locale = locale.trim().replace(/_/g, '-');
if (messages[locale]) {
......@@ -2310,31 +2306,135 @@ var serviceContext = (function () {
if (lang) {
return lang;
}
return fallbackLocale;
}
var index = {
init(options) {
if (options.fallbackLocale) {
fallbackLocale = options.fallbackLocale;
class I18n {
constructor({ locale, fallbackLocale, messages, watcher, formater, }) {
this.locale = 'en';
this.fallbackLocale = 'en';
this.message = {};
this.messages = {};
this.watchers = [];
if (fallbackLocale) {
this.fallbackLocale = fallbackLocale;
}
messages = options.messages;
this.setLocale(options.locale);
},
this.formater = formater || defaultFormatter;
this.messages = messages;
this.setLocale(locale);
if (watcher) {
this.watchLocale(watcher);
}
}
setLocale(locale) {
curLocale = normalizeLocale(locale);
curMessages = messages[curLocale];
},
const oldLocale = this.locale;
this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
this.message = this.messages[this.locale];
this.watchers.forEach((watcher) => {
watcher(this.locale, oldLocale);
});
}
getLocale() {
return curLocale;
},
return this.locale;
}
watchLocale(fn) {
const index = this.watchers.push(fn) - 1;
return () => {
this.watchers.splice(index, 1);
};
}
t(key, values) {
if (!hasOwn$1(curMessages, key)) {
if (!hasOwn$1(this.message, key)) {
console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
return key;
}
return defaultFormatter.interpolate(curMessages[key], values).join('');
},
};
return this.formater.interpolate(this.message[key], values).join('');
}
}
function initLocaleWatcher(appVm, i18n) {
appVm.$i18n &&
appVm.$i18n.vm.$watch('locale', (newLocale) => {
i18n.setLocale(newLocale);
}, {
immediate: true,
});
}
function getDefaultLocale() {
if (typeof navigator !== 'undefined') {
return navigator.userLanguage || navigator.language;
}
if (typeof plus !== 'undefined') {
// TODO 待调整为最新的获取语言代码
return plus.os.language;
}
return uni.getSystemInfoSync().language;
}
function initVueI18n(messages, fallbackLocale = 'en', locale) {
const i18n = new I18n({
locale: locale || fallbackLocale,
fallbackLocale,
messages,
});
let t = (key, values) => {
if (typeof getApp !== 'function') {
// app-plus view
/* eslint-disable no-func-assign */
t = function (key, values) {
return i18n.t(key, values);
};
}
else {
const appVm = getApp().$vm;
if (!appVm.$t || !appVm.$i18n) {
if (!locale) {
i18n.setLocale(getDefaultLocale());
}
/* eslint-disable no-func-assign */
t = function (key, values) {
return i18n.t(key, values);
};
}
else {
initLocaleWatcher(appVm, i18n);
/* eslint-disable no-func-assign */
t = function (key, values) {
const $i18n = appVm.$i18n;
const silentTranslationWarn = $i18n.silentTranslationWarn;
$i18n.silentTranslationWarn = true;
const msg = appVm.$t(key, values);
$i18n.silentTranslationWarn = silentTranslationWarn;
if (msg !== key) {
return msg;
}
return i18n.t(key, values);
};
}
}
return t(key, values);
};
return {
t(key, values) {
return t(key, values);
},
setLocale(newLocale) {
return i18n.setLocale(newLocale);
},
mixin: {
beforeCreate() {
const unwatch = i18n.watchLocale(() => {
this.$forceUpdate();
});
this.$once('hook:beforeDestroy', function () {
unwatch();
});
},
methods: {
$$t(key, values) {
return t(key, values);
},
},
},
};
}
var en = {
"uni.showActionSheet.cancel": "cancel",
......@@ -2386,7 +2486,7 @@ var serviceContext = (function () {
"uni.button.feedback.send": "發送"
};
const messages$1 = {
const messages = {
en,
es,
fr,
......@@ -2394,56 +2494,10 @@ var serviceContext = (function () {
'zh-Hant': zhHant
};
const fallbackLocale$1 = 'en';
const fallbackLocale = 'en';
function initI18n (locale, onChange) {
index.init({
locale,
fallbackLocale: fallbackLocale$1,
messages: messages$1
});
if (onChange) {
index.watchLocale((newLocale, oldLocale) => {
onChange(newLocale, oldLocale);
});
}
}
function initLocaleWatcher (appVm) {
appVm.$i18n.vm.$watch('locale', (newLocale) => {
index.setLocale(newLocale);
}, {
immediate: true
});
}
function t (key, values) {
if (__VIEW__) {
return index.t(key, values)
}
const appVm = getApp().$vm;
if (!appVm.$t) {
/* eslint-disable no-func-assign */
t = function (key, values) {
return index.t(key, values)
};
} else {
initLocaleWatcher(appVm);
/* eslint-disable no-func-assign */
t = function (key, values) {
const $i18n = appVm.$i18n;
const silentTranslationWarn = $i18n.silentTranslationWarn;
$i18n.silentTranslationWarn = true;
const msg = appVm.$t(key, values);
$i18n.silentTranslationWarn = silentTranslationWarn;
if (msg !== key) {
return msg
}
return index.t(key, values)
};
}
return t(key, values)
}
const i18n = initVueI18n( messages , fallbackLocale);
const t = i18n.t;
const showModal = {
title: {
......@@ -5820,12 +5874,12 @@ var serviceContext = (function () {
}, fail);
}
let index$1 = 0;
let index = 0;
function saveFile$1 ({
tempFilePath
} = {}, callbackId) {
const errorCallback = warpPlusErrorCallback(callbackId, 'saveFile');
const fileName = `${Date.now()}${index$1++}${getExtName(tempFilePath)}`;
const fileName = `${Date.now()}${index++}${getExtName(tempFilePath)}`;
plus.io.resolveLocalFileSystemURL(tempFilePath, entry => { // 读取临时文件 FileEntry
getSavedFileDir(dir => {
......@@ -12323,7 +12377,7 @@ var serviceContext = (function () {
// misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.
var messages$2 = {
var messages$1 = {
2: 'need dictionary', /* Z_NEED_DICT 2 */
1: 'stream end', /* Z_STREAM_END 1 */
0: '', /* Z_OK 0 */
......@@ -12458,7 +12512,7 @@ var serviceContext = (function () {
var OS_CODE = 0x03; // Unix :) . Don't detect, use this default.
function err(strm, errorCode) {
strm.msg = messages$2[errorCode];
strm.msg = messages$1[errorCode];
return errorCode;
}
......@@ -14606,7 +14660,7 @@ var serviceContext = (function () {
);
if (status !== Z_OK$1) {
throw new Error(messages$2[status]);
throw new Error(messages$1[status]);
}
if (opt.header) {
......@@ -14628,7 +14682,7 @@ var serviceContext = (function () {
status = deflate_1.deflateSetDictionary(this.strm, dict);
if (status !== Z_OK$1) {
throw new Error(messages$2[status]);
throw new Error(messages$1[status]);
}
this._dict_set = true;
......@@ -14806,7 +14860,7 @@ var serviceContext = (function () {
deflator.push(input, true);
// That will never happens, if you don't cheat with options :)
if (deflator.err) { throw deflator.msg || messages$2[deflator.err]; }
if (deflator.err) { throw deflator.msg || messages$1[deflator.err]; }
return deflator.result;
}
......@@ -17358,7 +17412,7 @@ var serviceContext = (function () {
);
if (status !== constants.Z_OK) {
throw new Error(messages$2[status]);
throw new Error(messages$1[status]);
}
this.header = new gzheader();
......@@ -17376,7 +17430,7 @@ var serviceContext = (function () {
if (opt.raw) { //In raw mode we need to set the dictionary early
status = inflate_1.inflateSetDictionary(this.strm, opt.dictionary);
if (status !== constants.Z_OK) {
throw new Error(messages$2[status]);
throw new Error(messages$1[status]);
}
}
}
......@@ -17606,7 +17660,7 @@ var serviceContext = (function () {
inflator.push(input, true);
// That will never happens, if you don't cheat with options :)
if (inflator.err) { throw inflator.msg || messages$2[inflator.err]; }
if (inflator.err) { throw inflator.msg || messages$1[inflator.err]; }
return inflator.result;
}
......@@ -20765,7 +20819,6 @@ var serviceContext = (function () {
if (process.env.NODE_ENV !== 'production') {
console.log('[uni-app] registerApp');
}
appVm.$$t = t;
appCtx = appVm;
appCtx.$vm = appVm;
......@@ -20775,9 +20828,6 @@ var serviceContext = (function () {
// merge globalData
appCtx.globalData = Object.assign(globalData, appCtx.globalData);
// TODO
initI18n(plus.os.language);
initOn(UniServiceJSBridge.on, {
getApp: getApp$1,
getCurrentPages: getCurrentPages$1
......@@ -21746,7 +21796,7 @@ var serviceContext = (function () {
UniServiceJSBridge.invokeCallbackHandler = invokeCallbackHandler;
UniServiceJSBridge.removeCallbackHandler = removeCallbackHandler;
var index$2 = {
var index$1 = {
__vuePlugin: vuePlugin,
__definePage: definePage,
__registerApp: registerApp,
......@@ -21756,7 +21806,7 @@ var serviceContext = (function () {
getCurrentPages: getCurrentPages$1
};
return index$2;
return index$1;
}());
......
import en from './en.json'
import es from './es.json'
import fr from './fr.json'
import zhHans from './zh-Hans.json'
import zhHant from './zh-Hant.json'
export default {
en,
es,
fr,
'zh-Hans': zhHans,
'zh-Hant': zhHant
}
......@@ -12,28 +12,10 @@
</template>
<script>
import defaultMessage from './i18n/zh-Hans.json'
function createTranslate (defaultMessage) {
let t = (key, values) => {
const appVm = getApp().$vm
if (appVm && appVm.$t) {
t = (key, values) => {
const msg = appVm.$t(key, values)
if (msg !== key) {
return msg
}
return defaultMessage[key]
}
} else {
t = (key, values) => {
return defaultMessage[key]
}
}
return t(key, values)
}
return t
}
const t = createTranslate(defaultMessage)
import { initVueI18n } from '@dcloudio/uni-i18n'
import messages from './i18n/index'
const { t } = initVueI18n(messages)
const events = {
load: 'load',
......
......@@ -907,11 +907,6 @@ const protocols = { // 需要做转换的 API 列表
text: 'data'
}
},
pageScrollTo: {
args: {
duration: false
}
},
login: {
name: 'getAuthCode',
returnValue (result) {
......@@ -1011,6 +1006,7 @@ const protocols = { // 需要做转换的 API 列表
result.userName = info.fullname;
result.provinceName = info.prov;
result.cityName = info.city;
result.countyName = info.area;
result.detailInfo = info.address;
result.telNumber = info.mobilePhone;
result.errMsg = result.resultStatus;
......
import i18n from '@dcloudio/uni-i18n'
import {
initVueI18n
} from '@dcloudio/uni-i18n'
import en from './en.json'
import es from './es.json'
......@@ -16,51 +18,7 @@ const messages = {
const fallbackLocale = 'en'
export function initI18n (locale, onChange) {
i18n.init({
locale,
fallbackLocale,
messages
})
if (onChange) {
i18n.watchLocale((newLocale, oldLocale) => {
onChange(newLocale, oldLocale)
})
}
}
function initLocaleWatcher (appVm) {
appVm.$i18n.vm.$watch('locale', (newLocale) => {
i18n.setLocale(newLocale)
}, {
immediate: true
})
}
export function t (key, values) {
if (__VIEW__) {
return i18n.t(key, values)
}
const appVm = getApp().$vm
if (!appVm.$t) {
/* eslint-disable no-func-assign */
t = function (key, values) {
return i18n.t(key, values)
}
} else {
initLocaleWatcher(appVm)
/* eslint-disable no-func-assign */
t = function (key, values) {
const $i18n = appVm.$i18n
const silentTranslationWarn = $i18n.silentTranslationWarn
$i18n.silentTranslationWarn = true
const msg = appVm.$t(key, values)
$i18n.silentTranslationWarn = silentTranslationWarn
if (msg !== key) {
return msg
}
return i18n.t(key, values)
}
}
return t(key, values)
}
const i18n = initVueI18n(__PLATFORM__ === 'app-plus' || __PLATFORM__ === 'h5' ? messages : {}, fallbackLocale)
export const t = i18n.t
export const i18nMixin = i18n.mixin
export const setLocale = i18n.setLocale
import {
t,
initI18n
} from 'uni-core/helpers/i18n'
import initRouterGuard from './router-guard'
let appVm = false
......@@ -69,13 +64,10 @@ export function getCurrentPages (isAll = false, ignoreError = false) {
}
export default function createApp (vm, routes) {
appVm = vm
appVm = vm
appVm.$vm = vm
appVm.$$t = t
appVm.globalData = appVm.$options.globalData || {}
// h5
initI18n(navigator.userLanguage || navigator.language)
// initEvents(appVm)
initRouterGuard(appVm, routes)
}
import i18n from '@dcloudio/uni-i18n'
import {
t
} from 'uni-core/helpers/i18n'
export default {
beforeCreate () {
const unwatch = i18n.watchLocale(() => {
this.$forceUpdate()
})
this.$once('hook:beforeDestroy', function () {
unwatch()
})
},
methods: {
$$t (key, values) {
return t(key, values)
}
}
}
import {
t,
initI18n
} from 'uni-core/helpers/i18n'
import {
callAppHook
} from 'uni-core/service/plugins/util'
......@@ -210,7 +206,6 @@ export function registerApp (appVm) {
if (process.env.NODE_ENV !== 'production') {
console.log('[uni-app] registerApp')
}
appVm.$$t = t
appCtx = appVm
appCtx.$vm = appVm
......@@ -220,9 +215,6 @@ export function registerApp (appVm) {
// merge globalData
appCtx.globalData = Object.assign(globalData, appCtx.globalData)
// TODO
initI18n(plus.os.language)
initOn(UniServiceJSBridge.on, {
getApp,
getCurrentPages
......
......@@ -3,7 +3,7 @@ import {
} from 'uni-shared'
import {
initI18n
setLocale
} from 'uni-core/helpers/i18n'
import {
......@@ -57,7 +57,7 @@ function onPageCreate ({
onPageReachBottom,
onReachBottomDistance
}, pageId) {
initI18n(locale)
setLocale(locale)
onCssVar({
statusbarHeight,
......
<template>
<uni-actionsheet @touchmove.prevent>
<transition name="uni-fade">
<div
v-show="visible"
class="uni-mask uni-actionsheet__mask"
@click="_close(-1)"
<div
v-show="visible"
class="uni-mask uni-actionsheet__mask"
@click="_close(-1)"
/>
</transition>
<div
:class="{ 'uni-actionsheet_toggle': visible }"
:style="popupStyle.content"
class="uni-actionsheet"
<div
:class="{ 'uni-actionsheet_toggle': visible }"
:style="popupStyle.content"
class="uni-actionsheet"
>
<div
ref="main"
class="uni-actionsheet__menu"
@wheel="_handleWheel"
<div
ref="main"
class="uni-actionsheet__menu"
@wheel="_handleWheel"
>
<!-- title占位 -->
<div
v-if="title"
class="uni-actionsheet__cell"
:style="{height:`${titleHeight}px`}"
<div
v-if="title"
class="uni-actionsheet__cell"
:style="{height:`${titleHeight}px`}"
/>
<div
v-if="title"
class="uni-actionsheet__title"
<div
v-if="title"
class="uni-actionsheet__title"
>
{{ title }}
</div>
<div
:style="{maxHeight:`${HEIGHT}px`,overflow:'hidden'}"
>
<div
ref="content"
>
<div
v-for="(itemTitle, index) in itemList"
:key="index"
:style="{ color: itemColor }"
<div :style="{maxHeight:`${HEIGHT}px`,overflow:'hidden'}">
<div ref="content">
<div
v-for="(itemTitle, index) in itemList"
:key="index"
:style="{ color: itemColor }"
class="uni-actionsheet__cell"
@click="_close(index)"
@click="_close(index)"
>
{{ itemTitle }}
</div>
......@@ -48,26 +44,28 @@
</div>
</div>
<div class="uni-actionsheet__action">
<div
:style="{ color: itemColor }"
class="uni-actionsheet__cell"
@click="_close(-1)"
<div
:style="{ color: itemColor }"
class="uni-actionsheet__cell"
@click="_close(-1)"
>
{{ $$t('uni.showActionSheet.cancel') }}
</div>
</div>
<div :style="popupStyle.triangle" />
</div>
<keypress
:disable="!visible"
@esc="_close(-1)"
<keypress
:disable="!visible"
@esc="_close(-1)"
/>
</uni-actionsheet>
</template>
<script>
import popup from './mixins/popup'
import keypress from '../../../helpers/keypress'
import i18n from 'uni-mixins/i18n'
import keypress from '../../../helpers/keypress'
import {
i18nMixin
} from 'uni-core/helpers/i18n'
import touchtrack from 'uni-mixins/touchtrack'
import scroller from 'uni-mixins/scroller/index'
import {
......@@ -110,8 +108,10 @@ function initClick (dom) {
export default {
name: 'ActionSheet',
components: { keypress },
mixins: [i18n, popup, touchtrack, scroller],
components: {
keypress
},
mixins: [i18nMixin, popup, touchtrack, scroller],
props: {
title: {
type: String,
......@@ -150,7 +150,9 @@ export default {
if (newValue) {
this.$nextTick(() => {
// title 占位
if (this.title) { this.titleHeight = document.querySelector('.uni-actionsheet__title').offsetHeight }
if (this.title) {
this.titleHeight = document.querySelector('.uni-actionsheet__title').offsetHeight
}
// 滚动条更新
this._scroller.update()
// 获取contentHeight 滚动时使用
......@@ -222,54 +224,54 @@ export default {
}
</script>
<style>
uni-actionsheet {
display: block;
box-sizing: border-box;
}
uni-actionsheet {
display: block;
box-sizing: border-box;
}
uni-actionsheet .uni-actionsheet {
position: fixed;
left: 6px;
right: 6px;
bottom: 6px;
transform: translate(0, 100%);
backface-visibility: hidden;
z-index: 999;
visibility: hidden;
transition: transform 0.3s, visibility 0.3s;
}
uni-actionsheet .uni-actionsheet {
position: fixed;
left: 6px;
right: 6px;
bottom: 6px;
transform: translate(0, 100%);
backface-visibility: hidden;
z-index: 999;
visibility: hidden;
transition: transform 0.3s, visibility 0.3s;
}
uni-actionsheet .uni-actionsheet.uni-actionsheet_toggle {
visibility: visible;
transform: translate(0, 0);
}
uni-actionsheet .uni-actionsheet.uni-actionsheet_toggle {
visibility: visible;
transform: translate(0, 0);
}
uni-actionsheet .uni-actionsheet * {
box-sizing: border-box;
}
uni-actionsheet .uni-actionsheet * {
box-sizing: border-box;
}
uni-actionsheet .uni-actionsheet__menu,
uni-actionsheet .uni-actionsheet__action {
border-radius: 5px;
background-color: #fcfcfd;
}
uni-actionsheet .uni-actionsheet__menu,
uni-actionsheet .uni-actionsheet__action {
border-radius: 5px;
background-color: #fcfcfd;
}
uni-actionsheet .uni-actionsheet__action {
margin-top: 6px;
}
uni-actionsheet .uni-actionsheet__action {
margin-top: 6px;
}
uni-actionsheet .uni-actionsheet__cell,
uni-actionsheet .uni-actionsheet__title {
position: relative;
padding: 10px 6px;
text-align: center;
font-size: 18px;
text-overflow: ellipsis;
overflow: hidden;
cursor: pointer;
}
uni-actionsheet .uni-actionsheet__cell,
uni-actionsheet .uni-actionsheet__title {
position: relative;
padding: 10px 6px;
text-align: center;
font-size: 18px;
text-overflow: ellipsis;
overflow: hidden;
cursor: pointer;
}
uni-actionsheet .uni-actionsheet__title{
uni-actionsheet .uni-actionsheet__title {
position: absolute;
top: 0;
right: 0;
......@@ -278,52 +280,56 @@ uni-actionsheet .uni-actionsheet__title{
background-color: #fff;
border-radius: 5px 5px 0 0;
border-bottom: 1px solid #e5e5e5;
}
uni-actionsheet .uni-actionsheet__cell:before {
content: " ";
position: absolute;
left: 0;
top: 0;
right: 0;
height: 1px;
border-top: 1px solid #e5e5e5;
color: #e5e5e5;
transform-origin: 0 0;
transform: scaleY(0.5);
}
uni-actionsheet .uni-actionsheet__cell:active {
background-color: #ececec;
}
uni-actionsheet .uni-actionsheet__cell:first-child:before {
display: none;
}
@media screen and (min-width: 500px) and (min-height: 500px) {
.uni-mask.uni-actionsheet__mask {
background: none;
}
uni-actionsheet .uni-actionsheet {
width: 300px;
left: 50%;
right: auto;
top: 50%;
bottom: auto;
transform: translate(-50%, -50%);
opacity: 0;
transition: opacity 0.3s, visibility 0.3s;
}
uni-actionsheet .uni-actionsheet.uni-actionsheet_toggle {
opacity: 1;
transform: translate(-50%, -50%);
uni-actionsheet .uni-actionsheet__cell:before {
content: " ";
position: absolute;
left: 0;
top: 0;
right: 0;
height: 1px;
border-top: 1px solid #e5e5e5;
color: #e5e5e5;
transform-origin: 0 0;
transform: scaleY(0.5);
}
uni-actionsheet .uni-actionsheet__menu {
box-shadow: 0px 0 20px 5px rgba(0, 0, 0, 0.3);
uni-actionsheet .uni-actionsheet__cell:active {
background-color: #ececec;
}
uni-actionsheet .uni-actionsheet__action {
uni-actionsheet .uni-actionsheet__cell:first-child:before {
display: none;
}
}
</style>
@media screen and (min-width: 500px) and (min-height: 500px) {
.uni-mask.uni-actionsheet__mask {
background: none;
}
uni-actionsheet .uni-actionsheet {
width: 300px;
left: 50%;
right: auto;
top: 50%;
bottom: auto;
transform: translate(-50%, -50%);
opacity: 0;
transition: opacity 0.3s, visibility 0.3s;
}
uni-actionsheet .uni-actionsheet.uni-actionsheet_toggle {
opacity: 1;
transform: translate(-50%, -50%);
}
uni-actionsheet .uni-actionsheet__menu {
box-shadow: 0px 0 20px 5px rgba(0, 0, 0, 0.3);
}
uni-actionsheet .uni-actionsheet__action {
display: none;
}
}
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册