mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-08-14 11:00:16 +08:00
refactor: use toRef instead of watching a function, mute rollup for mixed use of default/named export
This commit is contained in:
@ -31,11 +31,13 @@ const options = [
|
||||
{
|
||||
file: "dist/index.cjs.js",
|
||||
format: "cjs",
|
||||
exports: "named",
|
||||
sourcemap: true
|
||||
},
|
||||
{
|
||||
file: "dist/index.cjs.min.js",
|
||||
format: "cjs",
|
||||
exports: "named",
|
||||
sourcemap: true,
|
||||
plugins: [
|
||||
terser({
|
||||
|
@ -79,8 +79,9 @@ export default defineComponent({
|
||||
);
|
||||
|
||||
const { autoresize, manualUpdate, loading } = toRefs(props);
|
||||
const theme = toRef(props, "theme");
|
||||
const initOptions = toRef(props, "initOptions");
|
||||
const loadingOptions = toRef(props, "loadingOptions");
|
||||
const a = toRef(props, "autoresize");
|
||||
|
||||
function init(option?: Option) {
|
||||
if (chart.value || !root.value) {
|
||||
@ -170,7 +171,7 @@ export default defineComponent({
|
||||
);
|
||||
|
||||
watch(
|
||||
[() => props.theme, () => props.initOptions],
|
||||
[theme, initOptions],
|
||||
() => {
|
||||
cleanup();
|
||||
init();
|
||||
|
Reference in New Issue
Block a user